ATLAS Offline Software
TRTTimeCorrection.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TRT_DIGITIZATION_TRTTIMECORRECTION_H
6 #define TRT_DIGITIZATION_TRTTIMECORRECTION_H
7 
9 #include "Identifier/Identifier.h"
11 
12 #include <vector>
13 
14 namespace InDetDD {
15  class TRT_DetectorManager;
16 }
17 
18 class TRTDigSettings;
19 class TRT_ID;
20 
22 
27 
28 public:
29 
30  TRTTimeCorrection(const TRTDigSettings* digset,
31  const InDetDD::TRT_DetectorManager* detmgr,
32  const TRT_ID*,
33  const ITRT_CalDbTool*);
34 
36 
44  double TimeShift(const int& strawID);
45 
56  void PropagationTime(const int& strawID,
57  const double& meanZ,
58  double& propagationTime1,
59  double& propagationTime2);
60 
61 private:
62 
63  Identifier getIdentifier ( int hitID,
64  bool& statusok) ; //Note: Changed from const due to message service hick ups
65 
66 
67  void Initialize();
68 
70  double calculateTimeShift_Barrel( const unsigned int& iPhi,
71  const unsigned int& iRing,
72  const unsigned int& iLayer,
73  const unsigned int& iStraw,
74  const int strawID) ; //Note: Changed from const due to message service hick ups
75 
77  double calculateTimeShift_EndCap( const unsigned int& iPhi,
78  const unsigned int& iWheel,
79  const unsigned int& iLayer,
80  const int strawID) ; //Note: Changed from const due to message service hick ups
81 
83  double calculateTimeShiftFromStrawEnds( const Amg::Vector3D& strawend1_globalcoord,
84  const Amg::Vector3D& strawend2_globalcoord,
85  const int strawID) ;
91  void calculateSignalDists_Barrel(const unsigned int& iRing,
92  const unsigned int& iLayer,
93  double& direct_dist,
94  double& reflect_dist ) const;
100  void calculateSignalDists_EndCap(const unsigned int& iWheel,
101  double& direct_dist,
102  double& reflect_dist ) const;
103 
106 protected:
107  const TRT_ID* m_trt_id;
108 private:
110  std::vector< std::vector< std::vector<double> > >
113  std::vector< std::vector< std::vector< std::vector<double> > > >
115 
117  std::vector<double> m_directDistsForEndCapWheels;
119  std::vector<double> m_reflectedDistsForEndCapWheels;
121  std::vector< std::vector<double> > m_directDistsForBarrelLayers;
123  std::vector< std::vector<double> > m_reflectedDistsForBarrelLayers;
124 
125  //Substitute these with use of hitidhelper?:
126  const unsigned int m_subdetectorMask;
127  const unsigned int m_right5Bits;
128  const unsigned int m_shift5Bits;
129  const unsigned int m_shift10Bits;
130  const unsigned int m_shift15Bits;
131 
133  const double m_notInitVal;
134 
135  //Digitization parameters
137  double m_lengthDeadRegion = 0.0;
140  bool m_getT0FromData = false;
141 
143 };
144 
145 #endif
TRTTimeCorrection::m_maxVertexDisplacement
double m_maxVertexDisplacement
Definition: TRTTimeCorrection.h:138
TRTTimeCorrection::m_subdetectorMask
const unsigned int m_subdetectorMask
Definition: TRTTimeCorrection.h:126
TRTTimeCorrection::m_signalPropagationSpeed
double m_signalPropagationSpeed
Definition: TRTTimeCorrection.h:136
TRTTimeCorrection::m_trt_id
const TRT_ID * m_trt_id
Definition: TRTTimeCorrection.h:107
TRTTimeCorrection::m_detmgr
const InDetDD::TRT_DetectorManager * m_detmgr
Definition: TRTTimeCorrection.h:105
TRTTimeCorrection::calculateTimeShift_Barrel
double calculateTimeShift_Barrel(const unsigned int &iPhi, const unsigned int &iRing, const unsigned int &iLayer, const unsigned int &iStraw, const int strawID)
Time shift for barrel straws.
Definition: TRTTimeCorrection.cxx:172
TRTTimeCorrection::m_lengthDeadRegion
double m_lengthDeadRegion
Definition: TRTTimeCorrection.h:137
TRTTimeCorrection::calculateSignalDists_Barrel
void calculateSignalDists_Barrel(const unsigned int &iRing, const unsigned int &iLayer, double &direct_dist, double &reflect_dist) const
Calculate the distance along the wire the signal travels before reaching the electronics.
Definition: TRTTimeCorrection.cxx:334
TRTTimeCorrection::TRTTimeCorrection
TRTTimeCorrection(const TRTDigSettings *digset, const InDetDD::TRT_DetectorManager *detmgr, const TRT_ID *, const ITRT_CalDbTool *)
Definition: TRTTimeCorrection.cxx:22
TRTTimeCorrection::calculateTimeShiftFromStrawEnds
double calculateTimeShiftFromStrawEnds(const Amg::Vector3D &strawend1_globalcoord, const Amg::Vector3D &strawend2_globalcoord, const int strawID)
Time shift from straw endpoints in global system.
Definition: TRTTimeCorrection.cxx:236
TRTTimeCorrection::m_right5Bits
const unsigned int m_right5Bits
Definition: TRTTimeCorrection.h:127
TRTTimeCorrection::PropagationTime
void PropagationTime(const int &strawID, const double &meanZ, double &propagationTime1, double &propagationTime2)
Calculates the time between the signal reaching the wire and when it reaches the electronics.
Definition: TRTTimeCorrection.cxx:287
TRTTimeCorrection::m_shift15Bits
const unsigned int m_shift15Bits
Definition: TRTTimeCorrection.h:130
TRTTimeCorrection::m_getT0FromData
bool m_getT0FromData
Definition: TRTTimeCorrection.h:140
TRTTimeCorrection::m_directDistsForEndCapWheels
std::vector< double > m_directDistsForEndCapWheels
Cached distances.
Definition: TRTTimeCorrection.h:117
TRTTimeCorrection::m_timeShiftPhiSectSymmetry
bool m_timeShiftPhiSectSymmetry
Definition: TRTTimeCorrection.h:139
TRTTimeCorrection::m_timeShiftForEndCapPlanes
std::vector< std::vector< std::vector< double > > > m_timeShiftForEndCapPlanes
Cached timeshifts.
Definition: TRTTimeCorrection.h:111
TRTTimeCorrection::TimeShift
double TimeShift(const int &strawID)
Returns the time it would take to travel at light-speed from (0,0,0) to the farthest end of the wire ...
Definition: TRTTimeCorrection.cxx:96
TRTTimeCorrection::getIdentifier
Identifier getIdentifier(int hitID, bool &statusok)
Definition: TRTTimeCorrection.cxx:373
TRTTimeCorrection::m_shift10Bits
const unsigned int m_shift10Bits
Definition: TRTTimeCorrection.h:129
GeoPrimitives.h
TRTTimeCorrection::m_shift5Bits
const unsigned int m_shift5Bits
Definition: TRTTimeCorrection.h:128
TRTTimeCorrection::~TRTTimeCorrection
~TRTTimeCorrection()
TRTTimeCorrection::m_reflectedDistsForEndCapWheels
std::vector< double > m_reflectedDistsForEndCapWheels
Cached distances.
Definition: TRTTimeCorrection.h:119
TRTTimeCorrection::m_settings
const TRTDigSettings * m_settings
Definition: TRTTimeCorrection.h:104
TRTTimeCorrection::m_reflectedDistsForBarrelLayers
std::vector< std::vector< double > > m_reflectedDistsForBarrelLayers
Cached distances.
Definition: TRTTimeCorrection.h:123
AthMessaging
Class to provide easy MsgStream access and capabilities.
Definition: AthMessaging.h:55
TRTTimeCorrection::m_directDistsForBarrelLayers
std::vector< std::vector< double > > m_directDistsForBarrelLayers
Cached distances.
Definition: TRTTimeCorrection.h:121
ITRT_CalDbTool.h
abstract interface to TRT calibration constants
TRTTimeCorrection::calculateTimeShift_EndCap
double calculateTimeShift_EndCap(const unsigned int &iPhi, const unsigned int &iWheel, const unsigned int &iLayer, const int strawID)
Time shift for end cap straws.
Definition: TRTTimeCorrection.cxx:208
ITRT_CalDbTool
Definition: ITRT_CalDbTool.h:30
TRTTimeCorrection::m_notInitVal
const double m_notInitVal
Value used to denote an uninitialized value.
Definition: TRTTimeCorrection.h:133
TRTTimeCorrection::m_timeShiftForBarrelStraws
std::vector< std::vector< std::vector< std::vector< double > > > > m_timeShiftForBarrelStraws
Cached timeshifts.
Definition: TRTTimeCorrection.h:114
TRTTimeCorrection::m_trtcaldbtool
const ITRT_CalDbTool * m_trtcaldbtool
Definition: TRTTimeCorrection.h:142
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Trk::iPhi
@ iPhi
Definition: ParamDefs.h:47
TRT_ID
Definition: TRT_ID.h:84
InDetDD::TRT_DetectorManager
The Detector Manager for all TRT Detector elements, it acts as the interface to the detector elements...
Definition: TRT_DetectorManager.h:69
InDetDD
Message Stream Member.
Definition: FakeTrackBuilder.h:8
AthMessaging.h
TRTTimeCorrection::Initialize
void Initialize()
Definition: TRTTimeCorrection.cxx:39
TRTTimeCorrection
Time correction.
Definition: TRTTimeCorrection.h:26
TRTDigSettings
Class containing parameters and settings used by TRT digitization.
Definition: TRTDigSettings.h:35
TRTTimeCorrection::calculateSignalDists_EndCap
void calculateSignalDists_EndCap(const unsigned int &iWheel, double &direct_dist, double &reflect_dist) const
Calculate the distance along the wire the signal travels before reaching the electronics.
Definition: TRTTimeCorrection.cxx:357
Identifier
Definition: IdentifierFieldParser.cxx:14