ATLAS Offline Software
TRTTrackHoleSearchTool.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 // 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 "CLHEP/Units/SystemOfUnits.h"
22 
23 #include <atomic>
24 #include <string>
25 #include <vector>
26 #include <fstream>
27 
28 namespace Trk
29 {
30  class CylinderSurface;
31  class Track;
32  class Surface;
33 }
34 
35 class TRT_ID;
36 
38 {
39  public:
40  TRTTrackHoleSearchTool(const std::string& type, const std::string& name, const IInterface* parent);
41 
44 
52  void countHoles(const Trk::Track& track,
53  std::vector<int>& information ,
54  const Trk::ParticleHypothesis partHyp = Trk::pion) const;
55 
62  const Trk::ParticleHypothesis partHyp = Trk::pion) const;
63 
70  const Trk::ParticleHypothesis partHyp = Trk::pion) const;
71 
72 
79  const Trk::ParticleHypothesis partHyp = Trk::pion) const;
80 
81 
82  private:
83  // configurables
84  //----------------------------------
85  ToolHandle<Trk::IExtrapolator> m_extrapolator
86  {this, "extrapolator", "Trk::Extrapolator"};
88  {this, "conditions_svc", "TRT_ConditionsSummarySvc"};
89  BooleanProperty m_use_conditions_svc{this, "use_conditions_svc", true};
90  // barrel 1075.0, EC 1010.0
91  FloatProperty m_outer_radius{this, "outer_radius", 1075.0*CLHEP::mm};
92  // barrel 715.0, EC 2715.0
93  FloatProperty m_max_z{this, "max_z", 2715.0*CLHEP::mm};
94  IntegerProperty m_max_trailing_holes{this, "max_trailing_holes", 1}; // only used if not end_at_last_trt_hit
95  BooleanProperty m_begin_at_first_trt_hit{this, "begin_at_first_trt_hit", false}; // if not, extrapolate from last Si hit
96  BooleanProperty m_end_at_last_trt_hit{this, "end_at_last_trt_hit", false}; // if not, continue hole search to the edge of the TRT
97  BooleanProperty m_bcheck{this, "bcheck", false};
98  BooleanProperty m_do_dump_bad_straw_log{this, "do_dump_bad_straw_log", false};
99  FloatProperty m_locR_cut{this, "locR_cut", -1.}; // 1.4*CLHEP::mm // negative means no cut
100  FloatProperty m_locR_sigma_cut{this, "locR_sigma_cut", -1.};
101  FloatProperty m_locZ_cut{this, "locZ_cut", 5.0*CLHEP::mm};
102 
103  // private data
104  //----------------------------------
105  mutable std::atomic_bool m_has_been_called{false};
106  const TRT_ID* m_TRT_ID{nullptr};
108 
109  // private methods
110  //----------------------------------
111  int extrapolateBetweenHits(const Trk::TrackParameters* start_parameters,
112  const Trk::Surface& end_surf,
114  const Trk::ParticleHypothesis partHyp = Trk::pion) const;
115 
116  void dump_bad_straw_log() const;
117 
119  find_first_trt_hit(const Trk::TrackStates& track_states) const;
120 
122  find_last_hit_before_trt(const Trk::TrackStates& track_states) const;
123 
125  const Trk::TrackStates* holes) const;
126 };
127 
128 #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:226
TRTTrackHoleSearchTool::m_outer_radius
FloatProperty m_outer_radius
Definition: TRTTrackHoleSearchTool.h:91
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:91
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_locR_sigma_cut
FloatProperty m_locR_sigma_cut
Definition: TRTTrackHoleSearchTool.h:100
TRTTrackHoleSearchTool::m_conditions_svc
ServiceHandle< IInDetConditionsSvc > m_conditions_svc
Definition: TRTTrackHoleSearchTool.h:88
Surface
Definition: Trigger/TrigAccel/TrigCudaFitter/src/Surface.h:8
IExtrapolator.h
TRTTrackHoleSearchTool::m_max_z
FloatProperty m_max_z
Definition: TRTTrackHoleSearchTool.h:93
TRTTrackHoleSearchTool::m_use_conditions_svc
BooleanProperty m_use_conditions_svc
Definition: TRTTrackHoleSearchTool.h:89
TRTTrackHoleSearchTool::m_extrapolator
ToolHandle< Trk::IExtrapolator > m_extrapolator
Definition: TRTTrackHoleSearchTool.h:86
TRTTrackHoleSearchTool::m_max_trailing_holes
IntegerProperty m_max_trailing_holes
Definition: TRTTrackHoleSearchTool.h:94
TRTTrackHoleSearchTool::initialize
StatusCode initialize()
Definition: TRTTrackHoleSearchTool.cxx:47
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:76
Trk::ParticleHypothesis
ParticleHypothesis
Definition: ParticleHypothesis.h:25
TRTTrackHoleSearchTool::m_locR_cut
FloatProperty m_locR_cut
Definition: TRTTrackHoleSearchTool.h:99
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:106
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:30
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
TRTTrackHoleSearchTool::m_locZ_cut
FloatProperty m_locZ_cut
Definition: TRTTrackHoleSearchTool.h:101
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
TRTTrackHoleSearchTool::dump_bad_straw_log
void dump_bad_straw_log() const
Definition: TRTTrackHoleSearchTool.cxx:354
python.SystemOfUnits.mm
int mm
Definition: SystemOfUnits.py:83
IInDetConditionsSvc.h
TRTTrackHoleSearchTool::m_do_dump_bad_straw_log
BooleanProperty m_do_dump_bad_straw_log
Definition: TRTTrackHoleSearchTool.h:98
TRT_ID
Definition: TRT_ID.h:84
TRTTrackHoleSearchTool
Definition: TRTTrackHoleSearchTool.h:38
TRTTrackHoleSearchTool::find_first_trt_hit
Trk::TrackStates::const_iterator find_first_trt_hit(const Trk::TrackStates &track_states) const
Definition: TRTTrackHoleSearchTool.cxx:378
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:399
TRTTrackHoleSearchTool::TRTTrackHoleSearchTool
TRTTrackHoleSearchTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: TRTTrackHoleSearchTool.cxx:39
TRTTrackHoleSearchTool::m_end_at_last_trt_hit
BooleanProperty m_end_at_last_trt_hit
Definition: TRTTrackHoleSearchTool.h:96
Track
Definition: TriggerChamberClusterOnTrackCreator.h:21
TRTTrackHoleSearchTool::m_has_been_called
std::atomic_bool m_has_been_called
Definition: TRTTrackHoleSearchTool.h:105
TRTTrackHoleSearchTool::finalize
StatusCode finalize()
Definition: TRTTrackHoleSearchTool.cxx:68
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
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:215
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:422
TRTTrackHoleSearchTool::m_begin_at_first_trt_hit
BooleanProperty m_begin_at_first_trt_hit
Definition: TRTTrackHoleSearchTool.h:95
TRTTrackHoleSearchTool::m_trt_outer_surf
Trk::CylinderSurface * m_trt_outer_surf
Definition: TRTTrackHoleSearchTool.h:107
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:204
TRTTrackHoleSearchTool::m_bcheck
BooleanProperty m_bcheck
Definition: TRTTrackHoleSearchTool.h:97