LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
detinfo::DetectorPropertiesStandard Class Reference

#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, detinfo::DetectorClocks >
 List of service providers we depend on. More...
 

Public Member Functions

 DetectorPropertiesStandard ()
 
 DetectorPropertiesStandard (fhicl::ParameterSet const &pset, const geo::GeometryCore *geo, const detinfo::LArProperties *lp, const detinfo::DetectorClocks *c, std::set< std::string > const &ignore_params={})
 
 DetectorPropertiesStandard (fhicl::ParameterSet const &pset, providers_type providers, std::set< std::string > const &ignore_params={})
 Constructs the provider and sets up the dependencies. More...
 
 DetectorPropertiesStandard (DetectorPropertiesStandard const &)=delete
 
virtual ~DetectorPropertiesStandard ()=default
 
void ValidateAndConfigure (fhicl::ParameterSet const &p, std::set< std::string > const &ignore_params={})
 Configures the provider, first validating the configuration. More...
 
void Configure (Configuration_t const &config)
 Extracts the relevant configuration from the specified object. More...
 
Configuration_t ValidateConfiguration (fhicl::ParameterSet const &p, std::set< std::string > const &ignore_params={})
 Validates the specified configuration. More...
 
bool Update (uint64_t ts)
 
bool UpdateClocks (const detinfo::DetectorClocks *clks)
 
void Setup (providers_type providers)
 Sets all the providers at once. More...
 
void SetGeometry (const geo::GeometryCore *g)
 
void SetLArProperties (const detinfo::LArProperties *lp)
 
void SetDetectorClocks (const detinfo::DetectorClocks *clks)
 
void SetNumberTimeSamples (unsigned int nsamp)
 
virtual double Efield (unsigned int planegap=0) const override
 kV/cm More...
 
virtual double DriftVelocity (double efield=0., double temperature=0.) const override
 cm/us More...
 
virtual double BirksCorrection (double dQdX) const override
 dQ/dX in electrons/cm, returns dE/dX in MeV/cm. More...
 
virtual double ModBoxCorrection (double dQdX) const override
 
virtual double ElectronLifetime () const override
 Returns the attenuation constant for ionization electrons. More...
 
virtual double Density (double temperature) const override
 Returns argon density at a given temperature. More...
 
virtual double Density () const override
 Returns argon density at the temperature from Temperature() More...
 
virtual double Temperature () const override
 In kelvin. More...
 
virtual double Eloss (double mom, double mass, double tcut) const override
 Restricted mean energy loss (dE/dx) More...
 
virtual double ElossVar (double mom, double mass) const override
 Energy loss fluctuation ( $ \sigma_{E}^2 / x $) More...
 
virtual double SamplingRate () const override
 Returns the period of the TPC readout electronics clock. More...
 
virtual double ElectronsToADC () const override
 
virtual unsigned int NumberTimeSamples () const override
 
virtual unsigned int ReadOutWindowSize () const override
 
virtual int TriggerOffset () const override
 
virtual double TimeOffsetU () const override
 
virtual double TimeOffsetV () const override
 
virtual double TimeOffsetZ () const override
 
virtual double TimeOffsetY () const override
 
virtual double ConvertXToTicks (double X, int p, int t, int c) const override
 
virtual double ConvertXToTicks (double X, geo::PlaneID const &planeid) const override
 
virtual double ConvertTicksToX (double ticks, int p, int t, int c) const override
 
virtual double ConvertTicksToX (double ticks, geo::PlaneID const &planeid) const override
 
virtual double GetXTicksOffset (int p, int t, int c) const override
 
virtual double GetXTicksOffset (geo::PlaneID const &planeid) const override
 
virtual double GetXTicksCoefficient (int t, int c) const override
 
virtual double GetXTicksCoefficient (geo::TPCID const &tpcid) const override
 
virtual double GetXTicksCoefficient () const override
 
virtual double ConvertTDCToTicks (double tdc) const override
 
virtual double ConvertTicksToTDC (double ticks) const override
 
virtual bool SimpleBoundary () const override
 
void CheckIfConfigured () const
 

Protected Member Functions

void CalculateXTicksParams ()
 
std::string CheckTimeOffsetConfigurationAfterSetup () const
 Checks the configuration of time offsets. More...
 
void CheckConfigurationAfterSetup () const
 
void DoUpdateClocks ()
 Time-independent implementation of clock updates. More...
 

Protected Attributes

const detinfo::LArPropertiesfLP
 
const detinfo::DetectorClocksfClocks
 
const geo::GeometryCorefGeo
 
std::vector< double > fEfield
 kV/cm (per inter-plane volume) More...
 
double fElectronlifetime
 microseconds More...
 
double fTemperature
 kelvin More...
 
double fSamplingRate
 in ns More...
 
double fElectronsToADC
 conversion factor for # of ionization electrons to 1 ADC count More...
 
unsigned int fNumberTimeSamples
 number of clock ticks per event More...
 
unsigned int fReadOutWindowSize
 number of clock ticks per readout window More...
 
double fTimeOffsetU
 time offset to convert spacepoint coordinates to hit times on view U More...
 
double fTimeOffsetV
 time offset to convert spacepoint coordinates to hit times on view V More...
 
double fTimeOffsetZ
 time offset to convert spacepoint coordinates to hit times on view Z More...
 
double fTimeOffsetY
 time offset to convert spacepoint coordinates to hit times on view Y More...
 
double fTimeOffsetX
 time offset to convert spacepoint coordinates to hit times on view X More...
 
double fHasTimeOffsetU = false
 whether time offset was configured for view U More...
 
double fHasTimeOffsetV = false
 whether time offset was configured for view V More...
 
