ATLAS Offline Software
TrackParticleClusterAssociationAlg.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TRACKPARTICLEASSOCIATIONALGS_TRACKPARTICLECLUSTERASSOCIATIONALG_H
6 #define TRACKPARTICLEASSOCIATIONALGS_TRACKPARTICLECLUSTERASSOCIATIONALG_H
7 
9 #include "GaudiKernel/ToolHandle.h"
14 
19 
21 
22 #include <string>
23 
39 {
40  public:
41  using AthReentrantAlgorithm::AthReentrantAlgorithm;
42 
43 
44  virtual StatusCode initialize() override ;
45  virtual StatusCode execute(const EventContext& ctx) const override ;
46 
47 
48  private:
49 
51  std::vector<const xAOD::CaloCluster* >
52  associatedClusters(const Trk::CaloExtension & caloExtensions, const xAOD::CaloClusterContainer & allClusters,
53  const EventContext& ctx) const;
54 
55 
56 
57  Gaudi::Property<float> m_dr {this, "DeltaR", 0.1, "max deltaR to match track and cluster" };
58  Gaudi::Property<bool> m_useCovariance {this, "UseCovariance", true, "use covariance from TrkParameters to evaluate angular uncertainties"};
59  Gaudi::Property<double> m_ptCut {this, "PtCut", 25000., ""};
60 
61  // input containers
62  SG::ReadHandleKey<CaloExtensionCollection> m_caloExtKey {this, "CaloExtensionName", "", ""};
63  SG::ReadHandleKey<xAOD::TrackParticleContainer> m_trackParticleCollectionHandle {this,"TrackParticleContainerName", "InDetTrackParticles", "input tracks" };
64  SG::ReadHandleKey<xAOD::CaloClusterContainer> m_caloClusters {this, "CaloClusterLocation", "CaloCalTopoClusters","input calo clusters"};
65 
66  // Whether or not to use the DetectorEta attribute of the clusters, which is important if the input cluster container has had the origin correction applied
67  // Default assumes no origin correction, must be configured if desired
68  SG::ReadDecorHandleKey<xAOD::CaloClusterContainer> m_detectorEtaDecor { this, "DetectorEtaName", "", "Decoration for CaloCluster DetectorEta" };
69  bool m_doDetEta = false;
70 
71  // vertex handling
72  SG::ReadHandleKey<xAOD::VertexContainer> m_vertexContHandle {this, "VertexContainerName", "", "if empty all tracks will be decorated. if not only those corresponding to the PV[0] will."};
73  ToolHandle<CP::ITrackVertexAssociationTool> m_trackvertexassoTool {this, "TrackVertexAssoTool", "" };
74 
75 
76  // decorations
77  SG::WriteDecorHandleKey<xAOD::TrackParticleContainer> m_assocClustersDecor {this, "AssociatedClusterDecorKey" , "", "Decoration key to store associated clusters. IMPORTANT must be consistent with TrackParticleContainer" };
78  SG::WriteDecorHandleKey<xAOD::TrackParticleContainer> m_caloEntryParsDecor {this, "CaloEntryParsDecorKey" , "", "Decoration name to store trk parameters to calo entry (if non blank). IMPORTANT : must be consistent with TrackParticleContainer" };
80  { this, "SigmaWidthKey", m_caloClusters, "sigmaWidth", "sigmaWidth decoration" };
81 };
82 
83 #endif
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer >
TrackParticleClusterAssociationAlg::m_useCovariance
Gaudi::Property< bool > m_useCovariance
Definition: TrackParticleClusterAssociationAlg.h:58
ReadDecorHandleKey.h
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
TrackParticleClusterAssociationAlg::m_vertexContHandle
SG::ReadHandleKey< xAOD::VertexContainer > m_vertexContHandle
Definition: TrackParticleClusterAssociationAlg.h:72
TrackParticleClusterAssociationAlg::m_trackParticleCollectionHandle
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trackParticleCollectionHandle
Definition: TrackParticleClusterAssociationAlg.h:63
TrackParticleClusterAssociationAlg::m_assocClustersDecor
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_assocClustersDecor
Definition: TrackParticleClusterAssociationAlg.h:77
Trk::CaloExtension
Tracking class to hold the extrapolation through calorimeter Layers Both the caloEntryLayerIntersecti...
Definition: CaloExtension.h:19
TrackParticleClusterAssociationAlg::initialize
virtual StatusCode initialize() override
Definition: TrackParticleClusterAssociationAlg.cxx:15
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:74
TrackParticleClusterAssociationAlg::m_detectorEtaDecor
SG::ReadDecorHandleKey< xAOD::CaloClusterContainer > m_detectorEtaDecor
Definition: TrackParticleClusterAssociationAlg.h:68
TrackParticleClusterAssociationAlg::m_sigmaWidthKey
SG::WriteDecorHandleKey< xAOD::CaloClusterContainer > m_sigmaWidthKey
Definition: TrackParticleClusterAssociationAlg.h:80
WriteDecorHandleKey.h
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
TrackParticleClusterAssociationAlg::m_caloEntryParsDecor
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_caloEntryParsDecor
Definition: TrackParticleClusterAssociationAlg.h:78
TrackParticleClusterAssociationAlg::m_dr
Gaudi::Property< float > m_dr
Definition: TrackParticleClusterAssociationAlg.h:57
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TrackParticleClusterAssociationAlg::m_caloExtKey
SG::ReadHandleKey< CaloExtensionCollection > m_caloExtKey
Definition: TrackParticleClusterAssociationAlg.h:62
TrackParticleClusterAssociationAlg::m_ptCut
Gaudi::Property< double > m_ptCut
Definition: TrackParticleClusterAssociationAlg.h:59
TrackParticleClusterAssociationAlg
Definition: TrackParticleClusterAssociationAlg.h:39
ITrackVertexAssociationTool.h
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
AthReentrantAlgorithm.h
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
CaloExtensionCollection.h
VertexContainer.h
CaloClusterContainer.h
TrackParticleClusterAssociationAlg::m_trackvertexassoTool
ToolHandle< CP::ITrackVertexAssociationTool > m_trackvertexassoTool
Definition: TrackParticleClusterAssociationAlg.h:73
SG::ReadDecorHandleKey
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Definition: StoreGate/StoreGate/ReadDecorHandleKey.h:85
TrackParticleClusterAssociationAlg::m_doDetEta
bool m_doDetEta
Definition: TrackParticleClusterAssociationAlg.h:69
TrackParticleContainer.h
TrackParticleClusterAssociationAlg::m_caloClusters
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_caloClusters
Definition: TrackParticleClusterAssociationAlg.h:64
TrackParticleClusterAssociationAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition: TrackParticleClusterAssociationAlg.cxx:44
TrackParticleClusterAssociationAlg::associatedClusters
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
Definition: TrackParticleClusterAssociationAlg.cxx:143