LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
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 detinfo::DetectorPropertiesData::Efield(unsigned int const planegap) const
17 {
18  return fProperties.Efield(planegap);
19 }
20 
22  double const temperature) const
23 {
24  return fProperties.DriftVelocity(efield, temperature);
25 }
26 
27 double detinfo::DetectorPropertiesData::BirksCorrection(double const dQdX) const
28 {
29  return fProperties.BirksCorrection(dQdX, Efield());
30 }
32  double const EField) const
33 {
34  return fProperties.BirksCorrection(dQdX, EField);
35 }
36 
38 {
39  return fProperties.ModBoxCorrection(dQdX, Efield());
40 }
42  double const EField) const
43 {
44  return fProperties.ModBoxCorrection(dQdX, EField);
45 }
46 
48 {
49  return fProperties.ElectronsToADC();
50 }
51 
53 {
55 }
56 
58 {
60 }
61 
63 {
65 }
66 
67 double detinfo::DetectorPropertiesData::Density(double const temperature) const
68 {
69  return fProperties.Density(temperature);
70 }
71 
73 {
74  return fProperties.Temperature();
75 }
76 
78  double const mass,
79  double const tcut) const
80 {
81  return fProperties.Eloss(mom, mass, tcut);
82 }
83 
84 double detinfo::DetectorPropertiesData::ElossVar(double const mom, double const mass) const
85 {
86  return fProperties.ElossVar(mom, mass);
87 }
88 
90  int const p,
91  int const t,
92  int const c) const
93 {
94  return (X / (fXTicksCoefficient * fDriftDirection.at(c).at(t)) +
95  fXTicksOffsets.at(c).at(t).at(p));
96 }
97 
99  geo::PlaneID const& planeid) const
100 {
101  return ConvertXToTicks(X, planeid.Plane, planeid.TPC, planeid.Cryostat);
102 }
103 
105  int const p,
106  int const t,
107  int const c) const
108 {
109  return (ticks - fXTicksOffsets.at(c).at(t).at(p)) * fXTicksCoefficient *
110  fDriftDirection.at(c).at(t);
111 }
112 
114  geo::PlaneID const& planeid) const
115 {
116  return ConvertTicksToX(ticks, planeid.Plane, planeid.TPC, planeid.Cryostat);
117 }
118 
120 {
121  return fProperties.TimeOffsetU();
122 }
124 {
125  return fProperties.TimeOffsetV();
126 }
128 {
129  return fProperties.TimeOffsetZ();
130 }
131 
132 double detinfo::DetectorPropertiesData::GetXTicksOffset(int const p, int const t, int const c) const
133 {
134  return fXTicksOffsets.at(c).at(t).at(p);
135 }
136 
138 {
139  return GetXTicksOffset(planeid.Plane, planeid.TPC, planeid.Cryostat);
140 }
141 
142 double detinfo::DetectorPropertiesData::GetXTicksCoefficient(int const t, int const c) const
143 {
144  return fXTicksCoefficient * fDriftDirection.at(c).at(t);
145 }
146 
148 {
149  return fXTicksCoefficient;
150 }
151 
153 {
154  return fProperties.SimpleBoundary();
155 }
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:463
double Temperature() const
In kelvin.
CryostatID_t Cryostat
Index of cryostat.
Definition: geo_types.h:211
double ModBoxCorrection(double dQdX) const
tick ticks
Alias for common language habits.
Definition: electronics.h:76
double Efield(unsigned int planegap=0) const
kV/cm
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Definition: DumpUtils.h:289
virtual double Eloss(double mom, double mass, double tcut) const =0
Restricted mean energy loss ( )
virtual double TimeOffsetV() const =0
virtual double Temperature() const =0
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:481
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:399
virtual double ElectronsToADC() const =0
Float_t X
Definition: plot.C:37
virtual double TimeOffsetU() const =0
virtual double ElectronLifetime() const =0
Returns the attenuation constant for ionization electrons.