All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
detinfo::DetectorPropertiesStandard Class Referencefinal

#include <DetectorPropertiesStandard.h>

Inheritance diagram for detinfo::DetectorPropertiesStandard:
detinfo::DetectorProperties

Classes

struct  Configuration_t
 Structure for configuration parameters. More...
 
struct  SternheimerParameters_t
 Parameters for Sternheimer density effect corrections. More...
 

Public Types

using providers_type = lar::ProviderPack< geo::GeometryCore, detinfo::LArProperties >
 List of service providers we depend on. More...
 

Public Member Functions

 DetectorPropertiesStandard (fhicl::ParameterSet const &pset, const geo::GeometryCore *geo, const detinfo::LArProperties *lp, std::set< std::string > const &ignore_params={})
 
 DetectorPropertiesStandard (DetectorPropertiesStandard const &)=delete
 
virtual ~DetectorPropertiesStandard ()=default
 
void SetNumberTimeSamples (unsigned int nsamp)
 
double Efield (unsigned int planegap=0) const override
 kV/cm More...
 
double DriftVelocity (double efield=0., double temperature=0.) const override
 cm/us More...
 
double BirksCorrection (double dQdX) const override
 dQ/dX in electrons/cm, returns dE/dX in MeV/cm. More...
 
double BirksCorrection (double dQdX, double EField) const override
 
double ModBoxCorrection (double dQdX) const override
 
double ModBoxCorrection (double dQdX, double EField) const override
 
double ElectronLifetime () const override
 Returns the attenuation constant for ionization electrons. More...
 
double Density (double temperature=0.) const override
 Returns argon density at a given temperature. More...
 
double Temperature () const override
 In kelvin. More...
 
double Eloss (double mom, double mass, double tcut) const override
 Restricted mean energy loss (dE/dx) More...
 
double ElossVar (double mom, double mass) const override
 Energy loss fluctuation ( $ \sigma_{E}^2 / x $) More...
 
double ElectronsToADC () const override
 
unsigned int NumberTimeSamples () const override
 
unsigned int ReadOutWindowSize () const override
 
double TimeOffsetU () const override
 
double TimeOffsetV () const override
 
double TimeOffsetZ () const override
 
double TimeOffsetY () const override
 
bool SimpleBoundary () const override
 
DetectorPropertiesData DataFor (detinfo::DetectorClocksData const &clock_data) const override
 
- Public Member Functions inherited from detinfo::DetectorProperties
 DetectorProperties ()=default
 
 DetectorProperties (const DetectorProperties &)=delete
 
 DetectorProperties (DetectorProperties &&)=delete
 
DetectorPropertiesoperator= (const DetectorProperties &)=delete
 
DetectorPropertiesoperator= (DetectorProperties &&)=delete
 
virtual ~DetectorProperties ()=default
 
virtual double Density () const
 Returns argon density at the temperature from Temperature() More...
 

Private Member Functions

void ValidateAndConfigure (fhicl::ParameterSet const &p, std::set< std::string > const &ignore_params)
 Configures the provider, first validating the configuration. More...
 
std::string CheckTimeOffsets (std::set< geo::View_t > const &requested_views) const
 

Private Attributes

const detinfo::LArPropertiesfLP
 
const geo::GeometryCorefGeo
 
std::vector< double > fEfield
 kV/cm (per inter-plane volume) ! More...
 
double fElectronlifetime
 microseconds More...
 
double fTemperature
 kelvin More...
 
double fElectronsToADC
 
unsigned int fNumberTimeSamples
 number of clock ticks per event More...
 
unsigned int fReadOutWindowSize
 number of clock ticks per readout window More...
 
double fTimeOffsetU
 
double fTimeOffsetV
 
double fTimeOffsetZ
 
double fTimeOffsetY
 
double fTimeOffsetX
 
double fDriftVelFudgeFactor
 
bool fUseIcarusMicrobooneDriftModel
 
bool fIncludeInterPlanePitchInXTickOffsets
 
SternheimerParameters_t fSternheimerParameters
 Sternheimer parameters. More...
 
std::vector< std::vector
< double > > 
fDriftDirection
 
bool fSimpleBoundary
 
double fModBoxA
 
double fModBoxB
 

Detailed Description

Definition at line 36 of file DetectorPropertiesStandard.h.

Member Typedef Documentation

List of service providers we depend on.

Definition at line 39 of file DetectorPropertiesStandard.h.

Constructor & Destructor Documentation

detinfo::DetectorPropertiesStandard::DetectorPropertiesStandard ( fhicl::ParameterSet const &  pset,
const geo::GeometryCore geo,
const detinfo::LArProperties lp,
std::set< std::string > const &  ignore_params = {} 
)

Definition at line 29 of file DetectorPropertiesStandard.cxx.

33  : fLP(lp), fGeo(geo)
34  {
35  ValidateAndConfigure(pset, ignore_params);
36  }
void ValidateAndConfigure(fhicl::ParameterSet const &p, std::set< std::string > const &ignore_params)
Configures the provider, first validating the configuration.
detinfo::DetectorPropertiesStandard::DetectorPropertiesStandard ( DetectorPropertiesStandard const &  )
delete
virtual detinfo::DetectorPropertiesStandard::~DetectorPropertiesStandard ( )
virtualdefault