double fHasTimeOffsetZ = false
 whether time offset was configured for view Z More...
 
double fHasTimeOffsetY = false
 whether time offset was configured for view Y More...
 
double fHasTimeOffsetX = false
 whether time offset was configured for view X More...
 
SternheimerParameters_t fSternheimerParameters
 Sternheimer parameters. More...
 
double fXTicksCoefficient
 Parameters for x<–>ticks. More...
 
std::vector< std::vector< std::vector< double > > > fXTicksOffsets
 
std::vector< std::vector< double > > fDriftDirection
 
::detinfo::ElecClock fTPCClock
 TPC electronics clock. More...
 
bool fSimpleBoundary
 

Detailed Description

Definition at line 34 of file DetectorPropertiesStandard.h.

Member Typedef Documentation

Constructor & Destructor Documentation

detinfo::DetectorPropertiesStandard::DetectorPropertiesStandard ( )

Definition at line 39 of file DetectorPropertiesStandard.cxx.

39  :
40  fLP(0), fClocks(0), fGeo(0)
41  {
42 
43  }
const detinfo::DetectorClocks * fClocks
detinfo::DetectorPropertiesStandard::DetectorPropertiesStandard ( fhicl::ParameterSet const &  pset,
const geo::GeometryCore geo,
const detinfo::LArProperties lp,
const detinfo::DetectorClocks c,
std::set< std::string > const &  ignore_params = {} 
)

Definition at line 46 of file DetectorPropertiesStandard.cxx.

References tca::debug, DoUpdateClocks(), fClocks, fTPCClock, detinfo::DetectorClocks::TPCClock(), and ValidateAndConfigure().

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  }
virtual const ::detinfo::ElecClock & TPCClock() const =0
Lends a constant TPC clock with time set to trigger time.
void DoUpdateClocks()
Time-independent implementation of clock updates.
void ValidateAndConfigure(fhicl::ParameterSet const &p, std::set< std::string > const &ignore_params={})
Configures the provider, first validating the configuration.
DebugStuff debug
Definition: DebugStruct.cxx:4
::detinfo::ElecClock fTPCClock
TPC electronics clock.
const detinfo::DetectorClocks * fClocks
detinfo::DetectorPropertiesStandard::DetectorPropertiesStandard ( fhicl::ParameterSet const &  pset,
providers_type  providers,
std::set< std::string > const &  ignore_params = {} 
)

Constructs the provider and sets up the dependencies.

Parameters
psetFHiCL parameter set for provider configuration
providerspack of providers DetectorPropertiesStandard depends on
ignore_paramsunknown configuration keys in pset to be tolerated
See also
Setup()

Definition at line 68 of file DetectorPropertiesStandard.cxx.

71  :
73  providers.get<geo::GeometryCore>(),
74  providers.get<detinfo::LArProperties>(),
75  providers.get<detinfo::DetectorClocks>(),
76  ignore_params
77  )
78  {}
Description of geometry of one entire detector.
Conversion of times between different formats and references.
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 379 of file DetectorPropertiesStandard.cxx.

References Density(), Efield(), util::kGeVToElectrons, util::kRecombA, and util::kRecombk.

Referenced by SetNumberTimeSamples().

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  }
virtual double Efield(unsigned int planegap=0) const override
kV/cm
constexpr double kGeVToElectrons
23.6eV per ion pair, 1e9 eV/GeV
constexpr double kRecombk
constexpr double kRecombA
A constant.
virtual double Density() const override
Returns argon density at the temperature from Temperature()
void detinfo::DetectorPropertiesStandard::CalculateXTicksParams ( )
protected

< special case for ArgoNeuT

Definition at line 462 of file DetectorPropertiesStandard.cxx.

References CheckIfConfigured(), geo::GeometryCore::Cryostat(), dir, geo::TPCGeo::DriftDirection(), DriftVelocity(), Efield(), fDriftDirection, fGeo, fTimeOffsetU, fTimeOffsetV, fTimeOffsetX, fTimeOffsetY, fTimeOffsetZ, fXTicksCoefficient, fXTicksOffsets, geo::kNegX, geo::kU, geo::kV, geo::kX, geo::kY, geo::kZ, geo::GeometryCore::Ncryostats(), geo::TPCGeo::Nplanes(), geo::CryostatGeo::NTPC(), geo::TPCGeo::Plane(), geo::TPCGeo::PlaneLocation(), geo::TPCGeo::PlanePitch(), SamplingRate(), Temperature(), geo::CryostatGeo::TPC(), TriggerOffset(), and geo::PlaneGeo::View().

Referenced by DoUpdateClocks().

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  }
double fTimeOffsetZ
time offset to convert spacepoint coordinates to hit times on view Z
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:419
double fXTicksCoefficient
Parameters for x<–>ticks.
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
unsigned int Nplanes() const
Number of planes in this tpc.
Definition: TPCGeo.h:145
Planes which measure X direction.
Definition: geo_types.h:81
Geometry information for a single TPC.
Definition: TPCGeo.h:37
std::vector< std::vector< double > > fDriftDirection
double fTimeOffsetU
time offset to convert spacepoint coordinates to hit times on view U
Planes which measure Z direction.
Definition: geo_types.h:79
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 fTimeOffsetV
time offset to convert spacepoint coordinates to hit times on view V
Planes which measure U.
Definition: geo_types.h:76
View_t View() const
Which coordinate does this plane measure.
Definition: PlaneGeo.h:171
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
unsigned int NTPC() const
Number of TPCs in this cryostat.
Definition: CryostatGeo.h:155
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:127
TDirectory * dir
Definition: macro.C:5
const TPCGeo & TPC(unsigned int itpc) const
Return the itpc&#39;th TPC in the cryostat.
double fTimeOffsetX
time offset to convert spacepoint coordinates to hit times on view X
PlaneGeo const & Plane(geo::View_t view) const
Return the plane in the tpc with View_t view.
Definition: TPCGeo.cxx:299
virtual double DriftVelocity(double efield=0., double temperature=0.) const override
cm/us
const double * PlaneLocation(unsigned int p) const
Returns the coordinates of the center of the specified plane [cm].
Definition: TPCGeo.cxx:413
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
void detinfo::DetectorPropertiesStandard::CheckConfigurationAfterSetup ( ) const
protected

