ECALPropertiesStandard.cxx
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 //
3 // ECALProperties
4 //
5 ////////////////////////////////////////////////////////////////////////
6 // Framework includes
7 
8 // C++ language includes
9 #include <cmath>
10 #include <iostream>
11 
12 // GArSoft includes
14 #include "CoreUtils/ProviderUtil.h" // gar::IgnorableProviderConfigKeys()
15 
16 // Framework includes
18 #include "cetlib_except/exception.h"
19 
20 //-----------------------------------------------
22 : fIsConfigured(false)
23 {
24 }
25 
26 //-----------------------------------------------
28  std::set<std::string> ignore_params /* = {} */)
30 {
31  this->Configure(pset, ignore_params);
32 }
33 
34 //------------------------------------------------
36  std::set<std::string> ignore_params /* = {} */)
37 {
38  std::set<std::string> ignorable_keys = gar::IgnorableProviderConfigKeys();
39  ignorable_keys.insert(ignore_params.begin(), ignore_params.end());
40 
41  // validation happens here:
43  Configuration_t const& config = config_table();
44 
46  SetLightYield (config.LightYield() );
47  SetSiPMGain (config.SiPMGain() );
50  SetADCSaturation (config.ADCSaturation() );
52  SetMeVtoMIP (config.MeVtoMIP() );
53  SetNoisePx (config.NoisePx() );
54 
55  fIsConfigured = true;
56 
57  return true;
58 }
59 
60 //------------------------------------------------
62 {
63  if (ts == 0) return false;
64 
65  return true;
66 }
Properties related to liquid argon environment in the detector.
void SetADCSaturation(double adcsaturation)
static Config * config
Definition: config.cpp:1054
std::set< std::string > const & IgnorableProviderConfigKeys()
Returns a list of configuration keys that providers should ignore.
Definition: ProviderUtil.h:35
Service provider with utility ECAL functions.
void SetIntercalibrationFactor(double intercalib)
bool Configure(fhicl::ParameterSet const &pset, std::set< std::string > ignore_params={})
Configures the provider.
structure with all configuration parameters
void SetTimeResolution(double timeresolution)