Member Function Documentation

double detinfo::DetectorPropertiesStandard::BirksCorrection ( double  dQdX) const
overridevirtual

dQ/dX in electrons/cm, returns dE/dX in MeV/cm.

Implements detinfo::DetectorProperties.

Definition at line 305 of file DetectorPropertiesStandard.cxx.

306  {
307  return BirksCorrection(dQdx, Efield());
308  }
double BirksCorrection(double dQdX) const override
dQ/dX in electrons/cm, returns dE/dX in MeV/cm.
double Efield(unsigned int planegap=0) const override
kV/cm
double detinfo::DetectorPropertiesStandard::BirksCorrection ( double  dQdX,
double  EField 
) const
overridevirtual

Implements detinfo::DetectorProperties.

Definition at line 310 of file DetectorPropertiesStandard.cxx.

311  {
312  // Correction for charge quenching using parameterization from
313  // S.Amoruso et al., NIM A 523 (2004) 275
314 
315  constexpr double A3t = util::kRecombA;
316  double K3t = util::kRecombk; // in KV/cm*(g/cm^2)/MeV
317  double const rho = Density(); // LAr density in g/cm^3
318  constexpr double Wion = 1000. / util::kGeVToElectrons; // 23.6 eV = 1e, Wion in MeV/e
319  K3t /= rho; // KV/MeV
320  double const dEdx = dQdx / (A3t / Wion - K3t / E_field * dQdx); // MeV/cm
321 
322  return dEdx;
323  }
virtual double Density() const
Returns argon density at the temperature from Temperature()
constexpr double kGeVToElectrons
23.6eV per ion pair, 1e9 eV/GeV
float dEdx(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, const TCSlice &slc, TP3D &tp3d)
Definition: PFPUtils.cxx:2687
int Wion
Definition: dedx.py:125
constexpr double kRecombk
constexpr double kRecombA
A constant.
std::string detinfo::DetectorPropertiesStandard::CheckTimeOffsets ( std::set< geo::View_t > const &  requested_views) const
private

Definition at line 461 of file DetectorPropertiesStandard.cxx.

462  {
463  auto const& present_views = fGeo->Views();
464 
465  auto view_diff = [&present_views, &requested_views](geo::View_t const view) {
466  return static_cast<int>(present_views.count(view)) -
467  static_cast<int>(requested_views.count(view));
468  };
469 
470  // It is not an error to specify an offset if the view does not
471  // exist. However, if a view does exist, and an offset does not,
472  // then that will end the job.
473  std::ostringstream errors;
474  if (auto diff = view_diff(geo::kU); diff > 0) { errors << "TimeOffsetU missing for view U.\n"; }
475  if (auto diff = view_diff(geo::kV); diff > 0) { errors << "TimeOffsetV missing for view V.\n"; }
476  if (auto diff = view_diff(geo::kZ); diff > 0) { errors << "TimeOffsetZ missing for view Z.\n"; }
477  if (auto diff = view_diff(geo::kY); diff > 0) { errors << "TimeOffsetY missing for view Y.\n"; }
478  if (auto diff = view_diff(geo::kX); diff > 0) { errors << "TimeOffsetX missing for view X.\n"; }
479  return errors.str();
480  }
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
Planes which measure V.
Definition: geo_types.h:130
std::set< geo::View_t > const & Views() const
Returns a list of possible views in the detector.
Planes which measure X direction.
Definition: geo_types.h:134
Planes which measure Z direction.
Definition: geo_types.h:132
Planes which measure Y direction.
Definition: geo_types.h:133
Planes which measure U.
Definition: geo_types.h:129
DetectorPropertiesData detinfo::DetectorPropertiesStandard::DataFor ( detinfo::DetectorClocksData const &  clock_data) const
overridevirtual

< special case for ArgoNeuT

Implements detinfo::DetectorProperties.

Definition at line 357 of file DetectorPropertiesStandard.cxx.

