GSystSet.h
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*!
3 
4 \class genie::rew::GSystSet
5 
6 \brief Set of systematics to be considered by the reweighting package.
7 
8 \author Costas Andreopoulos <costas.andreopoulos \at stfc.ac.uk>
9  University of Liverpool & STFC Rutherford Appleton Lab
10 
11 \created Aug 1, 2009
12 
13 \cpright Copyright (c) 2003-2017, GENIE Neutrino MC Generator Collaboration
14  For the full text of the license visit http://copyright.genie-mc.org
15  or see $GENIE/LICENSE
16 */
17 //____________________________________________________________________________
18 
19 #ifndef _G_SET_OF_SYSTEMATICS_H_
20 #define _G_SET_OF_SYSTEMATICS_H_
21 
22 #include <string>
23 #include <map>
24 #include <vector>
25 
26 #include "ReWeight/GSyst.h"
27 
28 using std::string;
29 using std::map;
30 using std::vector;
31 
32 namespace genie {
33 namespace rew {
34 
35 class GSystInfo;
36 
37 class GSystSet {
38 
39 public:
40  GSystSet();
41  GSystSet(const GSystSet & syst_set);
42  ~GSystSet();
43 
44  void Init (GSyst_t syst, double init=0., double min=-1., double max=+1., double step=0.05);
45  void Remove (GSyst_t syst);
46  void Set (GSyst_t syst, double current_value);
47  int Size (void) const;
48  bool Added (GSyst_t syst) const;
49  void Print (void);
50  void Copy (const GSystSet & syst_set);
51 
52  const GSystInfo * Info(GSyst_t syst) const;
53 
54  vector<genie::rew::GSyst_t> AllIncluded (void);
55 
56 private:
57 
58  map<GSyst_t, GSystInfo *> fSystematics;
59 };
60 
61 class GSystInfo {
62 
63 public:
64  GSystInfo() :
65  CurValue(0), InitValue(0), MinValue(0), MaxValue(0), Step(0)
66  {
67 
68  }
69  GSystInfo(double init, double min, double max, double step) :
70  CurValue(init), InitValue(init), MinValue(min), MaxValue(max), Step(step)
71  {
72 
73  }
75  {
76 
77  }
78 
79  double CurValue;
80  double InitValue;
81  double MinValue;
82  double MaxValue;
83  double Step;
84 };
85 
86 } // rew namespace
87 } // genie namespace
88 
89 #endif
90 
#include "Numerical/GSFunc.h"
Definition: AlgCmp.h:26
bool Added(GSyst_t syst) const
Definition: GSystSet.cxx:64
std::string string
Definition: nybbler.cc:12
void Copy(const GSystSet &syst_set)
Definition: GSystSet.cxx:115
void Set(GSyst_t syst, double current_value)
Definition: GSystSet.cxx:89
int Size(void) const
Definition: GSystSet.cxx:59
void Remove(GSyst_t syst)
Definition: GSystSet.cxx:54
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Definition: DumpUtils.h:265
void Init(GSyst_t syst, double init=0., double min=-1., double max=+1., double step=0.05)
Definition: GSystSet.cxx:42
An enumeration of systematic parameters.
GSystInfo(double init, double min, double max, double step)
Definition: GSystSet.h:69
const GSystInfo * Info(GSyst_t syst) const
Definition: GSystSet.cxx:81
T min(sqlite3 *const db, std::string const &table_name, std::string const &column_name)
Definition: statistics.h:57
vector< genie::rew::GSyst_t > AllIncluded(void)
Definition: GSystSet.cxx:69
Set of systematics to be considered by the reweighting package.
Definition: GSystSet.h:37
map< GSyst_t, GSystInfo * > fSystematics
Definition: GSystSet.h:58