GReWeightNuXSecDIS.h
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*!
3 
4 \class genie::rew::GReWeightNuXSecDIS
5 
6 \brief Reweighting GENIE DIS neutrino-nucleus cross sections
7 
8 \author Costas Andreopoulos <costas.andreopoulos \at stfc.ac.uk>
9  University of Liverpool & STFC Rutherford Appleton Lab
10 
11  Jim Dobson <J.Dobson07 \at imperial.ac.uk>
12  Imperial College London
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_NU_XSEC_DIS_H_
23 #define _G_REWEIGHT_NU_XSEC_DIS_H_
24 
25 //#define _G_REWEIGHT_DIS_DEBUG_
26 
27 #include "ReWeight/GReWeightI.h"
28 
29 class TFile;
30 class TNtupleD;
31 
32 namespace genie {
33 
34 class XSecAlgorithmI;
35 class Registry;
36 
37 namespace rew {
38 
40  {
41  public:
42  static const int kModeABCV12u = 0;
43  static const int kModeABCV12uShape = 1;
44 
47 
48  // implement the GReWeightI interface
49  bool IsHandled (GSyst_t syst);
50  void SetSystematic (GSyst_t syst, double val);
51  void Reset (void);
52  void Reconfigure (void);
53  double CalcWeight (const EventRecord & event);
54 
55  // various config options
56  void SetMode (int m ) { fMode = m; }
57  void RewNue (bool tf) { fRewNue = tf; }
58  void RewNuebar (bool tf) { fRewNuebar = tf; }
59  void RewNumu (bool tf) { fRewNumu = tf; }
60  void RewNumubar (bool tf) { fRewNumubar = tf; }
61  void RewCC (bool tf) { fRewCC = tf; }
62  void RewNC (bool tf) { fRewNC = tf; }
63  void SetAhtBYPath (string p ) { fAhtBYPath = p; }
64  void SetBhtBYPath (string p ) { fBhtBYPath = p; }
65  void SetCV1uBYPath(string p ) { fCV1uBYPath = p; }
66  void SetCV2uBYPath(string p ) { fCV2uBYPath = p; }
67  void SetWminCut (double W ) { fWmin = W; }
68  void SetQ2minCut (double Q2) { fQ2min = Q2; }
69 
70  private:
71 
72  void Init (void);
73  double CalcWeightABCV12u (const genie::EventRecord & event); ///< rew. Aht,Bht,CV1u,CV2u
74  double CalcWeightABCV12uShape (const genie::EventRecord & event); ///< rew. AhtShape,BhtShape,CV1uShape,CV2uShape
75 
76  XSecAlgorithmI * fXSecModelDef; ///< default model
77  XSecAlgorithmI * fXSecModel; ///< tweaked model
78  Registry * fXSecModelConfig; ///< config in tweaked model
79 
80  bool fRewNue; ///< reweight nu_e?
81  bool fRewNuebar; ///< reweight nu_e_bar?
82  bool fRewNumu; ///< reweight nu_mu?
83  bool fRewNumubar; ///< reweight nu_mu_bar?
84  bool fRewCC; ///< reweight CC?
85  bool fRewNC; ///< reweight NC?
86 
87  int fMode; ///< 0: Aht,Bht,CV1u,CV2u, 1:AhtShape,BhtShape,CV1uShape,CV2uShape
88  double fWmin; ///< W_{min} cut. Reweight only events with W > W_{min}.
89  double fQ2min; ///< Q2_{min} cut. Reweight only events with Q2 > Q2_{min}.
90  double fAhtBYTwkDial; ///< tweak dial for BY parameter: Aht
91  double fBhtBYTwkDial; ///< tweak dial for BY parameter: Bht
92  double fCV1uBYTwkDial; ///< tweak dial for BY parameter: CV1u
93  double fCV2uBYTwkDial; ///< tweak dial for BY parameter: CV2u
94  double fAhtBYDef; ///<
95  double fBhtBYDef; ///<
96  double fCV1uBYDef; ///<
97  double fCV2uBYDef; ///<
98  double fAhtBYCur; ///<
99  double fBhtBYCur; ///<
100  double fCV1uBYCur; ///<
101  double fCV2uBYCur; ///<
102  string fAhtBYPath; ///<
103  string fBhtBYPath; ///<
104  string fCV1uBYPath; ///<
105  string fCV2uBYPath; ///<
106 
107 #ifdef _G_REWEIGHT_DIS_DEBUG_
108  TFile * fTestFile;
109  TNtupleD * fTestNtp;
110 #endif
111  };
112 
113 } // rew namespace
114 } // genie namespace
115 
116 #endif
117 
Cross Section Calculation Interface.
Reweighting GENIE DIS neutrino-nucleus cross sections.
static const double m
Definition: Units.h:79
bool IsHandled(GSyst_t syst)
does the current weight calculator handle the input nuisance param?
void SetSystematic(GSyst_t syst, double val)
update the value for the specified nuisance param
#include "Numerical/GSFunc.h"
Definition: AlgCmp.h:26
double fBhtBYTwkDial
tweak dial for BY parameter: Bht
double Q2(const Interaction *const i)
Definition: KineUtils.cxx:642
double CalcWeight(const EventRecord &event)
calculate a weight for the input event using the current nuisance param values
Definition: tf_graph.h:23
XSecAlgorithmI * fXSecModelDef
default model
XSecAlgorithmI * fXSecModel
tweaked model
void Reconfigure(void)
propagate updated nuisance parameter values to actual MC, etc
double fCV1uBYTwkDial
tweak dial for BY parameter: CV1u
int fMode
0: Aht,Bht,CV1u,CV2u, 1:AhtShape,BhtShape,CV1uShape,CV2uShape
bool fRewNuebar
reweight nu_e_bar?
void Reset(void)
set all nuisance parameters to default values
An enumeration of systematic parameters.
double fCV2uBYTwkDial
tweak dial for BY parameter: CV2u
double fWmin
W_{min} cut. Reweight only events with W > W_{min}.
double fAhtBYTwkDial
tweak dial for BY parameter: Aht
Generated Event Record. It is a GHepRecord object that can accept / be visited by EventRecordVisitorI...
Definition: EventRecord.h:38
p
Definition: test.py:228
double fQ2min
Q2_{min} cut. Reweight only events with Q2 > Q2_{min}.
double CalcWeightABCV12u(const genie::EventRecord &event)
rew. Aht,Bht,CV1u,CV2u
A registry. Provides the container for algorithm configuration parameters.
Definition: Registry.h:66
Registry * fXSecModelConfig
config in tweaked model
double CalcWeightABCV12uShape(const genie::EventRecord &event)
rew. AhtShape,BhtShape,CV1uShape,CV2uShape
bool fRewNumubar
reweight nu_mu_bar?
Event finding and building.
GENIE event reweighting engine ABC.
Definition: GReWeightI.h:31