358  {
359  double const samplingRate = sampling_rate(clock_data);
360  double const efield = Efield();
361  double const temperature = Temperature();
362  double const driftVelocity = DriftVelocity(efield, temperature);
363  double const x_ticks_coefficient = 0.001 * driftVelocity * samplingRate;
364 
365  double const triggerOffset = trigger_offset(clock_data);
366 
367  std::vector<std::vector<std::vector<double>>> x_ticks_offsets(fGeo->Ncryostats());
368  std::vector<std::vector<double>> drift_direction(fGeo->Ncryostats());
369 
370  for (size_t cstat = 0; cstat < fGeo->Ncryostats(); ++cstat) {
371  x_ticks_offsets[cstat].resize(fGeo->Cryostat(cstat).NTPC());
372  drift_direction[cstat].resize(fGeo->Cryostat(cstat).NTPC());
373 
374  for (size_t tpc = 0; tpc < fGeo->Cryostat(cstat).NTPC(); ++tpc) {
375  const geo::TPCGeo& tpcgeom = fGeo->Cryostat(cstat).TPC(tpc);
376 
377  const double dir((tpcgeom.DriftDirection() == geo::kNegX) ? +1.0 : -1.0);
378  drift_direction[cstat][tpc] = dir;
379 
380  int nplane = tpcgeom.Nplanes();
381  x_ticks_offsets[cstat][tpc].resize(nplane, 0.);
382  for (int plane = 0; plane < nplane; ++plane) {
383  const geo::PlaneGeo& pgeom = tpcgeom.Plane(plane);
384 
385  // Calculate geometric time offset.
386  // only works if xyz[0]<=0
387  const double* xyz = tpcgeom.PlaneLocation(0);
388 
389  x_ticks_offsets[cstat][tpc][plane] =
390  -xyz[0] / (dir * x_ticks_coefficient) + triggerOffset;
391 
393  // Get field in gap between planes
394  double efieldgap[3];
395  double driftVelocitygap[3];
396  double x_ticks_coefficient_gap[3];
397  for (int igap = 0; igap < 3; ++igap) {
398  efieldgap[igap] = Efield(igap);
399  driftVelocitygap[igap] = DriftVelocity(efieldgap[igap], temperature);
400  x_ticks_coefficient_gap[igap] = 0.001 * driftVelocitygap[igap] * samplingRate;
401  }
402 
403  if (nplane == 3) {
404  /*
405  | ---------- plane = 2 (collection)
406  | Coeff[2]
407  | ---------- plane = 1 (2nd induction)
408  | Coeff[1]
409  | ---------- plane = 0 (1st induction) x = xyz[0]
410  | Coeff[0]
411  | ---------- x = 0
412  V For plane = 0, t offset is -xyz[0]/Coeff[0]
413  x */
414  for (int ip = 0; ip < plane; ++ip) {
415  x_ticks_offsets[cstat][tpc][plane] +=
416  tpcgeom.PlanePitch(ip, ip + 1) / x_ticks_coefficient_gap[ip + 1];
417  }
418  }
419  else if (nplane == 2) { ///< special case for ArgoNeuT
420  /*
421  | ---------- plane = 1 (collection)
422  | Coeff[2]
423  | ---------- plane = 0 (2nd induction) x = xyz[0]
424  | ---------- x = 0, Coeff[1]
425  V ---------- first induction plane
426  x Coeff[0]
427  For plane = 0, t offset is pitch/Coeff[1] -
428  (pitch+xyz[0])/Coeff[0] = -xyz[0]/Coeff[0] -
429  pitch*(1/Coeff[0]-1/Coeff[1])
430  */
431  for (int ip = 0; ip < plane; ++ip) {
432  x_ticks_offsets[cstat][tpc][plane] +=
433  tpcgeom.PlanePitch(ip, ip + 1) / x_ticks_coefficient_gap[ip + 2];
434  }
435  x_ticks_offsets[cstat][tpc][plane] -=
436  tpcgeom.PlanePitch() * (1 / x_ticks_coefficient - 1 / x_ticks_coefficient_gap[1]);
437  }
438 
439  } // end if fIncludeInterPlanePitchInXTickOffsets
440 
441  // Add view dependent offset
442  // FIXME the offset should be plane-dependent
443  geo::View_t view = pgeom.View();
444  switch (view) {
445  case geo::kU: x_ticks_offsets[cstat][tpc][plane] += fTimeOffsetU; break;
446  case geo::kV: x_ticks_offsets[cstat][tpc][plane] += fTimeOffsetV; break;
447  case geo::kZ: x_ticks_offsets[cstat][tpc][plane] += fTimeOffsetZ; break;
448  case geo::kY: x_ticks_offsets[cstat][tpc][plane] += fTimeOffsetY; break;
449  case geo::kX: x_ticks_offsets[cstat][tpc][plane] += fTimeOffsetX; break;
450  default: throw cet::exception(__FUNCTION__) << "Bad view = " << view << "\n";
451  } // switch
452  }
453  }
454  }
455 
456  return DetectorPropertiesData{
457  *this, x_ticks_coefficient, move(x_ticks_offsets), move(drift_direction)};
458  }
double PlanePitch(unsigned int p1=0, unsigned int p2=1) const
Definition: TPCGeo.cxx:388
double Temperature() const override
In kelvin.
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
Planes which measure V.
Definition: geo_types.h:130
unsigned int Nplanes() const
Number of planes in this tpc.
Definition: TPCGeo.h:165
Planes which measure X direction.
Definition: geo_types.h:134
Geometry information for a single TPC.
Definition: TPCGeo.h:38
Planes which measure Z direction.
Definition: geo_types.h:132
Drift towards negative X values.
Definition: geo_types.h:162
unsigned int Ncryostats() const
Returns the number of cryostats in the detector.
Planes which measure Y direction.
Definition: geo_types.h:133
Planes which measure U.
Definition: geo_types.h:129
View_t View() const
Which coordinate does this plane measure.
Definition: PlaneGeo.h:184
Geometry information for a single wire plane.The plane is represented in the geometry by a solid whic...
Definition: PlaneGeo.h:82
unsigned int NTPC() const
Number of TPCs in this cryostat.
Definition: CryostatGeo.h:181
CryostatGeo const & Cryostat(geo::CryostatID const &cryoid) const
Returns the specified cryostat.
DriftDirection_t DriftDirection() const
Returns an enumerator value describing the drift direction.
Definition: TPCGeo.h:144
tuple dir
Definition: dropbox.py:28
double DriftVelocity(double efield=0., double temperature=0.) const override
cm/us
const TPCGeo & TPC(unsigned int itpc) const
Return the itpc&#39;th TPC in the cryostat.
Definition: CryostatGeo.cxx:93
int trigger_offset(DetectorClocksData const &data)
PlaneGeo const & Plane(geo::View_t view) const
Return the plane in the tpc with View_t view.
Definition: TPCGeo.cxx:263
double sampling_rate(DetectorClocksData const &data)
Returns the period of the TPC readout electronics clock.
const double * PlaneLocation(unsigned int p) const
Definition: TPCGeo.cxx:382
double Efield(unsigned int planegap=0) const override
kV/cm
double detinfo::DetectorPropertiesStandard::Density ( double  temperature = 0.) const
overridevirtual

