ATLAS Offline Software
Loading...
Searching...
No Matches
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
28namespace Trk
29{
30 class CylinderSurface;
31 class Track;
32 class Surface;
33}
34
35class TRT_ID;
36
38{
39 public:
40 TRTTrackHoleSearchTool(const std::string& type, const std::string& name, const IInterface* parent);
41
42 StatusCode initialize();
43 StatusCode finalize();
44
52 void countHoles(const Trk::Track& track,
53 std::vector<int>& information ,
54 const Trk::ParticleHypothesis partHyp = Trk::pion) const;
55
61 const Trk::TrackStates* getHolesOnTrack(const Trk::Track& track,
62 const Trk::ParticleHypothesis partHyp = Trk::pion) const;
63
69 const Trk::Track* getTrackWithHoles(const Trk::Track& track,
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,
113 Trk::TrackStates* holes,
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
124 const Trk::Track* addHolesToTrack(const Trk::Track& track,
125 const Trk::TrackStates* holes) const;
126};
127
128#endif // TRT_TrackHoleSearch_TRTTrackHoleSearchTool_h
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
DataModel_detail::const_iterator< DataVector > const_iterator
Definition DataVector.h:838
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...
Trk::TrackStates::const_iterator find_last_hit_before_trt(const Trk::TrackStates &track_states) const
BooleanProperty m_begin_at_first_trt_hit
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...
Trk::TrackStates::const_iterator find_first_trt_hit(const Trk::TrackStates &track_states) const
TRTTrackHoleSearchTool(const std::string &type, const std::string &name, const IInterface *parent)
ServiceHandle< IInDetConditionsSvc > m_conditions_svc
const Trk::Track * addHolesToTrack(const Trk::Track &track, const Trk::TrackStates *holes) const
BooleanProperty m_do_dump_bad_straw_log
BooleanProperty m_end_at_last_trt_hit
ToolHandle< Trk::IExtrapolator > m_extrapolator
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...
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...
int extrapolateBetweenHits(const Trk::TrackParameters *start_parameters, const Trk::Surface &end_surf, Trk::TrackStates *holes, const Trk::ParticleHypothesis partHyp=Trk::pion) const
Trk::CylinderSurface * m_trt_outer_surf
This is an Identifier helper class for the TRT subdetector.
Definition TRT_ID.h:82
Class for a CylinderSurface in the ATLAS detector.
interface for searching, counting and adding holes on tracks anywhere in ATLAS.
Abstract Base Class for tracking surfaces.
Ensure that the ATLAS eigen extensions are properly loaded.
DataVector< const Trk::TrackStateOnSurface > TrackStates
ParticleHypothesis
Enumeration for Particle hypothesis respecting the interaction with material.
ParametersBase< TrackParametersDim, Charged > TrackParameters