Checks that provider configuration is complete, using setup information.

Definition at line 643 of file DetectorPropertiesStandard.cxx.

References CheckTimeOffsetConfigurationAfterSetup().

Referenced by Setup().

643  {
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()
std::string CheckTimeOffsetConfigurationAfterSetup() const
Checks the configuration of time offsets.
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
void detinfo::DetectorPropertiesStandard::CheckIfConfigured ( ) const

Verifies that the provider is in a fully configured status

Exceptions
cet::exception(category DetectorPropertiesStandard) if not ok

Definition at line 451 of file DetectorPropertiesStandard.cxx.

References fClocks, fGeo, and fLP.

Referenced by CalculateXTicksParams(), and SimpleBoundary().

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  }
const detinfo::DetectorClocks * fClocks
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
std::string detinfo::DetectorPropertiesStandard::CheckTimeOffsetConfigurationAfterSetup ( ) const
protected

Checks the configuration of time offsets.

Definition at line 601 of file DetectorPropertiesStandard.cxx.

References fGeo, fHasTimeOffsetU, fHasTimeOffsetV, fHasTimeOffsetX, fHasTimeOffsetY, fHasTimeOffsetZ, geo::kU, geo::kV, geo::kX, geo::kY, geo::kZ, and geo::GeometryCore::Views().

Referenced by CheckConfigurationAfterSetup(), and GetXTicksOffset().

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()
Planes which measure V.
Definition: geo_types.h:77
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:81
Planes which measure Z direction.
Definition: geo_types.h:79
double fHasTimeOffsetV
whether time offset was configured for view V
Planes which measure Y direction.
Definition: geo_types.h:80
double fHasTimeOffsetX
whether time offset was configured for view X
Planes which measure U.
Definition: geo_types.h:76
double fHasTimeOffsetZ
whether time offset was configured for view Z
double fHasTimeOffsetU
whether time offset was configured for view U
double fHasTimeOffsetY
whether time offset was configured for view Y
void detinfo::DetectorPropertiesStandard::Configure ( Configuration_t const &  config)

Extracts the relevant configuration from the specified object.

Definition at line 112 of file DetectorPropertiesStandard.cxx.

References detinfo::DetectorPropertiesStandard::SternheimerParameters_t::a, detinfo::DetectorPropertiesStandard::SternheimerParameters_t::cbar, DoUpdateClocks(), detinfo::DetectorPropertiesStandard::Configuration_t::Efield, detinfo::DetectorPropertiesStandard::Configuration_t::Electronlifetime, detinfo::DetectorPropertiesStandard::Configuration_t::ElectronsToADC, fEfield, fElectronlifetime, fElectronsToADC, fHasTimeOffsetU, fHasTimeOffsetV, fHasTimeOffsetX, fHasTimeOffsetY, fHasTimeOffsetZ, fNumberTimeSamples, fReadOutWindowSize, fSimpleBoundary, fSternheimerParameters, fTemperature, fTimeOffsetU, fTimeOffsetV, fTimeOffsetX, fTimeOffsetY, fTimeOffsetZ, detinfo::DetectorPropertiesStandard::SternheimerParameters_t::k, detinfo::DetectorPropertiesStandard::Configuration_t::NumberTimeSamples, detinfo::DetectorPropertiesStandard::Configuration_t::ReadOutWindowSize, detinfo::DetectorPropertiesStandard::Configuration_t::SimpleBoundary, detinfo::DetectorPropertiesStandard::Configuration_t::SternheimerA, detinfo::DetectorPropertiesStandard::Configuration_t::SternheimerCbar, detinfo::DetectorPropertiesStandard::Configuration_t::SternheimerK, detinfo::DetectorPropertiesStandard::Configuration_t::SternheimerX0, detinfo::DetectorPropertiesStandard::Configuration_t::SternheimerX1, detinfo::DetectorPropertiesStandard::Configuration_t::Temperature, detinfo::DetectorPropertiesStandard::Configuration_t::TimeOffsetU, detinfo::DetectorPropertiesStandard::Configuration_t::TimeOffsetV, detinfo::DetectorPropertiesStandard::Configuration_t::TimeOffsetX, detinfo::DetectorPropertiesStandard::Configuration_t::TimeOffsetY, detinfo::DetectorPropertiesStandard::Configuration_t::TimeOffsetZ, detinfo::DetectorPropertiesStandard::SternheimerParameters_t::x0, and detinfo::DetectorPropertiesStandard::SternheimerParameters_t::x1.

Referenced by ValidateAndConfigure().