Returns argon density at a given temperature.

Parameters
temperaturethe temperature in kelvin
Returns
argon density in g/cm^3

Density is nearly a linear function of temperature. See the NIST tables for details Slope is between -6.2 and -6.1, intercept is 1928 kg/m^3. This parameterization will be good to better than 0.5%.g/cm^3

Implements detinfo::DetectorProperties.

Definition at line 108 of file DetectorPropertiesStandard.cxx.

109  {
110  // Default temperature use internal value.
111  if (temperature == 0.) temperature = Temperature();
112 
113  return -0.00615 * temperature + 1.928;
114  }
double Temperature() const override
In kelvin.
double detinfo::DetectorPropertiesStandard::DriftVelocity ( double  efield = 0.,
double  temperature = 0. 
) const
overridevirtual

cm/us

Implements detinfo::DetectorProperties.

Definition at line 191 of file DetectorPropertiesStandard.cxx.

192  {
193  // Drift Velocity as a function of Electric Field and LAr Temperature
194  // from : W. Walkowiak, NIM A 449 (2000) 288-294
195  //
196  // Option to use MicroBooNE+ICARUS model (as in arXiv:2008.09765) provided as
197  // well, with temperature depenence as prescribed by Mike Mooney based on
198  // looking at the Walkowiak data.
199  //
200  // Efield should have units of kV/cm
201  // Temperature should have units of Kelvin
202 
203  // Default Efield, use internal value.
204  if (efield == 0.) efield = Efield();
205 
206  if (efield > 4.0)
207  mf::LogWarning("DetectorPropertiesStandard")
208  << "DriftVelocity Warning! : E-field value of " << efield
209  << " kV/cm is outside of range covered by drift"
210  << " velocity parameterization. Returned value"
211  << " may not be correct";
212 
213  // Default temperature use internal value.
214  if (temperature == 0.) temperature = Temperature();
215 
216  if (temperature < 87.0 || temperature > 94.0)
217  mf::LogWarning("DetectorPropertiesStandard")
218  << "DriftVelocity Warning! : Temperature value of " << temperature
219  << " K is outside of range covered by drift velocity"
220  << " parameterization. Returned value may not be"
221  << " correct";
222 
223  double vd;
224 
226  double const tshift = -87.203 + temperature;
227  double const xFit = 0.0938163 - 0.0052563 * tshift - 0.0001470 * tshift * tshift;
228  double const uFit = 5.18406 + 0.01448 * tshift - 0.003497 * tshift * tshift -
229  0.000516 * tshift * tshift * tshift;
230 
231  // Icarus Parameter Set, use as default
232  constexpr double P1 = -0.04640; // K^-1
233  constexpr double P2 = 0.01712; // K^-1
234  constexpr double P3 = 1.88125; // (kV/cm)^-1
235  constexpr double P4 = 0.99408; // kV/cm
236  constexpr double P5 = 0.01172; // (kV/cm)^-P6
237  constexpr double P6 = 4.20214;
238  constexpr double T0 = 105.749; // K
239 
240  // Walkowiak Parameter Set
241  constexpr double P1W = -0.01481; // K^-1
242  constexpr double P2W = -0.0075; // K^-1
243  constexpr double P3W = 0.141; // (kV/cm)^-1
244  constexpr double P4W = 12.4; // kV/cm
245  constexpr double P5W = 1.627; // (kV/cm)^-P6
246  constexpr double P6W = 0.317;
247  constexpr double T0W = 90.371; // K
248 
249  // From Craig Thorne . . . currently not documented
250  // smooth transition from linear at small fields to
251  // icarus fit at most fields to Walkowiak at very high fields
252  if (efield < xFit)
253  vd = efield * uFit;
254  else if (efield < 0.619) {
255  vd = ((P1 * (temperature - T0) + 1) *
256  (P3 * efield * std::log(1 + P4 / efield) + P5 * std::pow(efield, P6)) +
257  P2 * (temperature - T0));
258  }
259  else if (efield < 0.699) {
260  vd = 12.5 * (efield - 0.619) *
261  ((P1W * (temperature - T0W) + 1) *
262  (P3W * efield * std::log(1 + P4W / efield) + P5W * std::pow(efield, P6W)) +
263  P2W * (temperature - T0W)) +
264  12.5 * (0.699 - efield) *
265  ((P1 * (temperature - T0) + 1) *
266  (P3 * efield * std::log(1 + P4 / efield) + P5 * std::pow(efield, P6)) +
267  P2 * (temperature - T0));
268  }
269  else {
270  vd = ((P1W * (temperature - T0W) + 1) *
271  (P3W * efield * std::log(1 + P4W / efield) + P5W * std::pow(efield, P6W)) +
272  P2W * (temperature - T0W));
273  }
274  }
275 
276  // MicroBooNE+ICARUS model (arXiv:2008.09765) with temperature dependence given by
277  // Mike Mooney based on looking at Walkowiak data (NIM A 449 (2000) 288-294)
279  constexpr double P0 = 0.;
280  constexpr double P1 = 5.53416;
281  constexpr double P2 = -6.53093;
282  constexpr double P3 = 3.20752;
283  constexpr double P4 = 0.389696;
284  constexpr double P5 = -0.556184;
285  vd = (1.0 - 0.0184 * (temperature - 89.0)) *
286  (P0 + P1 * cet::pow<1>(efield) + P2 * cet::pow<2>(efield) + P3 * cet::pow<3>(efield) +
287  P4 * cet::pow<4>(efield) + P5 * cet::pow<5>(efield));
288  }
289 
290  vd *= fDriftVelFudgeFactor / 10.;
291 
292  return vd; // in cm/us
293  }
double Temperature() const override
In kelvin.
process_name physics producers generator hPHist_pi physics producers generator P0
double Efield(unsigned int planegap=0) const override
kV/cm
process_name opdaq physics producers generator physics producers generator physics producers generator physics producers generator physics producers generator physics producers generator physics producers generator physics producers generator T0
Definition: gen_protons.fcl:45
double detinfo::DetectorPropertiesStandard::Efield ( unsigned int  planegap = 0) const
overridevirtual

