All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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
pdgs p
Definition: selectors.fcl:22
The data type to uniquely identify a Plane.
Definition: geo_types.h:472
double Temperature() const
In kelvin.
then echo echo For and will not be changed by echo further linking echo echo B echo The symbol is in the uninitialized data multiple common symbols may appear with the echo same name If the symbol is defined the common echo symbols are treated as undefined references For more echo details on common see the discussion of warn common echo in *Note Linker see the discussion of warn common echo in *Note Linker such as a global int variable echo as opposed to a large global array echo echo I echo The symbol is an indirect reference to another symbol This echo is a GNU extension to the a out object file format which is echo rarely used echo echo N echo The symbol is a debugging symbol echo echo R echo The symbol is in a read only data section echo echo S echo The symbol is in an uninitialized data section for small echo objects echo echo T echo The symbol is in the the normal defined echo symbol is used with no error When a weak undefined symbol echo is linked and the symbol is not the value of the echo weak symbol becomes zero with no error echo echo W echo The symbol is a weak symbol that has not been specifically echo tagged as a weak object symbol When a weak defined symbol echo is linked with a normal defined the normal defined echo symbol is used with no error When a weak undefined symbol echo is linked and the symbol is not the value of the echo weak symbol becomes zero with no error echo echo echo The symbol is a stabs symbol in an a out object file In echo this the next values printed are the stabs other echo the stabs desc and the stab type Stabs symbols are echo used to hold debugging information For more echo see *Note or object file format specific echo echo For Mac OS X
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
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Definition: DumpUtils.h:265
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
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.
float mass
Definition: dedx.py:47
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