24 #include "cetlib_except/exception.h" 30 : fIsConfigured(false)
37 std::set<std::string> ignore_params
106 std::set<std::string> ignore_params
109 const bool bScintByParticleType = pset.
get<
bool>(
"ScintByParticleType",
false);
112 ignorable_keys.insert(ignore_params.begin(), ignore_params.end());
114 #if DETECTORINFO_LARPROPERTIESSTANDARD_HASOPTIONALATOM 119 if(bScintByParticleType) {
123 else errmsg += fhicl::detail::fillMissingKeysMsg(&config_table, { config.ProtonScintYield .key() });
125 else errmsg += fhicl::detail::fillMissingKeysMsg(&config_table, { config.ProtonScintYieldRatio .key() });
127 else errmsg += fhicl::detail::fillMissingKeysMsg(&config_table, { config.MuonScintYield .key() });
129 else errmsg += fhicl::detail::fillMissingKeysMsg(&config_table, { config.MuonScintYieldRatio .key() });
131 else errmsg += fhicl::detail::fillMissingKeysMsg(&config_table, { config.PionScintYield .key() });
133 else errmsg += fhicl::detail::fillMissingKeysMsg(&config_table, { config.PionScintYieldRatio .key() });
135 else errmsg += fhicl::detail::fillMissingKeysMsg(&config_table, { config.KaonScintYield .key() });
137 else errmsg += fhicl::detail::fillMissingKeysMsg(&config_table, { config.KaonScintYieldRatio .key() });
139 else errmsg += fhicl::detail::fillMissingKeysMsg(&config_table, { config.ElectronScintYield .key() });
141 else errmsg += fhicl::detail::fillMissingKeysMsg(&config_table, { config.ElectronScintYieldRatio.key() });
143 else errmsg += fhicl::detail::fillMissingKeysMsg(&config_table, { config.AlphaScintYield .key() });
145 else errmsg += fhicl::detail::fillMissingKeysMsg(&config_table, { config.AlphaScintYieldRatio .key() });
146 if (!errmsg.empty()) {
148 "[these parameters are REQUIRED when ScintByParticleType is true; the list may be incomplete]\n" 155 #else // !DETECTORINFO_LARPROPERTIESSTANDARD_HASOPTIONALATOM 157 if (!bScintByParticleType) {
178 if (bScintByParticleType) {
192 #endif // DETECTORINFO_LARPROPERTIESSTANDARD_HASOPTIONALATOM?? 246 if (ts == 0)
return false;
255 throw cet::exception(
"Incorrect vector sizes in LArPropertiesStandard")
256 <<
"The vectors specifying the fast scintillation spectrum are " 261 std::map<double, double> ToReturn;
272 throw cet::exception(
"Incorrect vector sizes in LArPropertiesStandard")
273 <<
"The vectors specifying the slow scintillation spectrum are " 278 std::map<double, double> ToReturn;
289 throw cet::exception(
"Incorrect vector sizes in LArPropertiesStandard")
290 <<
"The vectors specifying the RIndex spectrum are " 295 std::map<double, double> ToReturn;
307 throw cet::exception(
"Incorrect vector sizes in LArPropertiesStandard")
308 <<
"The vectors specifying the Abs Length spectrum are " 313 std::map<double, double> ToReturn;
324 throw cet::exception(
"Incorrect vector sizes in LArPropertiesStandard")
325 <<
"The vectors specifying the rayleigh spectrum are " 330 std::map<double, double> ToReturn;
340 std::map<std::string, std::map<double, double> > ToReturn;
343 throw cet::exception(
"Incorrect vector sizes in LArPropertiesStandard")
344 <<
"The vectors specifying the surface reflectivities " 345 <<
"do not have consistent sizes";
349 throw cet::exception(
"Incorrect vector sizes in LArPropertiesStandard")
350 <<
"The vectors specifying the surface reflectivities do not have consistent sizes";
364 std::map<std::string, std::map<double, double> > ToReturn;
367 throw cet::exception(
"Incorrect vector sizes in LArPropertiesStandard")
368 <<
"The vectors specifying the surface reflectivities do not have consistent sizes";
372 throw cet::exception(
"Incorrect vector sizes in LArPropertiesStandard")
373 <<
"The vectors specifying the surface reflectivities do not have consistent sizes";
388 <<
"The vectors specifying the TpbAbsorption spectrum are " 393 std::map<double, double> ToReturn;
404 <<
"The vectors specifying the TpbEmmision spectrum are " 410 std::vector<double> new_x;
426 TH1D *energyhist=
new TH1D();
428 for(
int ii=0;ii<int(
fTpbEmmisionSpectrum.size());ii++) energyhist->SetBinContent(ii,spectr[ii]);
431 for(
int jj=0; jj<int(tablesize); jj++){
433 new_x.push_back(jj*(xrange/
double(tablesize)));
436 std::map<double, double> ToReturn;
439 for(
int i=0; i<tablesize; i++){
440 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
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
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)
void SetFastScintEnergies(std::vector< double > s)
fhicl::Sequence< double > SlowScintSpectrum
void SetEnableCerenkovLight(bool f)
void SetRIndexEnergies(std::vector< double > s)
void SetExtraMatProperties(bool l)
std::string value(boost::any const &)
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)
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)