kV/cm

Implements detinfo::DetectorProperties.

Definition at line 97 of file DetectorPropertiesStandard.cxx.

98  {
99  if (planegap >= fEfield.size())
100  throw cet::exception("DetectorPropertiesStandard")
101  << "requesting Electric field in a plane gap that is not defined\n";
102 
103  return fEfield[planegap];
104  }
std::vector< double > fEfield
kV/cm (per inter-plane volume) !
double detinfo::DetectorPropertiesStandard::ElectronLifetime ( ) const
inlineoverridevirtual

Returns the attenuation constant for ionization electrons.

Returns
the attenuation constant [s]

The returned constant τ can be used to know the attenuation the ionization charge undergoes after drifting for a certain time t: $ A(t) = e^{-t/\tau} $ (t is measured in microseconds).

This is a uniform, constant value for the detector.

Implements detinfo::DetectorProperties.

Definition at line 171 of file DetectorPropertiesStandard.h.

172  {
173  return fElectronlifetime; //< microseconds
174  }
double detinfo::DetectorPropertiesStandard::ElectronsToADC ( ) const
inlineoverridevirtual

Implements detinfo::DetectorProperties.

Definition at line 222 of file DetectorPropertiesStandard.h.

223  {
224  return fElectronsToADC;
225  }
double detinfo::DetectorPropertiesStandard::Eloss ( double  mom,
double  mass,
double  tcut 
) const
overridevirtual

Restricted mean energy loss (dE/dx)

Parameters
mommomentum of incident particle [GeV/c]
massmass of incident particle [GeV/c^2]
tcutmaximum kinetic energy of delta rays [MeV]; 0 for unlimited
Returns
the restricted mean energy loss (dE/dx) in units of MeV/cm

Returned value is always positive. For unrestricted mean energy loss, set tcut = 0 (special case), or tcut large.

Based on Bethe-Bloch formula as contained in particle data book. Material parameters are from the configuration.

Implements detinfo::DetectorProperties.

Definition at line 134 of file DetectorPropertiesStandard.cxx.

