ATLAS Offline Software
InDetTrackHoleSearchTool.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 // InDetTrackHoleSearchTool.h, (c) ATLAS Detector software
8 
9 #ifndef INDETINDETTRACKHOLESEARCHTOOL_H
10 #define INDETINDETTRACKHOLESEARCHTOOL_H
11 
13 #include "GaudiKernel/ToolHandle.h"
14 #include "GaudiKernel/EventContext.h"
20 #include <atomic>
21 #include <vector>
22 #include <map>
23 
24 class AtlasDetectorID;
25 class Identifier;
26 class AtlasID;
27 namespace InDet {class IInDetTestPixelLayerTool; }
28 class IGeoModelSvc;
29 
30 namespace Trk { class RIO_OnTrack; class TrackStateOnSurface; class Track; }
31 
32 namespace InDetDD { class SiDetectorElement; }
33 
34 namespace InDet
35 {
36 
49  {
50  public:
51  InDetTrackHoleSearchTool(const std::string&,const std::string&,const IInterface*);
52 
55 
57  virtual StatusCode initialize();
59  virtual StatusCode finalize ();
60 
68  virtual void countHoles(const Trk::Track& track,
69  std::vector<int>& information ,
70  const Trk::ParticleHypothesis partHyp = Trk::pion) const ;
71 
77  virtual const Trk::TrackStates* getHolesOnTrack(const Trk::Track& track,
78  const Trk::ParticleHypothesis partHyp = Trk::pion) const ;
79 
85  virtual const Trk::Track* getTrackWithHoles(const Trk::Track& track,
86  const Trk::ParticleHypothesis partHyp = Trk::pion) const ;
87 
88 
95  const Trk::ParticleHypothesis partHyp = Trk::pion) const;
96 
97  private:
98 
104  void searchForHoles(const Trk::Track& track,
105  std::vector<int>* information ,
106  std::vector<const Trk::TrackStateOnSurface*>* listOfHoles,
107  const Trk::ParticleHypothesis partHyp = Trk::pion) const;
108 
111 
113  ToolHandle<Trk::IExtrapolator> m_extrapolator{
114  this,
115  "Extrapolator",
116  "Trk::Extrapolator/InDetExtrapolator",
117  "Extrapolator used to extrapolate to layers"
118  };
119  ToolHandle<Trk::IBoundaryCheckTool> m_boundaryCheckTool {
120  this,
121  "BoundaryCheckTool",
122  "InDet::InDetBoundaryCheckTool",
123  "Boundary checking tool for detector sensitivities"
124  };
125 
127  BooleanProperty m_extendedListOfHoles{this, "ExtendedListOfHoles", false};
128  BooleanProperty m_cosmic{this, "Cosmics", false};
129 
131  IntegerProperty m_minSiHits{this, "minSiHits", 3};
132 
133  /* searching for dead modules after the last measurement (needed for robustness of SW)*/
135  {this, "CountDeadModulesAfterLastHit", true};
136 
138  mutable std::atomic_int m_warning;
139 
145  bool getMapOfHits(
146  const EventContext& ctx,
147  const Trk::Track& track,
148  const Trk::ParticleHypothesis partHyp,
149  std::map<const Identifier, const Trk::TrackStateOnSurface*>& mapOfHits,
150  std::map<const Identifier,std::pair<const Trk::TrackParameters*, const bool>>&
151  mapOfPredictions) const;
152 
162  void performHoleSearchStepWise(std::map<const Identifier, const Trk::TrackStateOnSurface*>& mapOfHits,
163  std::map<const Identifier, std::pair<const Trk::TrackParameters*,const bool> >& mapOfPredictions,
164  std::vector<int>* information,
165  std::vector<const Trk::TrackStateOnSurface*>* listOfHoles) const;
166 
170  static const Trk::TrackStateOnSurface* createHoleTSOS(const Trk::TrackParameters* trackPar) ;
171 
174  const Trk::Track* addHolesToTrack(const Trk::Track& oldTrack,
175  std::vector<const Trk::TrackStateOnSurface*>* listOfHoles) const;
176  };
177 
178 } // end of namespace
179 
180 #endif
InDet::InDetTrackHoleSearchTool::addHolesToTrack
const Trk::Track * addHolesToTrack(const Trk::Track &oldTrack, std::vector< const Trk::TrackStateOnSurface * > *listOfHoles) const
This Method creates a new Track from the TSOS of the input track combined with the TSOS from listOfHo...
Definition: InDetTrackHoleSearchTool.cxx:711
InDet::InDetTrackHoleSearchTool::m_cosmic
BooleanProperty m_cosmic
Definition: InDetTrackHoleSearchTool.h:128
TrackParameters.h
IGeoModelSvc
Definition: IGeoModelSvc.h:17
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
InDet::InDetTrackHoleSearchTool::m_warning
std::atomic_int m_warning
number of warnings printed when no track parameters available
Definition: InDetTrackHoleSearchTool.h:138
InDet::InDetTrackHoleSearchTool::InDetTrackHoleSearchTool
InDetTrackHoleSearchTool(const std::string &, const std::string &, const IInterface *)
Definition: InDetTrackHoleSearchTool.cxx:32
InDet
Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
InDet::InDetTrackHoleSearchTool::m_extendedListOfHoles
BooleanProperty m_extendedListOfHoles
Configure outwards hole search.
Definition: InDetTrackHoleSearchTool.h:127
IExtrapolator.h
InDet::InDetTrackHoleSearchTool::m_extrapolator
ToolHandle< Trk::IExtrapolator > m_extrapolator
Pointer to Extrapolator AlgTool.
Definition: InDetTrackHoleSearchTool.h:113
InDet::InDetTrackHoleSearchTool::~InDetTrackHoleSearchTool
virtual ~InDetTrackHoleSearchTool()
default destructor
Trk::ParticleHypothesis
ParticleHypothesis
Definition: ParticleHypothesis.h:25
InDet::InDetTrackHoleSearchTool::getTrackWithHolesAndOutliers
virtual const Trk::Track * getTrackWithHolesAndOutliers(const Trk::Track &track, const Trk::ParticleHypothesis partHyp=Trk::pion) const
Input : track, parthyp Return: A pointer to a new Trk::Track which containes the information of the i...
Definition: InDetTrackHoleSearchTool.cxx:108
InDet::InDetTrackHoleSearchTool::finalize
virtual StatusCode finalize()
standard Athena-Algorithm method
Definition: InDetTrackHoleSearchTool.cxx:60
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
Trk::pion
@ pion
Definition: ParticleHypothesis.h:29
AthAlgTool.h
InDet::InDetTrackHoleSearchTool::countHoles
virtual void countHoles(const Trk::Track &track, std::vector< int > &information, const Trk::ParticleHypothesis partHyp=Trk::pion) const
Input : track, partHyp Output: Changes in information This method first calls the method getMapOfHits...
Definition: InDetTrackHoleSearchTool.cxx:66
InDet::InDetTrackHoleSearchTool::initialize
virtual StatusCode initialize()
standard Athena-Algorithm method
Definition: InDetTrackHoleSearchTool.cxx:45
Trk::ITrackHoleSearchTool
interface for searching, counting and adding holes on tracks anywhere in ATLAS.
Definition: ITrackHoleSearchTool.h:30
Trk::ParametersBase
Definition: ParametersBase.h:55
DataVector< const Trk::TrackStateOnSurface >
ParticleHypothesis.h
InDet::InDetTrackHoleSearchTool::getHolesOnTrack
virtual const Trk::TrackStates * getHolesOnTrack(const Trk::Track &track, const Trk::ParticleHypothesis partHyp=Trk::pion) const
Input : track, parthyp Return: A DataVector containing pointers to TrackStateOnSurfaces which each re...
Definition: InDetTrackHoleSearchTool.cxx:82
InDet::InDetTrackHoleSearchTool::m_boundaryCheckTool
ToolHandle< Trk::IBoundaryCheckTool > m_boundaryCheckTool
Definition: InDetTrackHoleSearchTool.h:119
ITrackHoleSearchTool.h
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
InDet::InDetTrackHoleSearchTool::getMapOfHits
bool getMapOfHits(const EventContext &ctx, const Trk::Track &track, const Trk::ParticleHypothesis partHyp, std::map< const Identifier, const Trk::TrackStateOnSurface * > &mapOfHits, std::map< const Identifier, std::pair< const Trk::TrackParameters *, const bool >> &mapOfPredictions) const
Input: track Output: changes in mapOfHits (filling it) and hasTRT Return value: True if filling was s...
Definition: InDetTrackHoleSearchTool.cxx:165
Trk::TrackStateOnSurface
represents the track state (measurement, material, fit parameters and quality) at a surface.
Definition: TrackStateOnSurface.h:71
InDet::InDetTrackHoleSearchTool::searchForHoles
void searchForHoles(const Trk::Track &track, std::vector< int > *information, std::vector< const Trk::TrackStateOnSurface * > *listOfHoles, const Trk::ParticleHypothesis partHyp=Trk::pion) const
Input : track, parthyp Return: Changes in information and/or listOfHoles The interfacing method to th...
Definition: InDetTrackHoleSearchTool.cxx:116
Trk::MeasurementBaseType::RIO_OnTrack
@ RIO_OnTrack
Definition: MeasurementBase.h:49
InDet::InDetTrackHoleSearchTool::getTrackWithHoles
virtual const Trk::Track * getTrackWithHoles(const Trk::Track &track, const Trk::ParticleHypothesis partHyp=Trk::pion) const
Input : track, parthyp Return: A pointer to a new Trk::Track which containes the information of the i...
Definition: InDetTrackHoleSearchTool.cxx:97
InDet::InDetTrackHoleSearchTool::m_minSiHits
IntegerProperty m_minSiHits
Min number of hits.
Definition: InDetTrackHoleSearchTool.h:131
InDet::InDetTrackHoleSearchTool::performHoleSearchStepWise
void performHoleSearchStepWise(std::map< const Identifier, const Trk::TrackStateOnSurface * > &mapOfHits, std::map< const Identifier, std::pair< const Trk::TrackParameters *, const bool > > &mapOfPredictions, std::vector< int > *information, std::vector< const Trk::TrackStateOnSurface * > *listOfHoles) const
This method searches for holes in a track.
Definition: InDetTrackHoleSearchTool.cxx:555
InDet::InDetTrackHoleSearchTool
Definition: InDetTrackHoleSearchTool.h:49
InDetDD
Message Stream Member.
Definition: FakeTrackBuilder.h:8
InDet::InDetTrackHoleSearchTool::m_countDeadModulesAfterLastHit
BooleanProperty m_countDeadModulesAfterLastHit
Definition: InDetTrackHoleSearchTool.h:135
IBoundaryCheckTool.h
InDet::InDetTrackHoleSearchTool::m_atlasId
const AtlasDetectorID * m_atlasId
ID pixel helper.
Definition: InDetTrackHoleSearchTool.h:110
Track
Definition: TriggerChamberClusterOnTrackCreator.h:21
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
AthAlgTool
Definition: AthAlgTool.h:26
InDet::InDetTrackHoleSearchTool::createHoleTSOS
static const Trk::TrackStateOnSurface * createHoleTSOS(const Trk::TrackParameters *trackPar)
This method creates a TSOS to represent a detected hole.
Definition: InDetTrackHoleSearchTool.cxx:703
AtlasDetectorID
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
Definition: AtlasDetectorID.h:57
Identifier
Definition: IdentifierFieldParser.cxx:14