LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
GENIEReweight.h
Go to the documentation of this file.
1 #ifndef RWGT_GENIEREWEIGHT_H
8 #define RWGT_GENIEREWEIGHT_H
9 
10 #include <vector>
11 #include <map>
12 #include <set>
13 #include <fstream>
15 
16 //namespace simb { class MCTruth; }
17 //namespace simb { class GTruth; }
18 
20 namespace genie { class EventRecord; }
21 namespace genie { class AlgFactory; }
22 namespace genie{namespace rew { class GReWeight; }}
23 
24 namespace rwgt{
25 
26  class GENIEReweight {
27 
28  public:
29  GENIEReweight();
30  ~GENIEReweight();
31 
32 #ifndef __GCCXML__
33 
34  void AddReweightValue(ReweightLabel_t rLabel, double value);
35  void ChangeParameterValue(ReweightLabel_t rLabel, double value);
36 
37  double NominalParameterValue(ReweightLabel_t rLabel);
38  double ReweightParameterValue(ReweightLabel_t rLabel);
39 
40  genie::rew::GReWeight* WeightCalculator() {return fWcalc;}
41 
42  void Configure();
43  void Reconfigure();
44 
45  //Simple Configuration Functions. Only one of these should be called per instance of GENIEReweight
46  void ReweightNCEL(double ma, double eta);
47 
48  void ReweightQEMA(double ma);
49  void ReweightQEVec(double mv);
50  void ReweightQEZExp(double norm, double a1, double a2, double a3, double a4);
51 
52  void ReweightResGanged(double ma, double mv=0.0);
53  void ReweightCCRes(double ma, double mv=0.0);
54  void ReweightNCRes(double ma, double mv=0.0);
55 
56  void ReweightCoh(double ma, double r0);
57 
58  void ReweightNonResRvp1pi(double sigma);
59  void ReweightNonResRvbarp1pi(double sigma);
60  void ReweightNonResRvp2pi(double sigma);
61  void ReweightNonResRvbarp2pi(double sigma);
62 
63  void ReweightResDecay(double gamma, double eta, double theta);
64  void ReweightNC(double norm);
65  void ReweightDIS(double aht, double bht, double cv1u, double cv2u);
66  void ReweightDISnucl(bool mode);
67  void ReweightAGKY(double xF, double pT);
68 
69  void ReweightFormZone(double sigma);
70  void ReweightFGM(double kF, double sf);
71 
72  void ReweightIntraNuke(ReweightLabel_t name, double sigma);
73  void ReweightIntraNuke(int name, double sigma);
74 
75  //General Reweight Configurations
76  void MaQEshape() {fMaQEshape=true;}
77  void MaQErate() {fMaQEshape=false;}
78 
79  void CCRESshape() {fMaCCResShape=true;}
80  void CCRESrate() {fMaCCResShape=false;}
81 
82  void NCRESshape() {fMaNCResShape=true;}
83  void NCRESrate() {fMaNCResShape=false;}
84 
85  void DIS_BYshape() {fDISshape=true;}
86  void DIS_BYrate() {fDISshape=false;}
87 
88  void UseSigmaDef() {fUseSigmaDef=true;}
89  void UseStandardDef() {fUseSigmaDef=false;}
90 
91  void SetNominalValues();
92  double CalculateSigma(ReweightLabel_t label, double value);
93 
94  double CalculateWeight(const genie::EventRecord& evr) const;
95 
96  //genie::EventRecord RetrieveGHEP(simb::MCTruth truth, simb::GTruth gtruth);
97 
98  //Functions to configure individual weight calculators
99  void ConfigureNCEL();
100  void ConfigureQEMA();
101  void ConfigureQEVec();
102  void ConfigureCCRes();
103  void ConfigureNCRes();
104  void ConfigureResBkg();
105  void ConfgureResDecay();
106  void ConfigureNC();
107  void ConfigureDIS();
108  void ConfigureCoh();
109  void ConfigureAGKY();
110  void ConfigureDISNucMod();
111  void ConfigureFGM();
112  void ConfigureFZone();
113  void ConfigureINuke();
114  void ConfigureParameters();
115 #endif
116 
117  protected:
118 
119  //Reweight configuration bools it is possible to use all simultaneously
136  bool fReweightMEC; //Not used. Reserved for future addition to GENIE
137 
141  bool fDISshape;
142 
144 
145  std::vector<int> fReWgtParameterName;
146  std::vector<double> fReWgtParameterValue;
147 
148  std::map<int, double> fNominalParameters;
149 
150  genie::rew::GReWeight* fWcalc;
151 
152 
153  };
154 }
155 #endif //RWGT_GENIEREWEIGHT_H
enum rwgt::EReweightLabel ReweightLabel_t
GENIE neutrino interaction simulation objects.
Definition: GENIE2ART.h:14
const std::string label
std::map< int, double > fNominalParameters
std::vector< int > fReWgtParameterName
#define a2
#define a3
genie::rew::GReWeight * fWcalc
std::string value(boost::any const &)
std::vector< double > fReWgtParameterValue
Float_t norm
#define a4
genie::rew::GReWeight * WeightCalculator()
Definition: GENIEReweight.h:40
typedef defining all of the available GENIE reweighting parameters
#define a1