LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
DetectorProperties.h
Go to the documentation of this file.
1 // \file DetectorProperties.h
3 //
4 // \brief pure virtual base interface for detector properties
5 //
6 // \author jpaley@fnal.gov
7 //
9 #ifndef LARDATA_DETINFO_DETECTORPROPERTIES_H
10 #define LARDATA_DETINFO_DETECTORPROPERTIES_H
11 
12 #include "fhiclcpp/ParameterSet.h"
13 #include "larcoreobj/SimpleTypesAndConstants/geo_types.h" // geo::PlaneID, ...
14 
15 #include <stdexcept> // std::runtime_error()
16 
17 
19 namespace detinfo{
20 
22  public:
23 
24  DetectorProperties(const DetectorProperties &) = delete;
28  virtual ~DetectorProperties() = default;
29 
49  virtual double Efield(unsigned int planegap=0) const = 0;
50 
51  virtual double DriftVelocity(double efield=0., double temperature=0.) const = 0;
52 
54  virtual double BirksCorrection(double dQdX) const = 0;
55  virtual double ModBoxCorrection(double dQdX) const = 0;
56 
67  virtual double ElectronLifetime() const = 0;
68 
74  virtual double Density(double temperature) const = 0;
75  virtual double Temperature() const = 0;
76 
88  virtual double Eloss(double mom, double mass, double tcut) const = 0;
89 
96  virtual double ElossVar(double mom, double mass) const = 0;
97 
99  virtual double Density() const { return Density(Temperature()); }
100 
106  virtual double SamplingRate() const = 0;
107 
108  virtual double ElectronsToADC() const = 0;
109  virtual unsigned int NumberTimeSamples() const = 0;
110  virtual unsigned int ReadOutWindowSize() const = 0;
111  virtual int TriggerOffset() const = 0;
112  virtual double TimeOffsetU() const = 0;
113  virtual double TimeOffsetV() const = 0;
114  virtual double TimeOffsetZ() const = 0;
115  virtual double TimeOffsetY() const
116  { throw std::runtime_error("DetectorProperties::TimeOffsetY() not implemented"); }
117 
118  virtual double ConvertXToTicks(double X, int p, int t, int c) const = 0;
119  virtual double ConvertXToTicks(double X, geo::PlaneID const& planeid) const = 0;
120  virtual double ConvertTicksToX(double ticks, int p, int t, int c) const = 0;
121  virtual double ConvertTicksToX(double ticks, geo::PlaneID const& planeid) const = 0;
122  virtual double GetXTicksOffset(int p, int t, int c) const = 0;
123  virtual double GetXTicksOffset(geo::PlaneID const& planeid) const = 0;
124  virtual double GetXTicksCoefficient(int t, int c) const = 0;
125  virtual double GetXTicksCoefficient(geo::TPCID const& tpcid) const = 0;
126  virtual double GetXTicksCoefficient() const = 0;
127 
128  // The following methods convert between TDC counts (SimChannel time) and
129  // ticks (RawDigit/Wire time).
130  virtual double ConvertTDCToTicks(double tdc) const = 0;
131  virtual double ConvertTicksToTDC(double ticks) const = 0;
132 
133  // To set the model we want for the optical boundary simulation Simple or G4 default
134  virtual bool SimpleBoundary() const = 0;
135 
136  protected:
137  DetectorProperties() = default;
138 
139  }; // class DetectorProperties
140 } //namespace detinfo
141 
142 #endif // LARDATA_DETINFO_DETECTORPROPERTIES_H
virtual unsigned int ReadOutWindowSize() const =0
virtual double ElossVar(double mom, double mass) const =0
Energy loss fluctuation ( )
virtual int TriggerOffset() const =0
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:250
virtual double SamplingRate() const =0
Returns the period of the TPC readout electronics clock.
virtual double Density() const
Returns argon density at the temperature from Temperature()
virtual double GetXTicksCoefficient() const =0
virtual double ConvertXToTicks(double X, int p, int t, int c) const =0
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
virtual double TimeOffsetZ() const =0
virtual bool SimpleBoundary() const =0
General LArSoft Utilities.
virtual unsigned int NumberTimeSamples() const =0
The data type to uniquely identify a TPC.
Definition: geo_types.h:195
Definition of data types for geometry description.
virtual double ConvertTicksToX(double ticks, int p, int t, int c) const =0
virtual double DriftVelocity(double efield=0., double temperature=0.) const =0
virtual ~DetectorProperties()=default
virtual double ConvertTicksToTDC(double ticks) const =0
virtual double Efield(unsigned int planegap=0) const =0
Returns the nominal electric field in the specified volume.
DetectorProperties & operator=(const DetectorProperties &)=delete
virtual double TimeOffsetY() const
virtual double ElectronsToADC() const =0
Float_t X
Definition: plot.C:39
virtual double TimeOffsetU() const =0
virtual double ConvertTDCToTicks(double tdc) const =0
virtual double ElectronLifetime() const =0
Returns the attenuation constant for ionization electrons.
virtual double GetXTicksOffset(int p, int t, int c) const =0