14 #include "DetectorInfo/DetectorPropertiesStandard.h" 15 #include "CoreUtils/ProviderUtil.h" 16 #include "CoreUtils/DebugUtils.h" 27 inline T sqr(
T v) {
return v*v; }
50 std::set<std::string>
const& ignore_params )
59 debug <<
"Asked to ignore " << ignore_params.size() <<
" keys:";
60 for (
auto const&
key: ignore_params) debug <<
" '" <<
key <<
"'";
68 <<
"DetectorPropertiesStandard Warning!" 69 <<
"\t The following functions need to be verified for gaseous argon:" 70 <<
"\t\t BirksCorrection" 72 <<
"\t\t DriftVelocity" 81 std::set<std::string>
const& ignore_params )
83 providers.
get<
geo::GeometryCore>(),
144 std::set<std::string>
const& ignore_params )
147 ignorable_keys.insert(ignore_params.begin(), ignore_params.end());
160 std::set<std::string>
const& ignore_params )
182 <<
"requesting Electric field in a plane gap that is not defined\n";
192 if(temperature == 0.)
195 double density = -0.00615*temperature + 1.928;
225 double me = 0.510998918;
229 double bg = mom / mass;
230 double gamma = sqrt(1. + bg*bg);
232 double mer = 0.001 * me / mass;
233 double tmax = 2.*me* bg*bg / (1. + 2.*gamma*mer + mer*mer);
237 if(tcut == 0. || tcut > tmax)
242 double x = std::log10(bg);
253 - 0.5 * beta*beta * (1. + tcut / tmax) - 0.5 * delta;
276 double me = 0.510998918;
280 double bg = mom / mass;
281 double gamma2 = 1. + bg*bg;
282 double beta2 = bg*bg / gamma2;
314 if(temperature == 0.)
321 if(cmPerns)
return vd * 1.e-3;
354 if (!
fGP)
throw cet::exception(__FUNCTION__) <<
"GArPropertiesStandard is uninitialized!";
bool UpdateClocks(const detinfo::DetectorClocks *clks)
fhicl::Atom< double > SternheimerA
fhicl::Atom< double > ElectronsToADC
void Setup(providers_type providers)
Sets all the providers at once.
fhicl::Atom< double > DriftVelocity
SternheimerParameters_t fSternheimerParameters
Sternheimer parameters.
virtual double TPCTDC2Tick(double tdc) const =0
Given electronics clock count [tdc] returns TPC time-tick.
double beta(double KE, const simb::MCParticle *part)
fhicl::Atom< double > SternheimerX1
Provider const * get() const
Returns the provider with the specified type.
void SetDetectorClocks(const detinfo::DetectorClocks *clks)
virtual double ExcitationEnergy() const =0
Mean excitation energy of the gas (eV)
fhicl::Atom< double > SternheimerK
void SetGeometry(const geo::GeometryCore *g)
virtual double ConvertTDCToTicks(double tdc) const override
const detinfo::DetectorClocks * fClocks
virtual double DriftVelocity(double efield=0., double temperature=0., bool cmPerns=true) const override
cm/ns if true, otherwise cm/us
Description of geometry of one entire detector.
virtual double Temperature() const override
In kelvin.
virtual double AtomicNumber() const =0
Atomic number of the gas.
void ValidateAndConfigure(fhicl::ParameterSet const &p, std::set< std::string > const &ignore_params={})
Configures the provider, first validating the configuration.
virtual double AtomicMass() const =0
Atomic mass of the gas (g/mol)
tick ticks
Alias for common language habits.
double fXTicksCoefficient
Parameters for x<–>ticks.
double cbar
parameter Cbar
virtual double ConvertXToTicks(double X) const override
fhicl::Atom< double > SternheimerCbar
Container for a list of pointers to providers.
virtual double ElossVar(double mom, double mass) const override
Energy loss fluctuation ( )
DetectorPropertiesStandard()
virtual int TriggerOffset() const override
const detinfo::GArProperties * fGP
virtual double ConvertTicksToX(double ticks) const override
double fTemperature
kelvin
virtual double Density() const override
Returns argon density at the temperature from Temperature()
std::set< std::string > const & IgnorableProviderConfigKeys()
Returns a list of configuration keys that providers should ignore.
fhicl::Sequence< double > Efield
void printBacktrace(Stream &&out, unsigned int maxLines=5, std::string indent=" ", CallInfoPrinter::opt const *options=nullptr)
Prints the full backtrace into a stream.
void SetGArProperties(const detinfo::GArProperties *gp)
General LArSoft Utilities.
fhicl::Atom< unsigned int > NumberTimeSamples
double gamma(double KE, const simb::MCParticle *part)
void CheckIfConfigured() const
virtual double ConvertTicksToTDC(double ticks) const override
const geo::GeometryCore * fGeo
General GArSoft Utilities.
fhicl::Atom< double > Electronlifetime
void CalculateXTicksParams()
const detinfo::ECALProperties * fECALP
double fElectronsToADC
conversion factor for # of ionization electrons to 1 ADC count
fhicl::Atom< double > Temperature
virtual double Efield(unsigned int planegap=0) const override
kV/cm
virtual double TriggerOffsetTPC() const =0
int Ticks() const
of Ticks
double fElectronlifetime
microseconds
Configuration_t ValidateConfiguration(fhicl::ParameterSet const &p, std::set< std::string > const &ignore_params={})
Validates the specified configuration.
virtual const ElecClock & TPCClock() const =0
Borrow a const TPC clock with time set to Trigger time [ns].
Structure for configuration parameters.
void SetECALProperties(const detinfo::ECALProperties *ecalp)
fhicl::Atom< double > SternheimerX0
auto const & get(AssnsNode< L, R, D > const &r)
#define MF_LOG_WARNING(category)
std::vector< double > fEfield
kV/cm (per inter-plane volume)
virtual double SamplingRate() const override
LArSoft geometry interface.
art framework interface to geometry description
unsigned int fNumberTimeSamples
number of clock ticks per event (= readout window)
virtual double TPCTick2TDC(double tick) const =0
Given TPC time-tick (waveform index), returns electronics clock count [tdc].
void Configure(Configuration_t const &config)
Extracts the relevant configuration from the specified object.
double fDriftVelocity
centimeters / microsecond
cet::coded_exception< error, detail::translate > exception
detinfo::ElecClock fTPCClock
TPC electronics clock.
virtual double Eloss(double mom, double mass, double tcut) const override
Restricted mean energy loss (dE/dx)