112  {
113 
114  fEfield = config.Efield();
115  fElectronlifetime = config.Electronlifetime();
116  fTemperature = config.Temperature();
117  fElectronsToADC = config.ElectronsToADC();
118  fNumberTimeSamples = config.NumberTimeSamples();
119  fReadOutWindowSize = config.ReadOutWindowSize();
120  fHasTimeOffsetU = config.TimeOffsetU(fTimeOffsetU);
121  fHasTimeOffsetV = config.TimeOffsetV(fTimeOffsetV);
122  fHasTimeOffsetZ = config.TimeOffsetZ(fTimeOffsetZ);
123  fHasTimeOffsetY = config.TimeOffsetY(fTimeOffsetY);
124  fHasTimeOffsetX = config.TimeOffsetX(fTimeOffsetX);
125 
126  fSternheimerParameters.a = config.SternheimerA();
127  fSternheimerParameters.k = config.SternheimerK();
128  fSternheimerParameters.x0 = config.SternheimerX0();
129  fSternheimerParameters.x1 = config.SternheimerX1();
130  fSternheimerParameters.cbar = config.SternheimerCbar();
131 
132  fSimpleBoundary = config.SimpleBoundary();
133 
134  DoUpdateClocks();
135 
136  } // DetectorPropertiesStandard::Configure()
double fTimeOffsetZ
time offset to convert spacepoint coordinates to hit times on view Z
double fElectronsToADC
conversion factor for # of ionization electrons to 1 ADC count
void DoUpdateClocks()
Time-independent implementation of clock updates.
unsigned int fNumberTimeSamples
number of clock ticks per event
double fTimeOffsetU
time offset to convert spacepoint coordinates to hit times on view U
double fHasTimeOffsetV
whether time offset was configured for view V
double fTimeOffsetY
time offset to convert spacepoint coordinates to hit times on view Y
double fHasTimeOffsetX
whether time offset was configured for view X
double fTimeOffsetV
time offset to convert spacepoint coordinates to hit times on view V
std::vector< double > fEfield
kV/cm (per inter-plane volume)
SternheimerParameters_t fSternheimerParameters
Sternheimer parameters.
double fHasTimeOffsetZ
whether time offset was configured for view Z
double fHasTimeOffsetU
whether time offset was configured for view U
unsigned int fReadOutWindowSize
number of clock ticks per readout window
double fTimeOffsetX
time offset to convert spacepoint coordinates to hit times on view X
double fHasTimeOffsetY
whether time offset was configured for view Y
double detinfo::DetectorPropertiesStandard::ConvertTDCToTicks ( double  tdc) const
overridevirtual

Implements detinfo::DetectorProperties.

Definition at line 99 of file DetectorPropertiesStandard.cxx.

References fClocks, and detinfo::DetectorClocks::TPCTDC2Tick().

Referenced by GetXTicksCoefficient().

100  {
101  return fClocks->TPCTDC2Tick(tdc);
102  }
virtual double TPCTDC2Tick(double tdc) const =0
Given electronics clock count [tdc] returns TPC time-tick.
const detinfo::DetectorClocks * fClocks
double detinfo::DetectorPropertiesStandard::ConvertTicksToTDC ( double  ticks) const
overridevirtual

Implements detinfo::DetectorProperties.

Definition at line 105 of file DetectorPropertiesStandard.cxx.

References fClocks, and detinfo::DetectorClocks::TPCTick2TDC().

Referenced by GetXTicksCoefficient().

106  {
107  return fClocks->TPCTick2TDC(ticks);
108  }
virtual double TPCTick2TDC(double tick) const =0
Converts a TPC time tick into a electronics time tick.
const detinfo::DetectorClocks * fClocks
double detinfo::DetectorPropertiesStandard::ConvertTicksToX ( double  ticks,
int  p,
int  t,
int  c 
) const
overridevirtual

Implements detinfo::DetectorProperties.

Definition at line 444 of file DetectorPropertiesStandard.cxx.

References fDriftDirection, fXTicksCoefficient, and fXTicksOffsets.

Referenced by ConvertTicksToX(), and ConvertXToTicks().

445  {
446  return (ticks - fXTicksOffsets.at(c).at(t).at(p)) * fXTicksCoefficient * fDriftDirection.at(c).at(t);
447  }
double fXTicksCoefficient
Parameters for x<–>ticks.
std::vector< std::vector< double > > fDriftDirection
std::vector< std::vector< std::vector< double > > > fXTicksOffsets
virtual double detinfo::DetectorPropertiesStandard::ConvertTicksToX ( double  ticks,
geo::PlaneID const &  planeid 
) const
inlineoverridevirtual

Implements detinfo::DetectorProperties.

Definition at line 271 of file DetectorPropertiesStandard.h.

References ConvertTicksToX(), geo::CryostatID::Cryostat, GetXTicksOffset(), geo::PlaneID::Plane, and geo::TPCID::TPC.

272  { return ConvertTicksToX(ticks, planeid.Plane, planeid.TPC, planeid.Cryostat); }
virtual double ConvertTicksToX(double ticks, int p, int t, int c) const override
double detinfo::DetectorPropertiesStandard::ConvertXToTicks ( double  X,
int  p,
int  t,
int  c 
) const
overridevirtual

Implements detinfo::DetectorProperties.

Definition at line 433 of file DetectorPropertiesStandard.cxx.

References fDriftDirection, fXTicksCoefficient, and fXTicksOffsets.

Referenced by ConvertXToTicks(), and TimeOffsetY().

434  {
435  return (X / (fXTicksCoefficient * fDriftDirection.at(c).at(t)) + fXTicksOffsets.at(c).at(t).at(p) );
436  }
double fXTicksCoefficient
Parameters for x<–>ticks.
std::vector< std::vector< double > > fDriftDirection
std::vector< std::vector< std::vector< double > > > fXTicksOffsets
Float_t X
Definition: plot.C:39
virtual double detinfo::DetectorPropertiesStandard::ConvertXToTicks ( double  X,
geo::PlaneID const &  planeid 
) const
inlineoverridevirtual

Implements detinfo::DetectorProperties.

Definition at line 268 of file DetectorPropertiesStandard.h.