135  {
136  // Some constants.
137  constexpr double K = 0.307075; // 4 pi N_A r_e^2 m_e c^2 (MeV cm^2/mol).
138  constexpr double me = 0.510998918; // Electron mass (MeV/c^2).
139 
140  // Calculate kinematic quantities.
141  double const bg = mom / mass; // beta*gamma.
142  double const gamma = sqrt(1. + bg * bg); // gamma.
143  double const beta = bg / gamma; // beta (velocity).
144  double const mer = 0.001 * me / mass; // electron mass / mass of incident particle.
145  double const tmax =
146  2. * me * bg * bg / (1. + 2. * gamma * mer + mer * mer); // Maximum delta ray energy (MeV).
147 
148  // Make sure tcut does not exceed tmax.
149  if (tcut == 0. || tcut > tmax) tcut = tmax;
150 
151  // Calculate density effect correction (delta).
152  double const x = std::log10(bg);
153  double delta = 0.;
154  if (x >= fSternheimerParameters.x0) {
155  delta = 2. * std::log(10.) * x - fSternheimerParameters.cbar;
156  if (x < fSternheimerParameters.x1)
157  delta += fSternheimerParameters.a *
159  }
160 
161  // Calculate stopping number.
162  double B =
163  0.5 * std::log(2. * me * bg * bg * tcut / (1.e-12 * cet::square(fLP->ExcitationEnergy()))) -
164  0.5 * beta * beta * (1. + tcut / tmax) - 0.5 * delta;
165 
166  // Don't let the stopping number become negative.
167  if (B < 1.) B = 1.;
168 
169  // Calculate dE/dx.
170  return Density() * K * fLP->AtomicNumber() * B / (fLP->AtomicMass() * beta * beta);
171  }
virtual double AtomicNumber() const =0
Atomic number of the liquid.
process_name opflash particleana ie x
virtual double Density() const
Returns argon density at the temperature from Temperature()
virtual double ExcitationEnergy() const =0
Mean excitation energy of the liquid (eV)
SternheimerParameters_t fSternheimerParameters
Sternheimer parameters.
float mass
Definition: dedx.py:47
do i e
virtual double AtomicMass() const =0
Atomic mass of the liquid (g/mol)
double detinfo::DetectorPropertiesStandard::ElossVar ( double  mom,
double  mass 
) const
overridevirtual

Energy loss fluctuation ( $ \sigma_{E}^2 / x $)

Parameters
mommomentum of incident particle in [GeV/c]
massmass of incident particle [GeV/c^2]
Returns
energy loss fluctuation in MeV^2/cm

Based on Bichsel formula referred to but not given in PDG.

Implements detinfo::DetectorProperties.

Definition at line 175 of file DetectorPropertiesStandard.cxx.

176  {
177  // Some constants.
178  constexpr double K = 0.307075; // 4 pi N_A r_e^2 m_e c^2 (MeV cm^2/mol).
179  constexpr double me = 0.510998918; // Electron mass (MeV/c^2).
180 
181  // Calculate kinematic quantities.
182  double const bg = mom / mass; // beta*gamma.
183  double const gamma2 = 1. + bg * bg; // gamma^2.
184  double const beta2 = bg * bg / gamma2; // beta^2.
185  return gamma2 * (1. - 0.5 * beta2) * me * (fLP->AtomicNumber() / fLP->AtomicMass()) * K *
186  Density();
187  }
virtual double AtomicNumber() const =0
Atomic number of the liquid.
virtual double Density() const
Returns argon density at the temperature from Temperature()
float mass
Definition: dedx.py:47
virtual double AtomicMass() const =0
Atomic mass of the liquid (g/mol)
double detinfo::DetectorPropertiesStandard::ModBoxCorrection ( double  dQdX) const
overridevirtual

Implements detinfo::DetectorProperties.

Definition at line 328 of file DetectorPropertiesStandard.cxx.

329  {
330  return ModBoxCorrection(dQdx, Efield());
331  }
double ModBoxCorrection(double dQdX) const override
double Efield(unsigned int planegap=0) const override
kV/cm
double detinfo::DetectorPropertiesStandard::ModBoxCorrection ( double  dQdX,
double  EField 
) const
overridevirtual

Implements detinfo::DetectorProperties.

Definition at line 333 of file DetectorPropertiesStandard.cxx.

334  {
335  // Modified Box model correction has better behavior than the Birks
336  // correction at high values of dQ/dx.
337  double const rho = Density(); // LAr density in g/cm^3
338  constexpr double Wion = 1000. / util::kGeVToElectrons; // 23.6 eV = 1e, Wion in MeV/e
339  double const Beta = fModBoxB / (rho * E_field);
340  double const Alpha = fModBoxA;
341  double const dEdx = (exp(Beta * Wion * dQdx) - Alpha) / Beta;
342 
343  return dEdx;
344  }
virtual double Density() const
Returns argon density at the temperature from Temperature()
constexpr double kGeVToElectrons
23.6eV per ion pair, 1e9 eV/GeV
float dEdx(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, const TCSlice &slc, TP3D &tp3d)
Definition: PFPUtils.cxx:2687
int Wion
Definition: dedx.py:125
unsigned int detinfo::DetectorPropertiesStandard::NumberTimeSamples ( ) const
inlineoverridevirtual

Implements detinfo::DetectorProperties.

Definition at line 227 of file DetectorPropertiesStandard.h.

228  {
229  return fNumberTimeSamples;
230  }
unsigned int fNumberTimeSamples
number of clock ticks per event
unsigned int detinfo::DetectorPropertiesStandard::ReadOutWindowSize ( ) const
inlineoverridevirtual

