ATLAS Offline Software
TRTTrackHoleSearchTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // TRTTrackHoleSearchTool.h
6 // author: Ryan D. Reece <ryan.reece@cern.ch>
7 // created: Jan 2010
8 
9 
10 #ifndef TRT_TrackHoleSearch_TRTTrackHoleSearchTool_h
11 #define TRT_TrackHoleSearch_TRTTrackHoleSearchTool_h
12 
14 #include "GaudiKernel/ToolHandle.h"
15 #include "GaudiKernel/ServiceHandle.h"
20 
21 #include <atomic>
22 #include <string>
23 #include <vector>
24 #include <fstream>
25 
26 namespace Trk
27 {
28  class CylinderSurface;
29  class Track;
30  class Surface;
31 }
32 
33 class TRT_ID;
34 
36 {
37  public:
38  TRTTrackHoleSearchTool(const std::string& type, const std::string& name, const IInterface* parent);
39 
42 
50  void countHoles(const Trk::Track& track,
51  std::vector<int>& information ,
52  const Trk::ParticleHypothesis partHyp = Trk::pion) const;
53 
60  const Trk::ParticleHypothesis partHyp = Trk::pion) const;
61 
68  const Trk::ParticleHypothesis partHyp = Trk::pion) const;
69 
70 
77  const Trk::ParticleHypothesis partHyp = Trk::pion) const;
78 
79 
80  private:
81  // configurables
82  //----------------------------------
83  ToolHandle<Trk::IExtrapolator> m_extrapolator;
87  float m_max_z;
91  bool m_bcheck;
93  float m_locR_cut;
95  float m_locZ_cut;
96 
97  // private data
98  //----------------------------------
99  mutable std::atomic_bool m_has_been_called;
100  const TRT_ID* m_TRT_ID;
102 
103  // private methods
104  //----------------------------------
105  int extrapolateBetweenHits(const Trk::TrackParameters* start_parameters,
106  const Trk::Surface& end_surf,
108  const Trk::ParticleHypothesis partHyp = Trk::pion) const;
109 
110  void dump_bad_straw_log() const;
111 
113  find_first_trt_hit(const Trk::TrackStates& track_states) const;
114 
116  find_last_hit_before_trt(const Trk::TrackStates& track_states) const;
117 
119  const Trk::Track& track,
120  const Trk::TrackStates* holes) const;
121 };
122 
123 #endif // TRT_TrackHoleSearch_TRTTrackHoleSearchTool_h
TRTTrackHoleSearchTool::extrapolateBetweenHits
int extrapolateBetweenHits(const Trk::TrackParameters *start_parameters, const Trk::Surface &end_surf, Trk::TrackStates *holes, const Trk::ParticleHypothesis partHyp=Trk::pion) const
Definition: TRTTrackHoleSearchTool.cxx:245
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
TRTTrackHoleSearchTool::getHolesOnTrack
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: TRTTrackHoleSearchTool.cxx:110
TrackParameters.h
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
InDetDD::holes
@ holes
Definition: InDetDD_Defs.h:17
TRTTrackHoleSearchTool::m_conditions_svc
ServiceHandle< IInDetConditionsSvc > m_conditions_svc
Definition: TRTTrackHoleSearchTool.h:84
Surface
Definition: Trigger/TrigAccel/TrigCudaFitter/src/Surface.h:7
IExtrapolator.h
TRTTrackHoleSearchTool::m_end_at_last_trt_hit
bool m_end_at_last_trt_hit
Definition: TRTTrackHoleSearchTool.h:90
TRTTrackHoleSearchTool::m_extrapolator
ToolHandle< Trk::IExtrapolator > m_extrapolator
Definition: TRTTrackHoleSearchTool.h:83
TRTTrackHoleSearchTool::m_begin_at_first_trt_hit
bool m_begin_at_first_trt_hit
Definition: TRTTrackHoleSearchTool.h:89
TRTTrackHoleSearchTool::initialize
StatusCode initialize()
Definition: TRTTrackHoleSearchTool.cxx:66
TRTTrackHoleSearchTool::countHoles
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 fills the fields relevant to the ho...
Definition: TRTTrackHoleSearchTool.cxx:95
Trk::ParticleHypothesis
ParticleHypothesis
Definition: ParticleHypothesis.h:25
TRTTrackHoleSearchTool::m_locZ_cut
float m_locZ_cut
Definition: TRTTrackHoleSearchTool.h:95
TRTTrackHoleSearchTool::m_use_conditions_svc
bool m_use_conditions_svc
Definition: TRTTrackHoleSearchTool.h:85
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
Trk::CylinderSurface
Definition: CylinderSurface.h:55
Trk::pion
@ pion
Definition: ParticleHypothesis.h:29
AthAlgTool.h
TRTTrackHoleSearchTool::m_TRT_ID
const TRT_ID * m_TRT_ID
Definition: TRTTrackHoleSearchTool.h:100
test_pyathena.parent
parent
Definition: test_pyathena.py:15
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 >
ITrackHoleSearchTool.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:192
TRTTrackHoleSearchTool::m_do_dump_bad_straw_log
bool m_do_dump_bad_straw_log
Definition: TRTTrackHoleSearchTool.h:92
TRTTrackHoleSearchTool::m_max_trailing_holes
int m_max_trailing_holes
Definition: TRTTrackHoleSearchTool.h:88
TRTTrackHoleSearchTool::dump_bad_straw_log
void dump_bad_straw_log() const
Definition: TRTTrackHoleSearchTool.cxx:372
TRTTrackHoleSearchTool::m_bcheck
bool m_bcheck
Definition: TRTTrackHoleSearchTool.h:91
IInDetConditionsSvc.h
TRT_ID
Definition: TRT_ID.h:84
TRTTrackHoleSearchTool
Definition: TRTTrackHoleSearchTool.h:36
TRTTrackHoleSearchTool::m_locR_cut
float m_locR_cut
Definition: TRTTrackHoleSearchTool.h:93
TRTTrackHoleSearchTool::find_first_trt_hit
Trk::TrackStates::const_iterator find_first_trt_hit(const Trk::TrackStates &track_states) const
Definition: TRTTrackHoleSearchTool.cxx:396
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
TRTTrackHoleSearchTool::find_last_hit_before_trt
Trk::TrackStates::const_iterator find_last_hit_before_trt(const Trk::TrackStates &track_states) const
Definition: TRTTrackHoleSearchTool.cxx:417
TRTTrackHoleSearchTool::TRTTrackHoleSearchTool
TRTTrackHoleSearchTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: TRTTrackHoleSearchTool.cxx:39
Track
Definition: TriggerChamberClusterOnTrackCreator.h:21
TRTTrackHoleSearchTool::m_has_been_called
std::atomic_bool m_has_been_called
Definition: TRTTrackHoleSearchTool.h:99
TRTTrackHoleSearchTool::finalize
StatusCode finalize()
Definition: TRTTrackHoleSearchTool.cxx:87
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
TRTTrackHoleSearchTool::m_max_z
float m_max_z
Definition: TRTTrackHoleSearchTool.h:87
TRTTrackHoleSearchTool::getTrackWithHolesAndOutliers
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: TRTTrackHoleSearchTool.cxx:234
AthAlgTool
Definition: AthAlgTool.h:26
Trk::Surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:75
TRTTrackHoleSearchTool::addHolesToTrack
const Trk::Track * addHolesToTrack(const Trk::Track &track, const Trk::TrackStates *holes) const
Definition: TRTTrackHoleSearchTool.cxx:440
TRTTrackHoleSearchTool::m_outer_radius
float m_outer_radius
Definition: TRTTrackHoleSearchTool.h:86
TRTTrackHoleSearchTool::m_trt_outer_surf
Trk::CylinderSurface * m_trt_outer_surf
Definition: TRTTrackHoleSearchTool.h:101
ServiceHandle< IInDetConditionsSvc >
TRTTrackHoleSearchTool::getTrackWithHoles
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: TRTTrackHoleSearchTool.cxx:223
TRTTrackHoleSearchTool::m_locR_sigma_cut
float m_locR_sigma_cut
Definition: TRTTrackHoleSearchTool.h:94