ATLAS Offline Software
TRT_SeededTrackFinder.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 /**********************************************************************************
6  Header file for class TRT_SeededTrackFinder
7  (c) ATLAS Detector software
8  Algorithm for Trk::Track production in SCT and Pixels
9  Version 1.0: 04/12/2006
10  Authors : Thomas Koffas, Markus Elsing
11  email : Thomas.Koffas@cern.ch
12 **********************************************************************************/
13 
14 #ifndef TRT_SeededTrackFinder_H
15 #define TRT_SeededTrackFinder_H
16 
18 #include "GaudiKernel/ServiceHandle.h"
19 #include "GaudiKernel/ToolHandle.h"
20 
23 
26 
29 
32 
38 
40 
43 
44 class MsgStream;
45 
46 namespace InDet {
47 
55 {
56 
58  // Public methods:
60 
61 public:
63 
64 
66  TRT_SeededTrackFinder(const std::string& name, ISvcLocator* pSvcLocator);
68  StatusCode initialize() override;
69  StatusCode execute(const EventContext& ctx) const override;
70  StatusCode finalize() override;
71 
73 
74 
76  MsgStream& dump(MsgStream& out) const;
77  std::ostream& dump(std::ostream& out) const;
78 
79 protected:
80 
82  /* Protected data */
84  BooleanProperty m_doRefit
85  {this, "FinalRefit", false, "Do a final careful refit of tracks"};
86  BooleanProperty m_doExtension
87  {this, "TrtExtension", false, "Find the TRT extension of the track"};
88  BooleanProperty m_rejectShortExten
89  {this, "RejectShortExtension", false, "Reject short extensions"};
90  BooleanProperty m_doStat
91  {this, "FinalStatistics", false, "Statistics of final tracks"};
92  BooleanProperty m_saveTRT
93  {this, "OutputSegments", true, "Save stand-alone TRT segments"};
94  IntegerProperty m_MaxSegNum
95  {this, "MaxNumberSegments", 5000,
96  "Maximum number of segments to be handled"};
97  UnsignedIntegerProperty m_minTRTonSegment
98  {this, "MinTRTonSegment", 10, "Minimum Number of TRT Hits on segment"};
99  UnsignedIntegerProperty m_minTRTonly
100  {this, "MinTRTonly", 15, "Minimum number of TRT hits on TRT only"};
101 
102  ToolHandle<ITRT_SeededTrackFinder> m_trackmaker
103  {this, "TrackTool", "InDet::TRT_SeededTrackFinderTool",
104  "Back tracking tool"};
105  ToolHandle<Trk::ITrackFitter> m_fitterTool
106  {this, "RefitterTool", "Trk::GlobalChi2Fitter/InDetTrackFitter",
107  "Track refit tool"};
108  ToolHandle<ITRT_TrackExtensionTool> m_trtExtension
109  {this, "TrackExtensionTool", "InDet::TRT_TrackExtensionTool_xk",
110  "TRT track extension tool "};
111 
113  {this, "InputSegmentsLocation", "TRTSegments", "TRT segments to use"};
115  {this, "OutputTracksLocation", "TRTSeededTracks",
116  "Output track collection"};
117 
119  {this, "PRDtoTrackMap", "" };
120  ToolHandle<Trk::IExtendedTrackSummaryTool> m_trackSummaryTool
121  {this, "TrackSummaryTool", "InDetTrackSummaryToolNoHoleSearch"};
122 
123  ToolHandle<Trk::IExtrapolator> m_extrapolator{this, "Extrapolator", ""};
125  {this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot"};
126 
127  BooleanProperty m_SiExtensionCuts
128  {this, "SiExtensionCuts", false, "enable cuts after Si segment finding"};
129  DoubleProperty m_minPt{this, "minPt", 500., "minimal Pt cut"};
130  DoubleProperty m_maxEta{this, "maxEta", 2.7, "maximal Eta cut"};
131  DoubleProperty m_maxRPhiImp
132  {this, "maxRPhiImp", 10., "maximal RPhi impact parameter cut"};
133  DoubleProperty m_maxZImp
134  {this, "maxZImp", 250., "maximal z impact parameter cut"};
135 
136  BooleanProperty m_caloSeededRoI{this, "CaloSeededRoI", false};
138  {this, "EMROIPhiRZContainer", "",
139  "Name of the calo cluster ROIs in Phi,R,Z parameterization"};
140 
141  ToolHandle<IRegSelTool> m_regionSelector
142  {this, "RegSelTool", "RegSelTool/RegSel_SCT",
143  "Region selector service instance"};
144 
145  FloatProperty m_deltaEta
146  {this, "dEtaCaloRoI", 0.1, "delta Eta used for RoI creation"};
147  FloatProperty m_deltaPhi
148  {this, "dPhiCaloRoI", 0.25, "delta Phi used for RoI creation"};
149  FloatProperty m_deltaZ
150  {this, "dZCaloRoI", 300., "delta Z used for RoI creation"};
151 
153  struct Stat_t
154  {
155  enum ECounter
156  {
173  kNCounter
174  };
175  std::array<int, kNCounter> m_counter{};
176 
178  {
179  for (unsigned int i = 0; i < a.m_counter.size(); ++i) {
180  m_counter[i] += a.m_counter[i];
181  }
182  return *this;
183  }
184  };
185 
186  mutable std::mutex m_statMutex ATLAS_THREAD_SAFE;
187  mutable Stat_t m_totalStat ATLAS_THREAD_SAFE;
188 
190 
191 
195  Trk::Track* mergeSegments(const Trk::Track&, const Trk::TrackSegment&) const;
196 
200  std::vector<const Trk::MeasurementBase*>&) const;
201 
203  Trk::Track* segToTrack(const EventContext&, const Trk::TrackSegment&) const;
204 
206  void Analyze(TrackCollection*) const;
207 
208  MsgStream& dumptools(MsgStream& out) const;
209  MsgStream& dumpevent(MsgStream& out,
211 };
212 }
213 #endif // TRT_SeededTrackFinder_H
InDet::TRT_SeededTrackFinder::Stat_t::m_counter
std::array< int, kNCounter > m_counter
Definition: TRT_SeededTrackFinder.h:175
InDet::TRT_SeededTrackFinder::Stat_t::kNTrtSeg
@ kNTrtSeg
Definition: TRT_SeededTrackFinder.h:157
InDet::TRT_SeededTrackFinder::Stat_t::kNTrtNoSiExt
@ kNTrtNoSiExt
Number of TRT segments lost in busy events.
Definition: TRT_SeededTrackFinder.h:162
IRegSelTool.h
PRDtoTrackMap.h
InDet::TRT_SeededTrackFinder::mergeExtension
Trk::Track * mergeExtension(const Trk::Track &, std::vector< const Trk::MeasurementBase * > &) const
Merge a TRT track extension and a Si track component into one global ID track.
Definition: TRT_SeededTrackFinder.cxx:618
InDet::TRT_SeededTrackFinder::m_SegmentsKey
SG::ReadHandleKey< Trk::SegmentCollection > m_SegmentsKey
Definition: TRT_SeededTrackFinder.h:113
InDet::TRT_SeededTrackFinder::dump
std::ostream & dump(std::ostream &out) const
InDet::TRT_SeededTrackFinder::m_outTracksKey
SG::WriteHandleKey< TrackCollection > m_outTracksKey
Definition: TRT_SeededTrackFinder.h:115
InDet::TRT_SeededTrackFinder::Stat_t::kNCounter
@ kNCounter
Number of back tracks found with or without Si extension per event.
Definition: TRT_SeededTrackFinder.h:173
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
InDet::TRT_SeededTrackFinder::finalize
StatusCode finalize() override
Definition: TRT_SeededTrackFinder.cxx:413
InDet::TRT_SeededTrackFinder::m_minPt
DoubleProperty m_minPt
Definition: TRT_SeededTrackFinder.h:129
BeamSpot::mutex
std::mutex mutex
Definition: InDetBeamSpotVertex.cxx:18
InDet
Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
InDet::TRT_SeededTrackFinder::m_doRefit
BooleanProperty m_doRefit
Definition: TRT_SeededTrackFinder.h:85
InDet::TRT_SeededTrackFinder::initialize
StatusCode initialize() override
Definition: TRT_SeededTrackFinder.cxx:47
InDet::TRT_SeededTrackFinder::m_trackSummaryTool
ToolHandle< Trk::IExtendedTrackSummaryTool > m_trackSummaryTool
Definition: TRT_SeededTrackFinder.h:121
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
InDet::TRT_SeededTrackFinder::m_doExtension
BooleanProperty m_doExtension
Definition: TRT_SeededTrackFinder.h:87
ITRT_SeededTrackFinder.h
InDet::TRT_SeededTrackFinder::Stat_t::kNTrtLimit
@ kNTrtLimit
Number of TRT segments that will be investigated per event
Definition: TRT_SeededTrackFinder.h:161
InDet::TRT_SeededTrackFinder::m_extrapolator
ToolHandle< Trk::IExtrapolator > m_extrapolator
Definition: TRT_SeededTrackFinder.h:123
IExtrapolator.h
InDet::TRT_SeededTrackFinder::Stat_t::kNExtCut
@ kNExtCut
Number of TRT segments not extended in Si.
Definition: TRT_SeededTrackFinder.h:163
InDet::TRT_SeededTrackFinder::m_deltaZ
FloatProperty m_deltaZ
Definition: TRT_SeededTrackFinder.h:150
InDet::TRT_SeededTrackFinder
Definition: TRT_SeededTrackFinder.h:55
Trk::TrackSegment
Definition: TrackSegment.h:56
InDet::TRT_SeededTrackFinder::m_caloSeededRoI
BooleanProperty m_caloSeededRoI
Definition: TRT_SeededTrackFinder.h:136
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
InDet::TRT_SeededTrackFinder::m_deltaPhi
FloatProperty m_deltaPhi
Definition: TRT_SeededTrackFinder.h:148
InDet::TRT_SeededTrackFinder::Stat_t
Global Counters for final algorithm statistics.
Definition: TRT_SeededTrackFinder.h:154
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
InDet::TRT_SeededTrackFinder::m_MaxSegNum
IntegerProperty m_MaxSegNum
Definition: TRT_SeededTrackFinder.h:95
InDet::TRT_SeededTrackFinder::m_saveTRT
BooleanProperty m_saveTRT
Definition: TRT_SeededTrackFinder.h:93
InDet::TRT_SeededTrackFinder::dump
MsgStream & dump(MsgStream &out) const
Print internal tool parameters and status
InDet::TRT_SeededTrackFinder::Stat_t::kNTrtExtFail
@ kNTrtExtFail
Number of shorter TRT extensions.
Definition: TRT_SeededTrackFinder.h:169
InDet::TRT_SeededTrackFinder::m_maxEta
DoubleProperty m_maxEta
Definition: TRT_SeededTrackFinder.h:130
InDet::TRT_SeededTrackFinder::Analyze
void Analyze(TrackCollection *) const
Do some statistics analysis at the end of each event.
Definition: TRT_SeededTrackFinder.cxx:666
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition: StoreGate/StoreGate/WriteHandleKey.h:40
InDet::TRT_SeededTrackFinder::Stat_t::kNBckTrk
@ kNBckTrk
Number of back tracks found with Si extension per event.
Definition: TRT_SeededTrackFinder.h:171
lumiFormat.i
int i
Definition: lumiFormat.py:85
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
InDet::TRT_SeededTrackFinder::mergeSegments
Trk::Track * mergeSegments(const Trk::Track &, const Trk::TrackSegment &) const
Protected methods
Definition: TRT_SeededTrackFinder.cxx:501
InDet::TRT_SeededTrackFinder::m_fitterTool
ToolHandle< Trk::ITrackFitter > m_fitterTool
Definition: TRT_SeededTrackFinder.h:106
TrackCollection.h
InDet::TRT_SeededTrackFinder::m_regionSelector
ToolHandle< IRegSelTool > m_regionSelector
Definition: TRT_SeededTrackFinder.h:142
ITRT_TrackExtensionTool.h
InDet::TRT_SeededTrackFinder::m_trtExtension
ToolHandle< ITRT_TrackExtensionTool > m_trtExtension
Definition: TRT_SeededTrackFinder.h:109
InDet::TRT_SeededTrackFinder::m_deltaEta
FloatProperty m_deltaEta
Definition: TRT_SeededTrackFinder.h:146
InDet::TRT_SeededTrackFinder::Stat_t::kNTrtExt
@ kNTrtExt
Number of times the TRT extension is called.
Definition: TRT_SeededTrackFinder.h:167
ROIPhiRZContainer.h
InDet::TRT_SeededTrackFinder::Stat_t::kNTrtFailSel
@ kNTrtFailSel
Number of TRT segments to be investigated per event
Definition: TRT_SeededTrackFinder.h:158
DataVector< Trk::Track >
beamspotman.stat
stat
Definition: beamspotman.py:266
InDet::TRT_SeededTrackFinder::ATLAS_THREAD_SAFE
std::mutex m_statMutex ATLAS_THREAD_SAFE
Definition: TRT_SeededTrackFinder.h:186
AthReentrantAlgorithm.h
InDet::TRT_SeededTrackFinder::Stat_t::kNBckTrkSi
@ kNBckTrkSi
Number of failed TRT extensions.
Definition: TRT_SeededTrackFinder.h:170
InDet::TRT_SeededTrackFinder::m_SiExtensionCuts
BooleanProperty m_SiExtensionCuts
Definition: TRT_SeededTrackFinder.h:128
InDet::TRT_SeededTrackFinder::m_maxRPhiImp
DoubleProperty m_maxRPhiImp
Definition: TRT_SeededTrackFinder.h:132
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
InDet::TRT_SeededTrackFinder::dumpevent
MsgStream & dumpevent(MsgStream &out, const InDet::TRT_SeededTrackFinder::Stat_t &stat) const
Definition: TRT_SeededTrackFinder.cxx:459
InDet::TRT_SeededTrackFinder::m_trackmaker
ToolHandle< ITRT_SeededTrackFinder > m_trackmaker
Definition: TRT_SeededTrackFinder.h:103
InDet::TRT_SeededTrackFinder::Stat_t::kNTrtExtCalls
@ kNTrtExtCalls
Number of back tracks found without a Si extension per event.
Definition: TRT_SeededTrackFinder.h:166
InDet::TRT_SeededTrackFinder::m_maxZImp
DoubleProperty m_maxZImp
Definition: TRT_SeededTrackFinder.h:134
InDet::TRT_SeededTrackFinder::m_prdToTrackMap
SG::ReadHandleKey< Trk::PRDtoTrackMap > m_prdToTrackMap
Definition: TRT_SeededTrackFinder.h:119
InDet::TRT_SeededTrackFinder::segToTrack
Trk::Track * segToTrack(const EventContext &, const Trk::TrackSegment &) const
Transform a TRT track segment into a track
Definition: TRT_SeededTrackFinder.cxx:559
InDet::TRT_SeededTrackFinder::execute
StatusCode execute(const EventContext &ctx) const override
Definition: TRT_SeededTrackFinder.cxx:118
SG::ReadCondHandleKey< InDet::BeamSpotData >
InDet::TRT_SeededTrackFinder::dumptools
MsgStream & dumptools(MsgStream &out) const
Definition: TRT_SeededTrackFinder.cxx:428
a
TList * a
Definition: liststreamerinfos.cxx:10
IExtendedTrackSummaryTool.h
InDet::TRT_SeededTrackFinder::m_minTRTonSegment
UnsignedIntegerProperty m_minTRTonSegment
Definition: TRT_SeededTrackFinder.h:98
InDet::TRT_SeededTrackFinder::m_rejectShortExten
BooleanProperty m_rejectShortExten
Definition: TRT_SeededTrackFinder.h:89
InDet::TRT_SeededTrackFinder::Stat_t::ECounter
ECounter
Definition: TRT_SeededTrackFinder.h:156
InDet::TRT_SeededTrackFinder::ATLAS_THREAD_SAFE
Stat_t m_totalStat ATLAS_THREAD_SAFE
Definition: TRT_SeededTrackFinder.h:187
InDet::TRT_SeededTrackFinder::m_doStat
BooleanProperty m_doStat
Definition: TRT_SeededTrackFinder.h:91
InDet::TRT_SeededTrackFinder::~TRT_SeededTrackFinder
virtual ~TRT_SeededTrackFinder()
Definition: TRT_SeededTrackFinder.h:67
InDet::TRT_SeededTrackFinder::Stat_t::kNTrtSegGood
@ kNTrtSegGood
Number of TRT segments failing input selection.
Definition: TRT_SeededTrackFinder.h:159
InDet::TRT_SeededTrackFinder::m_beamSpotKey
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
Definition: TRT_SeededTrackFinder.h:125
BeamSpotData.h
InDet::TRT_SeededTrackFinder::m_caloClusterROIKey
SG::ReadHandleKey< ROIPhiRZContainer > m_caloClusterROIKey
Definition: TRT_SeededTrackFinder.h:138
InDet::TRT_SeededTrackFinder::Stat_t::kNBckTrkTrt
@ kNBckTrkTrt
Number of Si extensions failing cuts.
Definition: TRT_SeededTrackFinder.h:164
checker_macros.h
Define macros for attributes used to control the static checker.
InDet::TRT_SeededTrackFinder::Stat_t::kNTrtExtBad
@ kNTrtExtBad
Number of good TRT extensions.
Definition: TRT_SeededTrackFinder.h:168
InDet::TRT_SeededTrackFinder::Stat_t::operator+=
Stat_t & operator+=(const Stat_t &a)
Definition: TRT_SeededTrackFinder.h:177
InDet::TRT_SeededTrackFinder::m_minTRTonly
UnsignedIntegerProperty m_minTRTonly
Definition: TRT_SeededTrackFinder.h:100
ITrackFitter.h
SegmentCollection.h
InDet::TRT_SeededTrackFinder::TRT_SeededTrackFinder
TRT_SeededTrackFinder(const std::string &name, ISvcLocator *pSvcLocator)
Standard Algorithm methods
Definition: TRT_SeededTrackFinder.cxx:39