Functions
Nus18SystUtilities.h File Reference
#include "StandardRecord/Proxy/SRProxy.h"
#include "CAFAna/Core/Var.h"
#include "CAFAna/Systs/XSecSystLists.h"
#include <vector>
#include <map>
#include <string>

Go to the source code of this file.

Functions

std::map< std::string, std::vector< std::string > > GetBeamTranspShiftLabels ()
 
std::vector< VarGetPPFXFluxWeights ()
 
std::map< std::string, rwgt::ReweightLabel_t > GetGENIEShiftLabels ()
 
std::map< std::string, const ISyst * > GetXSecShiftLabels ()
 

Function Documentation

std::map<std::string, std::vector<std::string> > GetBeamTranspShiftLabels ( )

Definition at line 16 of file Nus18SystUtilities.h.

16  {
17 
18  // Map to set up systematics
19  std::map<std::string, std::vector<std::string> > shiftLabels;
20 
21  // First element is a label for the systematic
22  shiftLabels["BeamHornCurrent"] = std::vector<std::string>();
23  shiftLabels["BeamSpotSize"] = std::vector<std::string>();
24  shiftLabels["BeamposX"] = std::vector<std::string>();
25  shiftLabels["BeamposY"] = std::vector<std::string>();
26  shiftLabels["BeamH1PosX"] = std::vector<std::string>();
27  shiftLabels["BeamH1PosY"] = std::vector<std::string>();
28  shiftLabels["BeamH2PosX"] = std::vector<std::string>();
29  shiftLabels["BeamH2PosY"] = std::vector<std::string>();
30  shiftLabels["TargetPosZ"] = std::vector<std::string>();
31  shiftLabels["BeamExp"] = std::vector<std::string>();
32  shiftLabels["HornWater"] = std::vector<std::string>();
33  /* shiftLabels["totErr"] = std::vector<std::string>(); */
34 
35  // Second element is vector for items required to set up Syst object
36  shiftLabels["BeamHornCurrent"].push_back("2kA");
37  shiftLabels["BeamHornCurrent"].push_back("Horn Current");
38  shiftLabels["BeamSpotSize"] .push_back("0.2mmBeamSpotSize");
39  shiftLabels["BeamSpotSize"] .push_back("Spot Size");
40  shiftLabels["BeamposX"] .push_back("1mmBeamShiftX");
41  shiftLabels["BeamposX"] .push_back("Beam Position X");
42  shiftLabels["BeamposY"] .push_back("1mmBeamShiftY");
43  shiftLabels["BeamposY"] .push_back("Beam Position Y");
44  shiftLabels["BeamH1PosX"] .push_back("3mmHorn1X");
45  shiftLabels["BeamH1PosX"] .push_back("Horn 1 X Position");
46  shiftLabels["BeamH1PosY"] .push_back("3mmHorn1Y");
47  shiftLabels["BeamH1PosY"] .push_back("Horn 1 Y Position");
48  shiftLabels["BeamH2PosX"] .push_back("3mmHorn2X");
49  shiftLabels["BeamH2PosX"] .push_back("Horn 2 X Position");
50  shiftLabels["BeamH2PosY"] .push_back("3mmHorn2Y");
51  shiftLabels["BeamH2PosY"] .push_back("Horn 2 Y Position");
52  shiftLabels["TargetPosZ"] .push_back("7mmTargetZ");
53  shiftLabels["TargetPosZ"] .push_back("Target Z position");
54  shiftLabels["BeamExp"] .push_back("Magnetic Field in Decay Pipe");
55  shiftLabels["BeamExp"] .push_back("Magnet Field in Decay Pipe");
56  shiftLabels["HornWater"] .push_back("1mmHornWater");
57  shiftLabels["HornWater"] .push_back("New Horn Geometry and 1mm water");
58  /* shiftLabels["totErr"] .push_back("totErr"); */
59  /* shiftLabels["totErr"] .push_back("Combined Beam Transport Systematics"); */
60 
61  return shiftLabels;
62 
63 }
std::map<std::string, rwgt::ReweightLabel_t> GetGENIEShiftLabels ( )

Definition at line 88 of file Nus18SystUtilities.h.

88  {
89 
90  std::map<std::string, rwgt::ReweightLabel_t> shiftlabels;
91 
92  // Ma NCEL, affects dsigma(NCEL)/dQ2 both in shape and normalization
93  shiftlabels["ReweightMaNCEL"] = rwgt::fReweightMaNCEL;
94  // NCEL strange axial form factor eta, affects dsigma(NCEL)/dQ2 both in shape and normalization
95  shiftlabels["ReweightEtaNCEL"] = rwgt::fReweightEtaNCEL;
96 
97  // CCQE parameters -----------------------
98  // elastic nucleon form factors (BBA/default -> dipole) - shape only effect of dsigma(CCQE)/dQ2
99  shiftlabels["ReweightVecCCQEshape"] = rwgt::fReweightVecCCQEshape;
100  // Ma CCRES, affects d2sigma(CCRES)/dWdQ2 both in shape and normalization
101  shiftlabels["ReweightMaCCRES"] = rwgt::fReweightMaCCRES;
102  // Mv CCRES, affects d2sigma(CCRES)/dWdQ2 both in shape and normalization
103  shiftlabels["ReweightMvCCRES"] = rwgt::fReweightMvCCRES;
104  // Ma NCRES, affects d2sigma(NCRES)/dWdQ2 both in shape and normalization
105  shiftlabels["ReweightMaNCRES"] = rwgt::fReweightMaNCRES;
106  // Mv NCRES, affects d2sigma(NCRES)/dWdQ2 both in shape and normalization
107  shiftlabels["ReweightMvNCRES"] = rwgt::fReweightMvNCRES;
108 
109  // Coherent pion production parameters -----------------------
110  // Ma for COH pion production
111  shiftlabels["ReweightMaCOHpi"] = rwgt::fReweightMaCOHpi;
112  // R0 for COH pion production
113  shiftlabels["ReweightR0COHpi"] = rwgt::fReweightR0COHpi;
114  // the Bodek-Yang model parameter A_{ht} - incl. both shape and normalization effect
115  shiftlabels["ReweightAhtBY"] = rwgt::fReweightAhtBY;
116  // the Bodek-Yang model parameter B_{ht} - incl. both shape and normalization effect
117  shiftlabels["ReweightBhtBY"] = rwgt::fReweightBhtBY;
118  // the Bodek-Yang model parameter CV1u - incl. both shape and normalization effect
119  shiftlabels["ReweightCV1uBY"] = rwgt::fReweightCV1uBY;
120  // the Bodek-Yang model parameter CV2u - incl. both shape and normalization effect
121  shiftlabels["ReweightCV2uBY"] = rwgt::fReweightCV2uBY;
122  // // the Bodek-Yang model parameter A_{ht} - shape only effect to d2sigma(DIS)/dxdy
123  // shiftlabels["ReweightAhtBYshape"] = rwgt::fReweightAhtBYshape;
124  // // the Bodek-Yang model parameter B_{ht} - shape only effect to d2sigma(DIS)/dxdy
125  // shiftlabels["ReweightBhtBYshape"] = rwgt::fReweightBhtBYshape;
126  // // the Bodek-Yang model parameter CV1u - shape only effect to d2sigma(DIS)/dxdy
127  // shiftlabels["ReweightCV1uBYshape"] = rwgt::fReweightCV1uBYshape;
128  // // the Bodek-Yang model parameter CV2u - shape only effect to d2sigma(DIS)/dxdy
129  // shiftlabels["ReweightCV2uBYshape"] = rwgt::fReweightCV2uBYshape;
130  // the inclusive DIS CC normalization (not currently working in genie)
131  shiftlabels["ReweightNormDISCC"] = rwgt::fReweightNormDISCC;
132  // the ratio of \sigma(\bar\nu CC) / \sigma(\nu CC) (not currently working in genie)
133  shiftlabels["ReweightRnubarnuCC"] = rwgt::fReweightRnubarnuCC;
134  // DIS nuclear modification (shadowing, anti-shadowing, EMC). Not working in GENIE at the moment
135  shiftlabels["ReweightDISNuclMod"] = rwgt::fReweightDISNuclMod;
136 
137  // NC: general -----------------------
138  // NC total normalization (currently does nothing, but should retain for future)
139  shiftlabels["ReweightNC"] = rwgt::fReweightNC;
140 
141  // Hadronization (free nucleon target) -----------------------
142  // xF distribution for low multiplicity (N + pi) DIS f/s produced by AGKY
143  shiftlabels["ReweightAGKY_xF1pi"] = rwgt::fReweightAGKY_xF1pi;
144  // pT distribution for low multiplicity (N + pi) DIS f/s produced by AGKY
145  shiftlabels["ReweightAGKY_pT1pi"] = rwgt::fReweightAGKY_pT1pi;
146  // Hadron formation zone
147  shiftlabels["ReweightFormZone"] = rwgt::fReweightFormZone;
148 
149  // Resonance decays -----------------------
150  // Intranuclear rescattering systematics. There are 2 sets of parameters:
151  // - parameters that control the total rescattering probability, P(total)
152  // - parameters that control the fraction of each process (`fate'), given a total rescat. prob., P(fate|total)
153  // These parameters are considered separately for pions and nucleons.
154  // -----------------------
155  // mean free path for pions
156  shiftlabels["ReweightMFP_pi"] = rwgt::fReweightMFP_pi;
157  // mean free path for nucleons
158  shiftlabels["ReweightMFP_N"] = rwgt::fReweightMFP_N;
159  // charge exchange probability for pions, for given total rescattering probability
160  shiftlabels["ReweightFrCEx_pi"] = rwgt::fReweightFrCEx_pi;
161  // elastic probability for pions, for given total rescattering probability
162  // shiftlabels["ReweightFrElas_pi"] = rwgt::fReweightFrElas_pi;
163  // inelastic probability for pions, for given total rescattering probability`
164  shiftlabels["ReweightFrInel_pi"] = rwgt::fReweightFrInel_pi;
165  // absorption probability for pions, for given total rescattering probability
166  shiftlabels["ReweightFrAbs_pi"] = rwgt::fReweightFrAbs_pi;
167  // pion production probability for pions, for given total rescattering probability
168  shiftlabels["ReweightFrPiProd_pi"] = rwgt::fReweightFrPiProd_pi;
169  // charge exchange probability for nucleons, for given total rescattering probability
170  shiftlabels["ReweightFrCEx_N"] = rwgt::fReweightFrCEx_N;
171  // elastic probability for nucleons, for given total rescattering probability
172  // shiftlabels["ReweightFrElas_N"] = rwgt::fReweightFrElas_N;
173  // inelastic probability for nucleons, for given total rescattering probability
174  shiftlabels["ReweightFrInel_N"] = rwgt::fReweightFrInel_N;
175  // absorption probability for nucleons, for given total rescattering probability
176  shiftlabels["ReweightFrAbs_N"] = rwgt::fReweightFrAbs_N;
177  // pion production probability for nucleons, for given total rescattering probability
178  shiftlabels["ReweightFrPiProd_N"] = rwgt::fReweightFrPiProd_N;
179  shiftlabels["ReweightCCQEPauliSupViaKF"] = rwgt::fReweightCCQEPauliSupViaKF;
180  shiftlabels["ReweightCCQEMomDistroFGtoSF"] = rwgt::fReweightCCQEMomDistroFGtoSF;
181  // Resonance -> X + gamma branching ratio, eg Delta+(1232) -> p gamma
182  shiftlabels["ReweightBR1gamma"] = rwgt::fReweightBR1gamma;
183  // Resonance -> X + eta branching ratio, eg N+(1440) -> p eta
184  shiftlabels["ReweightBR1eta"] = rwgt::fReweightBR1eta;
185  // distort pi angular distribution in Delta -> N + pi
186  shiftlabels["ReweightTheta_Delta2Npi"] = rwgt::fReweightTheta_Delta2Npi;
187 
188  // Nuclear model -----------------------
189  // shiftlabels["ReweightNC"] = rwgt::fReweightNC;
190 
191  return shiftlabels;
192 
193 }
std::vector<Var> GetPPFXFluxWeights ( )

