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 DETINFO_IDETECTORPROPERTIES_H
10 #define DETINFO_IDETECTORPROPERTIES_H
11 
12 #include "fhiclcpp/ParameterSet.h"
13 #include "Geometry/GeometryGAr.h"
14 
15 ///General GArSoft Utilities
16 namespace gar {
17  namespace detinfo{
18 
19  // Conversion for energy deposited in GeV to number of ionization electrons produced
20  constexpr double kGeVToElectrons = 3.788e7; ///< 26.4 eV per ion pair, 1e9 eV/GeV
21 
23  public:
24 
25  DetectorProperties(const DetectorProperties &) = delete;
29  virtual ~DetectorProperties() = default;
30 
31  /**
32  * @brief Returns the nominal electric field in the specified volume
33  * @param planegap volume specification (default: 0, the big drift volume)
34  * @return electric field in the volume, in kV/cm
35  *
36  * The electric field is "nominal", i.e., a completely uniform field is
37  * assumed.
38  *
39  * The planegap argument identifies which volume to return the field value
40  * for. The relation between planegap and readout plane is not perfectly
41  * formalized yet. In general, a good rule is that planegap N describes
42  * the volume on the cathode side of wire plane N. This rule is formally
43  * valid also for ArgoNeuT/LArIAT, where three wire planes are present.
44  * But only two of them are instrumented and read, that are called
45  * "readout plane 0" and "readout plane 1", but effectively correspond to
46  * planegap 1 and 2.
47  *
48  * Note that all TPCs are assumed to have the same electric field values.
49  */
50  virtual double Efield(unsigned int planegap=0) const = 0;
51 
52  virtual double DriftVelocity(double efield=0.,
53  double temperature=0.,
54  bool cmPerns=true) const = 0;
55 
56  virtual double ElectronLifetime() const = 0;
57 
58  /**
59  * @brief Returns argon density at a given temperature
60  * @param temperature the temperature in kelvin
61  * @return argon density in g/cm^3
62  */
63  virtual double Density(double temperature) const = 0;
64  virtual double Temperature() const = 0;
65 
66  /**
67  * @brief Restricted mean energy loss (@f$ dE/dx @f$)
68  * @param mom momentum of incident particle [GeV/c]
69  * @param mass mass of incident particle [GeV/c^2]
70  * @param tcut maximum kinetic energy of delta rays [MeV]; 0 for unlimited
71  * @return the restricted mean energy loss (dE/dx) in units of MeV/cm
72  *
73  * Returned value is always positive.
74  * For unrestricted mean energy loss, set tcut = 0 (special case),
75  * or tcut large.
76  */
77  virtual double Eloss(double mom,
78  double mass,
79  double tcut) const = 0;
80 
81  /**
82  * @brief Energy loss fluctuation (@f$ \sigma_{E}^2 / x @f$)
83  * @param mom momentum of incident particle in [GeV/c]
84  * @return energy loss fluctuation in MeV^2/cm
85  */
86  virtual double ElossVar(double mom,
87  double mass) const = 0;
88 
89  /// Returns argon density at the temperature from Temperature()
90  virtual double Density() const { return Density(Temperature()); }
91 
92  virtual double SamplingRate() const = 0;
93  virtual double ElectronsToADC() const = 0;
94  virtual unsigned int NumberTimeSamples() const = 0;
95  virtual int TriggerOffset() const = 0;
96 
97  virtual double ConvertXToTicks(double X) const = 0;
98  virtual double ConvertTicksToX(double ticks) const = 0;
99 
100  // The following methods convert between TDC counts (SimChannel time) and
101  // ticks (RawDigit time).
102  virtual double ConvertTDCToTicks(double tdc) const = 0;
103  virtual double ConvertTicksToTDC(double ticks) const = 0;
104 
105  //ECAL Properties
106  virtual double EffectivePixel() const = 0;
107  virtual double LightYield() const = 0;
108  virtual double SiPMGain() const = 0;
109  virtual double IntercalibrationFactor() const = 0;
110  virtual double ADCSaturation() const = 0;
111  virtual double TimeResolution() const = 0;
112  virtual double MeVtoMIP() const = 0;
113  virtual double NoisePx() const = 0;
114 
115  protected:
116  DetectorProperties() = default;
117 
118  }; // class DetectorProperties
119  } //namespace detinfo
120 }
121 #endif // DETINFO_IDETECTORPROPERTIES_H
virtual double Eloss(double mom, double mass, double tcut) const =0
Restricted mean energy loss ( )
virtual double SiPMGain() const =0
virtual double ElossVar(double mom, double mass) const =0
Energy loss fluctuation ( )
virtual double IntercalibrationFactor() const =0
DetectorProperties & operator=(const DetectorProperties &)=delete
tick ticks
Alias for common language habits.
Definition: electronics.h:78
virtual double EffectivePixel() const =0
constexpr double kGeVToElectrons
26.4 eV per ion pair, 1e9 eV/GeV
virtual double ADCSaturation() const =0
virtual double Efield(unsigned int planegap=0) const =0
Returns the nominal electric field in the specified volume.
virtual double NoisePx() const =0
virtual ~DetectorProperties()=default
virtual double LightYield() const =0
virtual int TriggerOffset() const =0
General LArSoft Utilities.
virtual double Temperature() const =0
virtual double ElectronsToADC() const =0
virtual double ConvertTicksToTDC(double ticks) const =0
virtual double MeVtoMIP() const =0
General GArSoft Utilities.
virtual double ElectronLifetime() const =0
virtual double ConvertTicksToX(double ticks) const =0
virtual double TimeResolution() const =0
virtual double Density() const
Returns argon density at the temperature from Temperature()
virtual double SamplingRate() const =0
virtual double DriftVelocity(double efield=0., double temperature=0., bool cmPerns=true) const =0
art framework interface to geometry description
virtual double ConvertXToTicks(double X) const =0
virtual unsigned int NumberTimeSamples() const =0
virtual double ConvertTDCToTicks(double tdc) const =0