LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
DetectorPropertiesStandard.cxx
Go to the documentation of this file.
1 
7 // Framework includes
8 
9 #include <cassert>
10 
11 // LArSoft includes
13 #include "larcorealg/CoreUtils/ProviderUtil.h" // lar::IgnorableProviderConfigKeys()
19 
21 
22 // Art includes
24 
25 // C/C++ libraries
26 #include <sstream> // std::ostringstream
27 
28 
29 namespace {
30 
31  template <typename T>
32  inline T sqr(T v) { return v*v; }
33 
34 } // local namespace
35 
36 namespace detinfo{
37 
38  //--------------------------------------------------------------------
40  fLP(0), fClocks(0), fGeo(0)
41  {
42 
43  }
44 
45  //--------------------------------------------------------------------
47  const geo::GeometryCore* geo,
48  const detinfo::LArProperties* lp,
49  const detinfo::DetectorClocks* c,
50  std::set<std::string> const& ignore_params /* = {} */
51  ):
52  fLP(lp), fClocks(c), fGeo(geo)
53  {
54  {
55  mf::LogInfo debug("setupProvider<DetectorPropertiesStandard>");
56 
57  debug << "Asked to ignore " << ignore_params.size() << " keys:";
58  for (auto const& key: ignore_params) debug << " '" << key << "'";
59  }
60 
61  ValidateAndConfigure(pset, ignore_params);
62 
65  }
66 
67  //--------------------------------------------------------------------
69  providers_type providers,
70  std::set<std::string> const& ignore_params /* = {} */
71  ):
73  providers.get<geo::GeometryCore>(),
74  providers.get<detinfo::LArProperties>(),
75  providers.get<detinfo::DetectorClocks>(),
76  ignore_params
77  )
78  {}
79 
80  //--------------------------------------------------------------------
82  {
83 
85  return true;
86  }
87 
88  //--------------------------------------------------------------------
90  {
91  fClocks = clks;
92 
95  return true;
96  }
97 
98  //------------------------------------------------------------
100  {
101  return fClocks->TPCTDC2Tick(tdc);
102  }
103 
104  //--------------------------------------------------------------
106  {
107  return fClocks->TPCTick2TDC(ticks);
108  }
109 
110 
111  //--------------------------------------------------------------------
113 
114  fEfield = config.Efield();
116  fTemperature = config.Temperature();
117  fElectronsToADC = config.ElectronsToADC();
125 
131 
132  fSimpleBoundary = config.SimpleBoundary();
133 
134  DoUpdateClocks();
135 
136  } // DetectorPropertiesStandard::Configure()
137 
138  //--------------------------------------------------------------------
141  fhicl::ParameterSet const& p,
142  std::set<std::string> const& ignore_params /* = {} */
143  ) {
144  std::set<std::string> ignorable_keys = lar::IgnorableProviderConfigKeys();
145  ignorable_keys.insert(ignore_params.begin(), ignore_params.end());
146 
147  // parses and validates the parameter set:
148  fhicl::Table<Configuration_t> config_table { p, ignorable_keys };
149 
150  return std::move(config_table());
151 
152  } // DetectorPropertiesStandard::ValidateConfiguration()
153 
154  //--------------------------------------------------------------------
156  fhicl::ParameterSet const& p,
157  std::set<std::string> const& ignore_params /* = {} */
158  ) {
159  Configure(ValidateConfiguration(p, ignore_params));
160  } // ValidateAndConfigure()
161 
162 
163  //------------------------------------------------------------------------------------//
165 
166  SetGeometry(providers.get<geo::GeometryCore>());
169 
171 
172  } // DetectorPropertiesStandard::Setup()
173 
174 
175  //------------------------------------------------------------------------------------//
176  double DetectorPropertiesStandard::Efield(unsigned int planegap) const
177  {
178  if(planegap >= fEfield.size())
179  throw cet::exception("DetectorPropertiesStandard") << "requesting Electric field in a plane gap that is not defined\n";
180 
181  return fEfield[planegap];
182  }
183 
184 
185  //------------------------------------------------
186  double DetectorPropertiesStandard::Density(double temperature) const
187  {
188  // Default temperature use internal value.
189  if(temperature == 0.)
190  temperature = Temperature();
191 
192  double density = -0.00615*temperature + 1.928;
193 
194  return density;
195  } // DetectorPropertiesStandard::Density()
196 
197 
198  //----------------------------------------------------------------------------------
199  // Restricted mean energy loss (dE/dx) in units of MeV/cm.
200  //
201  // For unrestricted mean energy loss, set tcut = 0, or tcut large.
202  //
203  // Arguments:
204  //
205  // mom - Momentum of incident particle in GeV/c.
206  // mass - Mass of incident particle in GeV/c^2.
207  // tcut - Maximum kinetic energy of delta rays (MeV).
208  //
209  // Returned value is positive.
210  //
211  // Based on Bethe-Bloch formula as contained in particle data book.
212  // Material parameters (stored in larproperties.fcl) are taken from
213  // pdg web site http://pdg.lbl.gov/AtomicNuclearProperties/
214  //
215  double DetectorPropertiesStandard::Eloss(double mom, double mass, double tcut) const
216  {
217  // Some constants.
218 
219  double K = 0.307075; // 4 pi N_A r_e^2 m_e c^2 (MeV cm^2/mol).
220  double me = 0.510998918; // Electron mass (MeV/c^2).
221 
222  // Calculate kinematic quantities.
223 
224  double bg = mom / mass; // beta*gamma.
225  double gamma = sqrt(1. + bg*bg); // gamma.
226  double beta = bg / gamma; // beta (velocity).
227  double mer = 0.001 * me / mass; // electron mass / mass of incident particle.
228  double tmax = 2.*me* bg*bg / (1. + 2.*gamma*mer + mer*mer); // Maximum delta ray energy (MeV).
229 
230  // Make sure tcut does not exceed tmax.
231 
232  if(tcut == 0. || tcut > tmax)
233  tcut = tmax;
234 
235  // Calculate density effect correction (delta).
236 
237  double x = std::log10(bg);
238  double delta = 0.;
239  if(x >= fSternheimerParameters.x0) {
240  delta = 2. * std::log(10.) * x - fSternheimerParameters.cbar;
241  if(x < fSternheimerParameters.x1)
243  }
244 
245  // Calculate stopping number.
246 
247  double B = 0.5 * std::log(2.*me*bg*bg*tcut / (1.e-12 * sqr(fLP->ExcitationEnergy())))
248  - 0.5 * beta*beta * (1. + tcut / tmax) - 0.5 * delta;
249 
250  // Don't let the stopping number become negative.
251 
252  if(B < 1.)
253  B = 1.;
254 
255  // Calculate dE/dx.
256 
257  double dedx = Density() * K*fLP->AtomicNumber()*B / (fLP->AtomicMass() * beta*beta);
258 
259  // Done.
260 
261  return dedx;
262  } // DetectorPropertiesStandard::Eloss()
263 
264  //----------------------------------------------------------------------------------
265  double DetectorPropertiesStandard::ElossVar(double mom, double mass) const
266  {
267  // Some constants.
268 
269  double K = 0.307075; // 4 pi N_A r_e^2 m_e c^2 (MeV cm^2/mol).
270  double me = 0.510998918; // Electron mass (MeV/c^2).
271 
272  // Calculate kinematic quantities.
273 
274  double bg = mom / mass; // beta*gamma.
275  double gamma2 = 1. + bg*bg; // gamma^2.
276  double beta2 = bg*bg / gamma2; // beta^2.
277 
278  // Calculate final result.
279 
280  double result = gamma2 * (1. - 0.5 * beta2) * me * (fLP->AtomicNumber() / fLP->AtomicMass()) * K * Density();
281  return result;
282  } // DetectorPropertiesStandard::ElossVar()
283 
284 
285  //------------------------------------------------------------------------------------//
286  double DetectorPropertiesStandard::DriftVelocity(double efield, double temperature) const {
287 
288  // Drift Velocity as a function of Electric Field and LAr Temperature
289  // from : W. Walkowiak, NIM A 449 (2000) 288-294
290  //
291  // Efield should have units of kV/cm
292  // Temperature should have units of Kelvin
293 
294  // Default Efield, use internal value.
295  if(efield == 0.)
296  efield = Efield();
297  //
298  if(efield > 4.0)
299  mf::LogWarning("DetectorPropertiesStandard") << "DriftVelocity Warning! : E-field value of "
300  << efield
301  << " kV/cm is outside of range covered by drift"
302  << " velocity parameterization. Returned value"
303  << " may not be correct";
304 
305 
306  // Default temperature use internal value.
307  if(temperature == 0.)
308  temperature = Temperature();
309 
310  if(temperature < 87.0 || temperature > 94.0)
311  mf::LogWarning("DetectorPropertiesStandard") << "DriftVelocity Warning! : Temperature value of "
312  << temperature
313  << " K is outside of range covered by drift velocity"
314  << " parameterization. Returned value may not be"
315  << " correct";
316 
317 
318 
319 
320  double tshift = -87.203+temperature;
321  double xFit = 0.0938163-0.0052563*tshift-0.0001470*tshift*tshift;
322  double uFit = 5.18406+0.01448*tshift-0.003497*tshift*tshift-0.000516*tshift*tshift*tshift;
323  double vd;
324 
325 
326 // Icarus Parameter Set, use as default
327  double P1 = -0.04640; // K^-1
328  double P2 = 0.01712; // K^-1
329  double P3 = 1.88125; // (kV/cm)^-1
330  double P4 = 0.99408; // kV/cm
331  double P5 = 0.01172; // (kV/cm)^-P6
332  double P6 = 4.20214;
333  double T0 = 105.749; // K
334  // Walkowiak Parameter Set
335  double P1W = -0.01481; // K^-1
336  double P2W = -0.0075; // K^-1
337  double P3W = 0.141; // (kV/cm)^-1
338  double P4W = 12.4; // kV/cm
339  double P5W = 1.627; // (kV/cm)^-P6
340  double P6W = 0.317;
341  double T0W = 90.371; // K
342 
343 // From Craig Thorne . . . currently not documented
344 // smooth transition from linear at small fields to
345 // icarus fit at most fields to Walkowiak at very high fields
346  if (efield < xFit) vd=efield*uFit;
347  else if (efield<0.619) {
348  vd = ((P1*(temperature-T0)+1)
349  *(P3*efield*std::log(1+P4/efield) + P5*std::pow(efield,P6))
350  +P2*(temperature-T0));
351  }
352  else if (efield<0.699) {
353  vd = 12.5*(efield-0.619)*((P1W*(temperature-T0W)+1)
354  *(P3W*efield*std::log(1+P4W/efield) + P5W*std::pow(efield,P6W))
355  +P2W*(temperature-T0W))+
356  12.5*(0.699-efield)*((P1*(temperature-T0)+1)
357  *(P3*efield*std::log(1+P4/efield) + P5*std::pow(efield,P6))
358  +P2*(temperature-T0));
359  }
360  else {
361  vd = ((P1W*(temperature-T0W)+1)
362  *(P3W*efield*std::log(1+P4W/efield) + P5W*std::pow(efield,P6W))
363  +P2W*(temperature-T0W));
364  }
365 
366  vd /= 10.;
367 
368  return vd; // in cm/us
369 }
370 
371  //----------------------------------------------------------------------------------
372  // The below function assumes that the user has applied the lifetime correction and
373  // effective pitch between the wires (usually after 3D reconstruction). Using with
374  // mean wire pitch will not give correct results.
375  // parameters:
376  // dQdX in electrons/cm, charge (amplitude or integral obtained) divided by
377  // effective pitch for a given 3D track.
378  // returns dEdX in MeV/cm
380  {
381  // Correction for charge quenching using parameterization from
382  // S.Amoruso et al., NIM A 523 (2004) 275
383 
384  double A3t = util::kRecombA;
385  double K3t = util::kRecombk; // in KV/cm*(g/cm^2)/MeV
386  double rho = Density(); // LAr density in g/cm^3
387  double Wion = 1000./util::kGeVToElectrons; // 23.6 eV = 1e, Wion in MeV/e
388  double E_field = Efield(); // Electric Field in the drift region in KV/cm
389  K3t /= rho; // KV/MeV
390  double dEdx = dQdx/(A3t/Wion-K3t/E_field*dQdx); //MeV/cm
391 
392  return dEdx;
393  }
394 
395  //----------------------------------------------------------------------------------
396  // Modified Box model correction
398  {
399  // Modified Box model correction has better behavior than the Birks
400  // correction at high values of dQ/dx.
401  double rho = Density(); // LAr density in g/cm^3
402  double Wion = 1000./util::kGeVToElectrons; // 23.6 eV = 1e, Wion in MeV/e
403  double E_field = Efield(); // Electric Field in the drift region in KV/cm
404  double Beta = util::kModBoxB / (rho * E_field);
405  double Alpha = util::kModBoxA;
406  double dEdx = (exp(Beta * Wion * dQdx ) - Alpha) / Beta;
407 
408  return dEdx;
409 
410  }
411 
412  //------------------------------------------------------------------------------------//
414  {
415  return fTPCClock.Ticks(fClocks->TriggerOffsetTPC() * -1.);
416  }
417 
418 
419  //--------------------------------------------------------------------
420  // x<--> ticks conversion methods
421  //
422  // Ben Jones April 2012,
423  // based on code by Herb Greenlee in SpacePointService
424  //
425 
426 
427 
428 
429  //--------------------------------------------------------------------
430  // Take an X coordinate, and convert to a number of ticks, the
431  // charge deposit occured at t=0
432 
433  double DetectorPropertiesStandard::ConvertXToTicks(double X, int p, int t, int c) const
434  {
435  return (X / (fXTicksCoefficient * fDriftDirection.at(c).at(t)) + fXTicksOffsets.at(c).at(t).at(p) );
436  }
437 
438 
439 
440  //-------------------------------------------------------------------
441  // Take a cooridnate in ticks, and convert to an x position
442  // assuming event deposit occured at t=0
443 
444  double DetectorPropertiesStandard::ConvertTicksToX(double ticks, int p, int t, int c) const
445  {
446  return (ticks - fXTicksOffsets.at(c).at(t).at(p)) * fXTicksCoefficient * fDriftDirection.at(c).at(t);
447  }
448 
449 
450  //--------------------------------------------------------------------
452  {
453  if (!fGeo) throw cet::exception(__FUNCTION__) << "Geometry is uninitialized!";
454  if (!fLP) throw cet::exception(__FUNCTION__) << "LArPropertiesStandard is uninitialized!";
455  if (!fClocks) throw cet::exception(__FUNCTION__) << "DetectorClocks is uninitialized!";
456  }
457 
458 
459  //--------------------------------------------------------------------
460  // Recalculte x<-->ticks conversion parameters from detector constants
461 
463  {
465 
466  double samplingRate = SamplingRate();
467  double efield = Efield();
468  double temperature = Temperature();
469  double driftVelocity = DriftVelocity(efield, temperature);
470 
471  fXTicksCoefficient = 0.001 * driftVelocity * samplingRate;
472 
473  double triggerOffset = TriggerOffset();
474 
475  fXTicksOffsets.clear();
476  fXTicksOffsets.resize(fGeo->Ncryostats());
477 
478  fDriftDirection.clear();
479  fDriftDirection.resize(fGeo->Ncryostats());
480 
481  for(size_t cstat = 0; cstat < fGeo->Ncryostats(); ++cstat){
482  fXTicksOffsets[cstat].resize(fGeo->Cryostat(cstat).NTPC());
483  fDriftDirection[cstat].resize(fGeo->Cryostat(cstat).NTPC());
484 
485  for(size_t tpc = 0; tpc < fGeo->Cryostat(cstat).NTPC(); ++tpc) {
486  const geo::TPCGeo& tpcgeom = fGeo->Cryostat(cstat).TPC(tpc);
487 
488  const double dir((tpcgeom.DriftDirection() == geo::kNegX) ? +1.0 :-1.0);
489  fDriftDirection[cstat][tpc] = dir;
490 
491  int nplane = tpcgeom.Nplanes();
492  fXTicksOffsets[cstat][tpc].resize(nplane, 0.);
493  for(int plane = 0; plane < nplane; ++plane) {
494  const geo::PlaneGeo& pgeom = tpcgeom.Plane(plane);
495 
496 
497  // Get field in gap between planes
498  double efieldgap[3];
499  double driftVelocitygap[3];
500  double fXTicksCoefficientgap[3];
501  for (int igap = 0; igap<3; ++igap){
502  efieldgap[igap] = Efield(igap);
503  driftVelocitygap[igap] = DriftVelocity(efieldgap[igap], temperature);
504  fXTicksCoefficientgap[igap] = 0.001 * driftVelocitygap[igap] * samplingRate;
505  }
506 
507  // Calculate geometric time offset.
508  // only works if xyz[0]<=0
509  const double* xyz = tpcgeom.PlaneLocation(0);
510 
511  fXTicksOffsets[cstat][tpc][plane] = -xyz[0]/(dir * fXTicksCoefficient) + triggerOffset;
512 
513  if (nplane==3){
514  /*
515  | ---------- plane = 2 (collection)
516  | Coeff[2]
517  | ---------- plane = 1 (2nd induction)
518  | Coeff[1]
519  | ---------- plane = 0 (1st induction) x = xyz[0]
520  | Coeff[0]
521  | ---------- x = 0
522  V For plane = 0, t offset is -xyz[0]/Coeff[0]
523  x */
524  for (int ip = 0; ip < plane; ++ip){
525  fXTicksOffsets[cstat][tpc][plane] += tpcgeom.PlanePitch(ip,ip+1)/fXTicksCoefficientgap[ip+1];
526  }
527  }
528  else if (nplane==2){
529  /*
530  | ---------- plane = 1 (collection)
531  | Coeff[2]
532  | ---------- plane = 0 (2nd induction) x = xyz[0]
533  | ---------- x = 0, Coeff[1]
534  V ---------- first induction plane
535  x Coeff[0]
536 For plane = 0, t offset is pitch/Coeff[1] - (pitch+xyz[0])/Coeff[0]
537  = -xyz[0]/Coeff[0] - pitch*(1/Coeff[0]-1/Coeff[1])
538  */
539  for (int ip = 0; ip < plane; ++ip){
540  fXTicksOffsets[cstat][tpc][plane] += tpcgeom.PlanePitch(ip,ip+1)/fXTicksCoefficientgap[ip+2];
541  }
542  fXTicksOffsets[cstat][tpc][plane] -= tpcgeom.PlanePitch()*(1/fXTicksCoefficient-1/fXTicksCoefficientgap[1]);
543  }
544 
545  // Add view dependent offset
546  // FIXME the offset should be plane-dependent
547  geo::View_t view = pgeom.View();
548  switch (view) {
549  case geo::kU:
550  fXTicksOffsets[cstat][tpc][plane] += fTimeOffsetU;
551  break;
552  case geo::kV:
553  fXTicksOffsets[cstat][tpc][plane] += fTimeOffsetV;
554  break;
555  case geo::kZ:
556  fXTicksOffsets[cstat][tpc][plane] += fTimeOffsetZ;
557  break;
558  case geo::kY:
559  fXTicksOffsets[cstat][tpc][plane] += fTimeOffsetY;
560  break;
561  case geo::kX:
562  fXTicksOffsets[cstat][tpc][plane] += fTimeOffsetX;
563  break;
564  default:
565  throw cet::exception(__FUNCTION__) << "Bad view = " << view << "\n" ;
566  } // switch
567  }
568 
569  }
570  }
571 
572  }
573 
574  //--------------------------------------------------------------------
575  // Get scale factor for x<-->ticks
576 
578  {
579  return fXTicksCoefficient * fDriftDirection.at(c).at(t);
580  }
581 
582  //--------------------------------------------------------------------
583  // Get scale factor for x<-->ticks
584 
586  {
587  return fXTicksCoefficient;
588  }
589 
590  //--------------------------------------------------------------------
591  // Get offset for x<-->ticks
592 
593  double DetectorPropertiesStandard::GetXTicksOffset(int p, int t, int c) const
594  {
595  return fXTicksOffsets.at(c).at(t).at(p);
596  }
597 
598 
599  //--------------------------------------------------------------------
601  () const
602  {
603 
604  std::ostringstream errors;
605  auto const views = fGeo->Views();
606 
607  if ((views.count(geo::kU) != 0) != fHasTimeOffsetU) {
608  if (fHasTimeOffsetU)
609  errors << "TimeOffsetU has been specified, but no U view is present.\n";
610  else
611  errors << "TimeOffsetU missing for view U.\n";
612  }
613  if ((views.count(geo::kV) != 0) != fHasTimeOffsetV) {
614  if (fHasTimeOffsetV)
615  errors << "TimeOffsetV has been specified, but no V view is present.\n";
616  else
617  errors << "TimeOffsetV missing for view Z.\n";
618  }
619  if ((views.count(geo::kZ) != 0) != fHasTimeOffsetZ) {
620  if (fHasTimeOffsetZ)
621  errors << "TimeOffsetZ has been specified, but no Z view is present.\n";
622  else
623  errors << "TimeOffsetZ missing for view Z.\n";
624  }
625  if ((views.count(geo::kY) != 0) != fHasTimeOffsetY) {
626  if (fHasTimeOffsetY)
627  errors << "TimeOffsetY has been specified, but no Y view is present.\n";
628  else
629  errors << "TimeOffsetY missing for view Y.\n";
630  }
631  if ((views.count(geo::kX) != 0) != fHasTimeOffsetX) {
632  if (fHasTimeOffsetX)
633  errors << "TimeOffsetX has been specified, but no X view is present.\n";
634  else
635  errors << "TimeOffsetX missing for view X.\n";
636  }
637 
638  return errors.str();
639 
640  } // DetectorPropertiesStandard::CheckTimeOffsetConfigurationAfterSetup()
641 
642  //--------------------------------------------------------------------
644 
645  std::string errors;
646 
648 
649  if (!errors.empty()) {
650  throw cet::exception("DetectorPropertiesStandard")
651  << "Detected configuration errors: \n" << errors;
652  }
653 
654  } // DetectorPropertiesStandard::CheckConfigurationAfterSetup()
655 
656  //--------------------------------------------------------------------
658  {
660  }
661 
662  //--------------------------------------------------------------------
663 
664 
665 } // namespace
virtual double TPCTDC2Tick(double tdc) const =0
Given electronics clock count [tdc] returns TPC time-tick.
Float_t x
Definition: compare.C:6
double fTimeOffsetZ
time offset to convert spacepoint coordinates to hit times on view Z
virtual double ConvertTicksToTDC(double ticks) const override
virtual double Temperature() const override
In kelvin.
double PlanePitch(unsigned int p1=0, unsigned int p2=1) const
Returns the center of the TPC volume in world coordinates [cm].
Definition: TPCGeo.cxx:418
virtual double GetXTicksCoefficient() const override
double fXTicksCoefficient
Parameters for x<–>ticks.
virtual const ::detinfo::ElecClock & TPCClock() const =0
Lends a constant TPC clock with time set to trigger time.
virtual double ConvertTDCToTicks(double tdc) const override
Encapsulate the construction of a single cyostat.
double fElectronsToADC
conversion factor for # of ionization electrons to 1 ADC count
void DoUpdateClocks()
Time-independent implementation of clock updates.
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
virtual double Efield(unsigned int planegap=0) const override
kV/cm
Planes which measure V.
Definition: geo_types.h:77
void ValidateAndConfigure(fhicl::ParameterSet const &p, std::set< std::string > const &ignore_params={})
Configures the provider, first validating the configuration.
unsigned int Nplanes() const
Number of planes in this tpc.
Definition: TPCGeo.h:145
Int_t B
Definition: plot.C:25
std::set< geo::View_t > const & Views() const
Returns a list of possible views in the detector.
virtual double ElossVar(double mom, double mass) const override
Energy loss fluctuation ( )
Planes which measure X direction.
Definition: geo_types.h:81
Geometry information for a single TPC.
Definition: TPCGeo.h:37
bool UpdateClocks(const detinfo::DetectorClocks *clks)
virtual double BirksCorrection(double dQdX) const override
dQ/dX in electrons/cm, returns dE/dX in MeV/cm.
unsigned int fNumberTimeSamples
number of clock ticks per event
void SetDetectorClocks(const detinfo::DetectorClocks *clks)
std::vector< std::vector< double > > fDriftDirection
virtual double TriggerOffsetTPC() const =0
Time offset from hardware trigger to TPC electronics start time.
double fTimeOffsetU
time offset to convert spacepoint coordinates to hit times on view U
Planes which measure Z direction.
Definition: geo_types.h:79
Provider const * get() const
Returns the provider with the specified type.
Definition: ProviderPack.h:193
int Ticks() const
Current clock tick (that is, the number of tick Time() falls in).
Definition: ElecClock.h:235
double fHasTimeOffsetV
whether time offset was configured for view V
Double_t beta
std::vector< std::vector< std::vector< double > > > fXTicksOffsets
double fTimeOffsetY
time offset to convert spacepoint coordinates to hit times on view Y
Drift towards negative X values.
Definition: geo_types.h:109
unsigned int Ncryostats() const
Returns the number of cryostats in the detector.
Planes which measure Y direction.
Definition: geo_types.h:80
Double_t K
virtual double ExcitationEnergy() const =0
Mean excitation energy of the liquid (eV)
void SetGeometry(const geo::GeometryCore *g)
double fHasTimeOffsetX
whether time offset was configured for view X
void Configure(Configuration_t const &config)
Extracts the relevant configuration from the specified object.
double fTimeOffsetV
time offset to convert spacepoint coordinates to hit times on view V
T sqr(T v)
Access the description of detector geometry.
Planes which measure U.
Definition: geo_types.h:76
void SetLArProperties(const detinfo::LArProperties *lp)
View_t View() const
Which coordinate does this plane measure.
Definition: PlaneGeo.h:171
virtual double AtomicMass() const =0
Atomic mass of the liquid (g/mol)
constexpr double kGeVToElectrons
23.6eV per ion pair, 1e9 eV/GeV
DebugStuff debug
Definition: DebugStruct.cxx:4
std::vector< double > fEfield
kV/cm (per inter-plane volume)
constexpr double kModBoxB
Modified Box Beta in g/(MeV cm²)*kV/cm.
virtual double SamplingRate() const override
Returns the period of the TPC readout electronics clock.
Geometry information for a single wire plane.The plane is represented in the geometry by a solid whic...
Definition: PlaneGeo.h:78
SternheimerParameters_t fSternheimerParameters
Sternheimer parameters.
unsigned int NTPC() const
Number of TPCs in this cryostat.
Definition: CryostatGeo.h:155
std::set< std::string > const & IgnorableProviderConfigKeys()
Returns a list of configuration keys that providers should ignore.
Definition: ProviderUtil.h:35
std::string CheckTimeOffsetConfigurationAfterSetup() const
Checks the configuration of time offsets.
CryostatGeo const & Cryostat(geo::CryostatID const &cryoid) const
Returns the specified cryostat.
double fHasTimeOffsetZ
whether time offset was configured for view Z
virtual double GetXTicksOffset(int p, int t, int c) const override
General LArSoft Utilities.
Description of geometry of one entire detector.
double fHasTimeOffsetU
whether time offset was configured for view U
DriftDirection_t DriftDirection() const
Returns an enumerator value describing the drift direction.
Definition: TPCGeo.h:127
Conversion of times between different formats and references.
::detinfo::ElecClock fTPCClock
TPC electronics clock.
virtual double ModBoxCorrection(double dQdX) const override
virtual double TPCTick2TDC(double tick) const =0
Converts a TPC time tick into a electronics time tick.
virtual double ConvertXToTicks(double X, int p, int t, int c) const override
Encapsulate the construction of a single detector plane.
TDirectory * dir
Definition: macro.C:5
const TPCGeo & TPC(unsigned int itpc) const
Return the itpc&#39;th TPC in the cryostat.
unsigned int fReadOutWindowSize
number of clock ticks per readout window
Container for a list of pointers to providers.
Definition: ProviderPack.h:114
double fTimeOffsetX
time offset to convert spacepoint coordinates to hit times on view X
virtual double AtomicNumber() const =0
Atomic number of the liquid.
constexpr double kRecombk
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
Simple utilities for service providers.
const detinfo::DetectorClocks * fClocks
Configuration_t ValidateConfiguration(fhicl::ParameterSet const &p, std::set< std::string > const &ignore_params={})
Validates the specified configuration.
virtual double ConvertTicksToX(double ticks, int p, int t, int c) const override
PlaneGeo const & Plane(geo::View_t view) const
Return the plane in the tpc with View_t view.
Definition: TPCGeo.cxx:298
constexpr double kRecombA
A constant.
virtual double DriftVelocity(double efield=0., double temperature=0.) const override
cm/us
constexpr double kModBoxA
Modified Box Alpha.
virtual double Density() const override
Returns argon density at the temperature from Temperature()
Float_t e
Definition: plot.C:34
Float_t X
Definition: plot.C:39
Namespace collecting geometry-related classes utilities.
double fHasTimeOffsetY
whether time offset was configured for view Y
void Setup(providers_type providers)
Sets all the providers at once.
const double * PlaneLocation(unsigned int p) const
Returns the coordinates of the center of the specified plane [cm].
Definition: TPCGeo.cxx:412
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
Encapsulate the construction of a single detector plane.
virtual double Eloss(double mom, double mass, double tcut) const override
Restricted mean energy loss (dE/dx)