ATLAS Offline Software
HGTD_TimingResolution.h
Go to the documentation of this file.
1 
13 #ifndef HGTD_TIMINGRESOLUTION_H
14 #define HGTD_TIMINGRESOLUTION_H
15 
16 #include <array>
17 #include <map>
18 #include <string>
19 #include <vector>
20 
22 #include "CLHEP/Random/RandomEngine.h"
23 
25  public:
26  HGTD_TimingResolution(const std::string& type, const std::string& name,
27  const IInterface* parent);
28 
30  virtual StatusCode initialize() override final;
31 
32  void print();
33 
35  float calculateTime(const float t, const float E, float r,
36  CLHEP::HepRandomEngine* rndm_engine) const;
37 
38  constexpr static float HGTDInitialLuminosity = 0.0;
39  constexpr static float HGTDIntermediateLuminosity_pre_Replacement = 2000.0;
40  constexpr static float HGTDIntermediateLuminosity_post_Replacement = 2001.0;
41  constexpr static float HGTDFinalLuminosity = 4000.0;
42 
43  private:
44  typedef std::array<float, 400> PulseWaveform; //<! Signal Pulse
45 
46  // checks
47  bool radiusInRange(float) const;
48  bool etaInRange(float) const;
49 
50  // methods
51  float hitTimingResolution(float radius) const;
52 
53  float resolution(float) const;
54  float gain(float) const;
55  float electronicJitter() const;
56  float sensorResolution(float radius) const;
57 
58  float translateR2Eta(float) const;
59  float translateEta2R(float) const;
60 
61  void radToResolution();
62  void radToGain();
63  void computeDose();
64 
66 
68  PulseWaveform simulatePulse(CLHEP::HepRandomEngine* rndm_engine) const;
69 
71  void calculatePulse(const PulseWaveform& pulseWaveform,
72  std::map<int, std::pair<float, float>>& pulsebin, float t,
73  float E, float* max,
74  CLHEP::HepRandomEngine* rndm_engine) const;
75 
76  std::string m_version{""};
77 
78  float m_Rmin{120.};
79  float m_Rmax{670.};
80  float m_z{3500.};
81 
82  FloatProperty m_integratedLumi{this, "IntegratedLuminosity", 0.,
83  "Integrated Luminosity for smearing of LGAD "
84  "timing based on amount of radiation"};
85 
87 
88  std::vector<int> m_radii{};
89  // Inner ring is replaced every 1 ab-1, middle ring replaced every 2 ab-1,
90  // outer ring will be used till 4000 fb-1 Dose radius relation for inner ring
91  // at 1000 fb-1 integrated luminosity
92  std::vector<float> m_doseInner1000{};
93  std::vector<float> m_doseMiddle2000{};
94  std::vector<float> m_doseOuter4000{};
95  std::vector<float> m_dose{};
96  std::vector<float> m_resolution{};
97  std::vector<float> m_gain{};
98 
99  std::vector<std::pair<float, float>> m_doseResolution{};
100  std::vector<std::pair<float, float>> m_doseGain{};
101 
102  const float m_sensorNoiseFactor =
103  0.0229; // factor use to simulate the Landau fluctuation (1mm*1mm)
104 
105  const float m_cfdThreshold = 0.5; // fraction of max amplitude at which the
106  // time is extracted (default: 50%)
107 };
108 
109 #endif
HGTD_TimingResolution::etaInRange
bool etaInRange(float) const
Definition: HGTD_TimingResolution.cxx:174
HGTD_TimingResolution::PulseWaveform
std::array< float, 400 > PulseWaveform
Definition: HGTD_TimingResolution.h:44
beamspotman.r
def r
Definition: beamspotman.py:676
HGTD_TimingResolution::radToGain
void radToGain()
Definition: HGTD_TimingResolution.cxx:230
HGTD_TimingResolution::radiusInRange
bool radiusInRange(float) const
Definition: HGTD_TimingResolution.cxx:169
HGTD_TimingResolution::sensorResolution
float sensorResolution(float radius) const
Definition: HGTD_TimingResolution.cxx:99
HGTD_TimingResolution::m_dose
std::vector< float > m_dose
Definition: HGTD_TimingResolution.h:95
HGTD_TimingResolution::print
void print()
Definition: HGTD_TimingResolution.cxx:253
HGTD_TimingResolution::resolution
float resolution(float) const
Definition: HGTD_TimingResolution.cxx:119
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
HGTD_TimingResolution::m_doseInner1000
std::vector< float > m_doseInner1000
Definition: HGTD_TimingResolution.h:92
HGTD_TimingResolution::m_cfdThreshold
const float m_cfdThreshold
Definition: HGTD_TimingResolution.h:105
HGTD_TimingResolution::propagateDamage
StatusCode propagateDamage()
Definition: HGTD_TimingResolution.cxx:85
HGTD_TimingResolution::m_gain
std::vector< float > m_gain
Definition: HGTD_TimingResolution.h:97
HGTD_TimingResolution::computeDose
void computeDose()
Definition: HGTD_TimingResolution.cxx:190
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
HGTD_TimingResolution::m_Rmax
float m_Rmax
Definition: HGTD_TimingResolution.h:79
HGTD_TimingResolution::m_doseOuter4000
std::vector< float > m_doseOuter4000
Definition: HGTD_TimingResolution.h:94
HGTD_TimingResolution::hitTimingResolution
float hitTimingResolution(float radius) const
Definition: HGTD_TimingResolution.cxx:111
HGTD_TimingResolution::HGTDIntermediateLuminosity_pre_Replacement
constexpr static float HGTDIntermediateLuminosity_pre_Replacement
Definition: HGTD_TimingResolution.h:39
HGTD_TimingResolution::m_electronicJitter
float m_electronicJitter
Definition: HGTD_TimingResolution.h:86
HGTD_TimingResolution::m_doseMiddle2000
std::vector< float > m_doseMiddle2000
Definition: HGTD_TimingResolution.h:93
HGTD_TimingResolution::calculatePulse
void calculatePulse(const PulseWaveform &pulseWaveform, std::map< int, std::pair< float, float >> &pulsebin, float t, float E, float *max, CLHEP::HepRandomEngine *rndm_engine) const
Calculate the pulse as a vector of float (400 points)
Definition: HGTD_TimingResolution.cxx:320
HGTD_TimingResolution::gain
float gain(float) const
Definition: HGTD_TimingResolution.cxx:142
HGTD_TimingResolution::m_Rmin
float m_Rmin
Definition: HGTD_TimingResolution.h:78
HGTD_TimingResolution::simulatePulse
PulseWaveform simulatePulse(CLHEP::HepRandomEngine *rndm_engine) const
Simulate a new pulse that can be acess using the PulseShape method.
Definition: HGTD_TimingResolution.cxx:269
HGTD_TimingResolution::HGTDIntermediateLuminosity_post_Replacement
constexpr static float HGTDIntermediateLuminosity_post_Replacement
Definition: HGTD_TimingResolution.h:40
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
HGTD_TimingResolution::m_integratedLumi
FloatProperty m_integratedLumi
Definition: HGTD_TimingResolution.h:82
HGTD_TimingResolution::m_version
std::string m_version
Definition: HGTD_TimingResolution.h:76
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
HGTD_TimingResolution::radToResolution
void radToResolution()
Definition: HGTD_TimingResolution.cxx:204
HGTD_TimingResolution::initialize
virtual StatusCode initialize() override final
AlgTool initialize.
Definition: HGTD_TimingResolution.cxx:68
HGTD_TimingResolution::m_doseGain
std::vector< std::pair< float, float > > m_doseGain
Definition: HGTD_TimingResolution.h:100
HGTD_TimingResolution::translateR2Eta
float translateR2Eta(float) const
Definition: HGTD_TimingResolution.cxx:180
HGTD_TimingResolution::m_sensorNoiseFactor
const float m_sensorNoiseFactor
Definition: HGTD_TimingResolution.h:102
HGTD_TimingResolution::translateEta2R
float translateEta2R(float) const
Definition: HGTD_TimingResolution.cxx:186
HGTD_TimingResolution::HGTD_TimingResolution
HGTD_TimingResolution(const std::string &type, const std::string &name, const IInterface *parent)
Definition: HGTD_TimingResolution.cxx:35
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
VP1PartSpect::E
@ E
Definition: VP1PartSpectFlags.h:21
HGTD_TimingResolution::m_resolution
std::vector< float > m_resolution
Definition: HGTD_TimingResolution.h:96
HGTD_TimingResolution::HGTDFinalLuminosity
constexpr static float HGTDFinalLuminosity
Definition: HGTD_TimingResolution.h:41
HGTD_TimingResolution::m_doseResolution
std::vector< std::pair< float, float > > m_doseResolution
Definition: HGTD_TimingResolution.h:99
ParticleGun_SamplingFraction.radius
radius
Definition: ParticleGun_SamplingFraction.py:96
HGTD_TimingResolution
Definition: HGTD_TimingResolution.h:24
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
HGTD_TimingResolution::m_radii
std::vector< int > m_radii
Definition: HGTD_TimingResolution.h:88
AthAlgTool
Definition: AthAlgTool.h:26
HGTD_TimingResolution::m_z
float m_z
Definition: HGTD_TimingResolution.h:80
HGTD_TimingResolution::calculateTime
float calculateTime(const float t, const float E, float r, CLHEP::HepRandomEngine *rndm_engine) const
Return simulated CFD time.
Definition: HGTD_TimingResolution.cxx:352
HGTD_TimingResolution::HGTDInitialLuminosity
constexpr static float HGTDInitialLuminosity
Definition: HGTD_TimingResolution.h:38
HGTD_TimingResolution::electronicJitter
float electronicJitter() const
Definition: HGTD_TimingResolution.cxx:164