23 #include "cetlib_except/exception.h" 37 int nrun = run.
id().
run();
61 mf::LogWarning(
"LArProperties") <<
"run number == 0, not extracting info from DB\n" ;
72 fEfield = pset.
get< std::vector<double> >(
"Efield" );
78 fZ = pset.
get<
double >(
"AtomicNumber" );
79 fA = pset.
get<
double >(
"AtomicMass" );
80 fI = pset.
get<
double >(
"ExcitationEnergy");
81 fSa = pset.
get<
double >(
"SternheimerA" );
82 fSk = pset.
get<
double >(
"SternheimerK" );
83 fSx0 = pset.
get<
double >(
"SternheimerX0" );
84 fSx1 = pset.
get<
double >(
"SternheimerX1" );
85 fScbar = pset.
get<
double >(
"SternheimerCbar" );
110 if(fScintByParticleType){
125 if(fExtraMatProperties){
160 if(temperature == 0.)
163 double density = -0.00615*temperature + 1.928;
175 throw cet::exception(
"LArProperties") <<
"requesting Electric field in a plane gap that is not defined\n";
212 mf::LogWarning(
"LArProperties") <<
"DriftVelocity Warning! : E-field value of " 214 <<
" kV/cm is outside of range covered by drift" 215 <<
" velocity parameterization. Returned value" 216 <<
" may not be correct";
220 if(temperature == 0.)
223 if(temperature < 87.0 || temperature > 94.0)
224 mf::LogWarning(
"LArProperties") <<
"DriftVelocity Warning! : Temperature value of " 226 <<
" K is outside of range covered by drift velocity" 227 <<
" parameterization. Returned value may not be" 233 double tshift = -87.203+temperature;
234 double xFit = 0.0938163-0.0052563*tshift-0.0001470*tshift*tshift;
235 double uFit = 5.18406+0.01448*tshift-0.003497*tshift*tshift-0.000516*tshift*tshift*tshift;
240 double P1 = -0.04640;
248 double P1W = -0.01481;
249 double P2W = -0.0075;
259 if (efield < xFit) vd=efield*uFit;
260 else if (efield<0.619) {
261 vd = ((P1*(temperature-T0)+1)
262 *(P3*efield*std::log(1+P4/efield) + P5*std::pow(efield,P6))
263 +P2*(temperature-T0));
265 else if (efield<0.699) {
266 vd = 12.5*(efield-0.619)*((P1W*(temperature-T0W)+1)
267 *(P3W*efield*std::log(1+P4W/efield) + P5W*std::pow(efield,P6W))
268 +P2W*(temperature-T0W))+
269 12.5*(0.699-efield)*((P1*(temperature-T0)+1)
270 *(P3*efield*std::log(1+P4/efield) + P5*std::pow(efield,P6))
271 +P2*(temperature-T0));
274 vd = ((P1W*(temperature-T0W)+1)
275 *(P3W*efield*std::log(1+P4W/efield) + P5W*std::pow(efield,P6W))
276 +P2W*(temperature-T0W));
302 double dEdx = dQdx/(A3t/Wion-K3t/Efield*dQdx);
317 double dEdx = (exp(Beta * Wion * dQdx ) - Alpha) / Beta;
345 double me = 0.510998918;
349 double bg = mom / mass;
350 double gamma = sqrt(1. + bg*bg);
351 double beta = bg / gamma;
352 double mer = 0.001 * me / mass;
353 double tmax = 2.*me* bg*bg / (1. + 2.*gamma*mer + mer*mer);
357 if(tcut == 0. || tcut > tmax)
362 double x = std::log10(bg);
365 delta = 2. * std::log(10.) * x -
fScbar;
372 double B = 0.5 * std::log(2.*me*bg*bg*tcut / (1.
e-12 *
fI*
fI))
373 - 0.5 * beta*beta * (1. + tcut / tmax) - 0.5 * delta;
403 double me = 0.510998918;
407 double bg = mom / mass;
408 double gamma2 = 1. + bg*bg;
409 double beta2 = bg*bg / gamma2;
413 double result = gamma2 * (1. - 0.5 * beta2) * me * (
fZ /
fA) * K *
Density();
429 throw cet::exception(
"LArProperties") <<
" Extracting values from LArProperties before they " 430 <<
" have been read in from database. \n " 431 <<
"Set ToughErrorTreatment or ShouldConnect " 432 <<
" to false in databaseutil.fcl if you want " 433 <<
" to avoid this. \n";
437 mf::LogWarning(
"LArProperties") <<
"!!! Extracting values from LArProperties before they " 438 <<
" have been read in from the database. \n " 439 <<
" You may not be using the correct values of " 440 <<
" electron lifetime, temperature and electric field!" 441 <<
" You should not be initializing" 442 <<
" Database originating values in BeginJob()s or constructors." 443 <<
" You have been warned !!! \n ";
453 <<
"The vectors specifying the fast scintillation spectrum are " 458 std::map<double, double> ToReturn;
470 <<
"The vectors specifying the slow scintillation spectrum are " 475 std::map<double, double> ToReturn;
487 <<
"The vectors specifying the RIndex spectrum are " 492 std::map<double, double> ToReturn;
505 <<
"The vectors specifying the Abs Length spectrum are " 510 std::map<double, double> ToReturn;
522 <<
"The vectors specifying the rayleigh spectrum are " 527 std::map<double, double> ToReturn;
537 std::map<std::string, std::map<double, double> > ToReturn;
541 <<
"The vectors specifying the surface reflectivities " 542 <<
"do not have consistent sizes";
547 <<
"The vectors specifying the surface reflectivities do not have consistent sizes";
561 std::map<std::string, std::map<double, double> > ToReturn;
564 throw cet::exception(
"Incorrect vector sizes in LArPropertiesServiceArgoNeuT")
565 <<
"The vectors specifying the surface reflectivities do not have consistent sizes";
569 throw cet::exception(
"Incorrect vector sizes in LArPropertiesServiceArgoNeuT")
570 <<
"The vectors specifying the surface reflectivities do not have consistent sizes";
582 {
throw cet::exception(
"LArPropertiesServiceArgoNeuT") << __func__ <<
"() not implemented here !\n"; }
586 {
throw cet::exception(
"LArPropertiesServiceArgoNeuT") << __func__ <<
"() not implemented here !\n"; }
592 ToughErrorTreatment= DButil.ToughErrorTreatment();
593 ShouldConnect = DButil.ShouldConnect();
bool ShouldConnect
equivalent parameter in DatabaseUtil
double fProtonScintYieldRatio
void checkDBstatus() const
virtual std::map< double, double > RIndexSpectrum() const override
double fSx1
Sternheimer parameter x1.
Namespace for general, non-LArSoft-specific utilities.
double fScintSlowTimeConst
double Temperature() const
kelvin
double fDefTemperature
kelvin
virtual std::map< double, double > SlowScintSpectrum() const override
double fSx0
Sternheimer parameter x0.
int GetEfieldValuesFromDB(int run, std::vector< double > &efield)
#define DEFINE_ART_SERVICE_INTERFACE_IMPL(svc, iface)
double ModBoxCorrection(double dQdX) const
std::vector< double > fTpbEmmisionEnergies
std::vector< std::string > fReflectiveSurfaceNames
double fKaonScintYieldRatio
DBsettingsClass DBsettings
settings read from DB access
double ElossVar(double mom, double mass) const
Energy loss fluctuation (sigma_E^2 / length in MeV^2/cm).
double ElectronLifetime() const
microseconds
double DriftVelocity(double efield=0., double temperature=0.) const
cm/us
double fSk
Sternheimer parameter k.
std::vector< double > fRayleighSpectrum
virtual std::map< double, double > FastScintSpectrum() const override
LArPropertiesServiceArgoNeuT(fhicl::ParameterSet const &pset, art::ActivityRegistry ®)
std::vector< double > fSlowScintSpectrum
double fScintBirksConstant
virtual std::map< double, double > TpbEm() const override
double fDefElectronlifetime
microseconds
virtual void reconfigure(fhicl::ParameterSet const &pset) override
std::vector< double > fFastScintSpectrum
constexpr double kGeVToElectrons
23.6eV per ion pair, 1e9 eV/GeV
double fZ
Ar atomic number.
std::vector< double > fAbsLengthSpectrum
std::vector< double > fRIndexEnergies
double fArgon39DecayRate
decays per cm^3 per second
double Efield(unsigned int planegap=0) const
kV/cm
double fScintFastTimeConst
double fElectronlifetime
microseconds
Properties related to liquid argon environment in the detector.
constexpr double kModBoxB
Modified Box Beta in g/(MeV cm²)*kV/cm.
bool ToughErrorTreatment
equivalent parameter in DatabaseUtil
std::vector< double > fTpbAbsorptionSpectrum
T get(std::string const &key) const
double fElectronScintYield
virtual std::map< double, double > AbsLengthSpectrum() const override
void preBeginRun(art::Run const &run)
bool fEnableCerenkovLight
int GetLifetimeFromDB(int run, double &lftime_real)
std::vector< double > fRayleighEnergies
double fSa
Sternheimer parameter a.
std::vector< double > fFastScintEnergies
bool fAlreadyReadFromDB
tests whether the values have alread been picked up from the Database
virtual std::map< std::string, std::map< double, double > > SurfaceReflectances() const override
virtual std::map< std::string, std::map< double, double > > SurfaceReflectanceDiffuseFractions() const override
double fA
Ar atomic mass (g/mol)
std::vector< double > fEfield
kV/cm
double fScintResolutionScale
double BirksCorrection(double dQdX) const
dQ/dX in electrons/cm, returns dE/dX in MeV/cm.
GlobalSignal< detail::SignalResponseType::FIFO, void(Run const &)> sPreBeginRun
std::vector< double > fSlowScintEnergies
double Eloss(double mom, double mass, double tcut) const
Restricted mean dE/dx energy loss (MeV/cm).
double fI
Ar mean excitation energy (eV)
virtual std::map< double, double > TpbAbs() const override
std::vector< std::vector< double > > fReflectiveSurfaceReflectances
constexpr double kRecombk
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
double fRadiationLength
g/cm^2
std::vector< std::vector< double > > fReflectiveSurfaceDiffuseFractions
std::vector< double > fRIndexSpectrum
double fElectronScintYieldRatio
double Density(double temperature=0.) const
g/cm^3
std::vector< double > fReflectiveSurfaceEnergies
constexpr double kRecombA
A constant.
double fMuonScintYieldRatio
constexpr double kModBoxA
Modified Box Alpha.
double fPionScintYieldRatio
std::vector< double > fTpbAbsorptionEnergies
double fAlphaScintYieldRatio
bool fScintByParticleType
std::vector< double > fAbsLengthEnergies
double fTemperature
kelvin
std::vector< double > fTpbEmmisionSpectrum
virtual std::map< double, double > RayleighSpectrum() const override
cet::coded_exception< error, detail::translate > exception
int GetTemperatureFromDB(int run, double &temp_real)
double fScbar
Sternheimer parameter Cbar.