All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DetectorProperties.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 // \file DetectorProperties.h
3 //
4 // \brief pure virtual base interface for detector properties
5 //
6 // \author jpaley@fnal.gov
7 //
8 ////////////////////////////////////////////////////////////////////////
9 #ifndef LARDATA_DETINFO_DETECTORPROPERTIES_H
10 #define LARDATA_DETINFO_DETECTORPROPERTIES_H
11 
13 
14 /// General LArSoft Utilities
15 namespace detinfo {
16 
17  class DetectorClocksData;
19  public:
20  DetectorProperties() = default;
21  DetectorProperties(const DetectorProperties&) = delete;
25  virtual ~DetectorProperties() = default;
26 
27  /**
28  * @brief Returns the nominal electric field in the specified volume
29  * @param planegap volume specification (default: 0, the big drift volume)
30  * @return electric field in the volume, in kV/cm
31  *
32  * The electric field is "nominal", i.e., a completely uniform field is
33  * assumed.
34  *
35  * The planegap argument identifies which volume to return the field value
36  * for. The relation between planegap and readout plane is not perfectly
37  * formalized yet. In general, a good rule is that planegap N describes
38  * the volume on the cathode side of wire plane N. This rule is formally
39  * valid also for ArgoNeuT/LArIAT, where three wire planes are present.
40  * But only two of them are instrumented and read, that are called
41  * "readout plane 0" and "readout plane 1", but effectively correspond to
42  * planegap 1 and 2.
43  *
44  * Note that all TPCs are assumed to have the same electric field values.
45  */
46  virtual double Efield(unsigned int planegap = 0) const = 0;
47 
48  virtual double DriftVelocity(double efield = 0., double temperature = 0.) const = 0;
49 
50  /// dQ/dX in electrons/cm, returns dE/dX in MeV/cm.
51  virtual double BirksCorrection(double dQdX) const = 0;
52  virtual double BirksCorrection(double dQdX, double EField) const = 0;
53  virtual double ModBoxCorrection(double dQdX) const = 0;
54  virtual double ModBoxCorrection(double dQdX, double EField) const = 0;
55 
56  /**
57  * @brief Returns the attenuation constant for ionization electrons.
58  * @return the attenuation constant [µs]
59  *
60  * The returned constant τ can be used to know the attenuation the
61  * ionization charge undergoes after drifting for a certain time _t_:
62  * @f$ A(t) = e^{-t/\tau} @f$ (_t_ is measured in microseconds).
63  *
64  * This is a uniform, constant value for the detector.
65  */
66  virtual double ElectronLifetime() const = 0;
67 
68  /**
69  * @brief Returns argon density at a given temperature
70  * @param temperature the temperature in kelvin
71  * @return argon density in g/cm^3
72  */
73  virtual double Density(double temperature) const = 0;
74  virtual double Temperature() const = 0;
75 
76  /**
77  * @brief Restricted mean energy loss (@f$ dE/dx @f$)
78  * @param mom momentum of incident particle [GeV/c]
79  * @param mass mass of incident particle [GeV/c^2]
80  * @param tcut maximum kinetic energy of delta rays [MeV]; 0 for unlimited
81  * @return the restricted mean energy loss (dE/dx) in units of MeV/cm
82  *
83  * Returned value is always positive.
84  * For unrestricted mean energy loss, set tcut = 0 (special case),
85  * or tcut large.
86  */
87  virtual double Eloss(double mom, double mass, double tcut) const = 0;
88 
89  /**
90  * @brief Energy loss fluctuation (@f$ \sigma_{E}^2 / x @f$)
91  * @param mom momentum of incident particle in [GeV/c]
92  * @param mass mass of incident particle [GeV/c^2]
93  * @return energy loss fluctuation in MeV^2/cm
94  */
95  virtual double ElossVar(double mom, double mass) const = 0;
96 
97  /// Returns argon density at the temperature from Temperature()
98  virtual double
99  Density() const
100  {
101  return Density(Temperature());
102  }
103 
104  virtual double ElectronsToADC() const = 0;
105  virtual unsigned int NumberTimeSamples() const = 0;
106  virtual unsigned int ReadOutWindowSize() const = 0;
107  virtual double TimeOffsetU() const = 0;
108  virtual double TimeOffsetV() const = 0;
109  virtual double TimeOffsetZ() const = 0;
110  virtual double
111  TimeOffsetY() const
112  {
113  throw std::runtime_error("DetectorProperties::TimeOffsetY() not implemented");
114  }
115 
116  // To set the model we want for the optical boundary simulation Simple or G4
117  // default
118  virtual bool SimpleBoundary() const = 0;
119 
120  // Returns data object that corresponds to data specific for a
121  // given clock-data object instance.
122  virtual DetectorPropertiesData DataFor(DetectorClocksData const& clockData) const = 0;
123 
124  }; // class DetectorProperties
125 } // namespace detinfo
126 
127 #endif // LARDATA_DETINFO_DETECTORPROPERTIES_H
virtual unsigned int NumberTimeSamples() const =0
virtual double ElectronLifetime() const =0
Returns the attenuation constant for ionization electrons.
virtual DetectorPropertiesData DataFor(DetectorClocksData const &clockData) const =0
virtual double Temperature() const =0
virtual double Efield(unsigned int planegap=0) const =0
Returns the nominal electric field in the specified volume.
virtual double ModBoxCorrection(double dQdX) const =0
virtual double Density() const
Returns argon density at the temperature from Temperature()
virtual double TimeOffsetU() const =0
virtual double TimeOffsetZ() const =0
virtual double BirksCorrection(double dQdX) const =0
dQ/dX in electrons/cm, returns dE/dX in MeV/cm.
virtual double DriftVelocity(double efield=0., double temperature=0.) const =0
virtual double Eloss(double mom, double mass, double tcut) const =0
Restricted mean energy loss ( )
virtual bool SimpleBoundary() const =0
virtual double TimeOffsetV() const =0
virtual double ElossVar(double mom, double mass) const =0
Energy loss fluctuation ( )
Contains all timing reference information for the detector.
virtual double ElectronsToADC() const =0
float mass
Definition: dedx.py:47
virtual ~DetectorProperties()=default
DetectorProperties & operator=(const DetectorProperties &)=delete
virtual double TimeOffsetY() const
virtual unsigned int ReadOutWindowSize() const =0