ATLAS Offline Software
Loading...
Searching...
No Matches
TrackParticleClusterAssociationAlg Class Reference

Associate clusters to each track based on its extrapolation to the calo. More...

#include <TrackParticleClusterAssociationAlg.h>

Inheritance diagram for TrackParticleClusterAssociationAlg:
Collaboration diagram for TrackParticleClusterAssociationAlg:

Public Member Functions

virtual StatusCode initialize () override
virtual StatusCode execute (const EventContext &ctx) const override
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
virtual bool filterPassed (const EventContext &ctx) const
virtual void setFilterPassed (bool state, const EventContext &ctx) 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 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.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

std::vector< const xAOD::CaloCluster * > associatedClusters (const Trk::CaloExtension &caloExtensions, const xAOD::CaloClusterContainer &allClusters, const EventContext &ctx) const
 returns the clusters from allClusters which are close enough to caloExtensions
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

Gaudi::Property< float > m_dr {this, "DeltaR", 0.1, "max deltaR to match track and cluster" }
Gaudi::Property< bool > m_useCovariance {this, "UseCovariance", true, "use covariance from TrkParameters to evaluate angular uncertainties"}
Gaudi::Property< double > m_ptCut {this, "PtCut", 25000., ""}
SG::ReadHandleKey< CaloExtensionCollectionm_caloExtKey {this, "CaloExtensionName", "", ""}
SG::ReadHandleKey< xAOD::TrackParticleContainerm_trackParticleCollectionHandle {this,"TrackParticleContainerName", "InDetTrackParticles", "input tracks" }
SG::ReadHandleKey< xAOD::CaloClusterContainerm_caloClusters {this, "CaloClusterLocation", "CaloCalTopoClusters","input calo clusters"}
SG::ReadDecorHandleKey< xAOD::CaloClusterContainerm_detectorEtaDecor { this, "DetectorEtaName", m_caloClusters, "", "Decoration for CaloCluster DetectorEta" }
bool m_doDetEta = false
SG::ReadHandleKey< xAOD::VertexContainerm_vertexContHandle {this, "VertexContainerName", "", "if empty all tracks will be decorated. if not only those corresponding to the PV[0] will."}
ToolHandle< CP::ITrackVertexAssociationToolm_trackvertexassoTool {this, "TrackVertexAssoTool", "" }
SG::WriteDecorHandleKey< xAOD::TrackParticleContainerm_assocClustersDecor {this, "AssociatedClusterDecorKey", m_trackParticleCollectionHandle, "", "Decoration key to store associated clusters. IMPORTANT must be consistent with TrackParticleContainer" }
SG::WriteDecorHandleKey< xAOD::TrackParticleContainerm_caloEntryParsDecor {this, "CaloEntryParsDecorKey", m_trackParticleCollectionHandle, "", "Decoration name to store trk parameters to calo entry (if non blank). IMPORTANT : must be consistent with TrackParticleContainer" }
SG::WriteDecorHandleKey< xAOD::CaloClusterContainerm_sigmaWidthKey { this, "SigmaWidthKey", m_caloClusters, "sigmaWidth", "sigmaWidth decoration" }
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
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

Associate clusters to each track based on its extrapolation to the calo.

This alg reads in a CaloExtensionCollection corresponding to a TrackParticleContainer. It then decorates each TrackParticleContainer with a vector<EL<CaloCluster>> containing the clusters close enough (DeltaR property) w.r.t CaloExtension corresponding to the track. Optionnaly tracks are also decorated with a const Trk::TrackParameters* obtain from caloExtension->caloEntryLayerIntersection().

Note: In earlier versions this alg was creating 2 maps a xAODAssociations/TrackParticleClusterAssociationContainer and a Rec::ParticleClusterAssociation and was using ParticleCaloClusterAssociationTool to retrieve the extrapolation and perform the clusters association. All of this was suppress or replaced in order to simplify the procedure.

Definition at line 38 of file TrackParticleClusterAssociationAlg.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Member Function Documentation

◆ associatedClusters()

std::vector< const xAOD::CaloCluster * > TrackParticleClusterAssociationAlg::associatedClusters ( const Trk::CaloExtension & caloExtensions,
const xAOD::CaloClusterContainer & allClusters,
const EventContext & ctx ) const
private

returns the clusters from allClusters which are close enough to caloExtensions

Definition at line 137 of file TrackParticleClusterAssociationAlg.cxx.

