DetectorPropertiesData.cc
Go to the documentation of this file.
3 
5  DetectorProperties const& properties,
6  double const x_ticks_coefficient,
7  std::vector<std::vector<std::vector<double>>>&& x_ticks_offsets,
8  std::vector<std::vector<double>>&& drift_direction)
9 
10  : fProperties{properties}
11  , fXTicksCoefficient{x_ticks_coefficient}
12  , fXTicksOffsets{move(x_ticks_offsets)}
13  , fDriftDirection{move(drift_direction)}
14 {}
15 
16 double
17 detinfo::DetectorPropertiesData::Efield(unsigned int const planegap) const
18 {
19  return fProperties.Efield(planegap);
20 }
21 
22 double
23 detinfo::DetectorPropertiesData::DriftVelocity(double const efield, double const temperature) const
24 {
25  return fProperties.DriftVelocity(efield, temperature);
26 }
27 
28 double
30 {
31  return fProperties.BirksCorrection(dQdX, Efield());
32 }
33 double
34 detinfo::DetectorPropertiesData::BirksCorrection(double const dQdX, double const EField) const
35 {
36  return fProperties.BirksCorrection(dQdX, EField);
37 }
38 
39 double
41 {
42  return fProperties.ModBoxCorrection(dQdX, Efield());
43 }
44 double
45 detinfo::DetectorPropertiesData::ModBoxCorrection(double const dQdX, double const EField) const
46 {
47  return fProperties.ModBoxCorrection(dQdX, EField);
48 }
49 
50 double
52 {
53  return fProperties.ElectronsToADC();
54 }
55 
56 unsigned int
58 {
60 }
61 
62 unsigned int
64 {
66 }
67 
68 double
70 {
72 }
73 
74 double
75 detinfo::DetectorPropertiesData::Density(double const temperature) const
76 {
77  return fProperties.Density(temperature);
78 }
79 
80 double
82 {
83  return fProperties.Temperature();
84 }
85 
86 double
87 detinfo::DetectorPropertiesData::Eloss(double const mom, double const mass, double const tcut) const
88 {
89  return fProperties.Eloss(mom, mass, tcut);
90 }
91 
92 double
93 detinfo::DetectorPropertiesData::ElossVar(double const mom, double const mass) const
94 {
95  return fProperties.ElossVar(mom, mass);
96 }
97 
98 double
100  int const p,
101  int const t,
102  int const c) const
103 {
104  return (X / (fXTicksCoefficient * fDriftDirection.at(c).at(t)) +
105  fXTicksOffsets.at(c).at(t).at(p));
106 }
107 
108 double
110 {
111  return ConvertXToTicks(X, planeid.Plane, planeid.TPC, planeid.Cryostat);
112 }
113 
114 double
116  int const p,
117  int const t,
118  int const c) const
119 {
120  return (ticks - fXTicksOffsets.at(c).at(t).at(p)) * fXTicksCoefficient *
121  fDriftDirection.at(c).at(t);
122 }
123 
124 double
126  geo::PlaneID const& planeid) const
127 {
128  return ConvertTicksToX(ticks, planeid.Plane, planeid.TPC, planeid.Cryostat);
129 }
130 
131 double
133 {
134  return fProperties.TimeOffsetU();
135 }
136 double
138 {
139  return fProperties.TimeOffsetV();
140 }
141 double
143 {
144  return fProperties.TimeOffsetZ();
145 }
146 
147 double
148 detinfo::DetectorPropertiesData::GetXTicksOffset(int const p, int const t, int const c) const
149 {
150  return fXTicksOffsets.at(c).at(t).at(p);
151 }
152 
153 double
155 {
156  return GetXTicksOffset(planeid.Plane, planeid.TPC, planeid.Cryostat);
157 }
158 
159 double
161 {
162  return fXTicksCoefficient * fDriftDirection.at(c).at(t);
163 }
164 
165 double
167 {
168  return fXTicksCoefficient;
169 }
170 
171 bool
173 {
174  return fProperties.SimpleBoundary();
175 }
double ElossVar(double mom, double mass) const
Energy loss fluctuation ( )
virtual unsigned int ReadOutWindowSize() const =0
virtual double ElossVar(double mom, double mass) const =0
Energy loss fluctuation ( )
std::vector< std::vector< std::vector< double > > > const fXTicksOffsets
double GetXTicksOffset(int p, int t, int c) const
virtual double BirksCorrection(double dQdX) const =0
dQ/dX in electrons/cm, returns dE/dX in MeV/cm.
virtual double ModBoxCorrection(double dQdX) const =0
The data type to uniquely identify a Plane.
Definition: geo_types.h:472
double Temperature() const
In kelvin.
struct vector vector
CryostatID_t Cryostat
Index of cryostat.
Definition: geo_types.h:212
double ModBoxCorrection(double dQdX) const
tick ticks
Alias for common language habits.
Definition: electronics.h:78
double Efield(unsigned int planegap=0) const
kV/cm
virtual double Eloss(double mom, double mass, double tcut) const =0
Restricted mean energy loss ( )
virtual double TimeOffsetV() const =0
def move(depos, offset)
Definition: depos.py:107
virtual double Temperature() const =0
p
Definition: test.py:223
double ConvertXToTicks(double X, int p, int t, int c) const
virtual double TimeOffsetZ() const =0
virtual bool SimpleBoundary() const =0
double Density(double temperature=0.) const
Returns argon density at a given temperature.
detinfo::DetectorProperties const & fProperties
double DriftVelocity(double efield=0., double temperature=0.) const
cm/us
virtual unsigned int NumberTimeSamples() const =0
PlaneID_t Plane
Index of the plane within its TPC.
Definition: geo_types.h:493
virtual double Density(double temperature) const =0
Returns argon density at a given temperature.
double Eloss(double mom, double mass, double tcut) const
Restricted mean energy loss (dE/dx)
double ConvertTicksToX(double ticks, int p, int t, int c) const
virtual double DriftVelocity(double efield=0., double temperature=0.) const =0
double BirksCorrection(double dQdX) const
dQ/dX in electrons/cm, returns dE/dX in MeV/cm.
DetectorPropertiesData(DetectorProperties const &properties, double x_ticks_coefficient, std::vector< std::vector< std::vector< double >>> &&x_ticks_offsets, std::vector< std::vector< double >> &&drift_direction)
std::vector< std::vector< double > > const fDriftDirection
virtual double Efield(unsigned int planegap=0) const =0
Returns the nominal electric field in the specified volume.
TPCID_t TPC
Index of the TPC within its cryostat.
Definition: geo_types.h:406
virtual double ElectronsToADC() const =0
virtual double TimeOffsetU() const =0
virtual double ElectronLifetime() const =0
Returns the attenuation constant for ionization electrons.