ATLAS Offline Software
Loading...
Searching...
No Matches
TrackParticleCnvAlg.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef XAODCREATORALGS_TRACKPARTICLECREATOR_H
6#define XAODCREATORALGS_TRACKPARTICLECREATOR_H
7
8
9// Athena/Gaudi include(s):
11
22
26
27
28// Local include(s):
33
34
35
36namespace xAODMaker {
37
49
50 public:
52 using AthReentrantAlgorithm::AthReentrantAlgorithm;
53
55 virtual StatusCode initialize();
57 virtual StatusCode execute(const EventContext& ctx) const;
58
59 private:
60
62 Gaudi::Property<bool> m_addTruthLink{this,"AddTruthLink", false };
64
65
67 ToolHandle<Trk::ITrackParticleCreatorTool> m_particleCreator{this, "TrackParticleCreator", "Trk::TrackParticleCreatorTool/TrackParticleCreatorTool" };
69 ToolHandle<IMCTruthClassifier> m_truthClassifier{this, "MCTruthClassifier", "MCTruthClassifier/MCTruthClassifier",
70 " MCTruthClassifier Instance to use "};
71
72 // handles to the converting tools
73 ToolHandle<xAODMaker::ITrackCollectionCnvTool> m_TrackCollectionCnvTool{this, "TrackCollectionCnvTool", "xAODMaker::TrackCollectionCnvTool/TrackCollectionCnvTool"};
74
75 SG::ReadHandleKey<TrackCollection> m_tracks{this, "TrackContainerName", "Tracks"};
76
77 SG::ReadHandleKey<xAOD::VertexContainer> m_primaryVertexContainer{ this, "PrimaryVerticesName", "", "Name of primary vertex container is case the parameters should be calculated with respect to the primary vertex"};
78
79 SG::WriteHandleKey<xAOD::TrackParticleContainer> m_xaodout{this, "xAODTrackParticlesFromTracksContainerName", "InDetTrackParticles"};
80
81
85 SG::WriteDecorHandleKey<xAOD::TrackParticleContainer> m_truthProbKey{this, "TruthMatchProbKey", m_xaodout, "truthMatchProbability"};
87
88 SG::ReadHandleKey<xAODTruthParticleLinkVector> m_truthParticleLinkVec{this, "xAODTruthLinkVector", "xAODTruthLinks"};
89 SG::ReadHandleKey<TrackTruthCollection> m_trackTruth{this, "TrackTruthContainerName", ""};
90
91 // Allow monitoring of track parameters during conversion
92 Gaudi::Property<bool> m_doMonitoring{this, "DoMonitoring", false};
93 ToolHandle<ITrackParticleMonitoring> m_trackMonitoringTool{ this, "TrkMonTool", "", "Tracking Monitoring tool" };
94
95 //for timing we need a handle to the MonTool in the alg
96 ToolHandle<GenericMonitoringTool > m_monTool { this, "MonTool", "", "Monitoring tool" };
97
98 // Augment observed tracks with information from track observer tool map
99 Gaudi::Property<bool> m_augmentObservedTracks{this, "AugmentObservedTracks", false, "augment observed tracks"};
100 SG::ReadHandleKey<ObservedTrackMap> m_tracksMap{this, "TracksMapName", "" , "name of observed tracks map saved in store"};
101
103 Gaudi::Property<bool> m_convertTracks{this, "ConvertTracks", false};
104
105 StatusCode convert(const EventContext& ctx,
106 const TrackCollection& trackColl,
107 const TrackTruthCollection* assocTruthColl,
108 xAOD::TrackParticleContainer& outTrackCont,
110 const xAOD::Vertex* primaryVertex ,
111 const ObservedTrackMap* obs_track_map) const;
112
113 }; // class TrackParticleCnvAlg
114
115} // namespace xAODMaker
116
117#endif // XAODCREATORALGS_TRACKPARTICLECREATOR_H
Maintain a set of objects, one per slot.
std::map< int, std::tuple< Trk::Track *, double, xAOD::RejectionStep, xAOD::RejectionReason, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, float, float, int, std::vector< xAOD::RejectionStep >, std::vector< xAOD::RejectionReason > > > ObservedTrackMap
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.
DataVector< Trk::Track > TrackCollection
This typedef represents a collection of Trk::Track objects.
An algorithm that can be simultaneously executed in multiple threads.
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.
Algorithm creating xAOD::TrackParticles from TrackParticles.
SG::ReadHandleKey< xAODTruthParticleLinkVector > m_truthParticleLinkVec
ToolHandle< GenericMonitoringTool > m_monTool
StatusCode convert(const EventContext &ctx, const TrackCollection &trackColl, const TrackTruthCollection *assocTruthColl, xAOD::TrackParticleContainer &outTrackCont, const xAODTruthParticleLinkVector *, const xAOD::Vertex *primaryVertex, const ObservedTrackMap *obs_track_map) const
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_truthOriginKey
ToolHandle< ITrackParticleMonitoring > m_trackMonitoringTool
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_truthTypeKey
ToolHandle< xAODMaker::ITrackCollectionCnvTool > m_TrackCollectionCnvTool
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_truthProbKey
virtual StatusCode initialize()
Function initialising the algorithm.
Gaudi::Property< bool > m_addTruthLink
toggle on adding truth links
virtual StatusCode execute(const EventContext &ctx) const
Function executing the algorithm.
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_trackLinkKey
SG::ReadHandleKey< TrackTruthCollection > m_trackTruth
SG::ReadHandleKey< ObservedTrackMap > m_tracksMap
SG::WriteHandleKey< xAOD::TrackParticleContainer > m_xaodout
Gaudi::Property< bool > m_augmentObservedTracks
SG::ReadHandleKey< TrackCollection > m_tracks
SG::ReadHandleKey< xAOD::VertexContainer > m_primaryVertexContainer
Gaudi::Property< bool > m_convertTracks
toggle on converting tracks to xAOD
ToolHandle< IMCTruthClassifier > m_truthClassifier
ToolHandle to truth classifier.
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_truthClassKey
Gaudi::Property< bool > m_doMonitoring
ToolHandle< Trk::ITrackParticleCreatorTool > m_particleCreator
The key for the input TrackParticleTruthCollection.
Vertex_v1 Vertex
Define the latest version of the vertex class.
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".