139{
140 std::vector<const xAOD::CaloCluster* > clusters;
141
142 const Trk::TrackParameters* pars = caloExtension.caloEntryLayerIntersection();
143 if(!pars) {
144 ATH_MSG_WARNING( " NO TrackParameters caloExtension.caloEntryLayerIntersection() ");
145 return clusters;
146 }
147
148 float eta = pars->position().eta();
149 float phi = pars->position().phi();
150
151 double uncertEta = 0.;
152 double uncertPhi = 0.;
153 if(pars->covariance()) {
154 uncertEta = -2.*sin(pars->position().theta()) / (cos(2.*pars->position().theta())-1.) * sqrt((*pars->covariance())(Trk::theta,Trk::theta));
155 uncertPhi = sqrt((*pars->covariance())(Trk::phi,Trk::phi));
156 }
157 double uncertExtrp = uncertEta*uncertEta + uncertPhi*uncertPhi;
158
159 float dr2Cut0 = m_dr*m_dr;
160 // to access the pre-calculated width :
161 static const SG::AuxElement::ConstAccessor<float> sig_acc("sigmaWidth");
162
163 for(const xAOD::CaloCluster * cl : allClusters){
164
165 float dPhi = P4Helpers::deltaPhi( cl->phi(), phi);
166
167 float cl_eta {99};
168 if (m_doDetEta)
169 {
170 SG::ReadDecorHandle<xAOD::CaloClusterContainer, float> detEta(m_detectorEtaDecor, ctx);
171 cl_eta = detEta(*cl);
172 }
173 else
174 cl_eta = cl->eta();
175
176 float dEta = cl_eta - eta;
177 float dr2 = dPhi*dPhi+ dEta*dEta;
178 float dr2Cut = dr2Cut0;
179
180 if(m_useCovariance) {
181
182 double sigmaWidth = sig_acc(*cl);
183 double uncertClus = 2.*sigmaWidth*sigmaWidth;
184 if(uncertExtrp>uncertClus){
185 ATH_MSG_DEBUG("Extrapolation uncertainty larger than cluster width! Returning without association.");
186 continue;
187 }
188
189 dr2Cut = (sigmaWidth+uncertEta)*(sigmaWidth+uncertEta)+(sigmaWidth+uncertPhi)*(sigmaWidth+uncertPhi);
190 }
191 if( dr2 < dr2Cut ) clusters.push_back( cl );
192 }
193
194 return clusters;
195}
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
SG::ReadDecorHandleKey< xAOD::CaloClusterContainer > m_detectorEtaDecor
double deltaPhi(double phiA, double phiB)
delta Phi in range [-pi,pi[
Definition P4Helpers.h:34
bool dPhi(const xAOD::TauJet &tau, const xAOD::CaloVertexedTopoCluster &cluster, float &out)
bool dEta(const xAOD::TauJet &tau, const xAOD::CaloVertexedTopoCluster &cluster, float &out)
@ theta
Definition ParamDefs.h:66
@ phi
Definition ParamDefs.h:75
ParametersBase< TrackParametersDim, Charged > TrackParameters
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.

◆ cardinality()

unsigned int AthCommonReentrantAlgorithm< Gaudi::Algorithm >::cardinality ( ) const
overridevirtualinherited

Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.

Override this to return 0 for reentrant algorithms.

Definition at line 75 of file AthCommonReentrantAlgorithm.cxx.

64{
65 return 0;
66}

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::evtStore ( )
inlineinherited

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

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode TrackParticleClusterAssociationAlg::execute ( const EventContext & ctx) const
overridevirtual

Definition at line 38 of file TrackParticleClusterAssociationAlg.cxx.

39{
40
41 ATH_MSG_DEBUG("excute()");
42 // get track particles
43 SG::ReadHandle<xAOD::TrackParticleContainer> trackParticles(m_trackParticleCollectionHandle, ctx);
44 ATH_MSG_DEBUG("retrieved "<< m_trackParticleCollectionHandle.key()<< " size ="<< trackParticles->size() );
45
46 // pre-calculate a width of clusters, set it as dynamica attribute so we don't have to recalculate it
47 SG::ReadHandle<xAOD::CaloClusterContainer> clusterContainer(m_caloClusters, ctx);
48 ATH_MSG_DEBUG("retrieved "<< m_caloClusters.key() << " size = "<< clusterContainer->size() );
49 SG::WriteDecorHandle<xAOD::CaloClusterContainer, float> sig_dec (m_sigmaWidthKey, ctx);
50 //for(const xAOD::CaloCluster *cl : *clusterContainer){
51 for(const xAOD::CaloCluster *cl : *clusterContainer){
52 double rad;
53 cl->retrieveMoment(xAOD::CaloCluster::SECOND_R,rad);
54 double cent;
55 cl->retrieveMoment(xAOD::CaloCluster::CENTER_MAG,cent);
56
57 float cl_eta {99};
58 if (m_doDetEta)
59 {
60 SG::ReadDecorHandle<xAOD::CaloClusterContainer, float> detEta(m_detectorEtaDecor, ctx);
61 cl_eta = detEta(*cl);
62 }
63 else
64 cl_eta = cl->eta();
65
66 double sigmaWidth = 0.0;
67 if(cent > 0) sigmaWidth = atan(sqrt(rad)/cent)*cosh(cl_eta);
68 sig_dec(*cl) = sigmaWidth;
69 }
70
71
72 // obtain the CaloExtension from the map in the event store
73 SG::ReadHandle<CaloExtensionCollection> caloExts( m_caloExtKey, ctx );
74 ATH_MSG_DEBUG("CaloExtensionCollection "<< m_caloExtKey.key() << " : size="<< caloExts->size() );
75
76 const xAOD::Vertex * pv0 = nullptr;
77 if(!m_vertexContHandle.empty()){
78 SG::ReadHandle<xAOD::VertexContainer> vxCont(m_vertexContHandle, ctx);
79 if(!vxCont->empty()) pv0=(*vxCont)[0]; // Hard code HS vertex as PV0
80 }
81
82 SG::WriteDecorHandle<xAOD::TrackParticleContainer,
83 std::vector<ElementLink<xAOD::CaloClusterContainer>> > assoClustDecor(m_assocClustersDecor, ctx);
84
85 ATH_MSG_DEBUG("will decorate with "<<assoClustDecor.key()<< " and adding trkParam : "<< m_caloEntryParsDecor.key() );
86
87 // ******************************************
88 // main loop over tracks
89 unsigned int ntracks = 0;
90 for( const xAOD::TrackParticle* tp : *trackParticles){
91
92 // retrieve the vector of links to cluster (and creating it )
93 std::vector< ElementLink< xAOD::CaloClusterContainer > > & caloClusterLinks = assoClustDecor(*tp);
94
95 if( tp->pt() < m_ptCut ) continue;
96
97 if( pv0 != nullptr) if(! m_trackvertexassoTool->isCompatible(*tp, *pv0 )) continue;
98
99 ATH_MSG_DEBUG(" Selected track " << tp->index() << " pt " << tp->pt() << " eta " << tp->eta() << " phi " << tp->phi() );
100
101 // IMMPORTANT : this assumes a correspondance between the TrackParticleContainer and the CaloExtensionCollection !
102 const Trk::CaloExtension * caloExtension = (*caloExts)[tp->index() ] ;
103 if (caloExtension == nullptr ) {
104 ATH_MSG_DEBUG(" Selected track "<< tp->index() << " has no caloExtension ");
105 continue;
106 }
107
108 // build the associated clusters
109 std::vector<const xAOD::CaloCluster*> assoClusters = associatedClusters( *caloExtension, *clusterContainer, ctx);
110
111 // translate vector of links to cluster in ElementLink
112
113 caloClusterLinks.reserve( assoClusters.size() );
114 for(const xAOD::CaloCluster* cluster : assoClusters) caloClusterLinks.emplace_back( *clusterContainer,cluster->index() );
115 ntracks++;
116 }// end loop over tracks
117
118 // 2nd loop over track, only to decorate with Track parameter if requested.
119 if (! m_caloEntryParsDecor.empty() ){
120 // we can not do this in the above loop because declaring a WriteDecorHandle requires a non empty key
121 // (otherwise : run-time error).
122 SG::WriteDecorHandle<xAOD::TrackParticleContainer, const Trk::TrackParameters*> trkParamDecor( m_caloEntryParsDecor, ctx );
123 for( const xAOD::TrackParticle* tp : *trackParticles){
124 const Trk::CaloExtension * caloExtension = (*caloExts)[tp->index() ] ;
125 if (caloExtension == nullptr ) trkParamDecor( *tp ) = nullptr ;
126 else trkParamDecor( *tp ) = caloExtension->caloEntryLayerIntersection();
127 }
128 }
129
130 ATH_MSG_DEBUG(" Total number of selected tracks: " << ntracks );
131
132 return StatusCode::SUCCESS;
133}
SG::ReadHandleKey< CaloExtensionCollection > m_caloExtKey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_assocClustersDecor
ToolHandle< CP::ITrackVertexAssociationTool > m_trackvertexassoTool
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_caloClusters
std::vector< const xAOD::CaloCluster * > associatedClusters(const Trk::CaloExtension &caloExtensions, const xAOD::CaloClusterContainer &allClusters, const EventContext &ctx) const
returns the clusters from allClusters which are close enough to caloExtensions
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trackParticleCollectionHandle
SG::ReadHandleKey< xAOD::VertexContainer > m_vertexContHandle
SG::WriteDecorHandleKey< xAOD::CaloClusterContainer > m_sigmaWidthKey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_caloEntryParsDecor
const TrackParameters * caloEntryLayerIntersection() const
access to intersection with the calorimeter entry layer return nullptr if the intersection failed
@ SECOND_R
Second Moment in .
@ CENTER_MAG
Cluster Centroid ( )
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Vertex_v1 Vertex
Define the latest version of the vertex class.
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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

◆ extraOutputDeps()

const DataObjIDColl & AthCommonReentrantAlgorithm< Gaudi::Algorithm >::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 94 of file AthCommonReentrantAlgorithm.cxx.

90{
91 // If we didn't find any symlinks to add, just return the collection
92 // from the base class. Otherwise, return the extended collection.
93 if (!m_extendedExtraObjects.empty()) {
95 }
97}
An algorithm that can be simultaneously executed in multiple threads.

◆ filterPassed()

virtual bool AthCommonReentrantAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext & ctx) const
inlinevirtualinherited

Definition at line 96 of file AthCommonReentrantAlgorithm.h.

96 {
97 return execState( ctx ).filterPassed();
98 }
virtual bool filterPassed(const EventContext &ctx) const

◆ initialize()

StatusCode TrackParticleClusterAssociationAlg::initialize ( )
overridevirtual

Definition at line 15 of file TrackParticleClusterAssociationAlg.cxx.

16{
17
18 m_doDetEta = !m_detectorEtaDecor.key().empty();
19
20 ATH_CHECK( m_caloExtKey.initialize() );
22 ATH_CHECK( m_caloClusters.initialize() );
24 ATH_CHECK( m_assocClustersDecor.initialize() );
25 ATH_CHECK( m_sigmaWidthKey.initialize() );
26
28
29 ATH_CHECK( m_vertexContHandle.initialize( !m_vertexContHandle.empty() ) );
30 if(!m_vertexContHandle.empty() ) {
32 }
33
34 ATH_MSG_DEBUG(" cluster decoration = "<< m_assocClustersDecor.key() );
35 return StatusCode::SUCCESS;
36}
#define ATH_CHECK
Evaluate an expression and check for errors.

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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.

◆ isClonable()

◆ msg()

MsgStream & AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

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

◆ msgLvl()

bool AthCommonMsg< Gaudi::Algorithm >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ setFilterPassed()

virtual void AthCommonReentrantAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Definition at line 100 of file AthCommonReentrantAlgorithm.h.

100 {
102 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const

◆ sysExecute()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysExecute ( const EventContext & ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Definition at line 85 of file AthCommonReentrantAlgorithm.cxx.

77{
78 return BaseAlg::sysExecute (ctx);
79}

◆ sysInitialize()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in HypoBase, and InputMakerBase.

Definition at line 61 of file AthCommonReentrantAlgorithm.cxx.

107 {
109
110 if (sc.isFailure()) {
111 return sc;
112 }
113
114 ServiceHandle<ICondSvc> cs("CondSvc",name());
115 for (auto h : outputHandles()) {
116 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
117 // do this inside the loop so we don't create the CondSvc until needed
118 if ( cs.retrieve().isFailure() ) {
119 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
120 return StatusCode::SUCCESS;
121 }
122 if (cs->regHandle(this,*h).isFailure()) {
124 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
125 << " with CondSvc");
126 }
127 }
128 }
129 return sc;
130}
#define ATH_MSG_ERROR(x)
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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 }

