ATLAS Offline Software
SiCombinatorialTrackFinder_xk.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 
3 /*
4  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
5 */
6 
8 // Header file for class SiCombinatorialTrackFinder_xk
10 // Version 1.0 10/04/2007 I.Gavrilenko
12 
13 #ifndef SiCombinatorialTrackFinder_xk_H
14 #define SiCombinatorialTrackFinder_xk_H
15 
18 
28 
29 #include "GaudiKernel/ToolHandle.h"
30 
32 // MagField cache
35 
36 #include <list>
37 #include <map>
38 #include <vector>
39 
40 class MsgStream;
41 
42 namespace InDet {
43 
61 
62  public extends<AthAlgTool, ISiCombinatorialTrackFinder>
63  {
64  friend class SiTrajectory_xk;
65 
67  // Public methods:
69 
70  public:
71 
75 
76  SiCombinatorialTrackFinder_xk(const std::string&, const std::string&,
77  const IInterface*);
78  virtual ~SiCombinatorialTrackFinder_xk() = default;
79  virtual StatusCode initialize() override;
80  virtual StatusCode finalize() override;
82 
86 
87 
88  virtual const std::list<Trk::Track*>& getTracks(
90  const std::vector<const Trk::SpacePoint*>&,
91  const std::vector<Amg::Vector3D>&,
92  std::vector<const InDetDD::SiDetectorElement*>&,
93  const TrackQualityCuts&,
94  const EventContext& ctx) const override;
95 
96  virtual const std::list<Trk::Track*>& getTracks(
98  const std::vector<const Trk::SpacePoint*>&,
99  const std::vector<Amg::Vector3D>&,
100  std::vector<const InDetDD::SiDetectorElement*>&,
101  std::multimap<const Trk::PrepRawData*, const Trk::Track*>&,
102  const EventContext& ctx) const override;
103 
104  virtual const std::list<Trk::Track*>& getTracksWithBrem(
106  const std::vector<const Trk::SpacePoint*>&,
107  const std::vector<Amg::Vector3D>&,
108  std::vector<const InDetDD::SiDetectorElement*>&,
109  std::multimap<const Trk::PrepRawData*, const Trk::Track*>&, bool,
110  const EventContext& ctx) const override;
111 
113  const Trk::TrackParameters&,
114  const std::vector<const Trk::SpacePoint*>&,
115  const EventContext&) const override;
116 
117  virtual void newEvent(
118  const EventContext& ctx,
119  SiCombinatorialTrackFinderData_xk& data) const override;
120  virtual void newEvent(const EventContext& ctx,
123  const TrackQualityCuts&) const override;
124 
125  virtual void endEvent(
126  SiCombinatorialTrackFinderData_xk& data) const override;
128 
132 
134  MsgStream& out) const override;
136 
137  private:
138 
140  // Protected Data
142 
144 
145  ToolHandle<IInDetConditionsTool> m_pixelCondSummaryTool{this, "PixelSummaryTool",
146  "PixelConditionsSummaryTool"};
147  ToolHandle<IInDetConditionsTool> m_sctCondSummaryTool{this, "SctSummaryTool",
148  "InDetSCT_ConditionsSummaryTool/SCT_ConditionsSummaryTool", "Tool to retrieve SCT Conditions summary"};
149  ToolHandle<Trk::IBoundaryCheckTool> m_boundaryCheckTool{this, "BoundaryCheckTool",
150  "InDet::InDetBoundaryCheckTool", "Boundary checking tool for detector sensitivities"};
151 
152  PublicToolHandle<Trk::IPatternParametersPropagator> m_proptool{this, "PropagatorTool",
153  "Trk::RungeKuttaPropagator/InDetPropagator"};
154  PublicToolHandle<Trk::IPatternParametersUpdator> m_updatortool{this, "UpdatorTool",
155  "Trk::KalmanUpdator_xk/InDetPatternUpdator"};
156  PublicToolHandle<Trk::IRIO_OnTrackCreator> m_riocreator{this, "RIOonTrackTool",
157  "Trk::RIO_OnTrackCreator/RIO_OnTrackCreator"};
159 
161 
163  "PixelClusters"};
165  "SCT_Clusters"};
167  "PixelDetElementBoundaryLinks_xk", "Key of InDet::SiDetElementBoundaryLinks_xk for Pixel"};
169  "SCT_DetElementBoundaryLinks_xk", "Key of InDet::SiDetElementBoundaryLinks_xk for SCT"};
170  // For P->T converter of SCT_Clusters
171  SG::ReadCondHandleKey<AtlasFieldCacheCondObj> m_fieldCondObjInputKey {this, "AtlasFieldCacheCondObj", "fieldCondObj", "Name of the Magnetic Field conditions object key"};
173 
178  {this, "PixelDetElStatus", "", "Key of SiDetectorElementStatus for Pixel"};
179 
184  {this, "SCTDetElStatus", "", "Key of SiDetectorElementStatus for SCT"};
185 
187 
188  BooleanProperty m_usePIX{this, "usePixel", true};
189  BooleanProperty m_useSCT{this, "useSCT", true};
190  BooleanProperty m_ITkGeometry{this, "ITkGeometry", false};
191  BooleanProperty m_doFastTracking{this, "doFastTracking", false};
192  StringProperty m_fieldmode{this, "MagneticFieldMode", "MapSolenoid", "Mode of magnetic field"};
193  DoubleProperty m_qualityCut{this, "TrackQualityCut", 9.3, "Simple track quality cut"};
194  FloatProperty m_minPtCut{this, "MinFinalPtCut", 100, "Cut on the pt of the final track. Must be >0 to avoid NANs when computing eta."};
195  float m_minPt2Cut=0;
196  BooleanProperty m_writeHolesFromPattern{this, "writeHolesFromPattern", false,"Flag to activate writing hole info from the pattern recognition"};
198 
200 
203 
204 
206  typedef enum {
215  } EStat_t;
216 
218  // Methods
220 
223  const std::vector<const Trk::SpacePoint*>&,
224  const std::vector<Amg::Vector3D>&,
225  std::vector<const InDetDD::SiDetectorElement*>&,
226  std::multimap<const Trk::PrepRawData*, const Trk::Track*>&,
227  const EventContext&) const;
228 
230  const TrackQualityCuts&);
231 
232  Trk::Track* convertToTrack(SiCombinatorialTrackFinderData_xk& data, const EventContext& ctx) const;
235 
236  void magneticFieldInit();
237 
238  static bool spacePointsToClusters(
239  const std::vector<const Trk::SpacePoint*>&,
240  std::vector<const InDet::SiCluster*>&,
241  std::optional<std::reference_wrapper<std::vector<const InDetDD::SiDetectorElement*>>> = std::nullopt);
242 
244  std::vector<const InDetDD::SiDetectorElement*>&,
245  std::vector<const InDet::SiDetElementBoundaryLink_xk*>&,
246  const EventContext& ctx) const;
247 
248  MsgStream& dumpconditions(MsgStream& out) const;
249  static MsgStream& dumpevent(SiCombinatorialTrackFinderData_xk& data, MsgStream& out) ;
250 
251  void initializeCombinatorialData(const EventContext& ctx, SiCombinatorialTrackFinderData_xk& data) const;
252  virtual void fillStatistic(SiCombinatorialTrackFinderData_xk& data, std::array<bool,NumberOfStats>& information) const override;
253 
254  };
255 
256 } // end of name space
257 
258 #endif // SiCombinatorialTrackFinder_xk_H
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
Trk::TrackInfo
Contains information about the 'fitter' of this track.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:32
InDet::SiCombinatorialTrackFinder_xk::m_pixelCondSummaryTool
ToolHandle< IInDetConditionsTool > m_pixelCondSummaryTool
Definition: SiCombinatorialTrackFinder_xk.h:145
InDet::SiCombinatorialTrackFinder_xk::m_boundaryCheckTool
ToolHandle< Trk::IBoundaryCheckTool > m_boundaryCheckTool
Definition: SiCombinatorialTrackFinder_xk.h:149
Trk::MagneticFieldProperties
Definition: MagneticFieldProperties.h:31
InDet::SiCombinatorialTrackFinder_xk::m_proptool
PublicToolHandle< Trk::IPatternParametersPropagator > m_proptool
Definition: SiCombinatorialTrackFinder_xk.h:152
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
AtlasFieldCacheCondObj.h
InDet::SiCombinatorialTrackFinder_xk::getTracks
virtual const std::list< Trk::Track * > & getTracks(SiCombinatorialTrackFinderData_xk &data, const Trk::TrackParameters &, const std::vector< const Trk::SpacePoint * > &, const std::vector< Amg::Vector3D > &, std::vector< const InDetDD::SiDetectorElement * > &, const TrackQualityCuts &, const EventContext &ctx) const override
Definition: SiCombinatorialTrackFinder_xk.cxx:320
InDet::SiCombinatorialTrackFinder_xk::getTracksWithBrem
virtual const std::list< Trk::Track * > & getTracksWithBrem(SiCombinatorialTrackFinderData_xk &data, const Trk::TrackParameters &, const std::vector< const Trk::SpacePoint * > &, const std::vector< Amg::Vector3D > &, std::vector< const InDetDD::SiDetectorElement * > &, std::multimap< const Trk::PrepRawData *, const Trk::Track * > &, bool, const EventContext &ctx) const override
Definition: SiCombinatorialTrackFinder_xk.cxx:454
InDet
Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
InDet::SiCombinatorialTrackFinder_xk::m_boundaryPixelKey
SG::ReadCondHandleKey< InDet::SiDetElementBoundaryLinks_xk > m_boundaryPixelKey
Definition: SiCombinatorialTrackFinder_xk.h:166
InDet::SiCombinatorialTrackFinder_xk::endEvent
virtual void endEvent(SiCombinatorialTrackFinderData_xk &data) const override
Definition: SiCombinatorialTrackFinder_xk.cxx:303
InDet::SiCombinatorialTrackFinder_xk::m_fieldmode
StringProperty m_fieldmode
Definition: SiCombinatorialTrackFinder_xk.h:192
InDet::SiCombinatorialTrackFinder_xk::convertToTrack
Trk::Track * convertToTrack(SiCombinatorialTrackFinderData_xk &data, const EventContext &ctx) const
Definition: SiCombinatorialTrackFinder_xk.cxx:839
InDet::SiCombinatorialTrackFinder_xk::m_fieldCondObjInputKey
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > m_fieldCondObjInputKey
Definition: SiCombinatorialTrackFinder_xk.h:171
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
InDet::SiCombinatorialTrackFinder_xk::initializeCombinatorialData
void initializeCombinatorialData(const EventContext &ctx, SiCombinatorialTrackFinderData_xk &data) const
Definition: SiCombinatorialTrackFinder_xk.cxx:1091
InDet::SiCombinatorialTrackFinder_xk::m_riocreator
PublicToolHandle< Trk::IRIO_OnTrackCreator > m_riocreator
Definition: SiCombinatorialTrackFinder_xk.h:156
InDet::SiCombinatorialTrackFinder_xk::CantFindTrk
@ CantFindTrk
Definition: SiCombinatorialTrackFinder_xk.h:210
InDet::TrackQualityCuts
Definition: ISiCombinatorialTrackFinder.h:122
InDet::SiCombinatorialTrackFinder_xk::m_ITkGeometry
BooleanProperty m_ITkGeometry
Definition: SiCombinatorialTrackFinder_xk.h:190
InDet::SiCombinatorialTrackFinder_xk::findTrack
EStat_t findTrack(SiCombinatorialTrackFinderData_xk &data, const Trk::TrackParameters &, const std::vector< const Trk::SpacePoint * > &, const std::vector< Amg::Vector3D > &, std::vector< const InDetDD::SiDetectorElement * > &, std::multimap< const Trk::PrepRawData *, const Trk::Track * > &, const EventContext &) const
Definition: SiCombinatorialTrackFinder_xk.cxx:584
SG::ReadHandleKey< InDet::PixelClusterContainer >
SiTrajectory_xk.h
InDet::SiCombinatorialTrackFinder_xk::m_sctcontainerkey
SG::ReadHandleKey< InDet::SCT_ClusterContainer > m_sctcontainerkey
Definition: SiCombinatorialTrackFinder_xk.h:164
InDet::SiCombinatorialTrackFinder_xk::initialize
virtual StatusCode initialize() override
Definition: SiCombinatorialTrackFinder_xk.cxx:44
InDet::SiCombinatorialTrackFinder_xk::m_pixelDetElStatus
SG::ReadHandleKey< InDet::SiDetectorElementStatus > m_pixelDetElStatus
Optional read handle to get status data to test whether a pixel detector element is good.
Definition: SiCombinatorialTrackFinder_xk.h:178
InDet::SiCombinatorialTrackFinder_xk::m_fieldprop
Trk::MagneticFieldProperties m_fieldprop
Magnetic field properties.
Definition: SiCombinatorialTrackFinder_xk.h:202
InDet::SiCombinatorialTrackFinder_xk::m_sctCondSummaryTool
ToolHandle< IInDetConditionsTool > m_sctCondSummaryTool
Definition: SiCombinatorialTrackFinder_xk.h:147
InDet::SiCombinatorialTrackFinder_xk::m_outputlevel
int m_outputlevel
Definition: SiCombinatorialTrackFinder_xk.h:201
InDet::SiCombinatorialTrackFinder_xk::m_pixcontainerkey
SG::ReadHandleKey< InDet::PixelClusterContainer > m_pixcontainerkey
Definition: SiCombinatorialTrackFinder_xk.h:162
InDet::SiCombinatorialTrackFinder_xk::m_minPtCut
FloatProperty m_minPtCut
Definition: SiCombinatorialTrackFinder_xk.h:194
InDet::SiCombinatorialTrackFinder_xk::WrongInit
@ WrongInit
Definition: SiCombinatorialTrackFinder_xk.h:209
InDet::SiCombinatorialTrackFinder_xk::dumpconditions
MsgStream & dumpconditions(MsgStream &out) const
Definition: SiCombinatorialTrackFinder_xk.cxx:132
InDet::SiCombinatorialTrackFinder_xk::convertToNextTrack
Trk::Track * convertToNextTrack(SiCombinatorialTrackFinderData_xk &data) const
Definition: SiCombinatorialTrackFinder_xk.cxx:885
InDet::SiCombinatorialTrackFinder_xk::pTseed
virtual double pTseed(SiCombinatorialTrackFinderData_xk &data, const Trk::TrackParameters &, const std::vector< const Trk::SpacePoint * > &, const EventContext &) const override
Definition: SiCombinatorialTrackFinder_xk.cxx:565
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
InDet::SiCombinatorialTrackFinder_xk::magneticFieldInit
void magneticFieldInit()
Definition: SiCombinatorialTrackFinder_xk.cxx:921
AthAlgTool.h
SiCombinatorialTrackFinderData_xk.h
InDet::SiCombinatorialTrackFinder_xk::dump
MsgStream & dump(SiCombinatorialTrackFinderData_xk &data, MsgStream &out) const override
Definition: SiCombinatorialTrackFinder_xk.cxx:119
Trk::ParametersBase
Definition: ParametersBase.h:55
InDet::SiCombinatorialTrackFinder_xk::m_boundarySCTKey
SG::ReadCondHandleKey< InDet::SiDetElementBoundaryLinks_xk > m_boundarySCTKey
Definition: SiCombinatorialTrackFinder_xk.h:168
InDet::SiCombinatorialTrackFinder_xk::spacePointsToClusters
static bool spacePointsToClusters(const std::vector< const Trk::SpacePoint * > &, std::vector< const InDet::SiCluster * > &, std::optional< std::reference_wrapper< std::vector< const InDetDD::SiDetectorElement * >>>=std::nullopt)
Definition: SiCombinatorialTrackFinder_xk.cxx:935
InDet::SiCombinatorialTrackFinder_xk::TwoCluster
@ TwoCluster
Definition: SiCombinatorialTrackFinder_xk.h:207
InDet::SiCombinatorialTrackFinder_xk::WrongRoad
@ WrongRoad
Definition: SiCombinatorialTrackFinder_xk.h:208
InDet::SiCombinatorialTrackFinder_xk::Success
@ Success
Definition: SiCombinatorialTrackFinder_xk.h:214
ReadCondHandleKey.h
InDet::SiCombinatorialTrackFinder_xk::m_writeHolesFromPattern
BooleanProperty m_writeHolesFromPattern
Definition: SiCombinatorialTrackFinder_xk.h:196
PixelClusterContainer.h
SiDetectorElementCollection.h
InDet::SiCombinatorialTrackFinder_xk::m_usePIX
BooleanProperty m_usePIX
Definition: SiCombinatorialTrackFinder_xk.h:188
InDet::SiCombinatorialTrackFinder_xk::m_updatortool
PublicToolHandle< Trk::IPatternParametersUpdator > m_updatortool
Definition: SiCombinatorialTrackFinder_xk.h:154
SG::ReadCondHandleKey< InDet::SiDetElementBoundaryLinks_xk >
InDet::SiCombinatorialTrackFinder_xk::newEvent
virtual void newEvent(const EventContext &ctx, SiCombinatorialTrackFinderData_xk &data) const override
Definition: SiCombinatorialTrackFinder_xk.cxx:237
InDet::SiCombinatorialTrackFinder_xk::finalize
virtual StatusCode finalize() override
Definition: SiCombinatorialTrackFinder_xk.cxx:110
InDet::SiCombinatorialTrackFinderData_xk
Definition: SiCombinatorialTrackFinderData_xk.h:34
InDet::SiTrajectory_xk
Definition: SiTrajectory_xk.h:44
InDet::SiCombinatorialTrackFinder_xk
Definition: SiCombinatorialTrackFinder_xk.h:63
InDet::SiCombinatorialTrackFinder_xk::m_useSCT
BooleanProperty m_useSCT
Definition: SiCombinatorialTrackFinder_xk.h:189
InDet::SiCombinatorialTrackFinder_xk::m_minPt2Cut
float m_minPt2Cut
Definition: SiCombinatorialTrackFinder_xk.h:195
InDet::SiCombinatorialTrackFinder_xk::detectorElementLinks
void detectorElementLinks(std::vector< const InDetDD::SiDetectorElement * > &, std::vector< const InDet::SiDetElementBoundaryLink_xk * > &, const EventContext &ctx) const
Definition: SiCombinatorialTrackFinder_xk.cxx:990
SCT_ClusterContainer.h
InDet::SiCombinatorialTrackFinder_xk::dumpevent
static MsgStream & dumpevent(SiCombinatorialTrackFinderData_xk &data, MsgStream &out)
Definition: SiCombinatorialTrackFinder_xk.cxx:194
InDet::SiCombinatorialTrackFinder_xk::EStat_t
EStat_t
Array entries for data.statistic counter.
Definition: SiCombinatorialTrackFinder_xk.h:206
InDet::SiCombinatorialTrackFinder_xk::NotNewTrk
@ NotNewTrk
Definition: SiCombinatorialTrackFinder_xk.h:211
InDet::SiCombinatorialTrackFinder_xk::m_sctDetElStatus
SG::ReadHandleKey< InDet::SiDetectorElementStatus > m_sctDetElStatus
Optional read handle to get status data to test whether a SCT detector element is good.
Definition: SiCombinatorialTrackFinder_xk.h:184
ISiCombinatorialTrackFinder.h
InDet::SiCombinatorialTrackFinder_xk::m_doFastTracking
BooleanProperty m_doFastTracking
Definition: SiCombinatorialTrackFinder_xk.h:191
InDet::SiCombinatorialTrackFinder_xk::SiCombinatorialTrackFinder_xk
SiCombinatorialTrackFinder_xk(const std::string &, const std::string &, const IInterface *)
Definition: SiCombinatorialTrackFinder_xk.cxx:35
InDet::SiCombinatorialTrackFinder_xk::~SiCombinatorialTrackFinder_xk
virtual ~SiCombinatorialTrackFinder_xk()=default
InDet::SiCombinatorialTrackFinder_xk::m_qualityCut
DoubleProperty m_qualityCut
Definition: SiCombinatorialTrackFinder_xk.h:193
InDet::SiCombinatorialTrackFinder_xk::BremAttempt
@ BremAttempt
Definition: SiCombinatorialTrackFinder_xk.h:212
InDet::SiCombinatorialTrackFinder_xk::getTrackQualityCuts
static void getTrackQualityCuts(SiCombinatorialTrackFinderData_xk &data, const TrackQualityCuts &)
Definition: SiCombinatorialTrackFinder_xk.cxx:1024
InDet::SiCombinatorialTrackFinder_xk::NumberOfStats
@ NumberOfStats
Definition: SiCombinatorialTrackFinder_xk.h:213
InDet::SiCombinatorialTrackFinder_xk::fillStatistic
virtual void fillStatistic(SiCombinatorialTrackFinderData_xk &data, std::array< bool, NumberOfStats > &information) const override
Definition: SiCombinatorialTrackFinder_xk.cxx:1126