References ConvertTicksToX(), ConvertXToTicks(), geo::CryostatID::Cryostat, geo::PlaneID::Plane, and geo::TPCID::TPC.

269  { return ConvertXToTicks(X, planeid.Plane, planeid.TPC, planeid.Cryostat); }
virtual double ConvertXToTicks(double X, int p, int t, int c) const override
Float_t X
Definition: plot.C:39
double detinfo::DetectorPropertiesStandard::Density ( double  temperature) 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 186 of file DetectorPropertiesStandard.cxx.

References Temperature().

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()
virtual double Temperature() const override
In kelvin.
virtual double detinfo::DetectorPropertiesStandard::Density ( ) const
inlineoverridevirtual

Returns argon density at the temperature from Temperature()

Reimplemented from detinfo::DetectorProperties.

Definition at line 226 of file DetectorPropertiesStandard.h.

References Density(), and detinfo::DetectorPropertiesStandard::Configuration_t::Temperature.

Referenced by BirksCorrection(), Density(), ElectronLifetime(), Eloss(), ElossVar(), and ModBoxCorrection().

226 { return Density(Temperature()); }
virtual double Temperature() const override
In kelvin.
virtual double Density() const override
Returns argon density at the temperature from Temperature()
void detinfo::DetectorPropertiesStandard::DoUpdateClocks ( )
protected

Time-independent implementation of clock updates.

Definition at line 657 of file DetectorPropertiesStandard.cxx.

References CalculateXTicksParams().

Referenced by Configure(), DetectorPropertiesStandard(), Update(), and UpdateClocks().

double detinfo::DetectorPropertiesStandard::DriftVelocity ( double  efield = 0.,
double  temperature = 0. 
) const
overridevirtual

cm/us

Implements detinfo::DetectorProperties.

Definition at line 286 of file DetectorPropertiesStandard.cxx.

References Efield(), and Temperature().

Referenced by CalculateXTicksParams(), and SetNumberTimeSamples().

286  {
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 }
virtual double Temperature() const override
In kelvin.
virtual double Efield(unsigned int planegap=0) const override
kV/cm
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
double detinfo::DetectorPropertiesStandard::Efield ( unsigned int  planegap = 0) const
overridevirtual

kV/cm

Implements detinfo::DetectorProperties.

Definition at line 176 of file DetectorPropertiesStandard.cxx.

References fEfield.

Referenced by BirksCorrection(), CalculateXTicksParams(), DriftVelocity(), and ModBoxCorrection().

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  }
std::vector< double > fEfield
kV/cm (per inter-plane volume)
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
virtual 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 210 of file DetectorPropertiesStandard.h.

References Density(), and fElectronlifetime.

210 { return fElectronlifetime; } //< microseconds
virtual double detinfo::DetectorPropertiesStandard::ElectronsToADC ( ) const
inlineoverridevirtual

Implements detinfo::DetectorProperties.

Definition at line 258 of file DetectorPropertiesStandard.h.

References fElectronsToADC.

258 { return fElectronsToADC; }
double fElectronsToADC
conversion factor for # of ionization electrons to 1 ADC count
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 215 of file DetectorPropertiesStandard.cxx.

References detinfo::DetectorPropertiesStandard::SternheimerParameters_t::a, detinfo::LArProperties::AtomicMass(), detinfo::LArProperties::AtomicNumber(), B, beta, detinfo::DetectorPropertiesStandard::SternheimerParameters_t::cbar, Density(), e, detinfo::LArProperties::ExcitationEnergy(), fLP, fSternheimerParameters, K, detinfo::DetectorPropertiesStandard::SternheimerParameters_t::k, geo::sqr(), x, detinfo::DetectorPropertiesStandard::SternheimerParameters_t::x0, and detinfo::DetectorPropertiesStandard::SternheimerParameters_t::x1.

Referenced by Temperature().

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()
Float_t x
Definition: compare.C:6
Int_t B
Definition: plot.C:25
Double_t beta
Double_t K
virtual double ExcitationEnergy() const =0
Mean excitation energy of the liquid (eV)
T sqr(T v)
virtual double AtomicMass() const =0
Atomic mass of the liquid (g/mol)
SternheimerParameters_t fSternheimerParameters
Sternheimer parameters.
virtual double AtomicNumber() const =0
Atomic number of the liquid.
virtual double Density() const override
Returns argon density at the temperature from Temperature()
Float_t e
Definition: plot.C:34
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 265 of file DetectorPropertiesStandard.cxx.

References detinfo::LArProperties::AtomicMass(), detinfo::LArProperties::AtomicNumber(), Density(), fLP, and K.

Referenced by Temperature().

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()
Double_t K
virtual double AtomicMass() const =0
Atomic mass of the liquid (g/mol)
virtual double AtomicNumber() const =0
Atomic number of the liquid.
virtual double Density() const override
Returns argon density at the temperature from Temperature()
double detinfo::DetectorPropertiesStandard::GetXTicksCoefficient ( int  t,
int  c 
) const
overridevirtual

Implements detinfo::DetectorProperties.

Definition at line 577 of file DetectorPropertiesStandard.cxx.

References fDriftDirection, and fXTicksCoefficient.

578  {
579  return fXTicksCoefficient * fDriftDirection.at(c).at(t);
580  }
double fXTicksCoefficient
Parameters for x<–>ticks.
std::vector< std::vector< double > > fDriftDirection
virtual double detinfo::DetectorPropertiesStandard::GetXTicksCoefficient ( geo::TPCID const &  tpcid) const
inlineoverridevirtual
double detinfo::DetectorPropertiesStandard::GetXTicksCoefficient ( ) const
overridevirtual

Implements detinfo::DetectorProperties.