Member Data Documentation

◆ m_assocClustersDecor

SG::WriteDecorHandleKey<xAOD::TrackParticleContainer> TrackParticleClusterAssociationAlg::m_assocClustersDecor {this, "AssociatedClusterDecorKey", m_trackParticleCollectionHandle, "", "Decoration key to store associated clusters. IMPORTANT must be consistent with TrackParticleContainer" }
private

Definition at line 77 of file TrackParticleClusterAssociationAlg.h.

77{this, "AssociatedClusterDecorKey", m_trackParticleCollectionHandle, "", "Decoration key to store associated clusters. IMPORTANT must be consistent with TrackParticleContainer" };

◆ m_caloClusters

SG::ReadHandleKey<xAOD::CaloClusterContainer> TrackParticleClusterAssociationAlg::m_caloClusters {this, "CaloClusterLocation", "CaloCalTopoClusters","input calo clusters"}
private

Definition at line 64 of file TrackParticleClusterAssociationAlg.h.

64{this, "CaloClusterLocation", "CaloCalTopoClusters","input calo clusters"};

◆ m_caloEntryParsDecor

SG::WriteDecorHandleKey<xAOD::TrackParticleContainer> TrackParticleClusterAssociationAlg::m_caloEntryParsDecor {this, "CaloEntryParsDecorKey", m_trackParticleCollectionHandle, "", "Decoration name to store trk parameters to calo entry (if non blank). IMPORTANT : must be consistent with TrackParticleContainer" }
private

