DetectorPropertiesProtoDUNEsp.cxx
Go to the documentation of this file.
1 /**Adapted for ProtoDUNE by Owen Goodwin (ogoodwin@fnal.gov) from
2  * lardataalg/DetectorInfo/DetectorPropertiesStandard.cxx
3  * @brief Separation of service from Detector info class.
4  * @author Jonathan Paley (jpaley@fnal.gov)
5  */
6 // Framework includes
7 #include <cassert>
8 // LArSoft includes
10 #include "larcorealg/CoreUtils/ProviderUtil.h" // lar::IgnorableProviderConfigKeys()
17 
18 
19 
20 // Art includes
22 
23 // C/C++ libraries
24 #include <sstream> // std::ostringstream
25 #include <map>
26 #include <string>
27 
28 #include "art_root_io/RootDB/SQLite3Wrapper.h"
29 #include "ifdh_art/IFDHService/IFDH_service.h"
30 
31 
35 
36 
37 
38 #include "lardata/DetectorInfoServices/ServicePack.h" // lar::extractProviders()
41 
42 
43 
44 
45 
46 
47 
48 namespace {
49 
50  template <typename T>
51  inline T sqr(T v) { return v*v; }
52 
53 } // local namespace
54 namespace spdp{
55  //--------------------------------------------------------------------
57  fLP(0), fGeo(0)
58  {
59 
60  }
61 
62  //--------------------------------------------------------------------
64  const geo::GeometryCore* geo,
65  const detinfo::LArProperties* lp,
66  std::set<std::string> const& ignore_params /* = {} */
67  ):
68  fLP(lp), fGeo(geo)
69  {
70  {
71  mf::LogInfo debug("setupProvider<DetectorPropertiesStandard>");
72 
73  debug << "Asked to ignore " << ignore_params.size() << " keys:";
74  for (auto const& key: ignore_params) debug << " '" << key << "'";
75  }
76 
77  ValidateAndConfigure(pset, ignore_params);
78 
79  }
80 
81  //--------------------------------------------------------------------
83  providers_type providers,
84  std::set<std::string> const& ignore_params /* = {} */
85  ):
87  providers.get<geo::GeometryCore>(),
88  providers.get<detinfo::LArProperties>(),
89  ignore_params
90  )
91  {}
92 
94  {
95 
96 
97  if(fUseRunDependentTemperature){ // updata the temperature based on run number for data
98 
99  if ((run > 5903) & (run < 6930)){ //first runs after Nov 17 2019 and March 1 2019, where tempreture average was lower
100  fTemperature = 87.36;
101  }
102  else if (run >= 6930)
103  {
104  fTemperature = 87.65;
105  }
106  }
107 
108 
109  return true;
110  }
111 
114 
115  bool retVal=false;
116 
119  auto metadata=ifdh->getMetadata(filename);
120  retVal = true;
121  std::string window_str="DUNE_data.readout_window: ";
122  if(metadata.find(window_str)!=std::string::npos){
123  int n1 = metadata.find(window_str);
124  n1 += window_str.length();
125  int n2 = metadata.find("\n", n1);
126  double window=std::stod(metadata.substr(n1, n2-n1)); //milliseconds
127  double ticks=window*1000/(clockData.TPCClock().TickPeriod()); //sampling rate 2Mhz
130  std::cout<<"Setting ReadOutWindowSize and NumberTimeSamples as : "<<fReadOutWindowSize<<" (Ticks), Value retrieved from Metadata"<<std::endl;
131  }
132  else{
133  std::cout<<"Run has no specific readout window size entry in Metadata, default to fcl configured value : "<<fReadOutWindowSize<<" (Ticks)"<<std::endl;
134  }
135  }
136 
137  return retVal;
138 
139  }
140 
141 
142 
143 
144 
145 
147  {
148 
149 
150 
151  bool retVal=false;
152 
154  retVal = true;
155 
157  auto metadata=ifdh->getMetadata(filename);
158 
159  int run = 0;
160  std::string run_str="Runs: ";
161  if(metadata.find(run_str)!=std::string::npos){
162  int n1 = metadata.find(run_str);
163  n1 += run_str.length();
164  int n2 = metadata.find(".", n1);
165  run = std::stoi(metadata.substr(n1, n2-n1));
166  std::cout<<"Run number from metadata: "<<run<<std::endl;
167  }
168 
169  std::string hv_str="detector.hv_value: ";
170  if(metadata.find(hv_str)!=std::string::npos){
171  int n1 = metadata.find(hv_str);
172  n1 += hv_str.length();
173  int n2 = metadata.find("\n", n1);
174 
175  fHV_cath=std::stod(metadata.substr(n1, n2-n1));
176  std::cout<<"Using HV on cathode as: "<<fHV_cath<<"KV, Value retreived from samweb MetaData"<<std::endl;
177  }
178  else{
179  std::cout<<"HV Metadata entry not found"<<std::endl;
180  std::cout<<"Run has no nomninal HV value entered in Metadata, default to 180KV"<<std::endl;
181  fHV_cath=180;
182  }
183 
184 
185 
186  double Gplane_bias=(-0.665); //
187  double Uplane_bias=(-0.370);
188  double Vplane_bias=0;
189  double Xplane_bias=(0.820);
190 
191 
192  //double Gplane_bias=(-0.665*(fHV_cath/180)); // this is scaling, wasnt actually done.
193  //double Uplane_bias=(-0.370*(fHV_cath/180));
194  //double Vplane_bias=0;
195  //double Xplane_bias=0.820*(fHV_cath/180);
196  fEfield={fHV_cath/360,std::fabs(Gplane_bias-Uplane_bias)/0.47625,std::fabs(Uplane_bias-Vplane_bias)/0.47625,std::fabs(Vplane_bias-Xplane_bias)/0.47625};
197  //fEfield[0]=fHV_cath/360;
198  //fEfield[1]=std::fabs(Gplane_bias-Uplane_bias)/0.475;
199  //fEfield[2]=std::fabs(Uplane_bias-Vplane_bias)/0.475;
200  //fEfield[3]=std::fabs(Vplane_bias-Xplane_bias)/0.475;
201  if (std::abs(fHV_cath-180) < 1e-6){
202  // Use the corrected E field from Flavio, Francesco and Stefania
203  // Ref: https://indico.fnal.gov/event/20939/contribution/1/material/slides/0.pdf
204  if (run < 6725){ //first run in Feb 8, 2019
205  fEfield[0] = 0.4867;
206  }
207  else{
208  fEfield[0] = 0.4995;
209  }
210  }
211  std::cout<<"Calculated E field in 4 plane gaps as: "<<fEfield[0]<<","<<fEfield[1]<<","<<fEfield[2]<<","<<fEfield[3]<<std::endl;
212  }//End GetHVDriftfrom MetaData if
213 
214 
215  return retVal;
216  }
217 
218 
219 
220 
221  //--------------------------------------------------------------------
224  {
225  return CalculateXTicksParams(clockData);
226  }
227 
228  //--------------------------------------------------------------------
230 
231  fEfield = config.Efield();
233  fGetHVDriftfromMetaData = false; // DLA 2021-11-11 Redmine 26419
237  fTemperature = config.Temperature();
238  fElectronsToADC = config.ElectronsToADC();
246 
252  fSimpleBoundary = config.SimpleBoundary();
253 
254  } // DetectorPropertiesStandard::Configure()
255 
256  //--------------------------------------------------------------------
259  fhicl::ParameterSet const& p,
260  std::set<std::string> const& ignore_params /* = {} */
261  ) {
262  std::set<std::string> ignorable_keys = lar::IgnorableProviderConfigKeys();
263  ignorable_keys.insert(ignore_params.begin(), ignore_params.end());
264 
265  // parses and validates the parameter set:
266  fhicl::Table<Configuration_t> config_table { p, ignorable_keys };
267 
268  return std::move(config_table());
269 
270  } // DetectorPropertiesStandard::ValidateConfiguration()
271 
272  //--------------------------------------------------------------------
274  fhicl::ParameterSet const& p,
275  std::set<std::string> const& ignore_params /* = {} */
276  ) {
277  Configure(ValidateConfiguration(p, ignore_params));
278  } // ValidateAndConfigure()
279 
280 
281  //------------------------------------------------------------------------------------//
283 
284  SetGeometry(providers.get<geo::GeometryCore>());
286 
288 
289  } // DetectorPropertiesStandard::Setup()
290 
291 
292  //------------------------------------------------------------------------------------//
293  double DetectorPropertiesProtoDUNEsp::Efield(unsigned int planegap) const
294  {
295  if(planegap >= fEfield.size())
296  throw cet::exception("DetectorPropertiesStandard") << "requesting Electric field in a plane gap that is not defined\n";
297 
298 
299  return fEfield[planegap];
300  }
301 
302 
303  //------------------------------------------------
304  double DetectorPropertiesProtoDUNEsp::Density(double temperature) const
305  {
306  // Default temperature use internal value.
307  if(temperature == 0.)
308  temperature = Temperature();
309 
310  double density = -0.00615*temperature + 1.928;
311 
312  return density;
313  } // DetectorPropertiesStandard::Density()
314 
315 
316  //----------------------------------------------------------------------------------
317  // Restricted mean energy loss (dE/dx) in units of MeV/cm.
318  //
319  // For unrestricted mean energy loss, set tcut = 0, or tcut large.
320  //
321  // Arguments:
322  //
323  // mom - Momentum of incident particle in GeV/c.
324  // mass - Mass of incident particle in GeV/c^2.
325  // tcut - Maximum kinetic energy of delta rays (MeV).
326  //
327  // Returned value is positive.
328  //
329  // Based on Bethe-Bloch formula as contained in particle data book.
330  // Material parameters (stored in larproperties.fcl) are taken from
331  // pdg web site http://pdg.lbl.gov/AtomicNuclearProperties/
332  //
333  double DetectorPropertiesProtoDUNEsp::Eloss(double mom, double mass, double tcut) const
334  {
335  // Some constants.
336 
337  double K = 0.307075; // 4 pi N_A r_e^2 m_e c^2 (MeV cm^2/mol).
338  double me = 0.510998918; // Electron mass (MeV/c^2).
339 
340  // Calculate kinematic quantities.
341 
342  double bg = mom / mass; // beta*gamma.
343  double gamma = sqrt(1. + bg*bg); // gamma.
344  double beta = bg / gamma; // beta (velocity).
345  double mer = 0.001 * me / mass; // electron mass / mass of incident particle.
346  double tmax = 2.*me* bg*bg / (1. + 2.*gamma*mer + mer*mer); // Maximum delta ray energy (MeV).
347 
348  // Make sure tcut does not exceed tmax.
349 
350  if(tcut == 0. || tcut > tmax)
351  tcut = tmax;
352 
353  // Calculate density effect correction (delta).
354 
355  double x = std::log10(bg);
356  double delta = 0.;
357  if(x >= fSternheimerParameters.x0) {
358  delta = 2. * std::log(10.) * x - fSternheimerParameters.cbar;
359  if(x < fSternheimerParameters.x1)
361  }
362 
363  // Calculate stopping number.
364 
365  double B = 0.5 * std::log(2.*me*bg*bg*tcut / (1.e-12 * sqr(fLP->ExcitationEnergy())))
366  - 0.5 * beta*beta * (1. + tcut / tmax) - 0.5 * delta;
367 
368  // Don't let the stopping number become negative.
369 
370  if(B < 1.)
371  B = 1.;
372 
373  // Calculate dE/dx.
374 
375  double dedx = Density() * K*fLP->AtomicNumber()*B / (fLP->AtomicMass() * beta*beta);
376 
377  // Done.
378 
379  return dedx;
380  } // DetectorPropertiesStandard::Eloss()
381 
382  //----------------------------------------------------------------------------------
383  double DetectorPropertiesProtoDUNEsp::ElossVar(double mom, double mass) const
384  {
385  // Some constants.
386 
387  double K = 0.307075; // 4 pi N_A r_e^2 m_e c^2 (MeV cm^2/mol).
388  double me = 0.510998918; // Electron mass (MeV/c^2).
389 
390  // Calculate kinematic quantities.
391 
392  double bg = mom / mass; // beta*gamma.
393  double gamma2 = 1. + bg*bg; // gamma^2.
394  double beta2 = bg*bg / gamma2; // beta^2.
395 
396  // Calculate final result.
397 
398  double result = gamma2 * (1. - 0.5 * beta2) * me * (fLP->AtomicNumber() / fLP->AtomicMass()) * K * Density();
399  return result;
400  } // DetectorPropertiesStandard::ElossVar()
401  //------------------------------------------------------------------------------------//
402  double DetectorPropertiesProtoDUNEsp::DriftVelocity(double efield, double temperature) const {
403  // Drift Velocity as a function of Electric Field and LAr Temperature
404  // from : W. Walkowiak, NIM A 449 (2000) 288-294
405  //
406  // Efield should have units of kV/cm
407  // Temperature should have units of Kelvin
408  // Default Efield, use internal value.
409  if(efield == 0.)
410  efield = Efield();
411  //
412  if(efield > 4.0)
413  mf::LogWarning("DetectorPropertiesStandard") << "DriftVelocity Warning! : E-field value of "
414  << efield
415  << " kV/cm is outside of range covered by drift"
416  << " velocity parameterization. Returned value"
417  << " may not be correct";
418  // Default temperature use internal value.
419  if(temperature == 0.)
420  temperature = Temperature();
421  if(temperature < 87.0 || temperature > 94.0)
422  mf::LogWarning("DetectorPropertiesStandard") << "DriftVelocity Warning! : Temperature value of "
423  << temperature
424  << " K is outside of range covered by drift velocity"
425  << " parameterization. Returned value may not be"
426  << " correct";
427  double tshift = -87.203+temperature;
428  double xFit = 0.0938163-0.0052563*tshift-0.0001470*tshift*tshift;
429  double uFit = 5.18406+0.01448*tshift-0.003497*tshift*tshift-0.000516*tshift*tshift*tshift;
430  double vd;
431  // Icarus Parameter Set, use as default
432  double P1 = -0.04640; // K^-1
433  double P2 = 0.01712; // K^-1
434  double P3 = 1.88125; // (kV/cm)^-1
435  double P4 = 0.99408; // kV/cm
436  double P5 = 0.01172; // (kV/cm)^-P6
437  double P6 = 4.20214;
438  double T0 = 105.749; // K
439  // Walkowiak Parameter Set
440  double P1W = -0.01481; // K^-1
441  double P2W = -0.0075; // K^-1
442  double P3W = 0.141; // (kV/cm)^-1
443  double P4W = 12.4; // kV/cm
444  double P5W = 1.627; // (kV/cm)^-P6
445  double P6W = 0.317;
446  double T0W = 90.371; // K
447  // From Craig Thorne . . . currently not documented
448  // smooth transition from linear at small fields to
449  // icarus fit at most fields to Walkowiak at very high fields
450  if (efield < xFit) vd=efield*uFit;
451  else if (efield<0.619) {
452  vd = ((P1*(temperature-T0)+1)
453  *(P3*efield*std::log(1+P4/efield) + P5*std::pow(efield,P6))
454  +P2*(temperature-T0));
455  }
456  else if (efield<0.699) {
457  vd = 12.5*(efield-0.619)*((P1W*(temperature-T0W)+1)
458  *(P3W*efield*std::log(1+P4W/efield) + P5W*std::pow(efield,P6W))
459  +P2W*(temperature-T0W))+
460  12.5*(0.699-efield)*((P1*(temperature-T0)+1)
461  *(P3*efield*std::log(1+P4/efield) + P5*std::pow(efield,P6))
462  +P2*(temperature-T0));
463  }
464  else {
465  vd = ((P1W*(temperature-T0W)+1)
466  *(P3W*efield*std::log(1+P4W/efield) + P5W*std::pow(efield,P6W))
467  +P2W*(temperature-T0W));
468  }
469  vd /= 10.;
470  return vd; // in cm/us
471  }
472  //----------------------------------------------------------------------------------
473  // The below function assumes that the user has applied the lifetime correction and
474  // effective pitch between the wires (usually after 3D reconstruction). Using with
475  // mean wire pitch will not give correct results.
476  // parameters:
477  // dQdX in electrons/cm, charge (amplitude or integral obtained) divided by
478  // effective pitch for a given 3D track.
479  // Electric Field in the drift region in KV/cm
480  //
481  // returns dEdX in MeV/cm
483  {
484  return BirksCorrection(dQdx, Efield());
485  }
486  double DetectorPropertiesProtoDUNEsp::BirksCorrection(double dQdx, double E_field) const
487  {
488  // Correction for charge quenching using parameterization from
489  // S.Amoruso et al., NIM A 523 (2004) 275
490 
491  double A3t = util::kRecombA;
492  double K3t = util::kRecombk; // in KV/cm*(g/cm^2)/MeV
493  double rho = Density(); // LAr density in g/cm^3
494  double Wion = 1000./util::kGeVToElectrons; // 23.6 eV = 1e, Wion in MeV/e
495  K3t /= rho; // KV/MeV
496  double dEdx = dQdx/(A3t/Wion-K3t/E_field*dQdx); //MeV/cm
497 
498  return dEdx;
499  }
500 
501  //----------------------------------------------------------------------------------
502  // Modified Box model correction
504  {
505  return ModBoxCorrection(dQdx, Efield());
506  }
507  double DetectorPropertiesProtoDUNEsp::ModBoxCorrection(double dQdx, double E_field) const
508  {
509  // Modified Box model correction has better behavior than the Birks
510  // correction at high values of dQ/dx.
511  double rho = Density(); // LAr density in g/cm^3
512  double Wion = 1000./util::kGeVToElectrons; // 23.6 eV = 1e, Wion in MeV/e
513  double Beta = util::kModBoxB / (rho * E_field);
514  double Alpha = util::kModBoxA;
515  double dEdx = (exp(Beta * Wion * dQdx ) - Alpha) / Beta;
516 
517  return dEdx;
518 
519  }
520 
521  //--------------------------------------------------------------------
523  {
524  if (!fGeo) throw cet::exception(__FUNCTION__) << "Geometry is uninitialized!";
525  if (!fLP) throw cet::exception(__FUNCTION__) << "LArPropertiesStandard is uninitialized!";
526  }
527 
528 
529  //--------------------------------------------------------------------
530  // Recalculte x<-->ticks conversion parameters from detector constants
531 
534  {
536 
537  double samplingRate = sampling_rate(clockData);
538  double efield = Efield();
539  double temperature = Temperature();
540  double driftVelocity = DriftVelocity(efield, temperature);
541 
542  double const x_ticks_coefficient = 0.001 * driftVelocity * samplingRate;
543  double triggerOffset = trigger_offset(clockData);
544  std::vector<std::vector<std::vector<double>>> x_ticks_offsets(fGeo->Ncryostats());
545  std::vector<std::vector<double>> drift_direction(fGeo->Ncryostats());
546  for(size_t cstat = 0; cstat < fGeo->Ncryostats(); ++cstat){
547  x_ticks_offsets[cstat].resize(fGeo->Cryostat(cstat).NTPC());
548  drift_direction[cstat].resize(fGeo->Cryostat(cstat).NTPC());
549  for(size_t tpc = 0; tpc < fGeo->Cryostat(cstat).NTPC(); ++tpc) {
550  const geo::TPCGeo& tpcgeom = fGeo->Cryostat(cstat).TPC(tpc);
551  const double dir((tpcgeom.DriftDirection() == geo::kNegX) ? +1.0 :-1.0);
552  drift_direction[cstat][tpc] = dir;
553  int nplane = tpcgeom.Nplanes();
554  x_ticks_offsets[cstat][tpc].resize(nplane, 0.);
555 
556  for(int plane = 0; plane < nplane; ++plane) {
557  const geo::PlaneGeo& pgeom = tpcgeom.Plane(plane);
558  const double* xyz = tpcgeom.PlaneLocation(0);
559  x_ticks_offsets[cstat][tpc][plane] = -xyz[0]/(dir * x_ticks_coefficient) + triggerOffset;
560 
561  // Add view dependent offset
562  // FIXME the offset should be plane-dependent
563  geo::View_t view = pgeom.View();
564  switch (view) {
565  case geo::kU:
566  x_ticks_offsets[cstat][tpc][plane] += fTimeOffsetU;
567  break;
568  case geo::kV:
569  x_ticks_offsets[cstat][tpc][plane] += fTimeOffsetV;
570  break;
571  case geo::kZ:
572  x_ticks_offsets[cstat][tpc][plane] += fTimeOffsetZ;
573  break;
574  case geo::kY:
575  x_ticks_offsets[cstat][tpc][plane] += fTimeOffsetY;
576  break;
577  case geo::kX:
578  x_ticks_offsets[cstat][tpc][plane] += fTimeOffsetX;
579  break;
580  default:
581  throw cet::exception(__FUNCTION__) << "Bad view = " << view << "\n" ;
582  } // switch
583  }
584  }
585  }
586  return detinfo::DetectorPropertiesData{*this, x_ticks_coefficient, move(x_ticks_offsets), move(drift_direction)};
587  }
588 
589  //--------------------------------------------------------------------
591  () const
592  {
593 
594  std::ostringstream errors;
595  auto const views = fGeo->Views();
596 
597  if ((views.count(geo::kU) != 0) != fHasTimeOffsetU) {
598  if (fHasTimeOffsetU)
599  errors << "TimeOffsetU has been specified, but no U view is present.\n";
600  else
601  errors << "TimeOffsetU missing for view U.\n";
602  }
603  if ((views.count(geo::kV) != 0) != fHasTimeOffsetV) {
604  if (fHasTimeOffsetV)
605  errors << "TimeOffsetV has been specified, but no V view is present.\n";
606  else
607  errors << "TimeOffsetV missing for view Z.\n";
608  }
609  if ((views.count(geo::kZ) != 0) != fHasTimeOffsetZ) {
610  if (fHasTimeOffsetZ)
611  errors << "TimeOffsetZ has been specified, but no Z view is present.\n";
612  else
613  errors << "TimeOffsetZ missing for view Z.\n";
614  }
615  if ((views.count(geo::kY) != 0) != fHasTimeOffsetY) {
616  if (fHasTimeOffsetY)
617  errors << "TimeOffsetY has been specified, but no Y view is present.\n";
618  else
619  errors << "TimeOffsetY missing for view Y.\n";
620  }
621  if ((views.count(geo::kX) != 0) != fHasTimeOffsetX) {
622  if (fHasTimeOffsetX)
623  errors << "TimeOffsetX has been specified, but no X view is present.\n";
624  else
625  errors << "TimeOffsetX missing for view X.\n";
626  }
627 
628  return errors.str();
629 
630  } // DetectorPropertiesStandard::CheckTimeOffsetConfigurationAfterSetup()
631 
632  //--------------------------------------------------------------------
634 
635  std::string errors;
636 
638 
639  if (!errors.empty()) {
640  throw cet::exception("DetectorPropertiesStandard")
641  << "Detected configuration errors: \n" << errors;
642  }
643 
644  } // DetectorPropertiesStandard::CheckConfigurationAfterSetup()
645 
646 } // namespace
bool UpdateReadoutWindowSize(detinfo::DetectorClocksData const &clockData, std::string filename)
double fTimeOffsetZ
time offset to convert spacepoint coordinates to hit times on view Z
double beta(double KE, const simb::MCParticle *part)
std::string CheckTimeOffsetConfigurationAfterSetup() const
Checks the configuration of time offsets.
void Configure(Configuration_t const &config)
Extracts the relevant configuration from the specified object.
static QCString result
Encapsulate the construction of a single cyostat.
double fTimeOffsetX
time offset to convert spacepoint coordinates to hit times on view X
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
std::string string
Definition: nybbler.cc:12
Planes which measure V.
Definition: geo_types.h:130
unsigned int Nplanes() const
Number of planes in this tpc.
Definition: TPCGeo.h:165
double fHasTimeOffsetU
whether time offset was configured for view U
std::set< geo::View_t > const & Views() const
Returns a list of possible views in the detector.
double fTimeOffsetU
time offset to convert spacepoint coordinates to hit times on view U
constexpr T pow(T x)
Definition: pow.h:72
Planes which measure X direction.
Definition: geo_types.h:134
Geometry information for a single TPC.
Definition: TPCGeo.h:38
virtual double BirksCorrection(double dQdX) const override
dQ/dX in electrons/cm, returns dE/dX in MeV/cm.
double fElectronsToADC
conversion factor for # of ionization electrons to 1 ADC count
Planes which measure Z direction.
Definition: geo_types.h:132
Provider const * get() const
Returns the provider with the specified type.
Definition: ProviderPack.h:193
void ValidateAndConfigure(fhicl::ParameterSet const &p, std::set< std::string > const &ignore_params={})
Configures the provider, first validating the configuration.
string dir
Drift towards negative X values.
Definition: geo_types.h:162
unsigned int Ncryostats() const
Returns the number of cryostats in the detector.
string filename
Definition: train.py:213
double fHasTimeOffsetZ
whether time offset was configured for view Z
tick ticks
Alias for common language habits.
Definition: electronics.h:78
double fTimeOffsetY
time offset to convert spacepoint coordinates to hit times on view Y
Planes which measure Y direction.
Definition: geo_types.h:133
detinfo::DetectorPropertiesData DataFor(const detinfo::DetectorClocksData &clockData) const override
art framework interface to geometry description
constexpr double TickPeriod() const noexcept
A single tick period in microseconds.
Definition: ElecClock.h:352
T sqr(T v)
virtual double ExcitationEnergy() const =0
Mean excitation energy of the liquid (eV)
detinfo::DetectorPropertiesData CalculateXTicksParams(detinfo::DetectorClocksData const &clockData) const
T abs(T value)
Planes which measure U.
Definition: geo_types.h:129
View_t View() const
Which coordinate does this plane measure.
Definition: PlaneGeo.h:184
virtual double DriftVelocity(double efield=0., double temperature=0.) const override
cm/us
virtual double AtomicMass() const =0
Atomic mass of the liquid (g/mol)
constexpr double kGeVToElectrons
23.6eV per ion pair, 1e9 eV/GeV
virtual double Eloss(double mom, double mass, double tcut) const override
Restricted mean energy loss (dE/dx)
double dEdx(float dqdx, float Efield)
Definition: doAna.cpp:21
const double e
double fHasTimeOffsetX
whether time offset was configured for view X
def key(type, name=None)
Definition: graph.py:13
static Config * config
Definition: config.cpp:1054
constexpr double kModBoxB
Modified Box Beta in g/(MeV cm²)*kV/cm.
def move(depos, offset)
Definition: depos.py:107
Geometry information for a single wire plane.The plane is represented in the geometry by a solid whic...
Definition: PlaneGeo.h:82
void SetGeometry(const geo::GeometryCore *g)
General LArSoft Utilities.
std::vector< double > fEfield
kV/cm (per inter-plane volume)
p
Definition: test.py:223
unsigned int NTPC() const
Number of TPCs in this cryostat.
Definition: CryostatGeo.h:181
ElecClock const & TPCClock() const noexcept
Borrow a const TPC clock with time set to Trigger time [us].
std::set< std::string > const & IgnorableProviderConfigKeys()
Returns a list of configuration keys that providers should ignore.
Definition: ProviderUtil.h:35
CryostatGeo const & Cryostat(geo::CryostatID const &cryoid) const
Returns the specified cryostat.
unsigned int fNumberTimeSamples
number of clock ticks per event
virtual double ModBoxCorrection(double dQdX) const override
General LArSoft Utilities.
Description of geometry of one entire detector.
double gamma(double KE, const simb::MCParticle *part)
DriftDirection_t DriftDirection() const
Returns an enumerator value describing the drift direction.
Definition: TPCGeo.h:144
unsigned int fReadOutWindowSize
number of clock ticks per readout window
Configuration_t ValidateConfiguration(fhicl::ParameterSet const &p, std::set< std::string > const &ignore_params={})
Validates the specified configuration.
virtual double Efield(unsigned int planegap=0) const override
kV/cm
Encapsulate the construction of a single detector plane.
Contains all timing reference information for the detector.
const TPCGeo & TPC(unsigned int itpc) const
Return the itpc&#39;th TPC in the cryostat.
Definition: CryostatGeo.cxx:93
double fTimeOffsetV
time offset to convert spacepoint coordinates to hit times on view V
Container for a list of pointers to providers.
Definition: ProviderPack.h:114
virtual double AtomicNumber() const =0
Atomic number of the liquid.
constexpr double kRecombk
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
int trigger_offset(DetectorClocksData const &data)
virtual double Temperature() const override
In kelvin.
Access the description of detector geometry.
list x
Definition: train.py:276
SternheimerParameters_t fSternheimerParameters
Sternheimer parameters.
virtual double ElossVar(double mom, double mass) const override
Energy loss fluctuation ( )
PlaneGeo const & Plane(geo::View_t view) const
Return the plane in the tpc with View_t view.
Definition: TPCGeo.cxx:263
constexpr double kRecombA
A constant.
auto const & get(AssnsNode< L, R, D > const &r)
Definition: AssnsNode.h:115
constexpr double kModBoxA
Modified Box Alpha.
double Wion
Definition: doAna.cpp:16
Collection of Physical constants used in LArSoft.
double sampling_rate(DetectorClocksData const &data)
Returns the period of the TPC readout electronics clock.
LArSoft geometry interface.
Definition: ChannelGeo.h:16
void Setup(providers_type providers)
Sets all the providers at once.
const double * PlaneLocation(unsigned int p) const
Definition: TPCGeo.cxx:382
virtual double Density() const override
Returns argon density at the temperature from Temperature()
double fHasTimeOffsetY
whether time offset was configured for view Y
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
QTextStream & endl(QTextStream &s)
Encapsulate the construction of a single detector plane.
void SetLArProperties(const detinfo::LArProperties *lp)
double fHasTimeOffsetV
whether time offset was configured for view V