13 #include <RtypesCore.h> 16 #include "cetlib_except/exception.h" 25 std::set<std::string> ignore_params
94 std::set<std::string> ignore_params
98 const bool bScintByParticleType = pset.
get<
bool>(
"ScintByParticleType",
false);
101 ignorable_keys.insert(ignore_params.begin(), ignore_params.end());
103 #if DETECTORINFO_LARPROPERTIESSTANDARD_HASOPTIONALATOM 108 if (bScintByParticleType) {
111 if (config.ProtonScintYield(value))
114 errmsg += fhicl::detail::fillMissingKeysMsg(&config_table, {config.ProtonScintYield.key()});
115 if (config.ProtonScintYieldRatio(value))
119 fhicl::detail::fillMissingKeysMsg(&config_table, {config.ProtonScintYieldRatio.key()});
120 if (config.MuonScintYield(value))
123 errmsg += fhicl::detail::fillMissingKeysMsg(&config_table, {config.MuonScintYield.key()});
124 if (config.MuonScintYieldRatio(value))
128 fhicl::detail::fillMissingKeysMsg(&config_table, {config.MuonScintYieldRatio.key()});
129 if (config.PionScintYield(value))
132 errmsg += fhicl::detail::fillMissingKeysMsg(&config_table, {config.PionScintYield.key()});
133 if (config.PionScintYieldRatio(value))
137 fhicl::detail::fillMissingKeysMsg(&config_table, {config.PionScintYieldRatio.key()});
138 if (config.KaonScintYield(value))
141 errmsg += fhicl::detail::fillMissingKeysMsg(&config_table, {config.KaonScintYield.key()});
142 if (config.KaonScintYieldRatio(value))
146 fhicl::detail::fillMissingKeysMsg(&config_table, {config.KaonScintYieldRatio.key()});
147 if (config.ElectronScintYield(value))
150 errmsg += fhicl::detail::fillMissingKeysMsg(&config_table, {config.ElectronScintYield.key()});
151 if (config.ElectronScintYieldRatio(value))
155 fhicl::detail::fillMissingKeysMsg(&config_table, {config.ElectronScintYieldRatio.key()});
156 if (config.AlphaScintYield(value))
159 errmsg += fhicl::detail::fillMissingKeysMsg(&config_table, {config.AlphaScintYield.key()});
160 if (config.AlphaScintYieldRatio(value))
164 fhicl::detail::fillMissingKeysMsg(&config_table, {config.AlphaScintYieldRatio.key()});
165 if (!errmsg.empty()) {
167 (
"[these parameters are REQUIRED when ScintByParticleType is true; the list may be " 175 #else // !DETECTORINFO_LARPROPERTIESSTANDARD_HASOPTIONALATOM 177 if (!bScintByParticleType) {
198 if (bScintByParticleType) {
212 #endif // DETECTORINFO_LARPROPERTIESSTANDARD_HASOPTIONALATOM?? 265 if (ts == 0)
return false;
274 throw cet::exception(
"Incorrect vector sizes in LArPropertiesStandard")
275 <<
"The vectors specifying the fast scintillation spectrum are " 279 std::map<double, double> ToReturn;
290 throw cet::exception(
"Incorrect vector sizes in LArPropertiesStandard")
291 <<
"The vectors specifying the slow scintillation spectrum are " 295 std::map<double, double> ToReturn;
306 throw cet::exception(
"Incorrect vector sizes in LArPropertiesStandard")
307 <<
"The vectors specifying the RIndex spectrum are " 311 std::map<double, double> ToReturn;
322 throw cet::exception(
"Incorrect vector sizes in LArPropertiesStandard")
323 <<
"The vectors specifying the Abs Length spectrum are " 327 std::map<double, double> ToReturn;
338 throw cet::exception(
"Incorrect vector sizes in LArPropertiesStandard")
339 <<
"The vectors specifying the rayleigh spectrum are " 343 std::map<double, double> ToReturn;
351 std::map<std::string, std::map<double, double>>
354 std::map<std::string, std::map<double, double>> ToReturn;
357 throw cet::exception(
"Incorrect vector sizes in LArPropertiesStandard")
358 <<
"The vectors specifying the surface reflectivities " 359 <<
"do not have consistent sizes";
363 throw cet::exception(
"Incorrect vector sizes in LArPropertiesStandard")
364 <<
"The vectors specifying the surface reflectivities do not have consistent sizes";
376 std::map<std::string, std::map<double, double>>
379 std::map<std::string, std::map<double, double>> ToReturn;
382 throw cet::exception(
"Incorrect vector sizes in LArPropertiesStandard")
383 <<
"The vectors specifying the surface reflectivities do not have consistent sizes";
387 throw cet::exception(
"Incorrect vector sizes in LArPropertiesStandard")
388 <<
"The vectors specifying the surface reflectivities do not have consistent sizes";
403 <<
"The vectors specifying the TpbAbsorption spectrum are " 408 std::map<double, double> ToReturn;
419 <<
"The vectors specifying the TpbEmmision spectrum are " 423 Int_t tablesize = 100;
424 std::vector<double> new_x;
440 TH1D* energyhist =
new TH1D();
443 energyhist->SetBinContent(ii, spectr[ii]);
447 for (
int jj = 0; jj < int(tablesize); jj++) {
449 new_x.push_back(jj * (xrange /
double(tablesize)));
452 std::map<double, double> ToReturn;
455 for (
int i = 0; i < tablesize; i++) {
456 ToReturn[new_x.at(i)] = energyhist->Interpolate(new_x[i]);
std::vector< double > fTpbEmmisionSpectrum
fhicl::Sequence< double > TpbAbsorptionEnergies
void SetAlphaScintYieldRatio(double r)
fhicl::Atom< bool > ScintByParticleType
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< double > KaonScintYield
std::vector< double > fRayleighSpectrum
bool Update(uint64_t ts=0)
std::vector< double > fRIndexSpectrum
fhicl::Atom< bool > EnableCerenkovLight
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
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
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
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
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.
std::string const & key() const
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 SetReflectiveSurfaceDiffuseFractions(std::vector< std::vector< double >> f)
void SetTpbEmmisionEnergies(std::vector< double > s)
fhicl::Atom< double > AlphaScintYield
void SetAbsLengthEnergies(std::vector< double > s)
void SetFastScintEnergies(std::vector< double > s)
fhicl::Sequence< double > SlowScintSpectrum
void SetEnableCerenkovLight(bool f)
void SetRIndexEnergies(std::vector< double > s)
void SetExtraMatProperties(bool l)
fhicl::Atom< bool > ExtraMatProperties
void SetTpbAbsorptionSpectrum(std::vector< double > s)
std::vector< std::vector< double > > fReflectiveSurfaceReflectances
void SetScintPreScale(double s)
void SetReflectiveSurfaceReflectances(std::vector< std::vector< double >> r)
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)
Simple utilities for service providers.
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)