Implements detinfo::DetectorProperties.

Definition at line 232 of file DetectorPropertiesStandard.h.

233  {
234  return fReadOutWindowSize;
235  }
unsigned int fReadOutWindowSize
number of clock ticks per readout window
void detinfo::DetectorPropertiesStandard::SetNumberTimeSamples ( unsigned int  nsamp)
inline

Definition at line 152 of file DetectorPropertiesStandard.h.

153  {
154  fNumberTimeSamples = nsamp;
155  }
unsigned int fNumberTimeSamples
number of clock ticks per event
bool detinfo::DetectorPropertiesStandard::SimpleBoundary ( ) const
inlineoverridevirtual

Implements detinfo::DetectorProperties.

Definition at line 258 of file DetectorPropertiesStandard.h.

double detinfo::DetectorPropertiesStandard::Temperature ( ) const
inlineoverridevirtual

In kelvin.

Implements detinfo::DetectorProperties.

Definition at line 190 of file DetectorPropertiesStandard.h.

191  {
192  return fTemperature;
193  }
double detinfo::DetectorPropertiesStandard::TimeOffsetU ( ) const
inlineoverridevirtual

Implements detinfo::DetectorProperties.

Definition at line 237 of file DetectorPropertiesStandard.h.

238  {
239  return fTimeOffsetU;
240  };
double detinfo::DetectorPropertiesStandard::TimeOffsetV ( ) const
inlineoverridevirtual

Implements detinfo::DetectorProperties.

Definition at line 242 of file DetectorPropertiesStandard.h.

243  {
244  return fTimeOffsetV;
245  };
double detinfo::DetectorPropertiesStandard::TimeOffsetY ( ) const
inlineoverridevirtual

Reimplemented from detinfo::DetectorProperties.

Definition at line 252 of file DetectorPropertiesStandard.h.

253  {
254  return fTimeOffsetY;
255  };
double detinfo::DetectorPropertiesStandard::TimeOffsetZ ( ) const
inlineoverridevirtual

Implements detinfo::DetectorProperties.

Definition at line 247 of file DetectorPropertiesStandard.h.

248  {
249  return fTimeOffsetZ;
250  };
void detinfo::DetectorPropertiesStandard::ValidateAndConfigure ( fhicl::ParameterSet const &  p,
std::set< std::string > const &  ignore_params 
)
private

Configures the provider, first validating the configuration.

Parameters
pconfiguration parameter set
ignore_paramsparameters to be ignored (optional)

