LArSoft  v09_90_00
Liquid Argon Software toolkit - https://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  //Functions to configure individual weight calculators
97  void ConfigureNCEL();
98  void ConfigureQEMA();
99  void ConfigureQEVec();
100  void ConfigureCCRes();
101  void ConfigureNCRes();
102  void ConfigureResBkg();
103  void ConfgureResDecay();
104  void ConfigureNC();
105  void ConfigureDIS();
106  void ConfigureCoh();
107  void ConfigureAGKY();
108  void ConfigureDISNucMod();
109  void ConfigureFGM();
110  void ConfigureFZone();
111  void ConfigureINuke();
112  void ConfigureParameters();
113 #endif
114 
115  protected:
116 
117  //Reweight configuration bools it is possible to use all simultaneously
134  bool fReweightMEC; //Not used. Reserved for future addition to GENIE
135 
139  bool fDISshape;
140 
142 
143  std::vector<int> fReWgtParameterName;
144  std::vector<double> fReWgtParameterValue;
145 
146  std::map<int, double> fNominalParameters;
147 
148  genie::rew::GReWeight* fWcalc;
149 
150 
151  };
152 }
153 #endif //RWGT_GENIEREWEIGHT_H
enum rwgt::EReweightLabel ReweightLabel_t
GENIE neutrino interaction simulation objects.
Definition: GENIE2ART.h:19
std::map< int, double > fNominalParameters
std::vector< int > fReWgtParameterName
#define a2
#define a3
genie::rew::GReWeight * fWcalc
double value
Definition: spectrum.C:18
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