ParameterUtility.h
Go to the documentation of this file.
1 // Singleton class to keep track of the systematic parameters
2 //
3 // Created by Brian Rebel on 8/17/20.
4 //
5 
6 #ifndef COVARIANCEMATRIXFIT_UTILITIES_SYSTPARSUTILITY_H
7 #define COVARIANCEMATRIXFIT_UTILITIES_SYSTPARSUTILITY_H
8 
9 // Framework includes
11 #include "cetlib_except/exception.h"
12 #include "fhiclcpp/ParameterSet.h"
13 
17 
18 #include <set>
19 #include <map>
20 #include <string>
21 #include <limits>
22 
23 namespace cmf {
24 
26 
27  public:
28 
29  static ParameterUtility* Instance();
30 
31  void Initialize(fhicl::ParameterSet const& pset);
32 
33  bool UseSysPar(std::string const& parName);
34 
35  cmf::Parameter const& ParameterInfo(std::string const& parName) const;
36 
37  cmf::Parameter const& OscParameterInfo(std::string const& parName,
38  cmf::DetType_t const& det=cmf::kFARDET) const;
39 
40  // currently any systematic parameters present for one detector but not the other
41  // returns a weight of 1 from the shifter and weighter
42  cmf::Parameter const& SysParameterInfo(std::string const& parName) const;
43 
45 
46  std::set<std::string> SysParNames() const;
47  std::set<uint8_t> SysParKeys() const;
48  std::vector<cmf::Parameter> const& SysParameters(cmf::DetType_t const& det=cmf::kFARDET) const;
49 
50  private:
52 
54 
55  std::vector<cmf::ParameterSpaceLoc> fDetOscParameters; ///< values for the oscillation parameters in each detector
56  std::vector<cmf::ParameterSpaceLoc> fDetSysParameters; ///< values for the systematic parameters in each detector
57  };
58 
60  cmf::DetType_t const& det,
61  cmf::Location & loc);
62 
63 } // cmf namespace
64 
65 #endif //COVARIANCEMATRIXFIT_UTILITIES_SYSTPARSUTILITY_H
std::vector< cmf::ParameterSpaceLoc > fDetOscParameters
values for the oscillation parameters in each detector
void Initialize(fhicl::ParameterSet const &pset)
std::set< std::string > SysParNames() const
cmf::Parameter const & OscParameterInfo(std::string const &parName, cmf::DetType_t const &det=cmf::kFARDET) const
cmf::Parameter const & ParameterInfo(std::string const &parName) const
std::set< uint8_t > SysParKeys() const
enum cmf::det_type DetType_t
std::vector< cmf::ParameterSpaceLoc > fDetSysParameters
values for the systematic parameters in each detector
std::vector< cmf::Parameter > const & SysParameters(cmf::DetType_t const &det=cmf::kFARDET) const
static ParameterUtility * Instance()
bool UseSysPar(std::string const &parName)
Module to combine a set of results into a single file currently only does one data product type at a ...
Definition: Event.cxx:24
void ParameterSetToLocation(fhicl::ParameterSet const &pset, cmf::DetType_t const &det, cmf::Location &loc)
cmf::Location ParametersAsLocation()
cmf::Parameter const & SysParameterInfo(std::string const &parName) const
enum BeamMode string