This method will validate the parameter set (except for the parameters it's explicitly told to ignore) and extract the useful information out of it.

Definition at line 40 of file DetectorPropertiesStandard.cxx.

42  {
43  {
44  mf::LogInfo debug("setupProvider<DetectorPropertiesStandard>");
45 
46  debug << "Asked to ignore " << ignore_params.size() << " keys:";
47  for (auto const& key : ignore_params)
48  debug << " '" << key << "'";
49  }
50 
51  std::set<std::string> ignorable_keys = lar::IgnorableProviderConfigKeys();
52  ignorable_keys.insert(ignore_params.begin(), ignore_params.end());
53 
54  // parses and validates the parameter set:
55  fhicl::Table<Configuration_t> const config{p, ignorable_keys};
56 
57  fEfield = config().Efield();
58  fElectronlifetime = config().Electronlifetime();
59  fTemperature = config().Temperature();
60  fElectronsToADC = config().ElectronsToADC();
61  fNumberTimeSamples = config().NumberTimeSamples();
62  fReadOutWindowSize = config().ReadOutWindowSize();
63 
64  std::set<geo::View_t> present_views;
65  if (config().TimeOffsetU(fTimeOffsetU)) present_views.insert(geo::kU);
66  if (config().TimeOffsetV(fTimeOffsetV)) present_views.insert(geo::kV);
67  if (config().TimeOffsetZ(fTimeOffsetZ)) present_views.insert(geo::kZ);
68  if (config().TimeOffsetY(fTimeOffsetY)) present_views.insert(geo::kY);
69  if (config().TimeOffsetX(fTimeOffsetX)) present_views.insert(geo::kX);
70 
71  std::string const errors = CheckTimeOffsets(present_views);
72  if (!errors.empty()) {
73  throw cet::exception("DetectorPropertiesStandard") << "Detected configuration errors: \n"
74  << errors;
75  }
76 
77  fSternheimerParameters.a = config().SternheimerA();
78  fSternheimerParameters.k = config().SternheimerK();
79  fSternheimerParameters.x0 = config().SternheimerX0();
80  fSternheimerParameters.x1 = config().SternheimerX1();
81  fSternheimerParameters.cbar = config().SternheimerCbar();
82 
83  fDriftVelFudgeFactor = config().DriftVelFudgeFactor();
84 
85  fUseIcarusMicrobooneDriftModel = config().UseIcarusMicrobooneDriftModel();
86 
87  fIncludeInterPlanePitchInXTickOffsets = config().IncludeInterPlanePitchInXTickOffsets();
88 
89  fSimpleBoundary = config().SimpleBoundary();
90 
91  fModBoxA = config().ModBoxAlpha();
92  fModBoxB = config().ModBoxBeta();
93  }
Planes which measure V.
Definition: geo_types.h:130
pdgs p
Definition: selectors.fcl:22
Planes which measure X direction.
Definition: geo_types.h:134
unsigned int fNumberTimeSamples
number of clock ticks per event
Planes which measure Z direction.
Definition: geo_types.h:132
Planes which measure Y direction.
Definition: geo_types.h:133
Planes which measure U.
Definition: geo_types.h:129
SternheimerParameters_t fSternheimerParameters
Sternheimer parameters.
std::set< std::string > const & IgnorableProviderConfigKeys()
Returns a list of configuration keys that providers should ignore.
Definition: ProviderUtil.h:35
std::string CheckTimeOffsets(std::set< geo::View_t > const &requested_views) const
unsigned int fReadOutWindowSize
number of clock ticks per readout window
std::vector< double > fEfield
kV/cm (per inter-plane volume) !

Member Data Documentation

std::vector<std::vector<double> > detinfo::DetectorPropertiesStandard::fDriftDirection
private

Definition at line 325 of file DetectorPropertiesStandard.h.

double detinfo::DetectorPropertiesStandard::fDriftVelFudgeFactor
private

Scaling factor to allow "fudging" of drift velocity

Definition at line 311 of file DetectorPropertiesStandard.h.

std::vector<double> detinfo::DetectorPropertiesStandard::fEfield
private

kV/cm (per inter-plane volume) !

Definition at line 294 of file DetectorPropertiesStandard.h.

double detinfo::DetectorPropertiesStandard::fElectronlifetime
private

microseconds

Definition at line 295 of file DetectorPropertiesStandard.h.

double detinfo::DetectorPropertiesStandard::fElectronsToADC
private

conversion factor for # of ionization electrons to 1 ADC count

Definition at line 297 of file DetectorPropertiesStandard.h.

const geo::GeometryCore* detinfo::DetectorPropertiesStandard::fGeo
private

Definition at line 292 of file DetectorPropertiesStandard.h.

bool detinfo::DetectorPropertiesStandard::fIncludeInterPlanePitchInXTickOffsets
private

Historically, ConvertTicksToX has allowed for the drift time between the wire planes. This is appropriate for recob::RawDigits, and recob::Wires from the 1D unfolding, but is not appropriate for recob::Wires from WireCell.

Definition at line 321 of file DetectorPropertiesStandard.h.

const detinfo::LArProperties* detinfo::DetectorPropertiesStandard::fLP
private

Definition at line 291 of file DetectorPropertiesStandard.h.

double detinfo::DetectorPropertiesStandard::fModBoxA
private

Definition at line 329 of file DetectorPropertiesStandard.h.

double detinfo::DetectorPropertiesStandard::fModBoxB
private

Definition at line 330 of file DetectorPropertiesStandard.h.

unsigned int detinfo::DetectorPropertiesStandard::fNumberTimeSamples
private

number of clock ticks per event

Definition at line 299 of file DetectorPropertiesStandard.h.

unsigned int detinfo::DetectorPropertiesStandard::fReadOutWindowSize
private

number of clock ticks per readout window

Definition at line 300 of file DetectorPropertiesStandard.h.

bool detinfo::DetectorPropertiesStandard::fSimpleBoundary
private

Definition at line 327 of file DetectorPropertiesStandard.h.

SternheimerParameters_t detinfo::DetectorPropertiesStandard::fSternheimerParameters
private

Sternheimer parameters.

Definition at line 323 of file DetectorPropertiesStandard.h.

double detinfo::DetectorPropertiesStandard::fTemperature
private

kelvin

Definition at line 296 of file DetectorPropertiesStandard.h.

double detinfo::DetectorPropertiesStandard::fTimeOffsetU
private

time offset to convert spacepoint coordinates to hit times on view U

Definition at line 301 of file DetectorPropertiesStandard.h.

double detinfo::DetectorPropertiesStandard::fTimeOffsetV
private

time offset to convert spacepoint coordinates to hit times on view V

Definition at line 303 of file DetectorPropertiesStandard.h.

double detinfo::DetectorPropertiesStandard::fTimeOffsetX
private

time offset to convert spacepoint coordinates to hit times on view X

Definition at line 309 of file DetectorPropertiesStandard.h.

double detinfo::DetectorPropertiesStandard::fTimeOffsetY
private

time offset to convert spacepoint coordinates to hit times on view Y

Definition at line 307 of file DetectorPropertiesStandard.h.

double detinfo::DetectorPropertiesStandard::fTimeOffsetZ
private

time offset to convert spacepoint coordinates to hit times on view Z

Definition at line 305 of file DetectorPropertiesStandard.h.

bool detinfo::DetectorPropertiesStandard::fUseIcarusMicrobooneDriftModel
private

if true, use alternative ICARUS-MicroBooNE drift model instead of Walkowiak-based one

Definition at line 314 of file DetectorPropertiesStandard.h.


The documentation for this class was generated from the following files: