GReWeightNuXSecNCRES.h
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*!
3 
4 \class genie::rew::GReWeightNuXSecNCRES
5 
6 \brief Reweight GENIE NC resonance neutrino-production cross section.
7  Basically a clone of the corresponding CC code.
8 
9 \author Costas Andreopoulos <costas.andreopoulos \at stfc.ac.uk>
10  University of Liverpool & STFC Rutherford Appleton Lab
11 
12  Jim Dobson <J.Dobson07 \at imperial.ac.uk>
13  Imperial College London
14 
15 \created Aug 1, 2009
16 
17 \cpright Copyright (c) 2003-2017, GENIE Neutrino MC Generator Collaboration
18  For the full text of the license visit http://copyright.genie-mc.org
19  or see $GENIE/LICENSE
20 */
21 //____________________________________________________________________________
22 
23 #ifndef _G_REWEIGHT_NU_XSEC_NCRES_H_
24 #define _G_REWEIGHT_NU_XSEC_NCRES_H_
25 
26 #include <map>
27 #include <string>
28 
29 using std::map;
30 using std::string;
31 
32 #include "ReWeight/GReWeightI.h"
33 
34 namespace genie {
35 
36 class XSecAlgorithmI;
37 class Registry;
38 
39 namespace rew {
40 
42  {
43  public:
44  static const int kModeMaMv = 0;
45  static const int kModeNormAndMaMvShape = 1;
46 
49 
50  // implement the GReWeightI interface
51  bool IsHandled (GSyst_t syst);
52  void SetSystematic (GSyst_t syst, double val);
53  void Reset (void);
54  void Reconfigure (void);
55  double CalcWeight (const EventRecord & event);
56 
57  // various config options
58  void SetMode (int mode) { fMode = mode; }
59  void SetMaPath (string p) { fMaPath = p; }
60  void SetMvPath (string p) { fMvPath = p; }
61  void RewNue (bool tf ) { fRewNue = tf; }
62  void RewNuebar (bool tf ) { fRewNuebar = tf; }
63  void RewNumu (bool tf ) { fRewNumu = tf; }
64  void RewNumubar (bool tf ) { fRewNumubar = tf; }
65 
66  private:
67 
68  void Init (void);
69  double CalcWeightNorm (const EventRecord & event);
70  double CalcWeightMaMvShape (const EventRecord & event);
71  double CalcWeightMaMv (const EventRecord & event);
72 
73  XSecAlgorithmI * fXSecModelDef; ///< default model
74  XSecAlgorithmI * fXSecModel; ///< tweaked model
75  Registry * fXSecModelConfig; ///< config in tweaked model
76 
77  int fMode; ///< 0: Ma/Mv, 1: Norm and MaShape/MvShape
78  string fMaPath; ///< M_{A} path in configuration
79  string fMvPath; ///< M_{V} path in configuration
80  bool fRewNue; ///< reweight nu_e NC?
81  bool fRewNuebar; ///< reweight nu_e_bar NC?
82  bool fRewNumu; ///< reweight nu_mu NC?
83  bool fRewNumubar; ///< reweight nu_mu_bar NC?
84  double fNormTwkDial; ///<
85  double fNormDef; ///<
86  double fNormCurr; ///<
87  double fMaTwkDial; ///<
88  double fMaDef; ///<
89  double fMaCurr; ///<
90  double fMvTwkDial; ///<
91  double fMvDef; ///<
92  double fMvCurr; ///<
93 
94  };
95 
96 } // rew namespace
97 } // genie namespace
98 
99 #endif
100 
double CalcWeight(const EventRecord &event)
calculate a weight for the input event using the current nuisance param values
Cross Section Calculation Interface.
Registry * fXSecModelConfig
config in tweaked model
bool fRewNuebar
reweight nu_e_bar NC?
XSecAlgorithmI * fXSecModelDef
default model
#include "Numerical/GSFunc.h"
Definition: AlgCmp.h:26
double CalcWeightNorm(const EventRecord &event)
std::string string
Definition: nybbler.cc:12
Reweight GENIE NC resonance neutrino-production cross section. Basically a clone of the corresponding...
Definition: tf_graph.h:23
double CalcWeightMaMv(const EventRecord &event)
int fMode
0: Ma/Mv, 1: Norm and MaShape/MvShape
bool fRewNumubar
reweight nu_mu_bar NC?
double CalcWeightMaMvShape(const EventRecord &event)
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
An enumeration of systematic parameters.
void Reconfigure(void)
propagate updated nuisance parameter values to actual MC, etc
Generated Event Record. It is a GHepRecord object that can accept / be visited by EventRecordVisitorI...
Definition: EventRecord.h:38
string fMvPath
M_{V} path in configuration.
p
Definition: test.py:228
void Reset(void)
set all nuisance parameters to default values
A registry. Provides the container for algorithm configuration parameters.
Definition: Registry.h:66
XSecAlgorithmI * fXSecModel
tweaked model
string fMaPath
M_{A} path in configuration.
Event finding and building.
GENIE event reweighting engine ABC.
Definition: GReWeightI.h:31