DetectorPropertiesData.h
Go to the documentation of this file.
1 #ifndef DETINFO_DETECTORPROPERTIESDATA_H
2 #define DETINFO_DETECTORPROPERTIESDATA_H
3 
5 
6 #include <vector>
7 
8 namespace detinfo {
9  class DetectorProperties;
10 
12  public:
13  explicit DetectorPropertiesData(DetectorProperties const& properties,
14  double x_ticks_coefficient,
15  std::vector<std::vector<std::vector<double>>>&& x_ticks_offsets,
16  std::vector<std::vector<double>>&& drift_direction);
17 
18  double Efield(unsigned int planegap = 0) const; ///< kV/cm
19 
20  double DriftVelocity(double efield = 0.,
21  double temperature = 0.) const; ///< cm/us
22 
23  /// dQ/dX in electrons/cm, returns dE/dX in MeV/cm.
24  double BirksCorrection(double dQdX) const;
25  double BirksCorrection(double dQdX, double EField) const;
26  double ModBoxCorrection(double dQdX) const;
27  double ModBoxCorrection(double dQdX, double EField) const;
28 
29  double ElectronLifetime() const;
30 
31  /**
32  * @brief Returns argon density at a given temperature
33  * @param temperature the temperature in kelvin
34  * @return argon density in g/cm^3
35  *
36  * Density is nearly a linear function of temperature.
37  * See the NIST tables for details
38  * Slope is between -6.2 and -6.1, intercept is 1928 kg/m^3.
39  * This parameterization will be good to better than 0.5%.
40  */
41  double Density(double temperature = 0.) const; ///< g/cm^3
42 
43  /// In kelvin.
44  double Temperature() const;
45 
46  /**
47  * @brief Restricted mean energy loss (dE/dx)
48  * @param mom momentum of incident particle [GeV/c]
49  * @param mass mass of incident particle [GeV/c^2]
50  * @param tcut maximum kinetic energy of delta rays [MeV]; 0 for unlimited
51  * @return the restricted mean energy loss (dE/dx) in units of MeV/cm
52  *
53  * Returned value is always positive.
54  * For unrestricted mean energy loss, set tcut = 0 (special case),
55  * or tcut large.
56  *
57  * Based on Bethe-Bloch formula as contained in particle data book.
58  * Material parameters are from the configuration.
59  */
60  double Eloss(double mom, double mass, double tcut) const;
61 
62  /**
63  * @brief Energy loss fluctuation (@f$ \sigma_{E}^2 / x @f$)
64  * @param mom momentum of incident particle in [GeV/c]
65  * @param mass mass of incident particle [GeV/c^2]
66  * @return energy loss fluctuation in MeV^2/cm
67  *
68  * Based on Bichsel formula referred to but not given in PDG.
69  */
70  double ElossVar(double mom, double mass) const;
71 
72  double ElectronsToADC() const;
73  unsigned int NumberTimeSamples() const;
74  unsigned int ReadOutWindowSize() const;
75  double TimeOffsetU() const;
76  double TimeOffsetV() const;
77  double TimeOffsetZ() const;
78  double TimeOffsetY() const;
79 
80  double ConvertXToTicks(double X, int p, int t, int c) const;
81  double ConvertXToTicks(double X, geo::PlaneID const& planeid) const;
82 
83  double ConvertTicksToX(double ticks, int p, int t, int c) const;
84  double ConvertTicksToX(double ticks, geo::PlaneID const& planeid) const;
85 
86  double GetXTicksOffset(int p, int t, int c) const;
87  double GetXTicksOffset(geo::PlaneID const& planeid) const;
88 
89  double GetXTicksCoefficient(int t, int c) const;
90  double GetXTicksCoefficient(geo::TPCID const& tpcid) const;
91  double GetXTicksCoefficient() const;
92 
93  bool SimpleBoundary() const;
94 
95  private:
97  double const fXTicksCoefficient;
98  std::vector<std::vector<std::vector<double>>> const fXTicksOffsets;
99  std::vector<std::vector<double>> const fDriftDirection;
100  }; // class DetectorPropertiesStandard
101 } // namespace detinfo
102 
103 #endif // DETINFO_DETECTOR_PROPERTIES_H
double ElossVar(double mom, double mass) const
Energy loss fluctuation ( )
std::vector< std::vector< std::vector< double > > > const fXTicksOffsets
double GetXTicksOffset(int p, int t, int c) const
The data type to uniquely identify a Plane.
Definition: geo_types.h:472
double Temperature() const
In kelvin.
struct vector vector
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
p
Definition: test.py:223
double ConvertXToTicks(double X, int p, int t, int c) const
double Density(double temperature=0.) const
Returns argon density at a given temperature.
detinfo::DetectorProperties const & fProperties
General LArSoft Utilities.
double DriftVelocity(double efield=0., double temperature=0.) const
cm/us
The data type to uniquely identify a TPC.
Definition: geo_types.h:386
Definition of data types for geometry description.
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
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