Definition at line 66 of file Nus18SystUtilities.h.

References caf::Proxy< caf::SRMCReweight >::ppfx, caf::Proxy< caf::SRNeutrino >::rwgt, ana::VarFromNuTruthVar(), and caf::Proxy< caf::SRFluxWeights >::vuniv.

Referenced by MakeNus18Systs().

66  {
67 
68  std::vector<Var> ppfxFluxUnivWgts;
69 
70  for (unsigned int UnivIdx = 0; UnivIdx < 100; UnivIdx++) {
71 
72  const NuTruthVar tempPPFXWgt([UnivIdx](const caf::SRNeutrinoProxy* nu) {
73  if(nu->rwgt.ppfx.vuniv[UnivIdx] <= 0)
74  return 1.f;
75  return (float)nu->rwgt.ppfx.vuniv[UnivIdx];
76  });
77 
78  const Var ppfxFluxUnivWgt = VarFromNuTruthVar(tempPPFXWgt, 1);
79  ppfxFluxUnivWgts.push_back(ppfxFluxUnivWgt);
80 
81  }
82 
83  return ppfxFluxUnivWgts;
84 
85 }
caf::Proxy< std::vector< float > > vuniv
Definition: SRProxy.h:490
Proxy for caf::SRNeutrino.
Definition: SRProxy.h:510
caf::Proxy< caf::SRMCReweight > rwgt
Definition: SRProxy.h:560
caf::Proxy< caf::SRFluxWeights > ppfx
Definition: SRProxy.h:506
Var VarFromNuTruthVar(const NuTruthVar &stv, double _default)
Definition: Var.cxx:7
Template for Var and SpillVar.
std::map<std::string, const ISyst*> GetXSecShiftLabels ( )

Definition at line 196 of file Nus18SystUtilities.h.

References ana::getAllXsecSysts_2018().