Definition at line 78 of file TrackParticleClusterAssociationAlg.h.

78{this, "CaloEntryParsDecorKey", m_trackParticleCollectionHandle, "", "Decoration name to store trk parameters to calo entry (if non blank). IMPORTANT : must be consistent with TrackParticleContainer" };

◆ m_caloExtKey

SG::ReadHandleKey<CaloExtensionCollection> TrackParticleClusterAssociationAlg::m_caloExtKey {this, "CaloExtensionName", "", ""}
private

Definition at line 62 of file TrackParticleClusterAssociationAlg.h.

62{this, "CaloExtensionName", "", ""};

◆ m_detectorEtaDecor

SG::ReadDecorHandleKey<xAOD::CaloClusterContainer> TrackParticleClusterAssociationAlg::m_detectorEtaDecor { this, "DetectorEtaName", m_caloClusters, "", "Decoration for CaloCluster DetectorEta" }
private

Definition at line 68 of file TrackParticleClusterAssociationAlg.h.

68{ this, "DetectorEtaName", m_caloClusters, "", "Decoration for CaloCluster DetectorEta" };

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_doDetEta

bool TrackParticleClusterAssociationAlg::m_doDetEta = false
private

Definition at line 69 of file TrackParticleClusterAssociationAlg.h.

◆ m_dr