Definition at line 585 of file DetectorPropertiesStandard.cxx.

References fXTicksCoefficient.

Referenced by GetXTicksCoefficient(), and GetXTicksOffset().

586  {
587  return fXTicksCoefficient;
588  }
double fXTicksCoefficient
Parameters for x<–>ticks.
double detinfo::DetectorPropertiesStandard::GetXTicksOffset ( int  p,
int  t,
int  c 
) const
overridevirtual

Implements detinfo::DetectorProperties.

Definition at line 593 of file DetectorPropertiesStandard.cxx.

References CheckTimeOffsetConfigurationAfterSetup(), and fXTicksOffsets.

Referenced by ConvertTicksToX(), and GetXTicksOffset().

594  {
595  return fXTicksOffsets.at(c).at(t).at(p);
596  }
std::vector< std::vector< std::vector< double > > > fXTicksOffsets
virtual double detinfo::DetectorPropertiesStandard::GetXTicksOffset ( geo::PlaneID const &  planeid) const
inlineoverridevirtual

Implements detinfo::DetectorProperties.

Definition at line 275 of file DetectorPropertiesStandard.h.

References geo::CryostatID::Cryostat, GetXTicksCoefficient(), GetXTicksOffset(), geo::PlaneID::Plane, and geo::TPCID::TPC.

276  { return GetXTicksOffset(planeid.Plane, planeid.TPC, planeid.Cryostat); }
virtual double GetXTicksOffset(int p, int t, int c) const override
double detinfo::DetectorPropertiesStandard::ModBoxCorrection ( double  dQdX) const
overridevirtual

Implements detinfo::DetectorProperties.

Definition at line 397 of file DetectorPropertiesStandard.cxx.

References Density(), Efield(), util::kGeVToElectrons, util::kModBoxA, and util::kModBoxB.

Referenced by SetNumberTimeSamples().

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  }
virtual double Efield(unsigned int planegap=0) const override
kV/cm
constexpr double kGeVToElectrons
23.6eV per ion pair, 1e9 eV/GeV
constexpr double kModBoxB
Modified Box Beta in g/(MeV cm²)*kV/cm.
constexpr double kModBoxA
Modified Box Alpha.
virtual double Density() const override
Returns argon density at the temperature from Temperature()
virtual unsigned int detinfo::DetectorPropertiesStandard::NumberTimeSamples ( ) const
inlineoverridevirtual

Implements detinfo::DetectorProperties.

Definition at line 259 of file DetectorPropertiesStandard.h.

References fNumberTimeSamples.

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

Implements detinfo::DetectorProperties.

Definition at line 260 of file DetectorPropertiesStandard.h.

References fReadOutWindowSize, and TriggerOffset().

260 { return fReadOutWindowSize; }
unsigned int fReadOutWindowSize
number of clock ticks per readout window
virtual double detinfo::DetectorPropertiesStandard::SamplingRate ( ) const
inlineoverridevirtual

Returns the period of the TPC readout electronics clock.

Returns
the period of the TPC readout electronics clock [µs]
See also
detinfo::DetectorClocks::TPCClock()

Implements detinfo::DetectorProperties.

Definition at line 257 of file DetectorPropertiesStandard.h.

References fTPCClock, and detinfo::ElecClock::TickPeriod().

Referenced by CalculateXTicksParams().

257 { return fTPCClock.TickPeriod() * 1.e3; }
::detinfo::ElecClock fTPCClock
TPC electronics clock.
double TickPeriod() const
A single tick period in microseconds.
Definition: ElecClock.h:342
void detinfo::DetectorPropertiesStandard::SetDetectorClocks ( const detinfo::DetectorClocks clks)
inline

Definition at line 197 of file DetectorPropertiesStandard.h.

References fClocks.

Referenced by Setup().

197 { fClocks = clks; }
const detinfo::DetectorClocks * fClocks
void detinfo::DetectorPropertiesStandard::SetGeometry ( const geo::GeometryCore g)
inline

Definition at line 195 of file DetectorPropertiesStandard.h.

References fGeo.

Referenced by Setup().

195 { fGeo = g; }
void detinfo::DetectorPropertiesStandard::SetLArProperties ( const detinfo::LArProperties lp)
inline

Definition at line 196 of file DetectorPropertiesStandard.h.

References fLP.

Referenced by Setup().

196 { fLP = lp; }
void detinfo::DetectorPropertiesStandard::SetNumberTimeSamples ( unsigned int  nsamp)
inline
void detinfo::DetectorPropertiesStandard::Setup ( providers_type  providers)

Sets all the providers at once.

Parameters
providersthe pack of service providers we depend on

Example:

lar::DetectorPropertiesStandard::providers_type providers;
providers.set(lar::providerFrom<geo::Geometry>());
providers.set(lar::providerFrom<detinfo::LArPropertiesService>());
providers.set(lar::providerFrom<detinfo::DetectorClocksService>());
detprop->Setup(providers);

Definition at line 164 of file DetectorPropertiesStandard.cxx.

References CheckConfigurationAfterSetup(), lar::ProviderPack< Providers >::get(), SetDetectorClocks(), SetGeometry(), and SetLArProperties().

164  {
165 
166  SetGeometry(providers.get<geo::GeometryCore>());
167  SetLArProperties(providers.get<detinfo::LArProperties>());
168  SetDetectorClocks(providers.get<detinfo::DetectorClocks>());
169 
171 
172  } // DetectorPropertiesStandard::Setup()
void SetDetectorClocks(const detinfo::DetectorClocks *clks)
void SetGeometry(const geo::GeometryCore *g)
void SetLArProperties(const detinfo::LArProperties *lp)
Description of geometry of one entire detector.
Conversion of times between different formats and references.
virtual bool detinfo::DetectorPropertiesStandard::SimpleBoundary ( ) const
inlineoverridevirtual
virtual double detinfo::DetectorPropertiesStandard::Temperature ( ) const
inlineoverridevirtual

