ATLAS Offline Software
TrackParticleClusterAssociationAlg.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 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  TrackParticleClusterAssociationAlg(const std::string& name, ISvcLocator* pSvcLocator);
42 
43 
44  StatusCode initialize() override ;
45  StatusCode execute() override ;
46 
47 
48  private:
49 
51  std::vector<const xAOD::CaloCluster* > associatedClusters(const Trk::CaloExtension & caloExtensions, const xAOD::CaloClusterContainer & allClusters) ;
52 
53 
54 
55  Gaudi::Property<float> m_dr {this, "DeltaR", 0.1, "max deltaR to match track and cluster" };
56  Gaudi::Property<bool> m_useCovariance {this, "UseCovariance", true, "use covariance from TrkParameters to evaluate angular uncertainties"};
57  Gaudi::Property<double> m_ptCut {this, "PtCut", 25000., ""};
58 
59  // input containers
60  SG::ReadHandleKey<CaloExtensionCollection> m_caloExtKey {this, "CaloExtensionName", "", ""};
61  SG::ReadHandleKey<xAOD::TrackParticleContainer> m_trackParticleCollectionHandle {this,"TrackParticleContainerName", "InDetTrackParticles", "input tracks" };
62  SG::ReadHandleKey<xAOD::CaloClusterContainer> m_caloClusters {this, "CaloClusterLocation", "CaloCalTopoClusters","input calo clusters"};
63 
64  // 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
65  // Default assumes no origin correction, must be configured if desired
66  SG::ReadDecorHandleKey<xAOD::CaloClusterContainer> m_detectorEtaDecor { this, "DetectorEtaName", "", "Decoration for CaloCluster DetectorEta" };
67  bool m_doDetEta;
68 
69  // vertex handling
70  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."};
71  ToolHandle<CP::ITrackVertexAssociationTool> m_trackvertexassoTool {this, "TrackVertexAssoTool", "" };
72 
73 
74  // decorations
75  SG::WriteDecorHandleKey<xAOD::TrackParticleContainer> m_assocClustersDecor {this, "AssociatedClusterDecorKey" , "", "Decoration key to store associated clusters. IMPORTANT must be consistent with TrackParticleContainer" };
76  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" };
77 };
78 
79 #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:56
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:70
TrackParticleClusterAssociationAlg::m_trackParticleCollectionHandle
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trackParticleCollectionHandle
Definition: TrackParticleClusterAssociationAlg.h:61
TrackParticleClusterAssociationAlg::m_assocClustersDecor
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_assocClustersDecor
Definition: TrackParticleClusterAssociationAlg.h:75
Trk::CaloExtension
Tracking class to hold the extrapolation from a particle from the ID to the muon system (or the other...
Definition: CaloExtension.h:18
TrackParticleClusterAssociationAlg::initialize
StatusCode initialize() override
Definition: TrackParticleClusterAssociationAlg.cxx:18
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
TrackParticleClusterAssociationAlg::m_detectorEtaDecor
SG::ReadDecorHandleKey< xAOD::CaloClusterContainer > m_detectorEtaDecor
Definition: TrackParticleClusterAssociationAlg.h:66
AthAlgorithm.h
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:76
TrackParticleClusterAssociationAlg::m_dr
Gaudi::Property< float > m_dr
Definition: TrackParticleClusterAssociationAlg.h:55
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TrackParticleClusterAssociationAlg::TrackParticleClusterAssociationAlg
TrackParticleClusterAssociationAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: TrackParticleClusterAssociationAlg.cxx:15
TrackParticleClusterAssociationAlg::m_caloExtKey
SG::ReadHandleKey< CaloExtensionCollection > m_caloExtKey
Definition: TrackParticleClusterAssociationAlg.h:60
TrackParticleClusterAssociationAlg::m_ptCut
Gaudi::Property< double > m_ptCut
Definition: TrackParticleClusterAssociationAlg.h:57
TrackParticleClusterAssociationAlg
Definition: TrackParticleClusterAssociationAlg.h:39
ITrackVertexAssociationTool.h
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
AthAlgorithm
Definition: AthAlgorithm.h:47
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
TrackParticleClusterAssociationAlg::associatedClusters
std::vector< const xAOD::CaloCluster * > associatedClusters(const Trk::CaloExtension &caloExtensions, const xAOD::CaloClusterContainer &allClusters)
returns the clusters from allClusters which are close enough to caloExtensions
Definition: TrackParticleClusterAssociationAlg.cxx:144
CaloExtensionCollection.h
VertexContainer.h
CaloClusterContainer.h
TrackParticleClusterAssociationAlg::m_trackvertexassoTool
ToolHandle< CP::ITrackVertexAssociationTool > m_trackvertexassoTool
Definition: TrackParticleClusterAssociationAlg.h:71
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:67
TrackParticleContainer.h
TrackParticleClusterAssociationAlg::m_caloClusters
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_caloClusters
Definition: TrackParticleClusterAssociationAlg.h:62
TrackParticleClusterAssociationAlg::execute
StatusCode execute() override
Definition: TrackParticleClusterAssociationAlg.cxx:46