ATLAS Offline Software
InDetTrackHoleSearchTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 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 
128 
131 
132  /* searching for dead modules after the last measurement (needed for robustness of SW)*/
134 
136  mutable std::atomic_int m_warning;
137 
143  bool getMapOfHits(
144  const EventContext& ctx,
145  const Trk::Track& track,
146  const Trk::ParticleHypothesis partHyp,
147  std::map<const Identifier, const Trk::TrackStateOnSurface*>& mapOfHits,
148  std::map<const Identifier,std::pair<const Trk::TrackParameters*, const bool>>&
149  mapOfPredictions) const;
150 
160  void performHoleSearchStepWise(std::map<const Identifier, const Trk::TrackStateOnSurface*>& mapOfHits,
161  std::map<const Identifier, std::pair<const Trk::TrackParameters*,const bool> >& mapOfPredictions,
162  std::vector<int>* information,
163  std::vector<const Trk::TrackStateOnSurface*>* listOfHoles) const;
164 
168  static const Trk::TrackStateOnSurface* createHoleTSOS(const Trk::TrackParameters* trackPar) ;
169 
172  const Trk::Track* addHolesToTrack(const Trk::Track& oldTrack,
173  std::vector<const Trk::TrackStateOnSurface*>* listOfHoles) const;
174  };
175 
176 } // end of namespace
177 
178 #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:710
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:136
InDet::InDetTrackHoleSearchTool::InDetTrackHoleSearchTool
InDetTrackHoleSearchTool(const std::string &, const std::string &, const IInterface *)
Definition: InDetTrackHoleSearchTool.cxx:32
InDet
DUMMY Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
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:114
InDet::InDetTrackHoleSearchTool::finalize
virtual StatusCode finalize()
standard Athena-Algorithm method
Definition: InDetTrackHoleSearchTool.cxx:66
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
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:72
InDet::InDetTrackHoleSearchTool::initialize
virtual StatusCode initialize()
standard Athena-Algorithm method
Definition: InDetTrackHoleSearchTool.cxx:51
Trk::ITrackHoleSearchTool
interface for searching, counting and adding holes on tracks anywhere in ATLAS.
Definition: ITrackHoleSearchTool.h:31
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:88
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:171
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:122
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:103
InDet::InDetTrackHoleSearchTool::m_minSiHits
int m_minSiHits
Min number of hits.
Definition: InDetTrackHoleSearchTool.h:130
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:554
InDet::InDetTrackHoleSearchTool
Definition: InDetTrackHoleSearchTool.h:49
InDetDD
Message Stream Member.
Definition: FakeTrackBuilder.h:8
IBoundaryCheckTool.h
InDet::InDetTrackHoleSearchTool::m_countDeadModulesAfterLastHit
bool m_countDeadModulesAfterLastHit
Definition: InDetTrackHoleSearchTool.h:133
InDet::InDetTrackHoleSearchTool::m_atlasId
const AtlasDetectorID * m_atlasId
ID pixel helper.
Definition: InDetTrackHoleSearchTool.h:110
Track
Definition: TriggerChamberClusterOnTrackCreator.h:21
InDet::InDetTrackHoleSearchTool::m_extendedListOfHoles
bool m_extendedListOfHoles
Configure outwards hole search.
Definition: InDetTrackHoleSearchTool.h:127
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:702
InDet::InDetTrackHoleSearchTool::m_cosmic
bool m_cosmic
Definition: InDetTrackHoleSearchTool.h:127
AtlasDetectorID
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
Definition: AtlasDetectorID.h:57