In kelvin.

Implements detinfo::DetectorProperties.

Definition at line 229 of file DetectorPropertiesStandard.h.

References Eloss(), ElossVar(), and fTemperature.

Referenced by CalculateXTicksParams(), Density(), and DriftVelocity().

virtual double detinfo::DetectorPropertiesStandard::TimeOffsetU ( ) const
inlineoverridevirtual

Implements detinfo::DetectorProperties.

Definition at line 262 of file DetectorPropertiesStandard.h.

References fTimeOffsetU.

262 { return fTimeOffsetU; };
double fTimeOffsetU
time offset to convert spacepoint coordinates to hit times on view U
virtual double detinfo::DetectorPropertiesStandard::TimeOffsetV ( ) const
inlineoverridevirtual

Implements detinfo::DetectorProperties.

Definition at line 263 of file DetectorPropertiesStandard.h.

References fTimeOffsetV.

263 { return fTimeOffsetV; };
double fTimeOffsetV
time offset to convert spacepoint coordinates to hit times on view V
virtual double detinfo::DetectorPropertiesStandard::TimeOffsetY ( ) const
inlineoverridevirtual

Reimplemented from detinfo::DetectorProperties.

Definition at line 265 of file DetectorPropertiesStandard.h.

References ConvertXToTicks(), fTimeOffsetY, and X.

265 { return fTimeOffsetY; };
double fTimeOffsetY
time offset to convert spacepoint coordinates to hit times on view Y
virtual double detinfo::DetectorPropertiesStandard::TimeOffsetZ ( ) const
inlineoverridevirtual

Implements detinfo::DetectorProperties.

Definition at line 264 of file DetectorPropertiesStandard.h.

References fTimeOffsetZ.

264 { return fTimeOffsetZ; };
double fTimeOffsetZ
time offset to convert spacepoint coordinates to hit times on view Z
int detinfo::DetectorPropertiesStandard::TriggerOffset ( ) const
overridevirtual

Implements detinfo::DetectorProperties.

Definition at line 413 of file DetectorPropertiesStandard.cxx.

References fClocks, fTPCClock, detinfo::ElecClock::Ticks(), and detinfo::DetectorClocks::TriggerOffsetTPC().

Referenced by CalculateXTicksParams(), and ReadOutWindowSize().

414  {
415  return fTPCClock.Ticks(fClocks->TriggerOffsetTPC() * -1.);
416  }
virtual double TriggerOffsetTPC() const =0
Time offset from hardware trigger to TPC electronics start time.
int Ticks() const
Current clock tick (that is, the number of tick Time() falls in).
Definition: ElecClock.h:235
::detinfo::ElecClock fTPCClock
TPC electronics clock.
const detinfo::DetectorClocks * fClocks
bool detinfo::DetectorPropertiesStandard::Update ( uint64_t  ts)

Definition at line 81 of file DetectorPropertiesStandard.cxx.

References DoUpdateClocks().

82  {
83 
85  return true;
86  }
void DoUpdateClocks()
Time-independent implementation of clock updates.
bool detinfo::DetectorPropertiesStandard::UpdateClocks ( const detinfo::DetectorClocks clks)

Definition at line 89 of file DetectorPropertiesStandard.cxx.

References DoUpdateClocks(), fClocks, fTPCClock, and detinfo::DetectorClocks::TPCClock().

90  {
91  fClocks = clks;
92 
95  return true;
96  }
virtual const ::detinfo::ElecClock & TPCClock() const =0
Lends a constant TPC clock with time set to trigger time.
void DoUpdateClocks()
Time-independent implementation of clock updates.
::detinfo::ElecClock fTPCClock
TPC electronics clock.
const detinfo::DetectorClocks * fClocks
void detinfo::DetectorPropertiesStandard::ValidateAndConfigure ( fhicl::ParameterSet const &  p,
std::set< std::string > const &  ignore_params = {} 
)

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 155 of file DetectorPropertiesStandard.cxx.

References Configure(), and ValidateConfiguration().

Referenced by DetectorPropertiesStandard().

158  {
159  Configure(ValidateConfiguration(p, ignore_params));
160  } // ValidateAndConfigure()
void Configure(Configuration_t const &config)
Extracts the relevant configuration from the specified object.
Configuration_t ValidateConfiguration(fhicl::ParameterSet const &p, std::set< std::string > const &ignore_params={})
Validates the specified configuration.
DetectorPropertiesStandard::Configuration_t detinfo::DetectorPropertiesStandard::ValidateConfiguration ( fhicl::ParameterSet const &  p,
std::set< std::string > const &  ignore_params = {} 
)

Validates the specified configuration.

Parameters
pconfiguration parameter set
ignore_paramsparameters to be ignored (optional)
Returns
a parsed configuration object
See also
ValidateAndConfigure(), Configure()

