GReWeight.h
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*!
3 
4 \class genie::rew::GReWeight
5 
6 \brief Interface to the GENIE event reweighting engines
7 
8 \author Jim Dobson <J.Dobson07 \at imperial.ac.uk>
9  Imperial College London
10 
11  Costas Andreopoulos <costas.andreopoulos \at stfc.ac.uk>
12  University of Liverpool & STFC Rutherford Appleton Lab
13 
14 \created Aug 1, 2009
15 
16 \cpright Copyright (c) 2003-2017, GENIE Neutrino MC Generator Collaboration
17  For the full text of the license visit http://copyright.genie-mc.org
18  or see $GENIE/LICENSE
19 */
20 //____________________________________________________________________________
21 
22 #ifndef _G_REWEIGHT_H_
23 #define _G_REWEIGHT_H_
24 
25 #include <string>
26 #include <map>
27 
28 #include "ReWeight/GSystSet.h"
29 #include "ReWeight/GReWeightI.h"
30 
31 using std::string;
32 using std::map;
33 
34 namespace genie {
35 
36 class EventRecord;
37 
38 namespace rew {
39 
40  class GReWeight
41  {
42  public:
43  GReWeight();
44  ~GReWeight();
45 
46  void AdoptWghtCalc (string name, GReWeightI* wcalc); ///< add concrete weight calculator, transfers ownership
47  GReWeightI* WghtCalc (string name); ///< access a weight calculator by name
48  GSystSet & Systematics (void); ///< set of enabled systematic params & values
49  void Reconfigure (void); ///< reconfigure weight calculators with new params
50  double CalcWeight (const genie::EventRecord & event); ///< calculate weight for input event
51  void Print (void); ///< print
52 
53  private:
54 
55  void CleanUp (void);
56 
57  GSystSet fSystSet; ///< set of enabled nuisance parameters
58  map<string, GReWeightI *> fWghtCalc; ///< concrete weight calculators
59  };
60 
61 } // rew namespace
62 } // genie namespace
63 
64 #endif
65 
#include "Numerical/GSFunc.h"
Definition: AlgCmp.h:26
std::string string
Definition: nybbler.cc:12
void Reconfigure(void)
reconfigure weight calculators with new params
Definition: GReWeight.cxx:74
GReWeightI * WghtCalc(string name)
access a weight calculator by name
Definition: GReWeight.cxx:61
map< string, GReWeightI * > fWghtCalc
concrete weight calculators
Definition: GReWeight.h:58
void AdoptWghtCalc(string name, GReWeightI *wcalc)
add concrete weight calculator, transfers ownership
Definition: GReWeight.cxx:54
GSystSet fSystSet
set of enabled nuisance parameters
Definition: GReWeight.h:57
Generated Event Record. It is a GHepRecord object that can accept / be visited by EventRecordVisitorI...
Definition: EventRecord.h:38
void Print(void)
print
Definition: GReWeight.cxx:128
double CalcWeight(const genie::EventRecord &event)
calculate weight for input event
Definition: GReWeight.cxx:99
GSystSet & Systematics(void)
set of enabled systematic params & values
Definition: GReWeight.cxx:69
Set of systematics to be considered by the reweighting package.
Definition: GSystSet.h:37
Interface to the GENIE event reweighting engines.
Definition: GReWeight.h:40
Event finding and building.
GENIE event reweighting engine ABC.
Definition: GReWeightI.h:31