13 #include <RtypesCore.h> 16 #include "cetlib_except/exception.h" 22 : fIsConfigured(false)
29 std::set<std::string> ignore_params
98 std::set<std::string> ignore_params
101 const bool bScintByParticleType = pset.
get<
bool>(
"ScintByParticleType",
false);
104 ignorable_keys.insert(ignore_params.begin(), ignore_params.end());
106 #if DETECTORINFO_LARPROPERTIESSTANDARD_HASOPTIONALATOM 111 if(bScintByParticleType) {
115 else errmsg += fhicl::detail::fillMissingKeysMsg(&config_table, { config.ProtonScintYield .key() });
117 else errmsg += fhicl::detail::fillMissingKeysMsg(&config_table, { config.ProtonScintYieldRatio .key() });
119 else errmsg += fhicl::detail::fillMissingKeysMsg(&config_table, { config.MuonScintYield .key() });
121 else errmsg += fhicl::detail::fillMissingKeysMsg(&config_table, { config.MuonScintYieldRatio .key() });
123 else errmsg += fhicl::detail::fillMissingKeysMsg(&config_table, { config.PionScintYield .key() });
125 else errmsg += fhicl::detail::fillMissingKeysMsg(&config_table, { config.PionScintYieldRatio .key() });
127 else errmsg += fhicl::detail::fillMissingKeysMsg(&config_table, { config.KaonScintYield .key() });
129 else errmsg += fhicl::detail::fillMissingKeysMsg(&config_table, { config.KaonScintYieldRatio .key() });
131 else errmsg += fhicl::detail::fillMissingKeysMsg(&config_table, { config.ElectronScintYield .key() });
133 else errmsg += fhicl::detail::fillMissingKeysMsg(&config_table, { config.ElectronScintYieldRatio.key() });
135 else errmsg += fhicl::detail::fillMissingKeysMsg(&config_table, { config.AlphaScintYield .key() });
137 else errmsg += fhicl::detail::fillMissingKeysMsg(&config_table, { config.AlphaScintYieldRatio .key() });
138 if (!errmsg.empty()) {
140 "[these parameters are REQUIRED when ScintByParticleType is true; the list may be incomplete]\n" 147 #else // !DETECTORINFO_LARPROPERTIESSTANDARD_HASOPTIONALATOM 149 if (!bScintByParticleType) {
170 if (bScintByParticleType) {
184 #endif // DETECTORINFO_LARPROPERTIESSTANDARD_HASOPTIONALATOM?? 238 if (ts == 0)
return false;
247 throw cet::exception(
"Incorrect vector sizes in LArPropertiesStandard")
248 <<
"The vectors specifying the fast scintillation spectrum are " 253 std::map<double, double> ToReturn;
264 throw cet::exception(
"Incorrect vector sizes in LArPropertiesStandard")
265 <<
"The vectors specifying the slow scintillation spectrum are " 270 std::map<double, double> ToReturn;
281 throw cet::exception(
"Incorrect vector sizes in LArPropertiesStandard")
282 <<
"The vectors specifying the RIndex spectrum are " 287 std::map<double, double> ToReturn;
299 throw cet::exception(
"Incorrect vector sizes in LArPropertiesStandard")
300 <<
"The vectors specifying the Abs Length spectrum are " 305 std::map<double, double> ToReturn;
316 throw cet::exception(
"Incorrect vector sizes in LArPropertiesStandard")
317 <<
"The vectors specifying the rayleigh spectrum are " 322 std::map<double, double> ToReturn;
332 std::map<std::string, std::map<double, double> > ToReturn;
335 throw cet::exception(
"Incorrect vector sizes in LArPropertiesStandard")
336 <<
"The vectors specifying the surface reflectivities " 337 <<
"do not have consistent sizes";
341 throw cet::exception(
"Incorrect vector sizes in LArPropertiesStandard")
342 <<
"The vectors specifying the surface reflectivities do not have consistent sizes";
356 std::map<std::string, std::map<double, double> > ToReturn;
359 throw cet::exception(
"Incorrect vector sizes in LArPropertiesStandard")
360 <<
"The vectors specifying the surface reflectivities do not have consistent sizes";
364 throw cet::exception(
"Incorrect vector sizes in LArPropertiesStandard")
365 <<
"The vectors specifying the surface reflectivities do not have consistent sizes";
380 <<
"The vectors specifying the TpbAbsorption spectrum are " 385 std::map<double, double> ToReturn;
396 <<
"The vectors specifying the TpbEmmision spectrum are " 402 std::vector<double> new_x;
418 TH1D *energyhist=
new TH1D();
423 for(
int jj=0; jj<
int(tablesize); jj++){
425 new_x.push_back(jj*(xrange/
double(tablesize)));
428 std::map<double, double> ToReturn;
431 for(
int i=0; i<tablesize; i++){
432 ToReturn[new_x.at(i)]=energyhist->Interpolate(new_x[i]);
std::vector< double > fTpbEmmisionSpectrum
fhicl::Sequence< double > TpbAbsorptionEnergies
void SetAlphaScintYieldRatio(double r)
fhicl::Sequence< double > FastScintSpectrum
void SetElectronScintYieldRatio(double r)
void SetScintYieldRatio(double r)
void SetTpbTimeConstant(double y)
std::vector< double > fRIndexEnergies
void SetKaonScintYieldRatio(double r)
virtual bool ScintByParticleType() const override
Service provider with utility LAr functions.
fhicl::Sequence< std::string > ReflectiveSurfaceNames
virtual std::map< double, double > SlowScintSpectrum() const override
fhicl::Atom< double > KaonScintYieldRatio
fhicl::Atom< double > MuonScintYieldRatio
void SetScintSlowTimeConst(double t)
virtual std::map< double, double > TpbAbs() const override
std::vector< double > fTpbAbsorptionSpectrum
void SetPionScintYieldRatio(double r)
void SetScintFastTimeConst(double t)
void SetElectronScintYield(double y)
fhicl::Atom< double > ScintSlowTimeConst
void SetAtomicMass(double a)
fhicl::Atom< double > ScintBirksConstant
fhicl::Atom< double > RadiationLength
fhicl::Sequence< double > FastScintEnergies
fhicl::Atom< double > ScintPreScale
std::vector< double > fFastScintEnergies
fhicl::Atom< double > ProtonScintYieldRatio
void SetPionScintYield(double y)
fhicl::Atom< bool > ExtraMatProperties
fhicl::Atom< double > KaonScintYield
std::vector< double > fRayleighSpectrum
bool Update(uint64_t ts=0)
std::vector< double > fRIndexSpectrum
void SetProtonScintYieldRatio(double r)
void SetMuonScintYieldRatio(double r)
void SetMeanExcitationEnergy(double e)
fhicl::Atom< double > Argon39DecayRate
void SetProtonScintYield(double y)
fhicl::Sequence< double > RIndexSpectrum
void SetAbsLengthSpectrum(std::vector< double > s)
virtual std::map< double, double > TpbEm() const override
fhicl::Sequence< double > RayleighEnergies
fhicl::Atom< double > AtomicNumber
void SetTpbEmmisionSpectrum(std::vector< double > s)
fhicl::Sequence< double > ReflectiveSurfaceEnergies
fhicl::Sequence< double > TpbEmmisionEnergies
fhicl::Sequence< double > AbsLengthEnergies
void SetRadiationLength(double rl)
fhicl::Atom< double > ScintResolutionScale
fhicl::Sequence< double > SlowScintEnergies
virtual std::map< std::string, std::map< double, double > > SurfaceReflectanceDiffuseFractions() const override
fhicl::Atom< double > ProtonScintYield
fhicl::Sequence< double > TpbEmmisionSpectrum
std::vector< std::string > fReflectiveSurfaceNames
void SetArgon39DecayRate(double r)
bool Configure(fhicl::ParameterSet const &pset, std::set< std::string > ignore_params={})
Configures the provider.
fhicl::Atom< double > PionScintYield
void SetScintBirksConstant(double kb)
fhicl::Atom< double > TpbTimeConstant
fhicl::Atom< bool > EnableCerenkovLight
virtual std::map< double, double > AbsLengthSpectrum() const override
structure with all configuration parameters
void SetReflectiveSurfaceEnergies(std::vector< double > e)
void SetMuonScintYield(double y)
T get(std::string const &key) const
std::vector< double > fFastScintSpectrum
void SetReflectiveSurfaceReflectances(std::vector< std::vector< double > > r)
fhicl::Sequence< double > RayleighSpectrum
std::vector< double > fAbsLengthEnergies
fhicl::Atom< double > ScintYield
void SetScintByParticleType(bool l)
fhicl::Atom< double > AtomicMass
std::set< std::string > const & IgnorableProviderConfigKeys()
Returns a list of configuration keys that providers should ignore.
void SetSlowScintEnergies(std::vector< double > s)
std::vector< double > fSlowScintEnergies
structure with all configuration parameters
std::vector< double > fTpbEmmisionEnergies
void SetFastScintSpectrum(std::vector< double > s)
fhicl::Atom< double > ElectronScintYield
void SetRayleighSpectrum(std::vector< double > s)
fhicl::Sequence< double > AbsLengthSpectrum
fhicl::Sequence< double > RIndexEnergies
fhicl::Atom< double > ScintFastTimeConst
void SetTpbEmmisionEnergies(std::vector< double > s)
fhicl::Atom< double > AlphaScintYield
void SetAbsLengthEnergies(std::vector< double > s)
std::string const & key() const
void SetFastScintEnergies(std::vector< double > s)
fhicl::Sequence< double > SlowScintSpectrum
void SetEnableCerenkovLight(bool f)
void SetRIndexEnergies(std::vector< double > s)
void SetExtraMatProperties(bool l)
void SetReflectiveSurfaceDiffuseFractions(std::vector< std::vector< double > > f)
void SetTpbAbsorptionSpectrum(std::vector< double > s)
std::vector< std::vector< double > > fReflectiveSurfaceReflectances
void SetScintPreScale(double s)
fhicl::Atom< bool > ScintByParticleType
Properties related to liquid argon environment in the detector.
std::vector< double > fAbsLengthSpectrum
void SetTpbAbsorptionEnergies(std::vector< double > s)
void SetKaonScintYield(double y)
std::vector< double > fReflectiveSurfaceEnergies
std::vector< double > fSlowScintSpectrum
void SetAtomicNumber(double z)
fhicl::Atom< double > ScintYieldRatio
void SetSlowScintSpectrum(std::vector< double > s)
fhicl::Atom< double > PionScintYieldRatio
void SetScintYield(double y)
virtual std::map< double, double > RIndexSpectrum() const override
std::vector< double > fTpbAbsorptionEnergies
virtual std::map< double, double > FastScintSpectrum() const override
virtual std::map< double, double > RayleighSpectrum() const override
fhicl::Sequence< fhicl::Sequence< double > > ReflectiveSurfaceReflectances
fhicl::Sequence< double > TpbAbsorptionSpectrum
fhicl::Atom< double > ElectronScintYieldRatio
std::vector< double > fRayleighEnergies
void SetAlphaScintYield(double y)
fhicl::Atom< double > AlphaScintYieldRatio
void SetScintResolutionScale(double r)
virtual std::map< std::string, std::map< double, double > > SurfaceReflectances() const override
fhicl::Atom< double > MeanExcitationEnergy
fhicl::Atom< double > MuonScintYield
void SetReflectiveSurfaceNames(std::vector< std::string > n)
cet::coded_exception< error, detail::translate > exception
void SetRIndexSpectrum(std::vector< double > s)
std::vector< std::vector< double > > fReflectiveSurfaceDiffuseFractions
fhicl::Sequence< fhicl::Sequence< double > > ReflectiveSurfaceDiffuseFractions
void SetRayleighEnergies(std::vector< double > s)