This method will validate the parameter set (except for the parameters it's explicitly told to ignore) and it returns an object ready to be used with Configure().

Definition at line 140 of file DetectorPropertiesStandard.cxx.

References lar::IgnorableProviderConfigKeys().

Referenced by ValidateAndConfigure().

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()
std::set< std::string > const & IgnorableProviderConfigKeys()
Returns a list of configuration keys that providers should ignore.
Definition: ProviderUtil.h:35

Member Data Documentation

const detinfo::DetectorClocks* detinfo::DetectorPropertiesStandard::fClocks
protected
std::vector<std::vector<double> > detinfo::DetectorPropertiesStandard::fDriftDirection
protected
std::vector< double > detinfo::DetectorPropertiesStandard::fEfield
protected

kV/cm (per inter-plane volume)

Definition at line 314 of file DetectorPropertiesStandard.h.

Referenced by Configure(), and Efield().

double detinfo::DetectorPropertiesStandard::fElectronlifetime
protected

microseconds

Definition at line 315 of file DetectorPropertiesStandard.h.

Referenced by Configure(), and ElectronLifetime().

double detinfo::DetectorPropertiesStandard::fElectronsToADC
protected

conversion factor for # of ionization electrons to 1 ADC count

Definition at line 318 of file DetectorPropertiesStandard.h.

Referenced by Configure(), and ElectronsToADC().

const geo::GeometryCore* detinfo::DetectorPropertiesStandard::fGeo
protected
double detinfo::DetectorPropertiesStandard::fHasTimeOffsetU = false
protected

whether time offset was configured for view U

Definition at line 326 of file DetectorPropertiesStandard.h.

Referenced by CheckTimeOffsetConfigurationAfterSetup(), and Configure().

double detinfo::DetectorPropertiesStandard::fHasTimeOffsetV = false
protected

whether time offset was configured for view V

Definition at line 327 of file DetectorPropertiesStandard.h.

Referenced by CheckTimeOffsetConfigurationAfterSetup(), and Configure().

double detinfo::DetectorPropertiesStandard::fHasTimeOffsetX = false
protected

whether time offset was configured for view X

Definition at line 330 of file DetectorPropertiesStandard.h.

Referenced by CheckTimeOffsetConfigurationAfterSetup(), and Configure().

double detinfo::DetectorPropertiesStandard::fHasTimeOffsetY = false
protected

whether time offset was configured for view Y

Definition at line 329 of file DetectorPropertiesStandard.h.

Referenced by CheckTimeOffsetConfigurationAfterSetup(), and Configure().

double detinfo::DetectorPropertiesStandard::fHasTimeOffsetZ = false
protected

whether time offset was configured for view Z

Definition at line 328 of file DetectorPropertiesStandard.h.

Referenced by CheckTimeOffsetConfigurationAfterSetup(), and Configure().

const detinfo::LArProperties* detinfo::DetectorPropertiesStandard::fLP
protected

Definition at line 310 of file DetectorPropertiesStandard.h.

Referenced by CheckIfConfigured(), Eloss(), ElossVar(), and SetLArProperties().

unsigned int detinfo::DetectorPropertiesStandard::fNumberTimeSamples
protected

number of clock ticks per event

Definition at line 319 of file DetectorPropertiesStandard.h.

Referenced by Configure(), NumberTimeSamples(), and SetNumberTimeSamples().

unsigned int detinfo::DetectorPropertiesStandard::fReadOutWindowSize
protected

number of clock ticks per readout window

Definition at line 320 of file DetectorPropertiesStandard.h.

Referenced by Configure(), and ReadOutWindowSize().

double detinfo::DetectorPropertiesStandard::fSamplingRate
protected

in ns

Definition at line 317 of file DetectorPropertiesStandard.h.

bool detinfo::DetectorPropertiesStandard::fSimpleBoundary
protected

Definition at line 341 of file DetectorPropertiesStandard.h.

Referenced by Configure(), and SimpleBoundary().

SternheimerParameters_t detinfo::DetectorPropertiesStandard::fSternheimerParameters
protected

Sternheimer parameters.

Definition at line 332 of file DetectorPropertiesStandard.h.

Referenced by Configure(), and Eloss().

double detinfo::DetectorPropertiesStandard::fTemperature
protected

kelvin

Definition at line 316 of file DetectorPropertiesStandard.h.

Referenced by Configure(), and Temperature().

double detinfo::DetectorPropertiesStandard::fTimeOffsetU
protected

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

Definition at line 321 of file DetectorPropertiesStandard.h.

Referenced by CalculateXTicksParams(), Configure(), and TimeOffsetU().

double detinfo::DetectorPropertiesStandard::fTimeOffsetV
protected

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

Definition at line 322 of file DetectorPropertiesStandard.h.

Referenced by CalculateXTicksParams(), Configure(), and TimeOffsetV().

double detinfo::DetectorPropertiesStandard::fTimeOffsetX
protected

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

Definition at line 325 of file DetectorPropertiesStandard.h.

Referenced by CalculateXTicksParams(), and Configure().

double detinfo::DetectorPropertiesStandard::fTimeOffsetY
protected

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

Definition at line 324 of file DetectorPropertiesStandard.h.

Referenced by CalculateXTicksParams(), Configure(), and TimeOffsetY().

double detinfo::DetectorPropertiesStandard::fTimeOffsetZ
protected

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

Definition at line 323 of file DetectorPropertiesStandard.h.

Referenced by CalculateXTicksParams(), Configure(), and TimeOffsetZ().

::detinfo::ElecClock detinfo::DetectorPropertiesStandard::fTPCClock
protected

TPC electronics clock.

Definition at line 339 of file DetectorPropertiesStandard.h.

Referenced by DetectorPropertiesStandard(), SamplingRate(), TriggerOffset(), and UpdateClocks().

double detinfo::DetectorPropertiesStandard::fXTicksCoefficient
protected

Parameters for x<–>ticks.

Definition at line 334 of file DetectorPropertiesStandard.h.

Referenced by CalculateXTicksParams(), ConvertTicksToX(), ConvertXToTicks(), and GetXTicksCoefficient().

std::vector<std::vector<std::vector<double> > > detinfo::DetectorPropertiesStandard::fXTicksOffsets
protected

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