196  {
197 
198  std::map<std::string, const ISyst*> shiftlabels;
199 
200  // Get cross-section systematics
201  std::vector<const ISyst*> AllSyst= getAllXsecSysts_2018();
202 
203  shiftlabels["PD3_MAQAGenieReducedSyst2018"] = AllSyst.at(0);
204  shiftlabels["PD3_RPACCQEEnhSyst2018"] = AllSyst.at(1);
205  shiftlabels["PD3_RPACCQESuppSyst2018"] = AllSyst.at(2);
206  shiftlabels["PD3_RPARESSyst2018"] = AllSyst.at(3);
207  shiftlabels["PD3_MECEShapeSyst2018Nu"] = AllSyst.at(4);
208  // shiftlabels["PD3_MECq0ShapeSyst2018"] = AllSyst.at(4);
209  shiftlabels["PD3_MECEShapeSyst2018AntiNu"] = AllSyst.at(5);
210  shiftlabels["PD3_MECEnuShapeSyst2018Nu"] = AllSyst.at(6);
211  // shiftlabels["PD3_MECEnuShapeSyst2018"] = AllSyst.at(6);
212  shiftlabels["PD3_MECEnuShapeSyst2018AntiNu"] = AllSyst.at(7);
213  shiftlabels["PD3_MECInitStateNPFracSyst2018Nu"] = AllSyst.at(8);
214  shiftlabels["PD3_MECInitStateNPFracSyst2018AntiNu"] = AllSyst.at(9);
215  shiftlabels["PD3_DISvpCC0pi"] = AllSyst.at(10);
216  shiftlabels["PD3_DISvpCC1pi"] = AllSyst.at(11);
217  shiftlabels["PD3_DISvpCC2pi"] = AllSyst.at(12);
218  shiftlabels["PD3_DISvpCC3pi"] = AllSyst.at(13);
219  shiftlabels["PD3_DISvpNC0pi"] = AllSyst.at(14);
220  shiftlabels["PD3_DISvpNC1pi"] = AllSyst.at(15);
221  shiftlabels["PD3_DISvpNC2pi"] = AllSyst.at(16);
222  shiftlabels["PD3_DISvpNC3pi"] = AllSyst.at(17);
223  shiftlabels["PD3_DISvnCC0pi"] = AllSyst.at(18);
224  shiftlabels["PD3_DISvnCC1pi"] = AllSyst.at(19);
225  shiftlabels["PD3_DISvnCC2pi"] = AllSyst.at(20);
226  shiftlabels["PD3_DISvnCC3pi"] = AllSyst.at(21);
227  shiftlabels["PD3_DISvnNC0pi"] = AllSyst.at(22);
228  shiftlabels["PD3_DISvnNC1pi"] = AllSyst.at(23);
229  shiftlabels["PD3_DISvnNC2pi"] = AllSyst.at(24);
230  shiftlabels["PD3_DISvnNC3pi"] = AllSyst.at(25);
231  shiftlabels["PD3_DISvbarpCC0pi"] = AllSyst.at(26);
232  shiftlabels["PD3_DISvbarpCC1pi"] = AllSyst.at(27);
233  shiftlabels["PD3_DISvbarpCC2pi"] = AllSyst.at(28);
234  shiftlabels["PD3_DISvbarpCC3pi"] = AllSyst.at(29);
235  shiftlabels["PD3_DISvbarpNC0pi"] = AllSyst.at(30);
236  shiftlabels["PD3_DISvbarpNC1pi"] = AllSyst.at(31);
237  shiftlabels["PD3_DISvbarpNC2pi"] = AllSyst.at(32);
238  shiftlabels["PD3_DISvbarpNC3pi"] = AllSyst.at(33);
239  shiftlabels["PD3_DISvbarnCC0pi"] = AllSyst.at(34);
240  shiftlabels["PD3_DISvbarnCC1pi"] = AllSyst.at(35);
241  shiftlabels["PD3_DISvbarnCC2pi"] = AllSyst.at(36);
242  shiftlabels["PD3_DISvbarnCC3pi"] = AllSyst.at(37);
243  shiftlabels["PD3_DISvbarnNC0pi"] = AllSyst.at(38);
244  shiftlabels["PD3_DISvbarnNC1pi"] = AllSyst.at(39);
245  shiftlabels["PD3_DISvbarnNC2pi"] = AllSyst.at(40);
246  shiftlabels["PD3_DISvbarnNC3pi"] = AllSyst.at(41);
247  shiftlabels["PD3_RadCorrNue"] = AllSyst.at(42);
248  shiftlabels["PD3_RadCorrNuebar"] = AllSyst.at(43);
249  shiftlabels["PD3_k2ndClassCurr"] = AllSyst.at(44);
250 
251  return shiftlabels;
252 
253 }
std::vector< const ISyst * > getAllXsecSysts_2018()
Get master XSec syst list for 2018 analyses.