ATLAS Offline Software
TrackTimeExtensionAlg.h
Go to the documentation of this file.
1 
20 #ifndef HGTD_RECALGS_TRACKTIMEEXTENSIONALG_H
21 #define HGTD_RECALGS_TRACKTIMEEXTENSIONALG_H
22 
24 
25 #include "GaudiKernel/ToolHandle.h"
36 
37 #include <string>
38 
39 namespace HGTD {
40 
42 
43 public:
44  TrackTimeExtensionAlg(const std::string& name, ISvcLocator* pSvcLocator);
46  virtual StatusCode initialize() override final;
47  virtual StatusCode execute(const EventContext& ctx) const override final;
48 
49 private:
50  struct DecorHandles
51  {
52  DecorHandles (const TrackTimeExtensionAlg& tool, const EventContext& ctx);
63  };
64  friend struct DecorHandles;
65 
67  const xAOD::TrackParticle* track_ptkl,
68  const HGTD::ExtensionObject& extension,
69  const InDetSimDataCollection* sdo_collection,
70  const HepMC::GenEvent* hs_event,
71  bool skip_deco = false) const;
72 
73  ToolHandle<IHGTD_TrackTimeExtensionTool> m_extension_tool{this, "TimeExtensionTool", "HGTD_IterativeExtensionTool/HGTD_IterativeExtensionTool", "Tool for extending ID tracks into the HGTD"};
74 
75  SG::ReadHandleKey<HGTD_ClusterContainer> m_clustercont_rh_key{this, "HGTDClusterContainerName", "HGTD_Cluster", "Name of the HGTD_Cluster container"};
76  SG::ReadHandleKey<InDetSimDataCollection> m_sdo_coll_rh_key{this, "HGTD_SDOCollectionName", "HGTD_SDO_Map", "Name of the SDO container"};
77  SG::ReadHandleKey<McEventCollection> m_mc_coll_rh_key{this, "MC_CollectionName", "TruthEvent", "Name of the McEventCollection containing the truth information"};
78  SG::ReadHandleKey<xAOD::TrackParticleContainer> m_trk_ptkl_rh_key{this, "TrackParticleContainerName", "InDetTrackParticles", "Name of the TrackParticle container"};
79 
80  StringProperty m_deco_prefix{this, "DecorationPrefix", "HGTD", "Prefix to better identify decorations"};
81 
82  FloatProperty m_eta_cut{this, "MinEtaAcceptance", 2.38, "Minimum eta to consider a track for extension"};
83 
84  ToolHandle<IHGTD_ClusterTruthTool> m_truth_tool{this, "TruthTool", "ClusterTruthTool/ClusterTruthTool", "Tool for classifying HGTD clusters with truth information"};
85 
86  SG::WriteDecorHandleKey<xAOD::TrackParticleContainer> m_layerHasExtensionKey{this, "HGTD_has_extension", "InDetTrackParticles.HGTD_has_extension", "deco with a handle for an extension"};
87  SG::WriteDecorHandleKey<xAOD::TrackParticleContainer> m_layerExtensionChi2Key{this, "HGTD_extension_chi2", "InDetTrackParticles.HGTD_extension_chi2", "deco with a handle for a ch2 of extension"};
88  SG::WriteDecorHandleKey<xAOD::TrackParticleContainer> m_layerClusterRawTimeKey{this, "HGTD_cluster_raw_time", "InDetTrackParticles.HGTD_cluster_raw_time", "deco with a handle for layer cluster raw time"};
89  SG::WriteDecorHandleKey<xAOD::TrackParticleContainer> m_layerClusterTimeKey{this, "HGTD_cluster_time", "InDetTrackParticles.HGTD_cluster_time", "deco with a handle for cluster time"};
90  SG::WriteDecorHandleKey<xAOD::TrackParticleContainer> m_layerClusterTruthClassKey{this, "HGTD_cluster_truth_class", "InDetTrackParticles.HGTD_cluster_truth_class", "deco with a handle for a truth time"};
91  SG::WriteDecorHandleKey<xAOD::TrackParticleContainer> m_layerClusterShadowedKey{this, "HGTD_cluster_shadowed", "InDetTrackParticles.HGTD_cluster_shadowed", "deco with a handle for a shadowed cluster"};
92  SG::WriteDecorHandleKey<xAOD::TrackParticleContainer> m_layerClusterMergedKey{this, "HGTD_cluster_merged", "InDetTrackParticles.HGTD_cluster_merged", "deco with a handle for a merged cluster"};
93  SG::WriteDecorHandleKey<xAOD::TrackParticleContainer> m_layerPrimaryExpectedKey{this, "HGTD_primary_expected", "InDetTrackParticles.HGTD_primary_expected", "deco with a handle for an expected primary"};
94  SG::WriteDecorHandleKey<xAOD::TrackParticleContainer> m_extrapXKey{this, "HGTD_extrap_x", "InDetTrackParticles.HGTD_extrap_x", "deco with a handle for an x of extrap"};
95  SG::WriteDecorHandleKey<xAOD::TrackParticleContainer> m_extrapYKey{this, "HGTD_extrap_y", "InDetTrackParticles.HGTD_extrap_y", "deco with a handle for an y of extrap"};
96 
97 };
98 
99 } // namespace HGTD
100 
101 #endif // HGTD_RECALGS_TRACKTIMEEXTENSIONALG_H
HGTD::TrackTimeExtensionAlg::DecorHandles::layerClusterTimeHandle
SG::WriteDecorHandle< xAOD::TrackParticleContainer, std::vector< float > > layerClusterTimeHandle
Definition: TrackTimeExtensionAlg.h:56
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer >
HGTD::TrackTimeExtensionAlg::decorateTrackParticle
StatusCode decorateTrackParticle(DecorHandles &dh, const xAOD::TrackParticle *track_ptkl, const HGTD::ExtensionObject &extension, const InDetSimDataCollection *sdo_collection, const HepMC::GenEvent *hs_event, bool skip_deco=false) const
Definition: TrackTimeExtensionAlg.cxx:166
HGTD::ExtensionObject
Definition: IHGTD_TrackTimeExtensionTool.h:32
HGTD::TrackTimeExtensionAlg::DecorHandles::layerClusterRawTimeHandle
SG::WriteDecorHandle< xAOD::TrackParticleContainer, std::vector< float > > layerClusterRawTimeHandle
Definition: TrackTimeExtensionAlg.h:55
IHGTD_TrackTimeExtensionTool.h
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration.
IHGTD_ClusterTruthTool.h
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration.
HGTD::TrackTimeExtensionAlg::DecorHandles
friend struct DecorHandles
Definition: TrackTimeExtensionAlg.h:64
HGTD::TrackTimeExtensionAlg::m_layerClusterShadowedKey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_layerClusterShadowedKey
Definition: TrackTimeExtensionAlg.h:91
HGTD::TrackTimeExtensionAlg::m_extrapXKey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_extrapXKey
Definition: TrackTimeExtensionAlg.h:94
InDetSimDataCollection
Definition: InDetSimDataCollection.h:25
HGTD::TrackTimeExtensionAlg::TrackTimeExtensionAlg
TrackTimeExtensionAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: TrackTimeExtensionAlg.cxx:23
HGTD::TrackTimeExtensionAlg::m_layerClusterRawTimeKey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_layerClusterRawTimeKey
Definition: TrackTimeExtensionAlg.h:88
PyPoolBrowser.dh
dh
Definition: PyPoolBrowser.py:102
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:562
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:83
HGTD::TrackTimeExtensionAlg::m_trk_ptkl_rh_key
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trk_ptkl_rh_key
Definition: TrackTimeExtensionAlg.h:78
HGTD::TrackTimeExtensionAlg
Definition: TrackTimeExtensionAlg.h:41
HGTD::TrackTimeExtensionAlg::m_extrapYKey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_extrapYKey
Definition: TrackTimeExtensionAlg.h:95
HGTD::TrackTimeExtensionAlg::m_extension_tool
ToolHandle< IHGTD_TrackTimeExtensionTool > m_extension_tool
Definition: TrackTimeExtensionAlg.h:73
HGTD::TrackTimeExtensionAlg::DecorHandles::extrapXHandle
SG::WriteDecorHandle< xAOD::TrackParticleContainer, float > extrapXHandle
Definition: TrackTimeExtensionAlg.h:61
HGTD::TrackTimeExtensionAlg::DecorHandles::layerClusterShadowedHandle
SG::WriteDecorHandle< xAOD::TrackParticleContainer, std::vector< bool > > layerClusterShadowedHandle
Definition: TrackTimeExtensionAlg.h:58
WriteDecorHandleKey.h
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
HGTD
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration.
Definition: Clustering.h:28
HGTD::TrackTimeExtensionAlg::m_sdo_coll_rh_key
SG::ReadHandleKey< InDetSimDataCollection > m_sdo_coll_rh_key
Definition: TrackTimeExtensionAlg.h:76
McEventCollection.h
HGTD::TrackTimeExtensionAlg::~TrackTimeExtensionAlg
virtual ~TrackTimeExtensionAlg()
Definition: TrackTimeExtensionAlg.h:45
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
HGTD::TrackTimeExtensionAlg::m_mc_coll_rh_key
SG::ReadHandleKey< McEventCollection > m_mc_coll_rh_key
Definition: TrackTimeExtensionAlg.h:77
HGTD::TrackTimeExtensionAlg::m_layerClusterTimeKey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_layerClusterTimeKey
Definition: TrackTimeExtensionAlg.h:89
SG::WriteDecorHandle
Handle class for adding a decoration to an object.
Definition: StoreGate/StoreGate/WriteDecorHandle.h:99
HGTD::TrackTimeExtensionAlg::DecorHandles::layerClusterTruthClassHandle
SG::WriteDecorHandle< xAOD::TrackParticleContainer, std::vector< int > > layerClusterTruthClassHandle
Definition: TrackTimeExtensionAlg.h:57
WriteDecorHandle.h
Handle class for adding a decoration to an object.
HGTD::TrackTimeExtensionAlg::m_layerClusterTruthClassKey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_layerClusterTruthClassKey
Definition: TrackTimeExtensionAlg.h:90
HGTD::TrackTimeExtensionAlg::DecorHandles::layerHasExtensionHandle
SG::WriteDecorHandle< xAOD::TrackParticleContainer, std::vector< bool > > layerHasExtensionHandle
Definition: TrackTimeExtensionAlg.h:53
AthReentrantAlgorithm.h
HGTD::TrackTimeExtensionAlg::m_eta_cut
FloatProperty m_eta_cut
Definition: TrackTimeExtensionAlg.h:82
HGTD::TrackTimeExtensionAlg::DecorHandles::extrapYHandle
SG::WriteDecorHandle< xAOD::TrackParticleContainer, float > extrapYHandle
Definition: TrackTimeExtensionAlg.h:62
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
AtlCoolConsole.tool
tool
Definition: AtlCoolConsole.py:453
HGTD::TrackTimeExtensionAlg::DecorHandles::layerExtensionChi2Handle
SG::WriteDecorHandle< xAOD::TrackParticleContainer, std::vector< float > > layerExtensionChi2Handle
Definition: TrackTimeExtensionAlg.h:54
TrackParticle.h
HGTD::TrackTimeExtensionAlg::initialize
virtual StatusCode initialize() override final
Definition: TrackTimeExtensionAlg.cxx:27
HGTD::TrackTimeExtensionAlg::DecorHandles
Definition: TrackTimeExtensionAlg.h:51
HGTD::TrackTimeExtensionAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override final
Definition: TrackTimeExtensionAlg.cxx:54
InDetSimDataCollection.h
HGTD::TrackTimeExtensionAlg::m_clustercont_rh_key
SG::ReadHandleKey< HGTD_ClusterContainer > m_clustercont_rh_key
Definition: TrackTimeExtensionAlg.h:75
HGTD::TrackTimeExtensionAlg::DecorHandles::layerClusterMergedHandle
SG::WriteDecorHandle< xAOD::TrackParticleContainer, std::vector< bool > > layerClusterMergedHandle
Definition: TrackTimeExtensionAlg.h:59
HGTD::TrackTimeExtensionAlg::m_layerPrimaryExpectedKey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_layerPrimaryExpectedKey
Definition: TrackTimeExtensionAlg.h:93
HGTD::TrackTimeExtensionAlg::m_truth_tool
ToolHandle< IHGTD_ClusterTruthTool > m_truth_tool
Definition: TrackTimeExtensionAlg.h:84
HGTD::TrackTimeExtensionAlg::m_layerHasExtensionKey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_layerHasExtensionKey
Definition: TrackTimeExtensionAlg.h:86
HGTD::TrackTimeExtensionAlg::DecorHandles::layerPrimaryExpectedHandle
SG::WriteDecorHandle< xAOD::TrackParticleContainer, std::vector< bool > > layerPrimaryExpectedHandle
Definition: TrackTimeExtensionAlg.h:60
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
HGTD::TrackTimeExtensionAlg::m_layerExtensionChi2Key
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_layerExtensionChi2Key
Definition: TrackTimeExtensionAlg.h:87
HGTD_ClusterContainer.h
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration.
TrackParticleContainer.h
HGTD::TrackTimeExtensionAlg::m_deco_prefix
StringProperty m_deco_prefix
Definition: TrackTimeExtensionAlg.h:80
HGTD::TrackTimeExtensionAlg::m_layerClusterMergedKey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_layerClusterMergedKey
Definition: TrackTimeExtensionAlg.h:92