GSystUncertainty.cxx
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*
3  Copyright (c) 2003-2017, GENIE Neutrino MC Generator Collaboration
4  For the full text of the license visit http://copyright.genie-mc.org
5  or see $GENIE/LICENSE
6 
7  Authors: Jim Dobson <J.Dobson07 \at imperial.ac.uk>
8  Imperial College London
9 
10  Costas Andreopoulos <costas.andreopoulos \at stfc.ac.uk>
11  University of Liverpool & STFC Rutherford Appleton Lab
12 
13  For the class documentation see the corresponding header file.
14 
15  Important revisions after version 2.0.0 :
16  @ Sep 01, 2009 - CA
17  Was adapted from Jim's and Costas' T2K-specific GENIE reweighting code.
18  First included in v2.5.1.
19  @ Apr 27, 2010 - CA
20  Included new parameters in preparation for the Summer 2010 T2K analyses.
21  Added option to override the default 1\sigma errors.
22  @ Nov 25, 2010 - CA
23  Allow for asymmetric 1 sigma fractional errors.
24 */
25 //____________________________________________________________________________
26 
27 #include "Messenger/Messenger.h"
29 
30 using namespace genie;
31 using namespace genie::rew;
32 
34 //____________________________________________________________________________
36 {
37 // fInstance = 0;
38 }
39 //____________________________________________________________________________
41 {
42  fInstance = 0;
43 }
44 //____________________________________________________________________________
46 {
47  if(fInstance == 0) {
48  LOG("ReW", pINFO) << "GSystUncertainty late initialization";
49  static GSystUncertainty::Cleaner cleaner;
53  }
54  return fInstance;
55 }
56 //____________________________________________________________________________
58 {
59  if(sign > 0) {
61  if(it != fOneSigPlusErrMap.end()) return it->second;
62  return 0;
63  }
64  else
65  if(sign < 0) {
67  if(it != fOneSigMnusErrMap.end()) return it->second;
68  return 0;
69  }
70  else {
71  // Handle default argument (sign=0)
72  // Case added for compatibility purposes since most existing weight
73  // calcutators call GSystUncertainty::OneSigmaErr(GSyst_t) and the error
74  // on most GSyst_t params is symmetric.
75  double err = 0.5 * (
76  this->OneSigmaErr(s, +1) + this->OneSigmaErr(s, -1));
77  return err;
78  }
79 }
80 //____________________________________________________________________________
82  GSyst_t s, double plus_err, double minus_err)
83 {
84  //fOneSigPlusErrMap.insert( map<GSyst_t,double>::value_type(s, plus_err ) );
85  //fOneSigMnusErrMap.insert( map<GSyst_t,double>::value_type(s, minus_err) );
86  fOneSigPlusErrMap[s] = plus_err;
87  fOneSigMnusErrMap[s] = minus_err;
88 }
89 //____________________________________________________________________________
91 {
92  this->SetUncertainty( kXSecTwkDial_MaNCEL, 0.25, 0.25);
93  this->SetUncertainty( kXSecTwkDial_EtaNCEL, 0.30, 0.30);
94  this->SetUncertainty( kXSecTwkDial_NormCCQE, 0.20, 0.15);
95  this->SetUncertainty( kXSecTwkDial_MaCCQEshape, 0.10, 0.10);
96  this->SetUncertainty( kXSecTwkDial_MaCCQE, 0.25, 0.15);
97  this->SetUncertainty( kXSecTwkDial_ZNormCCQE, 0.20, 0.15);
98  this->SetUncertainty( kXSecTwkDial_ZExpA1CCQE, 0.14, 0.14);
99  this->SetUncertainty( kXSecTwkDial_ZExpA2CCQE, 0.67, 0.67);
100  this->SetUncertainty( kXSecTwkDial_ZExpA3CCQE, 1.00, 1.00);
101  this->SetUncertainty( kXSecTwkDial_ZExpA4CCQE, 0.75, 0.75);
102  this->SetUncertainty( kXSecTwkDial_NormCCRES, 0.20, 0.20);
103  this->SetUncertainty( kXSecTwkDial_MaCCRESshape, 0.10, 0.10);
104  this->SetUncertainty( kXSecTwkDial_MvCCRESshape, 0.05, 0.05);
105  this->SetUncertainty( kXSecTwkDial_MaCCRES, 0.20, 0.20);
106  this->SetUncertainty( kXSecTwkDial_MvCCRES, 0.10, 0.10);
107  this->SetUncertainty( kXSecTwkDial_NormNCRES, 0.20, 0.20);
108  this->SetUncertainty( kXSecTwkDial_MaNCRESshape, 0.10, 0.10);
109  this->SetUncertainty( kXSecTwkDial_MvNCRESshape, 0.05, 0.05);
110  this->SetUncertainty( kXSecTwkDial_MaNCRES, 0.20, 0.20);
111  this->SetUncertainty( kXSecTwkDial_MvNCRES, 0.10, 0.10);
112  this->SetUncertainty( kXSecTwkDial_MaCOHpi, 0.40, 0.40);
113  this->SetUncertainty( kXSecTwkDial_R0COHpi, 0.10, 0.10);
114  this->SetUncertainty( kXSecTwkDial_RvpCC1pi, 0.50, 0.50);
115  this->SetUncertainty( kXSecTwkDial_RvpCC2pi, 0.50, 0.50);
116  this->SetUncertainty( kXSecTwkDial_RvpNC1pi, 0.50, 0.50);
117  this->SetUncertainty( kXSecTwkDial_RvpNC2pi, 0.50, 0.50);
118  this->SetUncertainty( kXSecTwkDial_RvnCC1pi, 0.50, 0.50);
119  this->SetUncertainty( kXSecTwkDial_RvnCC2pi, 0.50, 0.50);
120  this->SetUncertainty( kXSecTwkDial_RvnNC1pi, 0.50, 0.50);
121  this->SetUncertainty( kXSecTwkDial_RvnNC2pi, 0.50, 0.50);
122  this->SetUncertainty( kXSecTwkDial_RvbarpCC1pi, 0.50, 0.50);
123  this->SetUncertainty( kXSecTwkDial_RvbarpCC2pi, 0.50, 0.50);
124  this->SetUncertainty( kXSecTwkDial_RvbarpNC1pi, 0.50, 0.50);
125  this->SetUncertainty( kXSecTwkDial_RvbarpNC2pi, 0.50, 0.50);
126  this->SetUncertainty( kXSecTwkDial_RvbarnCC1pi, 0.50, 0.50);
127  this->SetUncertainty( kXSecTwkDial_RvbarnCC2pi, 0.50, 0.50);
128  this->SetUncertainty( kXSecTwkDial_RvbarnNC1pi, 0.50, 0.50);
129  this->SetUncertainty( kXSecTwkDial_RvbarnNC2pi, 0.50, 0.50);
130 
131  // From Debdatta's thesis:
132  // Aht = 0.538 +/- 0.134
133  // Bht = 0.305 +/- 0.076
134  // CV1u = 0.291 +/- 0.087
135  // CV2u = 0.189 +/- 0.076
136 
137  this->SetUncertainty( kXSecTwkDial_AhtBY, 0.25, 0.25);
138  this->SetUncertainty( kXSecTwkDial_BhtBY, 0.25, 0.25);
139  this->SetUncertainty( kXSecTwkDial_CV1uBY, 0.30, 0.30);
140  this->SetUncertainty( kXSecTwkDial_CV2uBY, 0.40, 0.40);
141 
142  this->SetUncertainty( kXSecTwkDial_AhtBYshape, 0.25, 0.25);
143  this->SetUncertainty( kXSecTwkDial_BhtBYshape, 0.25, 0.25);
144  this->SetUncertainty( kXSecTwkDial_CV1uBYshape, 0.30, 0.30);
145  this->SetUncertainty( kXSecTwkDial_CV2uBYshape, 0.40, 0.40);
146 
147  this->SetUncertainty( kXSecTwkDial_DISNuclMod, 1.00, 1.00);
148  this->SetUncertainty( kSystNucl_CCQEPauliSupViaKF, 0.30, 0.30);
149  this->SetUncertainty( kHadrAGKYTwkDial_xF1pi, 0.20, 0.20);
150  this->SetUncertainty( kHadrAGKYTwkDial_pT1pi, 0.03, 0.03);
151  this->SetUncertainty( kHadrNuclTwkDial_FormZone, 0.50, 0.50);
152 
153  // From INTRANUKE pi+A and N+A mode comparisons with hadron scattering data:
154  //
155  this->SetUncertainty( kINukeTwkDial_MFP_pi, 0.20, 0.20);
156  this->SetUncertainty( kINukeTwkDial_MFP_N, 0.20, 0.20);
157  this->SetUncertainty( kINukeTwkDial_FrCEx_pi, 0.50, 0.50);
158  this->SetUncertainty( kINukeTwkDial_FrElas_pi, 0.10, 0.10);
159  this->SetUncertainty( kINukeTwkDial_FrInel_pi, 0.40, 0.40);
160  this->SetUncertainty( kINukeTwkDial_FrAbs_pi, 0.30, 0.30);
161  this->SetUncertainty( kINukeTwkDial_FrPiProd_pi, 0.20, 0.20);
162  this->SetUncertainty( kINukeTwkDial_FrCEx_N, 0.50, 0.50);
163  this->SetUncertainty( kINukeTwkDial_FrElas_N, 0.30, 0.30);
164  this->SetUncertainty( kINukeTwkDial_FrInel_N, 0.40, 0.40);
165  this->SetUncertainty( kINukeTwkDial_FrAbs_N, 0.20, 0.20);
166  this->SetUncertainty( kINukeTwkDial_FrPiProd_N, 0.20, 0.20);
167 
168  this->SetUncertainty( kRDcyTwkDial_BR1gamma, 0.50, 0.50);
169  this->SetUncertainty( kRDcyTwkDial_BR1eta, 0.50, 0.50);
170 }
171 //____________________________________________________________________________
tweak Mv CCRES, affects d2sigma(CCRES)/dWdQ2 both in shape and normalization
Definition: GSyst.h:59
tweak the 1pi non-RES bkg in the RES region, for v+p CC
Definition: GSyst.h:69
tweak Z-expansion coefficient 1, affects dsigma(CCQE)/dQ2 both in shape and normalization ...
Definition: GSyst.h:157
tweak Mv CCRES, affects d2sigma(CCRES)/dWdQ2 in shape only (normalized to constant integral) ...
Definition: GSyst.h:57
tweak NCEL strange axial form factor eta, affects dsigma(NCEL)/dQ2 both in shape and normalization ...
Definition: GSyst.h:47
tweak the 1pi non-RES bkg in the RES region, for v+p NC
Definition: GSyst.h:71
tweak inelastic probability for pions, for given total rescattering probability
Definition: GSyst.h:128
#include "Numerical/GSFunc.h"
Definition: AlgCmp.h:26
tweak DIS nuclear modification (shadowing, anti-shadowing, EMC)
Definition: GSyst.h:96
tweak elastic probability for pions, for given total rescattering probability
Definition: GSyst.h:127
tweak xF distribution for low multiplicity (N + pi) DIS f/s produced by AGKY
Definition: GSyst.h:105
tweak the 1pi non-RES bkg in the RES region, for vbar+n CC
Definition: GSyst.h:81
tweak charge exchange probability for nucleons, for given total rescattering probability ...
Definition: GSyst.h:131
tweak CCQE normalization (energy independent)
Definition: GSyst.h:49
tweak the Bodek-Yang model parameter B_{ht} - shape only effect to d2sigma(DIS)/dxdy ...
Definition: GSyst.h:91
tweak Ma NCEL, affects dsigma(NCEL)/dQ2 both in shape and normalization
Definition: GSyst.h:46
tweak Resonance -> X + eta branching ratio, eg N+(1440) -> p eta
Definition: GSyst.h:149
void SetUncertainty(GSyst_t syst, double plus_err, double minus_err)
tweak pion production probability for pions, for given total rescattering probability ...
Definition: GSyst.h:130
map< GSyst_t, double > fOneSigPlusErrMap
tweak pT distribution for low multiplicity (N + pi) DIS f/s produced by AGKY
Definition: GSyst.h:106
double OneSigmaErr(GSyst_t syst, int sign=0) const
tweak Z-expansion coefficient 4, affects dsigma(CCQE)/dQ2 both in shape and normalization ...
Definition: GSyst.h:160
tweak the 2pi non-RES bkg in the RES region, for vbar+p NC
Definition: GSyst.h:80
tweak inelastic probability for nucleons, for given total rescattering probability ...
Definition: GSyst.h:133
tweak absorption probability for nucleons, for given total rescattering probability ...
Definition: GSyst.h:134
static GSystUncertainty * fInstance
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:87
intermediate_table::const_iterator const_iterator
tweak the 2pi non-RES bkg in the RES region, for vbar+n NC
Definition: GSyst.h:84
tweak Z-expansion coefficient 3, affects dsigma(CCQE)/dQ2 both in shape and normalization ...
Definition: GSyst.h:159
tweak the 1pi non-RES bkg in the RES region, for v+n CC
Definition: GSyst.h:73
tweak absorption probability for pions, for given total rescattering probability
Definition: GSyst.h:129
tweak the Bodek-Yang model parameter CV2u - incl. both shape and normalization effect ...
Definition: GSyst.h:89
tweak Z-expansion coefficient 2, affects dsigma(CCQE)/dQ2 both in shape and normalization ...
Definition: GSyst.h:158
tweak the 2pi non-RES bkg in the RES region, for v+n CC
Definition: GSyst.h:74
tweak Z-expansion CCQE normalization (energy independent)
Definition: GSyst.h:156
tweak the 2pi non-RES bkg in the RES region, for vbar+n CC
Definition: GSyst.h:82
tweak R0 for COH pion production
Definition: GSyst.h:67
An enumeration of systematic parameters.
#define pINFO
Definition: Messenger.h:53
tweak elastic probability for nucleons, for given total rescattering probability
Definition: GSyst.h:132
tweak the 1pi non-RES bkg in the RES region, for vbar+p CC
Definition: GSyst.h:77
tweak the 2pi non-RES bkg in the RES region, for v+p NC
Definition: GSyst.h:72
tweak CCRES normalization
Definition: GSyst.h:55
tweak Mv NCRES, affects d2sigma(NCRES)/dWdQ2 both in shape and normalization
Definition: GSyst.h:64
tweak the Bodek-Yang model parameter A_{ht} - incl. both shape and normalization effect ...
Definition: GSyst.h:86
tweak the 2pi non-RES bkg in the RES region, for v+n NC
Definition: GSyst.h:76
tweak mean free path for nucleons
Definition: GSyst.h:125
tweak mean free path for pions
Definition: GSyst.h:124
int sign(double val)
Definition: UtilFunc.cxx:106
map< GSyst_t, double > fOneSigMnusErrMap
tweak the Bodek-Yang model parameter A_{ht} - shape only effect to d2sigma(DIS)/dxdy ...
Definition: GSyst.h:90
tweak Ma CCRES, affects d2sigma(CCRES)/dWdQ2 both in shape and normalization
Definition: GSyst.h:58
tweak formation zone
Definition: GSyst.h:113
tweak NCRES normalization
Definition: GSyst.h:60
tweak Ma CCQE, affects dsigma(CCQE)/dQ2 both in shape and normalization
Definition: GSyst.h:52
tweak the Bodek-Yang model parameter CV1u - shape only effect to d2sigma(DIS)/dxdy ...
Definition: GSyst.h:92
tweak Resonance -> X + gamma branching ratio, eg Delta+(1232) -> p gamma
Definition: GSyst.h:148
tweak the 1pi non-RES bkg in the RES region, for v+n NC
Definition: GSyst.h:75
tweak Ma CCRES, affects d2sigma(CCRES)/dWdQ2 in shape only (normalized to constant integral) ...
Definition: GSyst.h:56
tweak the 2pi non-RES bkg in the RES region, for vbar+p CC
Definition: GSyst.h:78
tweak pion production probability for nucleons, for given total rescattering probability ...
Definition: GSyst.h:135
tweak Ma for COH pion production
Definition: GSyst.h:66
static GSystUncertainty * Instance(void)
tweak the Bodek-Yang model parameter CV1u - incl. both shape and normalization effect ...
Definition: GSyst.h:88
static const double s
Definition: Units.h:99
tweak Ma NCRES, affects d2sigma(NCRES)/dWdQ2 in shape only (normalized to constant integral) ...
Definition: GSyst.h:61
tweak Mv NCRES, affects d2sigma(NCRES)/dWdQ2 in shape only (normalized to constant integral) ...
Definition: GSyst.h:62
tweak the 1pi non-RES bkg in the RES region, for vbar+p NC
Definition: GSyst.h:79
tweak the Bodek-Yang model parameter CV2u - shape only effect to d2sigma(DIS)/dxdy ...
Definition: GSyst.h:93
tweak charge exchange probability for pions, for given total rescattering probability ...
Definition: GSyst.h:126
tweak Ma CCQE, affects dsigma(CCQE)/dQ2 in shape only (normalized to constant integral) ...
Definition: GSyst.h:51
tweak the 2pi non-RES bkg in the RES region, for v+p CC
Definition: GSyst.h:70
tweak the 1pi non-RES bkg in the RES region, for vbar+n NC
Definition: GSyst.h:83
tweak the Bodek-Yang model parameter B_{ht} - incl. both shape and normalization effect ...
Definition: GSyst.h:87
tweak Ma NCRES, affects d2sigma(NCRES)/dWdQ2 both in shape and normalization
Definition: GSyst.h:63