ATLAS Offline Software
Loading...
Searching...
No Matches
InDet::InDetTrtDriftCircleCutTool Class Reference

#include <InDetTrtDriftCircleCutTool.h>

Inheritance diagram for InDet::InDetTrtDriftCircleCutTool:
Collaboration diagram for InDet::InDetTrtDriftCircleCutTool:

Public Member Functions

virtual StatusCode initialize () override
 InDetTrtDriftCircleCutTool (const std::string &t, const std::string &n, const IInterface *p)
virtual ~InDetTrtDriftCircleCutTool ()
virtual int minNumberDCs (const Trk::TrackParameters *) const override
 Minimum number of drift circles using the track scoring tool.
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Static Public Member Functions

static const InterfaceID & interfaceID ()

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

SG::ReadCondHandleKey< TRTCond::ActiveFractionm_strawReadKey {this,"ActiveReadKey","ActiveFraction","ActiveFraction in-key"}
IntegerProperty m_minOffset {this, "MinOffsetDCs", 0, "Minimum number of TRT drit circles required"}
 Properties for track selection:all cuts are ANDed.
BooleanProperty m_param
BooleanProperty m_useTRT
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 24 of file InDetTrtDriftCircleCutTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ InDetTrtDriftCircleCutTool()

InDet::InDetTrtDriftCircleCutTool::InDetTrtDriftCircleCutTool ( const std::string & t,
const std::string & n,
const IInterface * p )

Definition at line 16 of file InDetTrtDriftCircleCutTool.cxx.

17 :AthAlgTool(t,n,p)
18{
19 declareInterface<ITrtDriftCircleCutTool>(this);
20}
AthAlgTool()
Default constructor:

◆ ~InDetTrtDriftCircleCutTool()

InDet::InDetTrtDriftCircleCutTool::~InDetTrtDriftCircleCutTool ( )
virtualdefault

Member Function Documentation

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ initialize()

StatusCode InDet::InDetTrtDriftCircleCutTool::initialize ( )
overridevirtual

Definition at line 8 of file InDetTrtDriftCircleCutTool.cxx.

9{
10 // Read key
11 ATH_CHECK( m_strawReadKey.initialize() );
12
13 return StatusCode::SUCCESS;
14}
#define ATH_CHECK
Evaluate an expression and check for errors.
SG::ReadCondHandleKey< TRTCond::ActiveFraction > m_strawReadKey

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ interfaceID()

const InterfaceID & InDet::ITrtDriftCircleCutTool::interfaceID ( )
inlinestaticinherited

Definition at line 29 of file ITrtDriftCircleCutTool.h.

30 {
31 return IID_ITrtDriftCircleCutTool;
32 }

◆ minNumberDCs()

int InDet::InDetTrtDriftCircleCutTool::minNumberDCs ( const Trk::TrackParameters * trkp) const
overridevirtual

Minimum number of drift circles using the track scoring tool.

Implements InDet::ITrtDriftCircleCutTool.

Definition at line 25 of file InDetTrtDriftCircleCutTool.cxx.

25 {
26 if(!m_param){
27 const double TrtEtaBin[6] = {0., 0.65, 0.85, 1.25, 1.80, 2.10};
28 const double TrtA [5] = { 29., 31., 20., 36., 34. };
29 const double TrtB [5] = { 2./0.65, -11./0.20, 16./0.40, -2./0.55, -24./0.3};
30
31 double eta= fabs(trkp->momentum().eta());
32
33 for(int i=0; i!=5; ++i) {
34 if(eta <= TrtEtaBin[i+1]) {
35 return int(TrtA[i]+TrtB[i]*(eta-TrtEtaBin[i])-m_minOffset);
36 }
37 }
38 return int(m_minOffset);
39 } else {
40 const double TrtEtaBin[7] = {0., 0.1, 0.6255, 1.07, 1.304, 1.752, 2.0 };
41 const double TrtA [6] = { 33.28, 30.40, 182.38, -226.18, -351.56, -250.2 };
42 const double TrtB [6] = { -79.4, 18.79, -371.9, 495.12, 777.5, 377.9 };
43 const double TrtC [6] = { 589.7, -42.73, 213.3, -314.96 , -512.3, -128.7 };
44 const double TrtD [6] = { 0., 32.53, 0. , 69.42 , 111.0, 3.4 };
45 const double TrtO [6] = { 9., 11., 10., 7., 9., 12. };
46
47 double eta = fabs(trkp->momentum().eta());
48
49 SG::ReadCondHandle<TRTCond::ActiveFraction> strawReadHandle{m_strawReadKey};
50 const TRTCond::ActiveFraction* actF{*strawReadHandle};
51
52 for(int i=0; i!=6; ++i) {
53 if(eta <= TrtEtaBin[i+1]) {
54 double diff = eta;
55 double nDiffTRT = TrtA[i]+TrtB[i]*diff+TrtC[i]*diff*diff+TrtD[i]*diff*diff*diff-TrtO[i];
56 double activeF = 1.;
57 float phi = trkp->momentum().phi();
58 float eta = trkp->momentum().eta();
59 if(m_useTRT) activeF = actF->getActiveFraction(eta,phi);
60 nDiffTRT = nDiffTRT*activeF;
61 if (nDiffTRT>=1) return int(nDiffTRT);
62 else return int(m_minOffset);
63 }
64 }
65 return int(m_minOffset);
66 }
67}
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
void diff(const Jet &rJet1, const Jet &rJet2, std::map< std::string, double > varDiff)
Difference between jets - Non-Class function required by trigger.
Definition Jet.cxx:631
IntegerProperty m_minOffset
Properties for track selection:all cuts are ANDed.
float getActiveFraction(float eta, float phi) const
const Amg::Vector3D & momentum() const
Access method for the momentum.

◆ msg()

MsgStream & AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and DerivationFramework::CfAthAlgTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_minOffset

IntegerProperty InDet::InDetTrtDriftCircleCutTool::m_minOffset {this, "MinOffsetDCs", 0, "Minimum number of TRT drit circles required"}
private

Properties for track selection:all cuts are ANDed.

Definition at line 43 of file InDetTrtDriftCircleCutTool.h.

44{this, "MinOffsetDCs", 0, "Minimum number of TRT drit circles required"};

◆ m_param

BooleanProperty InDet::InDetTrtDriftCircleCutTool::m_param
private
Initial value:
{this, "UseNewParameterization", false,
"Use the new or the old parameterization"}

Definition at line 45 of file InDetTrtDriftCircleCutTool.h.

46 {this, "UseNewParameterization", false,
47 "Use the new or the old parameterization"};

◆ m_strawReadKey

SG::ReadCondHandleKey<TRTCond::ActiveFraction> InDet::InDetTrtDriftCircleCutTool::m_strawReadKey {this,"ActiveReadKey","ActiveFraction","ActiveFraction in-key"}
private

Definition at line 40 of file InDetTrtDriftCircleCutTool.h.

41{this,"ActiveReadKey","ActiveFraction","ActiveFraction in-key"};

◆ m_useTRT

BooleanProperty InDet::InDetTrtDriftCircleCutTool::m_useTRT
private
Initial value:
{this, "UseActiveFractionSvc", true,
"Use the TRT active fraction services to correct for dead straws"}

Definition at line 48 of file InDetTrtDriftCircleCutTool.h.

49 {this, "UseActiveFractionSvc", true,
50 "Use the TRT active fraction services to correct for dead straws"};

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files: