ATLAS Offline Software
Loading...
Searching...
No Matches
IDTPM2::TMatchingTool< T, R > Class Template Reference

#include <TrackViewMatchingTool.h>

Inheritance diagram for IDTPM2::TMatchingTool< T, R >:
Collaboration diagram for IDTPM2::TMatchingTool< T, R >:

Public Member Functions

 TMatchingTool (const std::string &type, const std::string &name, const IInterface *parent)
 in a different merge request, so can uncomment later, once it is in the release to avoid a conflict
virtual ~TMatchingTool ()=default
virtual StatusCode initialize () override
std::unique_ptr< TIDA::Associator< T, R > > clone () const
 Return a fresh clone of the template matcher.
std::unique_ptr< TIDA::Associator< T, R > > uclone () const
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

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.

Protected Attributes

Gaudi::Property< std::string > m_matcherType
ConfiguredValueProperty< float > m_dr { this, "DeltaR", {}, "Primary distance parameter" }
 NB: not all these parameters need to be set, only the appropriate ones for the requested matcher.
ConfiguredValueProperty< float > m_deta { this, "DeltaEta", {}, "Delta eta parameter" }
ConfiguredValueProperty< float > m_dphi { this, "DeltaPhi", {}, "Delta phi parameter" }
ConfiguredValueProperty< float > m_dzed { this, "DeltaZed", {}, "Delta zed parameter" }
ConfiguredValueProperty< float > m_dpt { this, "DeltaPt", {}, "Delta pt parameter" }
ConfiguredValueProperty< float > m_dsigma { this, "DeltaSigma", {}, "Delta sigma parameter" }
ConfiguredValueProperty< float > m_prob { this, "Prob", {}, "Match probability" }
std::unique_ptr< TIDA::Associator< T, R > > m_matcher

Private Types

typedef ServiceHandle< StoreGateSvc > StoreGateSvc_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

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

template<typename T, typename R = T>
class IDTPM2::TMatchingTool< T, R >

Definition at line 32 of file TrackViewMatchingTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 376 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ TMatchingTool()

template<typename T, typename R>
IDTPM2::TMatchingTool< T, R >::TMatchingTool ( const std::string & type,
const std::string & name,
const IInterface * parent )

in a different merge request, so can uncomment later, once it is in the release to avoid a conflict

Definition at line 19 of file TrackViewMatchingTool.cxx.

23{ }
AthAlgTool()
Default constructor:

◆ ~TMatchingTool()

template<typename T, typename R = T>
virtual IDTPM2::TMatchingTool< T, R >::~TMatchingTool ( )
virtualdefault

Member Function Documentation

◆ clone()

template<typename T, typename R>
std::unique_ptr< TIDA::Associator< T, R > > IDTPM2::TMatchingTool< T, R >::clone ( ) const

Return a fresh clone of the template matcher.

Caller owns the returned object. Thread-safe, const.

Definition at line 54 of file TrackViewMatchingTool.cxx.

54{ return m_matcher->uclone(); }
std::unique_ptr< TIDA::Associator< T, R > > m_matcher

◆ 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()

template<typename T, typename R>
StatusCode IDTPM2::TMatchingTool< T, R >::initialize ( )
overridevirtual

Definition at line 27 of file TrackViewMatchingTool.cxx.

27 {
28
29 // MY_MSG_DEBUG << "TMatchingTool: type=" << m_matcherType << endmsg;
30
31 if ( m_matcherType == "DeltaR" ) m_matcher = std::make_unique<TDeltaRMatcher<T,R>>( "DeltaRMatcher", require_set(m_dr) );
32 else if ( m_matcherType == "DeltaPhi" ) m_matcher = std::make_unique<TDeltaPhiMatcher<T,R>>( "DeltaPhiMatcher", require_set(m_dphi) );
33 else if ( m_matcherType == "Sigma" ) m_matcher = std::make_unique<TSigmaMatcher<T,R>>( "SigmaMatcher", require_set(m_dsigma) );
34 else if ( m_matcherType == "SecondBestpT" ) m_matcher = std::make_unique<TSecondBestpTMatcher<T,R>>( "SecondBestpTMatcher", require_set(m_dpt) );
35 else if ( m_matcherType == "OfflineTruth" ) m_matcher = std::make_unique<TOfflineTruthMatcher<T,R>>( "OfflineTruthMatcher", require_set(m_prob) );
37 else if ( m_matcherType == "DeltaRZSinTheta" ) m_matcher = std::make_unique<TDeltaRZSinThetaMatcher<T,R>>( "DeltaRZSinThetaMatcher", require_set(m_deta), require_set(m_dphi), require_set(m_dzed) );
38 else if ( m_matcherType == "Default" ) {
39 float dr = 0.01;
40 if ( m_dr.isset() ) dr = m_dr;
42 }
43 else {
44 // MY_MSG_FATAL << "Unknown matcher type: " << m_matcherType << endmsg;
46 }
47
49}
const T & require_set(const T &t)
ConfiguredValueProperty< float > m_dpt
ConfiguredValueProperty< float > m_dzed
Gaudi::Property< std::string > m_matcherType
ConfiguredValueProperty< float > m_prob
ConfiguredValueProperty< float > m_dr
NB: not all these parameters need to be set, only the appropriate ones for the requested matcher.
ConfiguredValueProperty< float > m_deta
ConfiguredValueProperty< float > m_dsigma
ConfiguredValueProperty< float > m_dphi

◆ 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.

◆ 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 368 of file AthCommonDataStore.h.

369 {
370 h.renounce();
372 }
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 352 of file AthCommonDataStore.h.

352 {
354 }

◆ 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 >, and AthCheckedComponent<::AthAlgTool >.

◆ 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.

◆ uclone()

template<typename T, typename R>
std::unique_ptr< TIDA::Associator< T, R > > IDTPM2::TMatchingTool< T, R >::uclone ( ) const

Definition at line 58 of file TrackViewMatchingTool.cxx.

58{ return m_matcher->uclone(); }

◆ updateVHKA()

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

Definition at line 298 of file AthCommonDataStore.h.

298 {
299 for (auto &a : m_vhka) {
301 for (auto k : keys) {
302 k->setOwner(this);
303 }
304 }
305 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_deta

template<typename T, typename R = T>
ConfiguredValueProperty<float> IDTPM2::TMatchingTool< T, R >::m_deta { this, "DeltaEta", {}, "Delta eta parameter" }
protected

Definition at line 58 of file TrackViewMatchingTool.h.

58{ this, "DeltaEta", {}, "Delta eta parameter" };

◆ m_detStore

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

Pointer to StoreGate (detector store by default).

Definition at line 381 of file AthCommonDataStore.h.

◆ m_dphi

template<typename T, typename R = T>
ConfiguredValueProperty<float> IDTPM2::TMatchingTool< T, R >::m_dphi { this, "DeltaPhi", {}, "Delta phi parameter" }
protected

Definition at line 59 of file TrackViewMatchingTool.h.

59{ this, "DeltaPhi", {}, "Delta phi parameter" };

◆ m_dpt

template<typename T, typename R = T>
ConfiguredValueProperty<float> IDTPM2::TMatchingTool< T, R >::m_dpt { this, "DeltaPt", {}, "Delta pt parameter" }
protected

Definition at line 61 of file TrackViewMatchingTool.h.

61{ this, "DeltaPt", {}, "Delta pt parameter" };

◆ m_dr

template<typename T, typename R = T>
ConfiguredValueProperty<float> IDTPM2::TMatchingTool< T, R >::m_dr { this, "DeltaR", {}, "Primary distance parameter" }
protected

NB: not all these parameters need to be set, only the appropriate ones for the requested matcher.

Definition at line 57 of file TrackViewMatchingTool.h.

57{ this, "DeltaR", {}, "Primary distance parameter" };

◆ m_dsigma

template<typename T, typename R = T>
ConfiguredValueProperty<float> IDTPM2::TMatchingTool< T, R >::m_dsigma { this, "DeltaSigma", {}, "Delta sigma parameter" }
protected

Definition at line 62 of file TrackViewMatchingTool.h.

62{ this, "DeltaSigma", {}, "Delta sigma parameter" };

◆ m_dzed

template<typename T, typename R = T>
ConfiguredValueProperty<float> IDTPM2::TMatchingTool< T, R >::m_dzed { this, "DeltaZed", {}, "Delta zed parameter" }
protected

Definition at line 60 of file TrackViewMatchingTool.h.

60{ this, "DeltaZed", {}, "Delta zed parameter" };

◆ m_evtStore

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

Pointer to StoreGate (event store by default).

Definition at line 378 of file AthCommonDataStore.h.

◆ m_matcher

template<typename T, typename R = T>
std::unique_ptr<TIDA::Associator<T,R> > IDTPM2::TMatchingTool< T, R >::m_matcher
protected

Definition at line 65 of file TrackViewMatchingTool.h.

◆ m_matcherType

template<typename T, typename R = T>
Gaudi::Property<std::string> IDTPM2::TMatchingTool< T, R >::m_matcherType
protected
Initial value:
{ this, "MatcherType", "Default",
"Matcher algorithm: DeltaR, DeltaPhi, DeltaRZ, DeltaRZSinTheta, Sigma, SecondBestpT, Default" }

Definition at line 52 of file TrackViewMatchingTool.h.

52 { this, "MatcherType", "Default",
53 "Matcher algorithm: DeltaR, DeltaPhi, DeltaRZ, DeltaRZSinTheta, Sigma, SecondBestpT, Default" };

◆ m_prob

template<typename T, typename R = T>
ConfiguredValueProperty<float> IDTPM2::TMatchingTool< T, R >::m_prob { this, "Prob", {}, "Match probability" }
protected

Definition at line 63 of file TrackViewMatchingTool.h.

63{ this, "Prob", {}, "Match probability" };

◆ m_varHandleArraysDeclared

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

Definition at line 387 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 386 of file AthCommonDataStore.h.


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