ATLAS Offline Software
TrackCollectionMerger.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // TrackCollectionMerger.h, (c) ATLAS Detector software
8 #ifndef TrackCollectionMerger_H
9 #define TrackCollectionMerger_H
10 
12 
14 #include "GaudiKernel/ToolHandle.h"
15 
19 
23 
26 
27 #include <string>
28 #include <map>
29 
30 
31 namespace Trk {
32 
35  {
36 
37  public:
38 
40 
41 
43  TrackCollectionMerger(const std::string &name, ISvcLocator *pSvcLocator);
45  virtual StatusCode initialize() override final;
46  virtual StatusCode execute(const EventContext& ctx) const override final;
47  virtual StatusCode finalize() override final;
48 
49  protected:
50 
52 
53 
57  this, "TracksLocation", {}};
61  this,
62  "OverlayTracksLocation",
63  "",
64  "Pileup Track Collection"
65  };
66  // note that these handles are not used directly, they are needed here
67  // just to ensure that these collections get loaded into SG
70  this,
71  "OverlayTRTClusters",
72  "Bkg_TRT_DriftCircles",
73  "Pileup Drift Circles"
74  };
77  this,
78  "OverlayPixelClusters",
79  "Bkg_PixelClusters",
80  "Pileup Pixel Clusters"
81  };
84  this,
85  "OverlaySCTClusters",
86  "Bkg_SCT_Clusters",
87  "Pileup SCT Clusters"
88  };
91  {this, "OutputTracksLocation", "CombinedInDetTracks"};
92 
95  this,
96  "AssociationMapName",
97  ""
98  };
99 
100  ToolHandle<Trk::IPRDtoTrackMapTool> m_assoTool{
101  this,
102  "AssociationTool",
103  "InDet::InDetPRDtoTrackMapToolGangedPixels"
104  };
105 
107 
108 
111  StatusCode mergeTrack(const TrackCollection* trackCol,
112  Trk::PRDtoTrackMap* pPrdToTrackMap,
113  ConstDataVector<TrackCollection>* outputCol) const;
114 
115  private:
116 
117  //doing track overlay: needed to initialize the background PRD containers
118  BooleanProperty m_doTrackOverlay{this, "DoTrackOverlay", false};
119 
120  };
121 
122 }
123 #endif // TrackCollectionMerger_H
ReadHandleKeyArray.h
PRDtoTrackMap.h
Trk::TrackCollectionMerger::m_outtracklocation
SG::WriteHandleKey< ConstDataVector< TrackCollection > > m_outtracklocation
Combined track collection.
Definition: TrackCollectionMerger.h:91
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
Trk::TrackCollectionMerger::m_assoMapName
SG::WriteHandleKey< Trk::PRDtoTrackMap > m_assoMapName
the key given to the newly created association map
Definition: TrackCollectionMerger.h:94
Trk::TrackCollectionMerger::m_assoTool
ToolHandle< Trk::IPRDtoTrackMapTool > m_assoTool
Definition: TrackCollectionMerger.h:100
Trk::PRDtoTrackMap
Definition: PRDtoTrackMap.h:17
ConstDataVector.h
DataVector adapter that acts like it holds const pointers.
Trk::TrackCollectionMerger::finalize
virtual StatusCode finalize() override final
Definition: TrackCollectionMerger.cxx:90
Trk::TrackCollectionMerger::m_pileupSCT
SG::ReadHandleKey< InDet::SCT_ClusterContainer > m_pileupSCT
pileup SCT PRDs, only retrieved if track overlay is on
Definition: TrackCollectionMerger.h:83
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
protected
#define protected
Definition: DetDescrConditionsDict_dict_fixes.cxx:14
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
Trk::TrackCollectionMerger::mergeTrack
StatusCode mergeTrack(const TrackCollection *trackCol, Trk::PRDtoTrackMap *pPrdToTrackMap, ConstDataVector< TrackCollection > *outputCol) const
Protected methods:
Definition: TrackCollectionMerger.cxx:99
Trk::TrackCollectionMerger::m_doTrackOverlay
BooleanProperty m_doTrackOverlay
Definition: TrackCollectionMerger.h:118
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition: StoreGate/StoreGate/WriteHandleKey.h:40
Trk::TrackCollectionMerger::~TrackCollectionMerger
virtual ~TrackCollectionMerger()
Definition: TrackCollectionMerger.h:44
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
Trk::TrackCollectionMerger::m_overlayTrackLocation
SG::ReadHandleKey< TrackCollection > m_overlayTrackLocation
overlay track collection, if track overlay is on; default is emptystring, i.e.
Definition: TrackCollectionMerger.h:60
TrackCollection.h
SG::ReadHandleKeyArray
HandleKeyArray< ReadHandle< T >, ReadHandleKey< T >, Gaudi::DataHandle::Reader > ReadHandleKeyArray
Definition: StoreGate/StoreGate/ReadHandleKeyArray.h:32
Trk::TrackCollectionMerger::initialize
virtual StatusCode initialize() override final
Definition: TrackCollectionMerger.cxx:27
DataVector< Trk::Track >
AthReentrantAlgorithm.h
Trk::TrackCollectionMerger::execute
virtual StatusCode execute(const EventContext &ctx) const override final
Definition: TrackCollectionMerger.cxx:45
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
TRT_DriftCircleContainer.h
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
PixelClusterContainer.h
IPRDtoTrackMapTool.h
Trk::TrackCollectionMerger::TrackCollectionMerger
TrackCollectionMerger(const std::string &name, ISvcLocator *pSvcLocator)
Standard Algotithm methods:
Definition: TrackCollectionMerger.cxx:19
ConstDataVector
DataVector adapter that acts like it holds const pointers.
Definition: ConstDataVector.h:76
Trk::TrackCollectionMerger::m_pileupPixel
SG::ReadHandleKey< InDet::PixelClusterContainer > m_pileupPixel
pileup pixel PRDs, only retrieved if track overlay is on
Definition: TrackCollectionMerger.h:76
Trk::TrackCollectionMerger
Class-algorithm for track collection merging and removalof potential duplicate tracks.
Definition: TrackCollectionMerger.h:35
SCT_ClusterContainer.h
Trk::TrackCollectionMerger::m_tracklocation
SG::ReadHandleKeyArray< TrackCollection > m_tracklocation
Protected data:
Definition: TrackCollectionMerger.h:56
Trk::TrackCollectionMerger::m_pileupTRT
SG::ReadHandleKey< InDet::TRT_DriftCircleContainer > m_pileupTRT
pileup TRT PRDs, only retrieved if track overlay is on
Definition: TrackCollectionMerger.h:69