Gaudi::Property<float> TrackParticleClusterAssociationAlg::m_dr {this, "DeltaR", 0.1, "max deltaR to match track and cluster" }
private

Definition at line 57 of file TrackParticleClusterAssociationAlg.h.

57{this, "DeltaR", 0.1, "max deltaR to match track and cluster" };

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthCommonReentrantAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 114 of file AthCommonReentrantAlgorithm.h.

◆ m_ptCut

Gaudi::Property<double> TrackParticleClusterAssociationAlg::m_ptCut {this, "PtCut", 25000., ""}
private

Definition at line 59 of file TrackParticleClusterAssociationAlg.h.

59{this, "PtCut", 25000., ""};

◆ m_sigmaWidthKey

SG::WriteDecorHandleKey<xAOD::CaloClusterContainer> TrackParticleClusterAssociationAlg::m_sigmaWidthKey { this, "SigmaWidthKey", m_caloClusters, "sigmaWidth", "sigmaWidth decoration" }
private

Definition at line 79 of file TrackParticleClusterAssociationAlg.h.

80{ this, "SigmaWidthKey", m_caloClusters, "sigmaWidth", "sigmaWidth decoration" };

◆ m_trackParticleCollectionHandle

SG::ReadHandleKey<xAOD::TrackParticleContainer> TrackParticleClusterAssociationAlg::m_trackParticleCollectionHandle {this,"TrackParticleContainerName", "InDetTrackParticles", "input tracks" }
private

Definition at line 63 of file TrackParticleClusterAssociationAlg.h.

63{this,"TrackParticleContainerName", "InDetTrackParticles", "input tracks" };

◆ m_trackvertexassoTool

ToolHandle<CP::ITrackVertexAssociationTool> TrackParticleClusterAssociationAlg::m_trackvertexassoTool {this, "TrackVertexAssoTool", "" }
private

Definition at line 73 of file TrackParticleClusterAssociationAlg.h.

73{this, "TrackVertexAssoTool", "" };

◆ m_useCovariance

Gaudi::Property<bool> TrackParticleClusterAssociationAlg::m_useCovariance {this, "UseCovariance", true, "use covariance from TrkParameters to evaluate angular uncertainties"}
private

Definition at line 58 of file TrackParticleClusterAssociationAlg.h.

58{this, "UseCovariance", true, "use covariance from TrkParameters to evaluate angular uncertainties"};

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vertexContHandle

SG::ReadHandleKey<xAOD::VertexContainer> TrackParticleClusterAssociationAlg::m_vertexContHandle {this, "VertexContainerName", "", "if empty all tracks will be decorated. if not only those corresponding to the PV[0] will."}
private

Definition at line 72 of file TrackParticleClusterAssociationAlg.h.

72{this, "VertexContainerName", "", "if empty all tracks will be decorated. if not only those corresponding to the PV[0] will."};

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


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