ATLAS Offline Software
Loading...
Searching...
No Matches
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
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
An algorithm that can be simultaneously executed in multiple threads.
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Associate clusters to each track based on its extrapolation to the calo.
SG::ReadHandleKey< CaloExtensionCollection > m_caloExtKey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_assocClustersDecor
virtual StatusCode execute(const EventContext &ctx) const override
ToolHandle< CP::ITrackVertexAssociationTool > m_trackvertexassoTool
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_caloClusters
SG::ReadDecorHandleKey< xAOD::CaloClusterContainer > m_detectorEtaDecor
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
Tracking class to hold the extrapolation through calorimeter Layers Both the caloEntryLayerIntersecti...
CaloClusterContainer_v1 CaloClusterContainer
Define the latest version of the calorimeter cluster container.