GReWeightNuXSecCCRES.h
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*!
3 
4 \class genie::rew::GReWeightNuXSecCCRES
5 
6 \brief Reweight GENIE CC resonance neutrino-production
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_CCRES_H_
23 #define _G_REWEIGHT_NU_XSEC_CCRES_H_
24 
25 //#define _G_REWEIGHT_CCRES_DEBUG_
26 
27 #include <map>
28 #include <string>
29 
30 using std::map;
31 using std::string;
32 
33 #include "ReWeight/GReWeightI.h"
34 
35 class TFile;
36 class TNtupleD;
37 
38 namespace genie {
39 
40 class XSecAlgorithmI;
41 class Registry;
42 
43 namespace rew {
44 
46  {
47  public:
48  static const int kModeMaMv = 0;
49  static const int kModeNormAndMaMvShape = 1;
50 
53 
54  // implement the GReWeightI interface
55  bool IsHandled (GSyst_t syst);
56  void SetSystematic (GSyst_t syst, double val);
57  void Reset (void);
58  void Reconfigure (void);
59  double CalcWeight (const EventRecord & event);
60 
61  // various config options
62  void SetMode (int mode) { fMode = mode; }
63  void SetMaPath (string p) { fMaPath = p; }
64  void SetMvPath (string p) { fMvPath = p; }
65  void RewNue (bool tf ) { fRewNue = tf; }
66  void RewNuebar (bool tf ) { fRewNuebar = tf; }
67  void RewNumu (bool tf ) { fRewNumu = tf; }
68  void RewNumubar (bool tf ) { fRewNumubar = tf; }
69 
70  private:
71 
72  void Init (void);
73  double CalcWeightNorm (const EventRecord & event);
74  double CalcWeightMaMvShape (const EventRecord & event);
75  double CalcWeightMaMv (const EventRecord & event);
76 
77  XSecAlgorithmI * fXSecModelDef; ///< default model
78  XSecAlgorithmI * fXSecModel; ///< tweaked model
79  Registry * fXSecModelConfig; ///< config in tweaked model
80 
81  int fMode; ///< 0: Ma/Mv, 1: Norm and MaShape/MvShape
82  string fMaPath; ///< M_{A} path in configuration
83  string fMvPath; ///< M_{V} path in configuration
84  bool fRewNue; ///< reweight nu_e CC?
85  bool fRewNuebar; ///< reweight nu_e_bar CC?
86  bool fRewNumu; ///< reweight nu_mu CC?
87  bool fRewNumubar; ///< reweight nu_mu_bar CC?
88  double fNormTwkDial; ///<
89  double fNormDef; ///<
90  double fNormCurr; ///<
91  double fMaTwkDial; ///<
92  double fMaDef; ///<
93  double fMaCurr; ///<
94  double fMvTwkDial; ///<
95  double fMvDef; ///<
96  double fMvCurr; ///<
97 
98 #ifdef _G_REWEIGHT_CCRES_DEBUG_
99  TFile * fTestFile;
100  TNtupleD * fTestNtp;
101 #endif
102  };
103 
104 } // rew namespace
105 } // genie namespace
106 
107 #endif
108 
Cross Section Calculation Interface.
#include "Numerical/GSFunc.h"
Definition: AlgCmp.h:26
Registry * fXSecModelConfig
config in tweaked model
std::string string
Definition: nybbler.cc:12
double CalcWeightMaMv(const EventRecord &event)
void Reconfigure(void)
propagate updated nuisance parameter values to actual MC, etc
Definition: tf_graph.h:23
void Reset(void)
set all nuisance parameters to default values
XSecAlgorithmI * fXSecModelDef
default model
An enumeration of systematic parameters.
bool fRewNuebar
reweight nu_e_bar CC?
double CalcWeightMaMvShape(const EventRecord &event)
Generated Event Record. It is a GHepRecord object that can accept / be visited by EventRecordVisitorI...
Definition: EventRecord.h:38
bool IsHandled(GSyst_t syst)
does the current weight calculator handle the input nuisance param?
p
Definition: test.py:228
double CalcWeight(const EventRecord &event)
calculate a weight for the input event using the current nuisance param values
A registry. Provides the container for algorithm configuration parameters.
Definition: Registry.h:66
string fMvPath
M_{V} path in configuration.
string fMaPath
M_{A} path in configuration.
int fMode
0: Ma/Mv, 1: Norm and MaShape/MvShape
bool fRewNumubar
reweight nu_mu_bar CC?
Reweight GENIE CC resonance neutrino-production.
double CalcWeightNorm(const EventRecord &event)
void SetSystematic(GSyst_t syst, double val)
update the value for the specified nuisance param
Event finding and building.
XSecAlgorithmI * fXSecModel
tweaked model
GENIE event reweighting engine ABC.
Definition: GReWeightI.h:31