Nus18Systs.cxx
Go to the documentation of this file.
2 
3 #include "CAFAna/Systs/Systs.h"
4 #include "CAFAna/Vars/Vars.h"
5 #include "NuXAna/Vars/NusVars.h"
7 #include "Utilities/func/MathUtil.h"
8 
9 #include "TFile.h"
10 #include "TH1.h"
11 
12 #include <cassert>
13 #include <cmath>
14 #include <iostream>
15 
16 namespace ana
17 {
18  // Base -----------------------------------
19  const Nus18BaseSyst kNus18BaseBeamSyst ("Beam18", "All Beam");
20  const Nus18BaseSyst kNus18BaseKaonSyst ("Kaon18", "Kaon");
21  const Nus18BaseSyst kNus18BaseNeutronSyst ("Neutron18", "Neutron");
22  const Nus18BaseSyst kNus18BaseTauSyst ("TauScale18", "Tau");
23  const Nus18BaseSyst kNus18BaseCherenkovSyst ("Cherenkov18", "Cherenkov");
24  const Nus18BaseSyst kNus18BaseCalibFlatSyst ("CalFlat18", "Flat miscalibration");
25  const Nus18BaseSyst kNus18BaseCalibShapeSyst("CalShape18", "Calibration shape");
26  const Nus18BaseSyst kNus18BaseCalibRelSyst ("CalRelFD18", "Relative detector calibration");
27  const Nus18BaseSyst kNus18BaseGENIEGenSyst ("GENIEg18", "GENIE general syst");
28  const Nus18BaseSyst kNus18BaseGENIENOvASyst ("GENIEn18", "GENIE NOvA specific syst");
29  const Nus18BaseSyst kNus18BaseLightLSyst ("CalLight18", "Light level syst");
30  const Nus18BaseSyst kNus18BaseXSecOnOffSyst ("XSecOnOff18", "Cross-section On/Off");
31  const Nus18BaseSyst kNus18BaseOscPUnivSyst ("FDOscPUniv18", "FD oscillation parameters");
32  const Nus18BaseSyst kNus18BaseTauUnivSyst ("TauNDUniv18", "Tau ND");
33  const Nus18BaseSyst kNus18BaseNueUnivSyst ("NueNDUniv18", "Nue ND");
34  const Nus18BaseSyst kNus18BasePPFXSyst ("PPFX18", "PPFX syst");
35  const Nus18BaseSyst kNus18BaseNormNDSyst ("NormND18", "ND normalisation syst");
36  const Nus18BaseSyst kNus18BaseNormFDSyst ("NormFD18", "FD normalisation syst");
37 
38  // GENIE individual
39  const Nus18BaseSyst kNus18BaseGENIEMaNCRESSyst ("MaNCRES18", "GENIE MaNCRES");
40  const Nus18BaseSyst kNus18BaseGENIEFormZoneSyst ("FormZone18", "GENIE FormZone");
41  const Nus18BaseSyst kNus18BaseGENIEMaCOHpiSyst ("MaCOHpi18", "GENIE MaCOHpi");
42  const Nus18BaseSyst kNus18BaseGENIER0COHpiSyst ("R0COHpi18", "GENIE R0COHpi");
43  const Nus18BaseSyst kNus18BaseGENIEMANCELSyst ("MANCEL18", "GENIE MANCEL");
44  const Nus18BaseSyst kNus18BaseGENIEDISvbarnNC3piSyst("DISvbarnNC3pi18", "GENIE DISvbarnNC3pi");
45  const Nus18BaseSyst kNus18BaseGENIEDISvbarpNC2piSyst("DISvbarpNC2pi18", "GENIE DISvbarpNC2pi");
46  const Nus18BaseSyst kNus18BaseGENIEDISvnCC0piSyst ("DISvnCC0pi18", "GENIE DISvnCC0pi");
47  const Nus18BaseSyst kNus18BaseGENIERadCorrNueSyst ("RadCorrNue18", "GENIE RadCorrNue");
48  const Nus18BaseSyst kNus18BaseGENIEDISvbarpNC3piSyst("DISvbarpNC3pi18", "GENIE DISvbarpNC3pi");
49  const Nus18BaseSyst kNus18BaseGENIEDISvbarpNC1piSyst("DISvbarpNC1pi18", "GENIE DISvbarpNC1pi");
50  const Nus18BaseSyst kNus18BaseGENIEDISvbarpCC0piSyst("DISvbarpCC0pi18", "GENIE DISvbarpCC0pi");
51  const Nus18BaseSyst kNus18BaseGENIEDISvnNC1piSyst ("DISvnNC1pi18", "GENIE DISvnNC1pi");
52  const Nus18BaseSyst kNus18BaseGENIEDISvnNC2piSyst ("DISvnNC2pi18", "GENIE DISvnNC2pi");
53  const Nus18BaseSyst kNus18BaseGENIEDISvnNC3piSyst ("DISvnNC3pi18", "GENIE DISvnNC3pi");
54  const Nus18BaseSyst kNus18BaseGENIEMvNCRESSyst ("MvNCRES18", "GENIE MvNCRES");
55  const Nus18BaseSyst kNus18BaseGENIEDISvpNC0piSyst ("DISvpNC0pi18", "GENIE DISvpNC0pi");
56  const Nus18BaseSyst kNus18BaseGENIEDISvpNC1piSyst ("DISvpNC1pi18", "GENIE DISvpNC1pi");
57  const Nus18BaseSyst kNus18BaseGENIEDISvpNC3piSyst ("DISvpNC3pi18", "GENIE DISvpNC3pi");
58  // GENIE background dominated
59  const Nus18BaseSyst kNus18BaseGENIEMaCCRESSyst ("MaCCRES18", "GENIE MaCCRES");
60  const Nus18BaseSyst kNus18BaseGENIEMvCCRESSyst ("MvCCRES18", "GENIE MvCCRES");
61  const Nus18BaseSyst kNus18BaseGENIERPARESSyst ("RPARES18", "GENIE RPARES");
62  const Nus18BaseSyst kNus18BaseGENIEMECEShapeNuSyst ("MECEShapeNu18", "GENIE MECEShapeNu");
63  const Nus18BaseSyst kNus18BaseGENIEMFPpiSyst ("MFPpi18", "GENIE MFPpi");
64  const Nus18BaseSyst kNus18BaseGENIEBhBYSyst ("BhtBY18", "GENIE BhtBY");
65 
66  // FHC -----------------------------------
67  const Nus18SystFromHist kNus18FHCFDBeamSyst (kNusAna18FHCSystFile, "FD", "FHC", "Beam18", "All Beam");
68  const Nus18SystFromHist kNus18FHCFDKaonSyst (kNusAna18FHCSystFile, "FD", "FHC", "Kaon18", "Kaon");
69  const Nus18SystFromHist kNus18FHCFDNeutronSyst (kNusAna18FHCSystFile, "FD", "FHC", "Neutron18", "Neutron");
70  const Nus18SystFromHist kNus18FHCFDTauSyst (kNusAna18FHCSystFile, "FD", "FHC", "TauScale18", "Tau scale");
71  const Nus18SystFromHist kNus18FHCFDCherenkovSyst (kNusAna18FHCSystFile, "FD", "FHC", "Cherenkov18", "Cherenkov");
72  const Nus18SystFromHist kNus18FHCFDCalibFlatSyst (kNusAna18FHCSystFile, "FD", "FHC", "CalFlat18", "Flat Miscalibration");
73  const Nus18SystFromHist kNus18FHCFDCalibShapeSyst(kNusAna18FHCSystFile, "FD", "FHC", "CalShape18", "Calibration shape");
74  const Nus18SystFromHist kNus18FHCFDGENIEGenSyst (kNusAna18FHCSystFile, "FD", "FHC", "GENIEg18", "GENIE General Systs");
75  const Nus18SystFromHist kNus18FHCFDGENIENOvASyst (kNusAna18FHCSystFile, "FD", "FHC", "GENIEn18", "GENIE NOvA Specific Systs");
76  const Nus18SystFromHist kNus18FHCFDLightLSyst (kNusAna18FHCSystFile, "FD", "FHC", "CalLight18", "Light Level syst");
77  const Nus18SystFromHist kNus18FHCFDXSecOnOffSyst (kNusAna18FHCSystFile, "FD", "FHC", "XSecOnOff18", "Cross-section On/Off");
78  const Nus18SystFromHist kNus18FHCFDOscPUnivSyst (kNusAna18FHCSystFile, "FD", "FHC", "FDOscPUniv18", "FD oscillation parameters");
79  const Nus18FlatSyst kNus18FHCFDTauUnivSyst ("TauNDUniv18", "Tau ND", "FD", "FHC", 0., 0.);
80  const Nus18FlatSyst kNus18FHCFDNueUnivSyst ("NueNDUniv18", "Nue ND", "FD", "FHC", 0., 0.);
81  const Nus18FlatSyst kNus18FHCFDNormNDSyst ("NormND18","Normalisation ND", "FD", "FHC", 0, 0);
82  const Nus18FlatSyst kNus18FHCFDNormFDSyst ("NormFD18","Normalisation FD", "FD", "FHC", 1.5, 1.5);
83  // GENIE individual
84  const Nus18SystFromHist kNus18FHCFDGENIEMaNCRESSyst (kNusAna18FHCSystFile, "FD", "FHC", "MaNCRES18", "GENIE MaNCRES");
85  const Nus18SystFromHist kNus18FHCFDGENIEFormZoneSyst (kNusAna18FHCSystFile, "FD", "FHC", "FormZone18", "GENIE FormZone");
86  const Nus18SystFromHist kNus18FHCFDGENIEMaCOHpiSyst (kNusAna18FHCSystFile, "FD", "FHC", "MaCOHpi18", "GENIE MaCOHpi");
87  const Nus18SystFromHist kNus18FHCFDGENIER0COHpiSyst (kNusAna18FHCSystFile, "FD", "FHC", "R0COHpi18", "GENIE R0COHpi");
88  const Nus18SystFromHist kNus18FHCFDGENIEMANCELSyst (kNusAna18FHCSystFile, "FD", "FHC", "MANCEL18", "GENIE MANCEL");
89  const Nus18SystFromHist kNus18FHCFDGENIEDISvnNC1piSyst(kNusAna18FHCSystFile, "FD", "FHC", "DISvnNC1pi18", "GENIE DISvnNC1pi");
90  const Nus18SystFromHist kNus18FHCFDGENIEDISvnNC2piSyst(kNusAna18FHCSystFile, "FD", "FHC", "DISvnNC2pi18", "GENIE DISvnNC2pi");
91  const Nus18SystFromHist kNus18FHCFDGENIEDISvnNC3piSyst(kNusAna18FHCSystFile, "FD", "FHC", "DISvnNC3pi18", "GENIE DISvnNC3pi");
92  const Nus18SystFromHist kNus18FHCFDGENIEMvNCRESSyst (kNusAna18FHCSystFile, "FD", "FHC", "MvNCRES18", "GENIE MvNCRES");
93  const Nus18SystFromHist kNus18FHCFDGENIEDISvpNC0piSyst(kNusAna18FHCSystFile, "FD", "FHC", "DISvpNC0pi18", "GENIE DISvpNC0pi");
94  const Nus18SystFromHist kNus18FHCFDGENIEDISvpNC1piSyst(kNusAna18FHCSystFile, "FD", "FHC", "DISvpNC1pi18", "GENIE DISvpNC1pi");
95  const Nus18SystFromHist kNus18FHCFDGENIEDISvpNC3piSyst(kNusAna18FHCSystFile, "FD", "FHC", "DISvpNC3pi18", "GENIE DISvpNC3pi");
96  // GENIE background dominated
97  const Nus18SystFromHist kNus18FHCFDGENIEMaCCRESSyst (kNusAna18FHCSystFile, "FD", "FHC","MaCCRES18", "GENIE MaCCRES");
98  const Nus18SystFromHist kNus18FHCFDGENIEMvCCRESSyst (kNusAna18FHCSystFile, "FD", "FHC","MvCCRES18", "GENIE MvCCRES");
99  const Nus18SystFromHist kNus18FHCFDGENIEMFPpiSyst (kNusAna18FHCSystFile, "FD", "FHC","MFPpi18", "GENIE MFPpi");
100  const Nus18SystFromHist kNus18FHCFDGENIEBhBYSyst (kNusAna18FHCSystFile, "FD", "FHC","BhtBY18", "GENIE BhtBY");
101 
102  const Nus18SystFromHist kNus18FHCNDBeamSyst (kNusAna18FHCSystFile, "ND", "FHC", "Beam18", "All Beam (ND)");
103  const Nus18SystFromHist kNus18FHCNDKaonSyst (kNusAna18FHCSystFile, "ND", "FHC", "Kaon18", "Kaon (ND)");
104  const Nus18SystFromHist kNus18FHCNDNeutronSyst (kNusAna18FHCSystFile, "ND", "FHC", "Neutron18", "Neutron (ND)");
105  const Nus18FlatSyst kNus18FHCNDTauSyst ("TauScale18", "Tau Scale (ND)", "ND", "FHC", 0., 0.);
106  const Nus18SystFromHist kNus18FHCNDCherenkovSyst (kNusAna18FHCSystFile, "ND", "FHC", "Cherenkov18", "Cherenkov (ND)");
107  const Nus18SystFromHist kNus18FHCNDCalibFlatSyst (kNusAna18FHCSystFile, "ND", "FHC", "CalFlat18", "Flat Miscalibration (ND)");
108  const Nus18SystFromHist kNus18FHCNDCalibShapeSyst(kNusAna18FHCSystFile, "ND", "FHC", "CalShape18", "Calibration shape (ND)");
109  const Nus18SystFromHist kNus18FHCNDGENIEGenSyst (kNusAna18FHCSystFile, "ND", "FHC", "GENIEg18", "GENIE General Systs (ND)");
110  const Nus18SystFromHist kNus18FHCNDGENIENOvASyst (kNusAna18FHCSystFile, "ND", "FHC", "GENIEn18", "GENIE NOvA Specific Systs (ND)");
111  const Nus18SystFromHist kNus18FHCNDLightLSyst (kNusAna18FHCSystFile, "ND", "FHC", "CalLight18", "Light Level syst (ND)");
112  const Nus18SystFromHist kNus18FHCNDXSecOnOffSyst (kNusAna18FHCSystFile, "ND", "FHC", "XSecOnOff18", "Cross-section On/Off");
113  const Nus18FlatSyst kNus18FHCNDOscPUnivSyst ("FDOscPUniv18", "FD oscillation parameters", "ND", "FHC", 0., 0.);
114  const Nus18SystFromHist kNus18FHCNDTauUnivSyst (kNusAna18FHCSystFile, "ND", "FHC", "TauNDUniv18", "Tau ND");
115  const Nus18SystFromHist kNus18FHCNDNueUnivSyst (kNusAna18FHCSystFile, "ND", "FHC", "NueNDUniv18", "Nue ND");
116  const Nus18FlatSyst kNus18FHCNDNormNDSyst ("NormND18", "Normalisation ND", "ND", "FHC", 1.5, 1.5);
117  const Nus18FlatSyst kNus18FHCNDNormFDSyst ("NormFD18", "Normalisation FD", "ND", "FHC", 0, 0);
118 
119  // GENIE individual
120  const Nus18SystFromHist kNus18FHCNDGENIEMaNCRESSyst (kNusAna18FHCSystFile, "ND", "FHC", "MaNCRES18", "GENIE MaNCRES");
121  const Nus18SystFromHist kNus18FHCNDGENIEFormZoneSyst (kNusAna18FHCSystFile, "ND", "FHC", "FormZone18", "GENIE FormZone");
122  const Nus18SystFromHist kNus18FHCNDGENIEMaCOHpiSyst (kNusAna18FHCSystFile, "ND", "FHC", "MaCOHpi18", "GENIE MaCOHpi");
123  const Nus18SystFromHist kNus18FHCNDGENIER0COHpiSyst (kNusAna18FHCSystFile, "ND", "FHC", "R0COHpi18", "GENIE R0COHpi");
124  const Nus18SystFromHist kNus18FHCNDGENIEMANCELSyst (kNusAna18FHCSystFile, "ND", "FHC", "MANCEL18", "GENIE MANCEL");
125  const Nus18SystFromHist kNus18FHCNDGENIEDISvnNC1piSyst(kNusAna18FHCSystFile, "ND", "FHC", "DISvnNC1pi18", "GENIE DISvnNC1pi");
126  const Nus18SystFromHist kNus18FHCNDGENIEDISvnNC2piSyst(kNusAna18FHCSystFile, "ND", "FHC", "DISvnNC2pi18", "GENIE DISvnNC2pi");
127  const Nus18SystFromHist kNus18FHCNDGENIEDISvnNC3piSyst(kNusAna18FHCSystFile, "ND", "FHC", "DISvnNC3pi18", "GENIE DISvnNC3pi");
128  const Nus18SystFromHist kNus18FHCNDGENIEMvNCRESSyst (kNusAna18FHCSystFile, "ND", "FHC", "MvNCRES18", "GENIE MvNCRES");
129  const Nus18SystFromHist kNus18FHCNDGENIEDISvpNC0piSyst(kNusAna18FHCSystFile, "ND", "FHC", "DISvpNC0pi18", "GENIE DISvpNC0pi");
130  const Nus18SystFromHist kNus18FHCNDGENIEDISvpNC1piSyst(kNusAna18FHCSystFile, "ND", "FHC", "DISvpNC1pi18", "GENIE DISvpNC1pi");
131  const Nus18SystFromHist kNus18FHCNDGENIEDISvpNC3piSyst(kNusAna18FHCSystFile, "ND", "FHC", "DISvpNC3pi18", "GENIE DISvpNC3pi");
132  // GENIE background dominated
133  const Nus18SystFromHist kNus18FHCNDGENIEMaCCRESSyst (kNusAna18FHCSystFile, "ND", "FHC","MaCCRES18", "GENIE MaCCRES");
134  const Nus18SystFromHist kNus18FHCNDGENIEMvCCRESSyst (kNusAna18FHCSystFile, "ND", "FHC","MvCCRES18", "GENIE MvCCRES");
135  const Nus18SystFromHist kNus18FHCNDGENIEMFPpiSyst (kNusAna18FHCSystFile, "ND", "FHC","MFPpi18", "GENIE MFPpi");
136  const Nus18SystFromHist kNus18FHCNDGENIEBhBYSyst (kNusAna18FHCSystFile, "ND", "FHC","BhtBY18", "GENIE BhtBY");
137 
138  // Systematics applied as flat shifts
139  const Nus18FlatSyst kNus18FHCNDPPFXSyst("PPFX18", "Fluxweight ND", "ND", "FHC", 8.56, 8.78);
140  const Nus18FlatSyst kNus18FHCFDPPFXSyst("PPFX18", "Fluxweight FD", "FD", "FHC", 9.04, 11.8);
141 
142  // RHC -----------------------------------
143  const Nus18SystFromHist kNus18RHCFDBeamSyst (kNusAna18RHCSystFile, "FD", "RHC", "Beam18", "All Beam");
144  const Nus18SystFromHist kNus18RHCFDKaonSyst (kNusAna18RHCSystFile, "FD", "RHC", "Kaon18", "Kaon");
145  const Nus18SystFromHist kNus18RHCFDNeutronSyst (kNusAna18RHCSystFile, "FD", "RHC", "Neutron18", "Neutron");
146  const Nus18SystFromHist kNus18RHCFDTauSyst (kNusAna18RHCSystFile, "FD", "RHC", "TauScale18", "Tau scale");
147  const Nus18SystFromHist kNus18RHCFDCherenkovSyst (kNusAna18RHCSystFile, "FD", "RHC", "Cherenkov18", "Cherenkov");
148  const Nus18SystFromHist kNus18RHCFDCalibFlatSyst (kNusAna18RHCSystFile, "FD", "RHC", "CalFlat18", "Flat Miscalibration");
149  const Nus18SystFromHist kNus18RHCFDCalibShapeSyst(kNusAna18RHCSystFile, "FD", "RHC", "CalShape18", "Calibration shape");
150  const Nus18SystFromHist kNus18RHCFDGENIEGenSyst (kNusAna18RHCSystFile, "FD", "RHC", "GENIEg18", "GENIE General Systs");
151  const Nus18SystFromHist kNus18RHCFDGENIENOvASyst (kNusAna18RHCSystFile, "FD", "RHC", "GENIEn18", "GENIE NOvA Specific Systs");
152  const Nus18SystFromHist kNus18RHCFDLightLSyst (kNusAna18RHCSystFile, "FD", "RHC", "CalLight18", "Light Level syst");
153  const Nus18SystFromHist kNus18RHCFDXSecOnOffSyst (kNusAna18RHCSystFile, "FD", "RHC", "XSecOnOff18", "Cross-section On/Off");
154  const Nus18SystFromHist kNus18RHCFDOscPUnivSyst (kNusAna18RHCSystFile, "FD", "RHC", "FDOscPUniv18","Oscillation parameters");
155  // const Nus18FlatSyst kNus18RHCFDNormSyst ("Norm18","Normalisation FD", "FD", "RHC",0.69,0.69);
156 
157  // GENIE individual
158  const Nus18SystFromHist kNus18RHCFDGENIEMaNCRESSyst (kNusAna18RHCSystFile, "FD", "RHC", "MaNCRES18", "GENIE MaNCRES");
159  const Nus18SystFromHist kNus18RHCFDGENIEFormZoneSyst (kNusAna18RHCSystFile, "FD", "RHC", "FormZone18", "GENIE FormZone");
160  const Nus18SystFromHist kNus18RHCFDGENIEMaCOHpiSyst (kNusAna18RHCSystFile, "FD", "RHC", "MaCOHpi18", "GENIE MaCOHpi");
161  const Nus18SystFromHist kNus18RHCFDGENIER0COHpiSyst (kNusAna18RHCSystFile, "FD", "RHC", "R0COHpi18", "GENIE R0COHpi");
162  const Nus18SystFromHist kNus18RHCFDGENIEMANCELSyst (kNusAna18RHCSystFile, "FD", "RHC", "MANCEL18", "GENIE MANCEL");
163  const Nus18SystFromHist kNus18RHCFDGENIEDISvbarnNC3piSyst(kNusAna18RHCSystFile, "FD", "RHC", "DISvbarnNC3pi18", "GENIE DISvbarnNC3pi");
164  const Nus18SystFromHist kNus18RHCFDGENIEDISvbarpNC2piSyst(kNusAna18RHCSystFile, "FD", "RHC", "DISvbarpNC2pi18", "GENIE DISvbarpNC2pi");
165  const Nus18SystFromHist kNus18RHCFDGENIEDISvnCC0piSyst (kNusAna18RHCSystFile, "FD", "RHC", "DISvnCC0pi18", "GENIE DISvnCC0pi");
166  const Nus18SystFromHist kNus18RHCFDGENIERadCorrNueSyst (kNusAna18RHCSystFile, "FD", "RHC", "RadCorrNue18", "GENIE RadCorrNue");
167  const Nus18SystFromHist kNus18RHCFDGENIEDISvbarpNC3piSyst(kNusAna18RHCSystFile, "FD", "RHC", "DISvbarpNC3pi18", "GENIE DISvbarpNC3pi");
168  const Nus18SystFromHist kNus18RHCFDGENIEDISvbarpNC1piSyst(kNusAna18RHCSystFile, "FD", "RHC", "DISvbarpNC1pi18", "GENIE DISvbarpNC1pi");
169  const Nus18SystFromHist kNus18RHCFDGENIEDISvbarpCC0piSyst(kNusAna18RHCSystFile, "FD", "RHC", "DISvbarpCC0pi18", "GENIE DISvbarpCC0pi");
170  // GENIE background dominated
171  const Nus18SystFromHist kNus18RHCFDGENIEMaCCRESSyst (kNusAna18RHCSystFile, "FD", "RHC", "MaCCRES18", "GENIE MaCCRES");
172  const Nus18SystFromHist kNus18RHCFDGENIEMvCCRESSyst (kNusAna18RHCSystFile, "FD", "RHC", "MvCCRES18", "GENIE MvCCRES");
173  const Nus18SystFromHist kNus18RHCFDGENIERPARESSyst (kNusAna18RHCSystFile, "FD", "RHC", "RPARES18", "GENIE RPARES");
174  const Nus18SystFromHist kNus18RHCFDGENIEMECEShapeNuSyst (kNusAna18RHCSystFile, "FD", "RHC", "MECEShapeNu18", "GENIE MECEShapeNu");
175 
176  const Nus18SystFromHist kNus18RHCNDBeamSyst (kNusAna18RHCSystFile, "ND", "RHC", "Beam18", "All Beam (ND)");
177  const Nus18SystFromHist kNus18RHCNDKaonSyst (kNusAna18RHCSystFile, "ND", "RHC", "Kaon18", "Kaon (ND)");
178  const Nus18SystFromHist kNus18RHCNDNeutronSyst (kNusAna18RHCSystFile, "ND", "RHC", "Neutron18", "Neutron (ND)");
179  const Nus18FlatSyst kNus18RHCNDTauSyst ("TauScale18", "Tau Scale (ND)", "ND", "RHC", 0., 0.);
180  const Nus18SystFromHist kNus18RHCNDCherenkovSyst (kNusAna18RHCSystFile, "ND", "RHC", "Cherenkov18", "Cherenkov (ND)");
181  const Nus18SystFromHist kNus18RHCNDCalibFlatSyst (kNusAna18RHCSystFile, "ND", "RHC", "CalFlat18", "Flat Miscalibration (ND)");
182  const Nus18SystFromHist kNus18RHCNDCalibShapeSyst(kNusAna18RHCSystFile, "ND", "RHC", "CalShape18", "Calibration shape (ND)");
183  const Nus18SystFromHist kNus18RHCNDGENIEGenSyst (kNusAna18RHCSystFile, "ND", "RHC", "GENIEg18", "GENIE General Systs (ND)");
184  const Nus18SystFromHist kNus18RHCNDGENIENOvASyst (kNusAna18RHCSystFile, "ND", "RHC", "GENIEn18", "GENIE NOvA Specific Systs (ND)");
185  const Nus18SystFromHist kNus18RHCNDLightLSyst (kNusAna18RHCSystFile, "ND", "RHC", "CalLight18", "Light Level syst (ND)");
186  const Nus18SystFromHist kNus18RHCNDXSecOnOffSyst (kNusAna18RHCSystFile, "ND", "RHC", "XSecOnOff18", "Cross-section On/Off");
187  const Nus18FlatSyst kNus18RHCNDOscPUnivSyst ("FDOscPUniv18", "FD oscillation parameters", "ND", "RHC", 0., 0.);
188  // const Nus18FlatSyst kNus18RHCNDNormSyst ("Norm18","Normalisation ND", "ND", "RHC",0.69,0.69);
189  // GENIE individual
190  const Nus18SystFromHist kNus18RHCNDGENIEMaNCRESSyst (kNusAna18RHCSystFile, "ND", "RHC", "MaNCRES18", "GENIE MaNCRES");
191  const Nus18SystFromHist kNus18RHCNDGENIEFormZoneSyst (kNusAna18RHCSystFile, "ND", "RHC", "FormZone18", "GENIE FormZone");
192  const Nus18SystFromHist kNus18RHCNDGENIEMaCOHpiSyst (kNusAna18RHCSystFile, "ND", "RHC", "MaCOHpi18", "GENIE MaCOHpi");
193  const Nus18SystFromHist kNus18RHCNDGENIER0COHpiSyst (kNusAna18RHCSystFile, "ND", "RHC", "R0COHpi18", "GENIE R0COHpi");
194  const Nus18SystFromHist kNus18RHCNDGENIEMANCELSyst (kNusAna18RHCSystFile, "ND", "RHC", "MANCEL18", "GENIE MANCEL");
195  const Nus18SystFromHist kNus18RHCNDGENIEDISvbarnNC3piSyst(kNusAna18RHCSystFile, "ND", "RHC", "DISvbarnNC3pi18", "GENIE DISvbarnNC3pi");
196  const Nus18SystFromHist kNus18RHCNDGENIEDISvbarpNC2piSyst(kNusAna18RHCSystFile, "ND", "RHC", "DISvbarpNC2pi18", "GENIE DISvbarpNC2pi");
197  const Nus18SystFromHist kNus18RHCNDGENIEDISvnCC0piSyst (kNusAna18RHCSystFile, "ND", "RHC", "DISvnCC0pi18", "GENIE DISvnCC0pi");
198  const Nus18SystFromHist kNus18RHCNDGENIERadCorrNueSyst (kNusAna18RHCSystFile, "ND", "RHC", "RadCorrNue18", "GENIE RadCorrNue");
199  const Nus18SystFromHist kNus18RHCNDGENIEDISvbarpNC3piSyst(kNusAna18RHCSystFile, "ND", "RHC", "DISvbarpNC3pi18", "GENIE DISvbarpNC3pi");
200  const Nus18SystFromHist kNus18RHCNDGENIEDISvbarpNC1piSyst(kNusAna18RHCSystFile, "ND", "RHC", "DISvbarpNC1pi18", "GENIE DISvbarpNC1pi");
201  const Nus18SystFromHist kNus18RHCNDGENIEDISvbarpCC0piSyst(kNusAna18RHCSystFile, "ND", "RHC", "DISvbarpCC0pi18", "GENIE DISvbarpCC0pi");
202  // GENIE background dominated
203  const Nus18SystFromHist kNus18RHCNDGENIEMaCCRESSyst (kNusAna18RHCSystFile, "ND", "RHC", "MaCCRES18", "GENIE MaCCRES");
204  const Nus18SystFromHist kNus18RHCNDGENIEMvCCRESSyst (kNusAna18RHCSystFile, "ND", "RHC", "MvCCRES18", "GENIE MvCCRES");
205  const Nus18SystFromHist kNus18RHCNDGENIERPARESSyst (kNusAna18RHCSystFile, "ND", "RHC", "RPARES18", "GENIE RPARES");
206  const Nus18SystFromHist kNus18RHCNDGENIEMECEShapeNuSyst (kNusAna18RHCSystFile, "ND", "RHC", "MECEShapeNu18", "GENIE MECEShapeNu");
207 
208  const Nus18SystFromHist kNus18RHCEXBeamSyst (kNusAna18RHCExtrapSystFile, "EX", "RHC", "Beam18", "All Beam");
209  const Nus18SystFromHist kNus18RHCEXKaonSyst (kNusAna18RHCExtrapSystFile, "EX", "RHC", "Kaon18", "Kaon");
210  const Nus18SystFromHist kNus18RHCEXNeutronSyst (kNusAna18RHCExtrapSystFile, "EX", "RHC", "Neutron18", "Neutron");
211  const Nus18SystFromHist kNus18RHCEXTauSyst (kNusAna18RHCExtrapSystFile, "EX", "RHC", "TauScale18", "Tau");
212  const Nus18SystFromHist kNus18RHCEXCherenkovSyst (kNusAna18RHCExtrapSystFile, "EX", "RHC", "Cherenkov18", "Cherenkov");
213  const Nus18SystFromHist kNus18RHCEXCalibFlatSyst (kNusAna18RHCExtrapSystFile, "EX", "RHC", "CalFlat18", "Flat Miscalibration");
214  const Nus18SystFromHist kNus18RHCEXCalibShapeSyst(kNusAna18RHCExtrapSystFile, "EX", "RHC", "CalShape18", "Calibration shape");
215  const Nus18SystFromHist kNus18RHCEXCalibRelSyst (kNusAna18RHCExtrapSystFile, "EX", "RHC", "CalRelFD18", "Relative detector calibration");
216  const Nus18SystFromHist kNus18RHCEXGENIEGenSyst (kNusAna18RHCExtrapSystFile, "EX", "RHC", "GENIEg18", "GENIE General Systs");
217  const Nus18SystFromHist kNus18RHCEXGENIENOvASyst (kNusAna18RHCExtrapSystFile, "EX", "RHC", "GENIEn18", "GENIE NOvA Specific Systs");
218  const Nus18SystFromHist kNus18RHCEXLightLSyst (kNusAna18RHCExtrapSystFile, "EX", "RHC", "CalLight18", "Light Level syst");
219  const Nus18SystFromHist kNus18RHCEXXSecOnOffSyst (kNusAna18RHCExtrapSystFile, "EX", "RHC", "XSecOnOff18", "Cross-section On/Off");
220 
221  const Nus18FlatSyst kNus18RHCNDPPFXSyst("PPFX18", "Fluxweight ND", "ND", "RHC", 11.7, 11.4);
222  const Nus18FlatSyst kNus18RHCFDPPFXSyst("PPFX18", "Fluxweight FD", "FD", "RHC", 11.3, 11.2);
223  const Nus18FlatSyst kNus18RHCEXPPFXSyst("PPFX18", "Fluxweight EX", "EX", "RHC", 1.33, 4.63);
224  const Nus18FlatSyst kNus18RHCEXNormSyst("Norm18","Normalisation EX", "EX", "RHC",0.69,0.69);
225 
226  //----------------------------------------------------------------------
228  const std::string &det,
229  const std::string &polarity,
230  const std::string &systname,
231  const std::string &latexname)
232  : ISyst(std::string(polarity)+std::string("_")+std::string(det)+std::string("_")+systname, latexname),
233  fFileName(fname),
234  fDet(det),
235  fPolarity(polarity) {
236  }
237 
238  //----------------------------------------------------------------------
240  }
241 
242  //----------------------------------------------------------------------
244 
245  // Someone already called us
246  if (!fHists.empty())
247  return;
248 
249  TFile fin(fFileName.c_str(), "read");
250  if (fin.IsZombie()) {
251  std::cout << "Warning: couldn't open " << fFileName
252  << ". Crashing" << std::endl;
253  abort();
254  }
255 
256  std::vector<std::string> channels = {"NC", "BG"};
257 
258  const std::vector<int> sigmas = {-1, 0, +1};
259  const std::vector<std::string> sigstr = {"-1", "0", "+1"};
260 
261  for (int i_chan = 0; i_chan < (int)channels.size(); ++i_chan) {
262  std::vector< std::pair<int,TH1D*> > curHists;
263 
264  TString systShortName(ShortName().c_str());
265  TObjArray* systShortNames = systShortName.Tokenize("_");
266 
267  for(int i_sig = 0; i_sig < (int)sigmas.size(); ++i_sig) {
268  // Find histogram for given NusChannel at given sigma
269  std::string hName = TString::Format("h%s_%s_%s_%s",
270  channels[i_chan].c_str(),
271  fDet.c_str(),
272  ((TObjString*)systShortNames->At(2))->GetString().Data(),
273  sigstr[i_sig].c_str()).Data();
274  TH1D* h = (TH1D*)fin.Get(hName.c_str());
275  if (!h) {
276  // Surely it's a bad thing if we can't find nom, +-1 sigma hists
277  std::cout << "Error: can't find necessary " << hName
278  << " histogram in file " << fFileName
279  << ". Crashing" << std::endl;
280  abort();
281  }
282 
283  h->SetDirectory(0);
284  curHists.emplace_back(sigmas[i_sig], h);
285  }
286 
287  fHists.push_back(curHists);
288 
289  }
290  }
291 
292  //----------------------------------------------------------------------
294  if (sr->mc.nnu == 0)
295  return NusChannel::kNC;
296  if (!sr->mc.nu[0].iscc)
297  return NusChannel::kNC;
298  if (sr->mc.nu[0].iscc)
299  return NusChannel::kBG;
300  assert(0 && "Unknown Oscillation Channel");
301  }
302 
303  //----------------------------------------------------------------------
305  double sigma,
306  double calE) const {
307  LoadHists();
308 
309  const int bin = fHists[chan][0].second->FindBin(calE);
310 
311  int LowIdx = 0;
312  if (sigma < fHists[chan].front().first)
313  LowIdx = 0;
314  else if (sigma >= fHists[chan].back().first)
315  LowIdx = fHists[chan].size()-2;
316  else {
317  for (int i = 0; i < (int)fHists[chan].size()-1; i++){
318  if (sigma >= fHists[chan][i].first){
319  LowIdx = i;
320  break;
321  }
322  }
323  }
324 
325  // Why would we have templates differing by more than 1 sigma?
326  // fracpart below assumes this
327  assert(fHists[chan][LowIdx+1].first - fHists[chan][LowIdx].first == 1);
328 
329  const double fracpart = sigma - fHists[chan][LowIdx].first;
330  const double ret = fracpart* fHists[chan][LowIdx+1].second->GetBinContent(bin) +
331  (1-fracpart)*fHists[chan][LowIdx] .second->GetBinContent(bin);
332 
333  return std::max(0., ret); // Keep the LL from blowing up
334  }
335 
336  //----------------------------------------------------------------------
338  caf::SRProxy* sr, double& weight) const {
339 
340  if(sr->hdr.det == caf::kFARDET &&
341  fDet.compare("FD") != 0 &&
342  fDet.compare("EX") != 0) { return; }
343  if(sr->hdr.det == caf::kNEARDET &&
344  fDet.compare("ND") != 0) { return; }
345 
346  // Find the energy estimate for this slice
347  double calE = kNus18Energy(sr);
348 
349  // Find the signal or background oscillation channel
351 
352  weight *= WeightFor(chan, sigma, calE);
353 
354  }
355 
356  //----------------------------------------------------------------------
358  const std::string &latexname,
359  const std::string &det,
360  const std::string &polarity,
361  const double& ncWei,
362  const double& bgWei)
363  : ISyst(std::string(polarity)+std::string("_")+std::string(det)+std::string("_")+systname, latexname),
364  fNCWei(ncWei/100.),
365  fBGWei(bgWei/100.),
366  fDet(det),
367  fPolarity(polarity) {
368  }
369 
370  //----------------------------------------------------------------------
372  }
373 
374  //----------------------------------------------------------------------
376  caf::SRProxy* sr, double& weight) const {
377 
378  // Takes in output from extrap - only shift FD spectra
379  if(sr->hdr.det == caf::kFARDET &&
380  fDet.compare("FD") != 0) { return; }
381  if(sr->hdr.det == caf::kNEARDET &&
382  fDet.compare("ND") != 0) { return; }
383 
384  if(sr->mc.nnu == 0) return;
385  if(sigma == 0) return;
386 
387  weight *= ((sr->mc.nu[0].iscc) ?
388  1. + fBGWei*sigma :
389  1. + fNCWei*sigma);
390 
391  return;
392 
393  }
394 
395  //----------------------------------------------------------------------
397  const std::string& latexname)
398  : ISyst(shortname,latexname)
399  {
400  }
401 
402  //----------------------------------------------------------------------
404  {
405  }
406 
407  //----------------------------------------------------------------------
409  caf::SRProxy* sr, double& weight) const {
410  weight = 1;
411  return;
412  }
413 
414  //----------------------------------------------------------------------
415  void GetSystType(std::string syst_type, bool &use_xsec,
416  bool &use_nonxsec)
417  {
418  if (syst_type == "xsec") {
419  use_xsec = true;
420  use_nonxsec = false;
421  }
422  else if (syst_type == "nonxsec") {
423  use_xsec = false;
424  use_nonxsec = true;
425  }
426  else if (syst_type == "all") {
427  use_xsec = true;
428  use_nonxsec = true;
429  }
430  else if (syst_type == "none") {
431  use_xsec = false;
432  use_nonxsec = false;
433  }
434  else throw std::runtime_error("Syst type \"" + syst_type
435  + "\" not recognised.");
436  }
437 
438  //----------------------------------------------------------------------
439  std::vector<const ISyst*> GetNus18Systs(bool rhc, std::string det_type,
440  std::string syst_type)
441  {
442  std::vector<const ISyst*> systs;
443 
444  if (det_type == "base") systs = GetNus18BaseSysts(rhc, syst_type);
445  else if (det_type == "nd") {
446  if (rhc) systs = GetNus18RHCNDSysts(syst_type);
447  else systs = GetNus18FHCNDSysts(syst_type);
448  }
449  else if (det_type == "fd") {
450  if (rhc) systs = GetNus18RHCFDSysts(syst_type);
451  else systs = GetNus18FHCFDSysts(syst_type);
452  }
453  else throw std::runtime_error("Detector type \"" + det_type
454  + "\" not recognised! Must be \"nd\", \"fd\" or \"base\".");
455 
456  return systs;
457  }
458 
459  //----------------------------------------------------------------------
460  std::vector<const ISyst*> GetNus18BaseSysts(bool rhc,
461  std::string syst_type)
462  {
463  bool use_xsec, use_nonxsec;
464  GetSystType(syst_type, use_xsec, use_nonxsec);
465 
466  std::vector<const ISyst*> systs;
467 
468  if (use_nonxsec) {
469  systs.push_back(&kNus18BaseBeamSyst);
470  systs.push_back(&kNus18BaseKaonSyst);
471  systs.push_back(&kNus18BaseNeutronSyst);
472  systs.push_back(&kNus18BaseTauSyst);
473  systs.push_back(&kNus18BaseGENIEGenSyst);
474  systs.push_back(&kNus18BaseGENIENOvASyst);
475  systs.push_back(&kNus18BaseCherenkovSyst);
476  systs.push_back(&kNus18BaseCalibFlatSyst);
477  systs.push_back(&kNus18BaseCalibShapeSyst);
478  // systs.push_back(&kNus18BasePPFXSyst);
479  systs.push_back(&kNus18BaseLightLSyst);
480  systs.push_back(&kNus18BaseXSecOnOffSyst);
481  systs.push_back(&kNus18BaseOscPUnivSyst);
482  systs.push_back(&kNus18BaseNormNDSyst);
483  systs.push_back(&kNus18BaseNormFDSyst);
484  }
485  if (rhc) {
486  if (use_xsec) {
487  systs.push_back(&kNus18BaseGENIEMaNCRESSyst);
488  systs.push_back(&kNus18BaseGENIEFormZoneSyst);
489  systs.push_back(&kNus18BaseGENIEMaCOHpiSyst);
490  systs.push_back(&kNus18BaseGENIER0COHpiSyst);
491  systs.push_back(&kNus18BaseGENIEMANCELSyst);
492  systs.push_back(&kNus18BaseGENIEDISvbarnNC3piSyst);
493  systs.push_back(&kNus18BaseGENIEDISvbarpNC2piSyst);
494  systs.push_back(&kNus18BaseGENIEDISvnCC0piSyst);
495  systs.push_back(&kNus18BaseGENIERadCorrNueSyst);
496  systs.push_back(&kNus18BaseGENIEDISvbarpNC3piSyst);
497  systs.push_back(&kNus18BaseGENIEDISvbarpNC1piSyst);
498  systs.push_back(&kNus18BaseGENIEDISvbarpCC0piSyst);
499  systs.push_back(&kNus18BaseGENIEMaCCRESSyst);
500  systs.push_back(&kNus18BaseGENIEMvCCRESSyst);
501  systs.push_back(&kNus18BaseGENIEMECEShapeNuSyst);
502  systs.push_back(&kNus18BaseGENIERPARESSyst);
503  }
504  } else {
505  if (use_xsec) {
506  systs.push_back(&kNus18BaseGENIEMaNCRESSyst);
507  systs.push_back(&kNus18BaseGENIEFormZoneSyst);
508  systs.push_back(&kNus18BaseGENIEMaCOHpiSyst);
509  systs.push_back(&kNus18BaseGENIER0COHpiSyst);
510  systs.push_back(&kNus18BaseGENIEMANCELSyst);
511  systs.push_back(&kNus18BaseGENIEDISvnNC1piSyst);
512  systs.push_back(&kNus18BaseGENIEDISvnNC2piSyst);
513  systs.push_back(&kNus18BaseGENIEDISvnNC3piSyst);
514  systs.push_back(&kNus18BaseGENIEMvNCRESSyst);
515  systs.push_back(&kNus18BaseGENIEDISvpNC0piSyst);
516  systs.push_back(&kNus18BaseGENIEDISvpNC1piSyst);
517  systs.push_back(&kNus18BaseGENIEDISvpNC3piSyst);
518  systs.push_back(&kNus18BaseGENIEBhBYSyst);
519  systs.push_back(&kNus18BaseGENIEMFPpiSyst);
520  systs.push_back(&kNus18BaseGENIEMaCCRESSyst);
521  systs.push_back(&kNus18BaseGENIEMvCCRESSyst);
522  }
523  if (use_nonxsec) {
524  systs.push_back(&kNus18BaseTauUnivSyst);
525  systs.push_back(&kNus18BaseNueUnivSyst);
526  }
527 
528  }
529 
530  return systs;
531  }
532 
533  //----------------------------------------------------------------------
534  std::vector<const ISyst*> GetNus18FHCNDSysts(std::string syst_type) {
535 
536  bool use_xsec, use_nonxsec;
537  GetSystType(syst_type, use_xsec, use_nonxsec);
538 
539  std::vector<const ISyst*> systs;
540 
541  if (use_nonxsec) {
542  systs.push_back(&kNus18FHCNDBeamSyst);
543  systs.push_back(&kNus18FHCNDKaonSyst);
544  systs.push_back(&kNus18FHCNDNeutronSyst);
545  systs.push_back(&kNus18FHCNDTauSyst);
546  systs.push_back(&kNus18FHCNDGENIEGenSyst);
547  systs.push_back(&kNus18FHCNDGENIENOvASyst);
548  systs.push_back(&kNus18FHCNDCherenkovSyst);
549  systs.push_back(&kNus18FHCNDCalibFlatSyst);
550  systs.push_back(&kNus18FHCNDCalibShapeSyst);
551  // systs.push_back(&kNus18FHCNDPPFXSyst);
552  systs.push_back(&kNus18FHCNDLightLSyst);
553  systs.push_back(&kNus18FHCNDOscPUnivSyst);
554  systs.push_back(&kNus18FHCNDXSecOnOffSyst);
555  systs.push_back(&kNus18FHCNDNueUnivSyst);
556  systs.push_back(&kNus18FHCNDTauUnivSyst);
557  systs.push_back(&kNus18FHCNDNormNDSyst);
558  systs.push_back(&kNus18FHCNDNormFDSyst);
559  }
560 
561  if (use_xsec) {
562  systs.push_back(&kNus18FHCNDGENIEMaNCRESSyst);
563  systs.push_back(&kNus18FHCNDGENIEFormZoneSyst);
564  systs.push_back(&kNus18FHCNDGENIEMaCOHpiSyst);
565  systs.push_back(&kNus18FHCNDGENIER0COHpiSyst);
566  systs.push_back(&kNus18FHCNDGENIEMANCELSyst);
567  systs.push_back(&kNus18FHCNDGENIEDISvnNC1piSyst);
568  systs.push_back(&kNus18FHCNDGENIEDISvnNC2piSyst);
569  systs.push_back(&kNus18FHCNDGENIEDISvnNC3piSyst);
570  systs.push_back(&kNus18FHCNDGENIEMvNCRESSyst);
571  systs.push_back(&kNus18FHCNDGENIEDISvpNC0piSyst);
572  systs.push_back(&kNus18FHCNDGENIEDISvpNC1piSyst);
573  systs.push_back(&kNus18FHCNDGENIEDISvpNC3piSyst);
574  systs.push_back(&kNus18FHCNDGENIEBhBYSyst);
575  systs.push_back(&kNus18FHCNDGENIEMFPpiSyst);
576  systs.push_back(&kNus18FHCNDGENIEMaCCRESSyst);
577  systs.push_back(&kNus18FHCNDGENIEMvCCRESSyst);
578  }
579 
580  return systs;
581  }
582 
583  //----------------------------------------------------------------------
584  std::vector<const ISyst*> GetNus18RHCNDSysts(std::string syst_type) {
585 
586  bool use_xsec, use_nonxsec;
587  GetSystType(syst_type, use_xsec, use_nonxsec);
588 
589  std::vector<const ISyst*> systs;
590 
591  if (use_nonxsec) {
592  systs.push_back(&kNus18RHCNDBeamSyst);
593  systs.push_back(&kNus18RHCNDKaonSyst);
594  systs.push_back(&kNus18RHCNDNeutronSyst);
595  systs.push_back(&kNus18RHCNDGENIEGenSyst);
596  systs.push_back(&kNus18RHCNDGENIENOvASyst);
597  systs.push_back(&kNus18RHCNDCherenkovSyst);
598  systs.push_back(&kNus18RHCNDCalibFlatSyst);
599  systs.push_back(&kNus18RHCNDCalibShapeSyst);
600  systs.push_back(&kNus18RHCNDPPFXSyst);
601  systs.push_back(&kNus18RHCNDLightLSyst);
602  systs.push_back(&kNus18RHCNDOscPUnivSyst);
603  systs.push_back(&kNus18RHCNDXSecOnOffSyst);
604  // systs.push_back(&kNus18RHCNDNormSyst);
605  }
606 
607  if (use_xsec) {
608  systs.push_back(&kNus18RHCNDGENIEMaNCRESSyst);
609  systs.push_back(&kNus18RHCNDGENIEFormZoneSyst);
610  systs.push_back(&kNus18RHCNDGENIEMaCOHpiSyst);
611  systs.push_back(&kNus18RHCNDGENIER0COHpiSyst);
612  systs.push_back(&kNus18RHCNDGENIEMANCELSyst);
613  systs.push_back(&kNus18RHCNDGENIEDISvbarnNC3piSyst);
614  systs.push_back(&kNus18RHCNDGENIEDISvbarpNC2piSyst);
615  systs.push_back(&kNus18RHCNDGENIEDISvnCC0piSyst);
616  systs.push_back(&kNus18RHCNDGENIERadCorrNueSyst);
617  systs.push_back(&kNus18RHCNDGENIEDISvbarpNC3piSyst);
618  systs.push_back(&kNus18RHCNDGENIEDISvbarpNC1piSyst);
619  systs.push_back(&kNus18RHCNDGENIEDISvbarpCC0piSyst);
620  systs.push_back(&kNus18RHCNDGENIERPARESSyst);
621  systs.push_back(&kNus18RHCNDGENIEMECEShapeNuSyst);
622  systs.push_back(&kNus18RHCNDGENIEMaCCRESSyst);
623  systs.push_back(&kNus18RHCNDGENIEMvCCRESSyst);
624  }
625 
626  return systs;
627  }
628 
629  //----------------------------------------------------------------------
630  std::vector<const ISyst*> GetNus18FHCFDSysts(std::string syst_type) {
631 
632  bool use_xsec, use_nonxsec;
633  GetSystType(syst_type, use_xsec, use_nonxsec);
634 
635  std::vector<const ISyst*> systs;
636 
637  if (use_nonxsec) {
638  systs.push_back(&kNus18FHCFDBeamSyst);
639  systs.push_back(&kNus18FHCFDKaonSyst);
640  systs.push_back(&kNus18FHCFDNeutronSyst);
641  systs.push_back(&kNus18FHCFDTauSyst);
642  systs.push_back(&kNus18FHCFDGENIEGenSyst);
643  systs.push_back(&kNus18FHCFDGENIENOvASyst);
644  systs.push_back(&kNus18FHCFDCherenkovSyst);
645  systs.push_back(&kNus18FHCFDCalibFlatSyst);
646  systs.push_back(&kNus18FHCFDCalibShapeSyst);
647  // systs.push_back(&kNus18FHCFDPPFXSyst);
648  systs.push_back(&kNus18FHCFDLightLSyst);
649  systs.push_back(&kNus18FHCFDOscPUnivSyst);
650  systs.push_back(&kNus18FHCFDXSecOnOffSyst);
651  systs.push_back(&kNus18FHCFDNueUnivSyst);
652  systs.push_back(&kNus18FHCFDTauUnivSyst);
653  systs.push_back(&kNus18FHCFDNormNDSyst);
654  systs.push_back(&kNus18FHCFDNormFDSyst);
655  }
656 
657  if (use_xsec) {
658  systs.push_back(&kNus18FHCFDGENIEMaNCRESSyst);
659  systs.push_back(&kNus18FHCFDGENIEFormZoneSyst);
660  systs.push_back(&kNus18FHCFDGENIEMaCOHpiSyst);
661  systs.push_back(&kNus18FHCFDGENIER0COHpiSyst);
662  systs.push_back(&kNus18FHCFDGENIEMANCELSyst);
663  systs.push_back(&kNus18FHCFDGENIEDISvnNC1piSyst);
664  systs.push_back(&kNus18FHCFDGENIEDISvnNC2piSyst);
665  systs.push_back(&kNus18FHCFDGENIEDISvnNC3piSyst);
666  systs.push_back(&kNus18FHCFDGENIEMvNCRESSyst);
667  systs.push_back(&kNus18FHCFDGENIEDISvpNC0piSyst);
668  systs.push_back(&kNus18FHCFDGENIEDISvpNC1piSyst);
669  systs.push_back(&kNus18FHCFDGENIEDISvpNC3piSyst);
670  systs.push_back(&kNus18FHCFDGENIEBhBYSyst);
671  systs.push_back(&kNus18FHCFDGENIEMFPpiSyst);
672  systs.push_back(&kNus18FHCFDGENIEMaCCRESSyst);
673  systs.push_back(&kNus18FHCFDGENIEMvCCRESSyst);
674  }
675 
676  return systs;
677  }
678 
679  //----------------------------------------------------------------------
680  std::vector<const ISyst*> GetNus18RHCFDSysts(std::string syst_type) {
681 
682  bool use_xsec, use_nonxsec;
683  GetSystType(syst_type, use_xsec, use_nonxsec);
684 
685  std::vector<const ISyst*> systs;
686 
687  if (use_nonxsec) {
688  systs.push_back(&kNus18RHCFDBeamSyst);
689  systs.push_back(&kNus18RHCFDKaonSyst);
690  systs.push_back(&kNus18RHCFDNeutronSyst);
691  systs.push_back(&kNus18RHCFDTauSyst);
692  systs.push_back(&kNus18RHCFDGENIEGenSyst);
693  systs.push_back(&kNus18RHCFDGENIENOvASyst);
694  systs.push_back(&kNus18RHCFDCherenkovSyst);
695  systs.push_back(&kNus18RHCFDCalibFlatSyst);
696  systs.push_back(&kNus18RHCFDCalibShapeSyst);
697  systs.push_back(&kNus18RHCFDPPFXSyst);
698  systs.push_back(&kNus18RHCFDLightLSyst);
699  systs.push_back(&kNus18RHCFDOscPUnivSyst);
700  systs.push_back(&kNus18RHCFDXSecOnOffSyst);
701  // systs.push_back(&kNus18RHCFDNormSyst);
702  }
703 
704  if (use_xsec) {
705  systs.push_back(&kNus18RHCFDGENIEMaNCRESSyst);
706  systs.push_back(&kNus18RHCFDGENIEFormZoneSyst);
707  systs.push_back(&kNus18RHCFDGENIEMaCOHpiSyst);
708  systs.push_back(&kNus18RHCFDGENIER0COHpiSyst);
709  systs.push_back(&kNus18RHCFDGENIEMANCELSyst);
710  systs.push_back(&kNus18RHCFDGENIEDISvbarnNC3piSyst);
711  systs.push_back(&kNus18RHCFDGENIEDISvbarpNC2piSyst);
712  systs.push_back(&kNus18RHCFDGENIEDISvnCC0piSyst);
713  systs.push_back(&kNus18RHCFDGENIERadCorrNueSyst);
714  systs.push_back(&kNus18RHCFDGENIEDISvbarpNC3piSyst);
715  systs.push_back(&kNus18RHCFDGENIEDISvbarpNC1piSyst);
716  systs.push_back(&kNus18RHCFDGENIEDISvbarpCC0piSyst);
717  systs.push_back(&kNus18RHCFDGENIERPARESSyst);
718  systs.push_back(&kNus18RHCFDGENIEMECEShapeNuSyst);
719  systs.push_back(&kNus18RHCFDGENIEMaCCRESSyst);
720  systs.push_back(&kNus18RHCFDGENIEMvCCRESSyst);
721  }
722 
723  return systs;
724  }
725 
726  //----------------------------------------------------------------------
727  std::vector<const ISyst*> GetNus18RHCExtrapSysts() {
728 
729  std::vector<const ISyst*> systs;
730 
731  systs.push_back(&kNus18RHCEXBeamSyst);
732  systs.push_back(&kNus18RHCEXKaonSyst);
733  systs.push_back(&kNus18RHCEXNeutronSyst);
734  systs.push_back(&kNus18RHCEXTauSyst);
735  systs.push_back(&kNus18RHCEXGENIEGenSyst);
736  systs.push_back(&kNus18RHCEXGENIENOvASyst);
737  systs.push_back(&kNus18RHCEXCherenkovSyst);
738  systs.push_back(&kNus18RHCEXCalibFlatSyst);
739  systs.push_back(&kNus18RHCEXCalibShapeSyst);
740  systs.push_back(&kNus18RHCEXCalibRelSyst);
741  systs.push_back(&kNus18RHCEXPPFXSyst);
742  systs.push_back(&kNus18RHCEXLightLSyst);
743  systs.push_back(&kNus18RHCEXXSecOnOffSyst);
744  systs.push_back(&kNus18RHCEXNormSyst);
745  return systs;
746  }
747 
748 } // namespace
749 
const Nus18BaseSyst kNus18BaseGENIEDISvnCC0piSyst("DISvnCC0pi18","GENIE DISvnCC0pi")
Definition: Nus18Systs.h:297
std::vector< const ISyst * > GetNus18BaseSysts(bool rhc, std::string syst_type)
Definition: Nus18Systs.cxx:460
Near Detector underground.
Definition: SREnums.h:10
T max(const caf::Proxy< T > &a, T b)
const Nus18BaseSyst kNus18BaseGENIEGenSyst("GENIEg18","GENIE general syst")
Definition: Nus18Systs.h:171
TString fin
Definition: Style.C:24
const Nus18SystFromHist kNus18RHCEXCalibShapeSyst(kNusAna18RHCExtrapSystFile,"EX","RHC","CalShape18","Calibration shape")
Definition: Nus18Systs.h:168
double WeightFor(NusChannel chan, double sigma, double nueenergy) const
Definition: Nus18Systs.cxx:304
const Nus18BaseSyst kNus18BaseGENIEMFPpiSyst("MFPpi18","GENIE MFPpi")
Definition: Nus18Systs.h:375
const Nus18SystFromHist kNus18RHCFDNeutronSyst(kNusAna18RHCSystFile,"FD","RHC","Neutron18","Neutron")
Definition: Nus18Systs.h:127
std::vector< const ISyst * > GetNus18FHCFDSysts(std::string syst_type)
Definition: Nus18Systs.cxx:630
const Nus18SystFromHist kNus18RHCEXGENIEGenSyst(kNusAna18RHCExtrapSystFile,"EX","RHC","GENIEg18","GENIE General Systs")
Definition: Nus18Systs.h:176
const Nus18SystFromHist kNus18FHCNDGENIENOvASyst(kNusAna18FHCSystFile,"ND","FHC","GENIEn18","GENIE NOvA Specific Systs (ND)")
Definition: Nus18Systs.h:180
const Nus18FlatSyst kNus18FHCFDNormFDSyst("NormFD18","Normalisation FD","FD","FHC", 1.5, 1.5)
Definition: Nus18Systs.h:276
Far Detector at Ash River.
Definition: SREnums.h:11
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
const Var kNus18Energy([](const caf::SRProxy *sr){bool h_FHC=sr->spill.isFHC;bool h_RHC=sr->spill.isRHC;double cale=sr->slc.calE;double recoE=0.;if(h_FHC &&sr->hdr.det==caf::kFARDET) recoE=FDscaleCalE18 *cale;else if(h_FHC &&sr->hdr.det==caf::kNEARDET) recoE=NDscaleCalE18 *cale;else if(h_RHC &&sr->hdr.det==caf::kFARDET) recoE=FDscaleCalE18RHC *cale;else if(h_RHC &&sr->hdr.det==caf::kNEARDET) recoE=NDscaleCalE18RHC *cale;return recoE;})
Definition: NusVars.h:63
const Nus18BaseSyst kNus18BaseGENIEMECEShapeNuSyst("MECEShapeNu18","GENIE MECEShapeNu")
Definition: Nus18Systs.h:374
const Nus18SystFromHist kNus18RHCNDGENIEDISvbarpNC2piSyst(kNusAna18RHCSystFile,"ND","RHC","DISvbarpNC2pi18","GENIE DISvbarpNC2pi")
Definition: Nus18Systs.h:351
const Nus18BaseSyst kNus18BaseGENIEMaCOHpiSyst("MaCOHpi18","GENIE MaCOHpi")
Definition: Nus18Systs.h:292
const Nus18SystFromHist kNus18FHCNDNueUnivSyst(kNusAna18FHCSystFile,"ND","FHC","NueNDUniv18","Nue ND")
Definition: Nus18Systs.h:220
Nus18SystFromHist(const std::string &fname, const std::string &det, const std::string &polarity, const std::string &systname, const std::string &latexname)
Definition: Nus18Systs.cxx:227
std::vector< SystGroupDef > systs
Definition: syst_header.h:385
void LoadHists() const
Definition: Nus18Systs.cxx:243
const Nus18SystFromHist kNus18RHCFDGENIERPARESSyst(kNusAna18RHCSystFile,"FD","RHC","RPARES18","GENIE RPARES")
Definition: Nus18Systs.h:388
const Nus18FlatSyst kNus18RHCEXNormSyst("Norm18","Normalisation EX","EX","RHC", 0.69, 0.69)
const Nus18SystFromHist kNus18RHCFDGENIEMECEShapeNuSyst(kNusAna18RHCSystFile,"FD","RHC","MECEShapeNu18","GENIE MECEShapeNu")
Definition: Nus18Systs.h:392
const Nus18SystFromHist kNus18FHCFDGENIEMaCCRESSyst(kNusAna18FHCSystFile,"FD","FHC","MaCCRES18","GENIE MaCCRES")
Definition: Nus18Systs.h:380
const Nus18BaseSyst kNus18BaseGENIEDISvbarpNC2piSyst("DISvbarpNC2pi18","GENIE DISvbarpNC2pi")
Definition: Nus18Systs.h:296
const Nus18BaseSyst kNus18BaseGENIEDISvpNC1piSyst("DISvpNC1pi18","GENIE DISvpNC1pi")
Definition: Nus18Systs.h:307
const Nus18SystFromHist kNus18RHCFDGENIER0COHpiSyst(kNusAna18RHCSystFile,"FD","RHC","R0COHpi18","GENIE R0COHpi")
Definition: Nus18Systs.h:336
virtual const std::string & ShortName() const final
The name printed out to the screen.
Definition: ISyst.h:27
const Nus18SystFromHist kNus18FHCNDCherenkovSyst(kNusAna18FHCSystFile,"ND","FHC","Cherenkov18","Cherenkov (ND)")
Definition: Nus18Systs.h:140
const Var weight
const Nus18BaseSyst kNus18BaseGENIEDISvbarpNC3piSyst("DISvbarpNC3pi18","GENIE DISvbarpNC3pi")
Definition: Nus18Systs.h:299
const Nus18SystFromHist kNus18RHCNDGENIEDISvbarpNC3piSyst(kNusAna18RHCSystFile,"ND","RHC","DISvbarpNC3pi18","GENIE DISvbarpNC3pi")
Definition: Nus18Systs.h:354
const Nus18SystFromHist kNus18FHCNDGENIEDISvnNC1piSyst(kNusAna18FHCSystFile,"ND","FHC","DISvnNC1pi18","GENIE DISvnNC1pi")
Definition: Nus18Systs.h:326
const Nus18FlatSyst kNus18FHCNDNormFDSyst("NormFD18","Normalisation FD","ND","FHC", 0, 0)
Definition: Nus18Systs.h:275
const Nus18SystFromHist kNus18RHCEXTauSyst(kNusAna18RHCExtrapSystFile,"EX","RHC","TauScale18","Tau")
Definition: Nus18Systs.h:136
caf::Proxy< caf::SRHeader > hdr
Definition: SRProxy.h:2004
const Nus18SystFromHist kNus18FHCFDGENIEDISvpNC3piSyst(kNusAna18FHCSystFile,"FD","FHC","DISvpNC3pi18","GENIE DISvpNC3pi")
Definition: Nus18Systs.h:320
const Nus18BaseSyst kNus18BaseGENIEDISvnNC1piSyst("DISvnNC1pi18","GENIE DISvnNC1pi")
Definition: Nus18Systs.h:302
Proxy for caf::StandardRecord.
Definition: SRProxy.h:1993
const Nus18BaseSyst kNus18BaseNormFDSyst("NormFD18","FD normalisation syst")
Definition: Nus18Systs.h:274
const Nus18BaseSyst kNus18BaseXSecOnOffSyst("XSecOnOff18","Cross-section On/Off")
Definition: Nus18Systs.h:282
caf::Proxy< std::vector< caf::SRNeutrino > > nu
Definition: SRProxy.h:570
const Nus18SystFromHist kNus18RHCNDGENIER0COHpiSyst(kNusAna18RHCSystFile,"ND","RHC","R0COHpi18","GENIE R0COHpi")
Definition: Nus18Systs.h:348
const Nus18FlatSyst kNus18RHCFDPPFXSyst("PPFX18","Fluxweight FD","FD","RHC", 11.3, 11.2)
Definition: Nus18Systs.h:262
const Nus18SystFromHist kNus18FHCNDGENIEDISvnNC2piSyst(kNusAna18FHCSystFile,"ND","FHC","DISvnNC2pi18","GENIE DISvnNC2pi")
Definition: Nus18Systs.h:327
const Nus18SystFromHist kNus18FHCFDGENIEDISvpNC1piSyst(kNusAna18FHCSystFile,"FD","FHC","DISvpNC1pi18","GENIE DISvpNC1pi")
Definition: Nus18Systs.h:319
const Nus18SystFromHist kNus18RHCFDGENIEMaCCRESSyst(kNusAna18RHCSystFile,"FD","RHC","MaCCRES18","GENIE MaCCRES")
Definition: Nus18Systs.h:378
string fFileName
Definition: nue_pid_effs.C:43
const Nus18FlatSyst kNus18FHCFDTauUnivSyst("TauNDUniv18","Tau ND","FD","FHC", 0., 0.)
Definition: Nus18Systs.h:229
const Nus18SystFromHist kNus18RHCNDKaonSyst(kNusAna18RHCSystFile,"ND","RHC","Kaon18","Kaon (ND)")
Definition: Nus18Systs.h:118
const Nus18SystFromHist kNus18RHCEXCherenkovSyst(kNusAna18RHCExtrapSystFile,"EX","RHC","Cherenkov18","Cherenkov")
Definition: Nus18Systs.h:144
void Shift(double sigma, caf::SRProxy *sr, double &weight) const override
Perform the systematic shift.
Definition: Nus18Systs.cxx:375
const Nus18SystFromHist kNus18RHCNDGENIEMaCOHpiSyst(kNusAna18RHCSystFile,"ND","RHC","MaCOHpi18","GENIE MaCOHpi")
Definition: Nus18Systs.h:347
caf::Proxy< short int > nnu
Definition: SRProxy.h:569
const Nus18BaseSyst kNus18BaseGENIER0COHpiSyst("R0COHpi18","GENIE R0COHpi")
Definition: Nus18Systs.h:293
const Nus18SystFromHist kNus18FHCNDTauUnivSyst(kNusAna18FHCSystFile,"ND","FHC","TauNDUniv18","Tau ND")
Definition: Nus18Systs.h:228
const Nus18SystFromHist kNus18FHCNDGENIEMaNCRESSyst(kNusAna18FHCSystFile,"ND","FHC","MaNCRES18","GENIE MaNCRES")
Definition: Nus18Systs.h:321
const Nus18SystFromHist kNus18FHCNDCalibFlatSyst(kNusAna18FHCSystFile,"ND","FHC","CalFlat18","Flat Miscalibration (ND)")
Definition: Nus18Systs.h:148
const Nus18SystFromHist kNus18FHCFDGENIEMaCOHpiSyst(kNusAna18FHCSystFile,"FD","FHC","MaCOHpi18","GENIE MaCOHpi")
Definition: Nus18Systs.h:311
const Nus18BaseSyst kNus18BaseCalibShapeSyst("CalShape18","Calibration shape")
Definition: Nus18Systs.h:163
const std::string kNusAna18FHCSystFile
Definition: Nus18Systs.h:97
std::vector< const ISyst * > GetNus18RHCFDSysts(std::string syst_type)
Definition: Nus18Systs.cxx:680
std::vector< std::vector< std::pair< int, TH1D * > > > fHists
Definition: Nus18Systs.h:63
const Nus18SystFromHist kNus18RHCNDGENIERPARESSyst(kNusAna18RHCSystFile,"ND","RHC","RPARES18","GENIE RPARES")
Definition: Nus18Systs.h:387
Encapsulate code to systematically shift a caf::SRProxy.
Definition: ISyst.h:14
const Nus18BaseSyst kNus18BaseCalibRelSyst("CalRelFD18","Relative detector calibration")
Definition: Nus18Systs.h:155
const Nus18SystFromHist kNus18RHCNDLightLSyst(kNusAna18RHCSystFile,"ND","RHC","CalLight18","Light Level syst (ND)")
Definition: Nus18Systs.h:190
const Nus18SystFromHist kNus18RHCFDCalibShapeSyst(kNusAna18RHCSystFile,"FD","RHC","CalShape18","Calibration shape")
Definition: Nus18Systs.h:167
const Nus18SystFromHist kNus18FHCNDKaonSyst(kNusAna18FHCSystFile,"ND","FHC","Kaon18","Kaon (ND)")
Definition: Nus18Systs.h:116
const Nus18SystFromHist kNus18RHCFDBeamSyst(kNusAna18RHCSystFile,"FD","RHC","Beam18","All Beam")
Definition: Nus18Systs.h:111
const Nus18SystFromHist kNus18FHCFDGENIEMaNCRESSyst(kNusAna18FHCSystFile,"FD","FHC","MaNCRES18","GENIE MaNCRES")
Definition: Nus18Systs.h:309
const Nus18BaseSyst kNus18BaseGENIEMvNCRESSyst("MvNCRES18","GENIE MvNCRES")
Definition: Nus18Systs.h:305
const Nus18SystFromHist kNus18RHCFDGENIEGenSyst(kNusAna18RHCSystFile,"FD","RHC","GENIEg18","GENIE General Systs")
Definition: Nus18Systs.h:175
Nus18BaseSyst(const std::string &shortname, const std::string &latexname)
Definition: Nus18Systs.cxx:396
const Nus18SystFromHist kNus18RHCFDGENIERadCorrNueSyst(kNusAna18RHCSystFile,"FD","RHC","RadCorrNue18","GENIE RadCorrNue")
Definition: Nus18Systs.h:341
const Nus18SystFromHist kNus18RHCFDGENIEMvCCRESSyst(kNusAna18RHCSystFile,"FD","RHC","MvCCRES18","GENIE MvCCRES")
Definition: Nus18Systs.h:382
std::vector< const ISyst * > GetNus18RHCNDSysts(std::string syst_type)
Definition: Nus18Systs.cxx:584
const Nus18SystFromHist kNus18RHCNDGENIEDISvbarpCC0piSyst(kNusAna18RHCSystFile,"ND","RHC","DISvbarpCC0pi18","GENIE DISvbarpCC0pi")
Definition: Nus18Systs.h:356
const Nus18SystFromHist kNus18FHCFDGENIEMFPpiSyst(kNusAna18FHCSystFile,"FD","FHC","MFPpi18","GENIE MFPpi")
Definition: Nus18Systs.h:394
const Nus18SystFromHist kNus18RHCFDGENIEDISvbarnNC3piSyst(kNusAna18RHCSystFile,"FD","RHC","DISvbarnNC3pi18","GENIE DISvbarnNC3pi")
Definition: Nus18Systs.h:338
const Nus18FlatSyst kNus18FHCFDPPFXSyst("PPFX18","Fluxweight FD","FD","FHC", 9.04, 11.8)
Definition: Nus18Systs.h:260
const Nus18BaseSyst kNus18BaseGENIEMANCELSyst("MANCEL18","GENIE MANCEL")
Definition: Nus18Systs.h:294
const Nus18SystFromHist kNus18RHCNDXSecOnOffSyst(kNusAna18RHCSystFile,"ND","RHC","XSecOnOff18","Cross-section On/Off")
Definition: Nus18Systs.h:285
const Nus18SystFromHist kNus18FHCFDTauSyst(kNusAna18FHCSystFile,"FD","FHC","TauScale18","Tau scale")
Definition: Nus18Systs.h:133
const Nus18SystFromHist kNus18RHCFDOscPUnivSyst(kNusAna18RHCSystFile,"FD","RHC","FDOscPUniv18","Oscillation parameters")
Definition: Nus18Systs.h:239
const Nus18SystFromHist kNus18FHCNDGENIEDISvpNC0piSyst(kNusAna18FHCSystFile,"ND","FHC","DISvpNC0pi18","GENIE DISvpNC0pi")
Definition: Nus18Systs.h:330
std::map< ToFCounter, std::vector< unsigned int > > channels
const Nus18BaseSyst kNus18BaseTauSyst("TauScale18","Tau")
Definition: Nus18Systs.h:131
const Nus18SystFromHist kNus18RHCFDGENIEDISvbarpNC3piSyst(kNusAna18RHCSystFile,"FD","RHC","DISvbarpNC3pi18","GENIE DISvbarpNC3pi")
Definition: Nus18Systs.h:342
const Nus18BaseSyst kNus18BaseGENIEDISvbarnNC3piSyst("DISvbarnNC3pi18","GENIE DISvbarnNC3pi")
Definition: Nus18Systs.h:295
const Nus18SystFromHist kNus18FHCNDGENIEMFPpiSyst(kNusAna18FHCSystFile,"ND","FHC","MFPpi18","GENIE MFPpi")
Definition: Nus18Systs.h:393
const Nus18SystFromHist kNus18RHCFDGENIEMANCELSyst(kNusAna18RHCSystFile,"FD","RHC","MANCEL18","GENIE MANCEL")
Definition: Nus18Systs.h:337
const Nus18SystFromHist kNus18RHCFDGENIEDISvbarpNC2piSyst(kNusAna18RHCSystFile,"FD","RHC","DISvbarpNC2pi18","GENIE DISvbarpNC2pi")
Definition: Nus18Systs.h:339
const Nus18SystFromHist kNus18RHCNDGENIENOvASyst(kNusAna18RHCSystFile,"ND","RHC","GENIEn18","GENIE NOvA Specific Systs (ND)")
Definition: Nus18Systs.h:182
const Nus18FlatSyst kNus18RHCNDOscPUnivSyst("FDOscPUniv18","FD oscillation parameters","ND","RHC", 0., 0.)
Definition: Nus18Systs.h:238
const Nus18BaseSyst kNus18BaseNeutronSyst("Neutron18","Neutron")
Definition: Nus18Systs.h:123
const Nus18SystFromHist kNus18FHCNDGENIEDISvnNC3piSyst(kNusAna18FHCSystFile,"ND","FHC","DISvnNC3pi18","GENIE DISvnNC3pi")
Definition: Nus18Systs.h:328
const Nus18SystFromHist kNus18RHCNDGENIEMECEShapeNuSyst(kNusAna18RHCSystFile,"ND","RHC","MECEShapeNu18","GENIE MECEShapeNu")
Definition: Nus18Systs.h:391
const Nus18SystFromHist kNus18FHCFDCherenkovSyst(kNusAna18FHCSystFile,"FD","FHC","Cherenkov18","Cherenkov")
Definition: Nus18Systs.h:141
const Nus18BaseSyst kNus18BaseCherenkovSyst("Cherenkov18","Cherenkov")
Definition: Nus18Systs.h:139
const Nus18SystFromHist kNus18FHCFDLightLSyst(kNusAna18FHCSystFile,"FD","FHC","CalLight18","Light Level syst")
Definition: Nus18Systs.h:189
const Nus18SystFromHist kNus18FHCNDGENIEDISvpNC1piSyst(kNusAna18FHCSystFile,"ND","FHC","DISvpNC1pi18","GENIE DISvpNC1pi")
Definition: Nus18Systs.h:331
const Nus18SystFromHist kNus18RHCNDNeutronSyst(kNusAna18RHCSystFile,"ND","RHC","Neutron18","Neutron (ND)")
Definition: Nus18Systs.h:126
const Nus18SystFromHist kNus18FHCFDNeutronSyst(kNusAna18FHCSystFile,"FD","FHC","Neutron18","Neutron")
Definition: Nus18Systs.h:125
const Nus18SystFromHist kNus18RHCNDGENIEFormZoneSyst(kNusAna18RHCSystFile,"ND","RHC","FormZone18","GENIE FormZone")
Definition: Nus18Systs.h:346
const Nus18SystFromHist kNus18FHCFDOscPUnivSyst(kNusAna18FHCSystFile,"FD","FHC","FDOscPUniv18","FD oscillation parameters")
Definition: Nus18Systs.h:237
const Nus18SystFromHist kNus18RHCNDGENIEMANCELSyst(kNusAna18RHCSystFile,"ND","RHC","MANCEL18","GENIE MANCEL")
Definition: Nus18Systs.h:349
const Nus18SystFromHist kNus18FHCFDGENIEFormZoneSyst(kNusAna18FHCSystFile,"FD","FHC","FormZone18","GENIE FormZone")
Definition: Nus18Systs.h:310
const Nus18SystFromHist kNus18RHCFDGENIEDISvbarpNC1piSyst(kNusAna18RHCSystFile,"FD","RHC","DISvbarpNC1pi18","GENIE DISvbarpNC1pi")
Definition: Nus18Systs.h:343
const Nus18BaseSyst kNus18BaseGENIEBhBYSyst("BhtBY18","GENIE BhtBY")
Definition: Nus18Systs.h:376
const Nus18BaseSyst kNus18BaseGENIEDISvnNC3piSyst("DISvnNC3pi18","GENIE DISvnNC3pi")
Definition: Nus18Systs.h:304
const Nus18BaseSyst kNus18BaseGENIEDISvbarpCC0piSyst("DISvbarpCC0pi18","GENIE DISvbarpCC0pi")
Definition: Nus18Systs.h:301
const Nus18BaseSyst kNus18BaseGENIERPARESSyst("RPARES18","GENIE RPARES")
Definition: Nus18Systs.h:373
void GetSystType(std::string syst_type, bool &use_xsec, bool &use_nonxsec)
Definition: Nus18Systs.cxx:415
const Nus18SystFromHist kNus18FHCFDGENIENOvASyst(kNusAna18FHCSystFile,"FD","FHC","GENIEn18","GENIE NOvA Specific Systs")
Definition: Nus18Systs.h:181
const Nus18SystFromHist kNus18FHCNDGENIEMvNCRESSyst(kNusAna18FHCSystFile,"ND","FHC","MvNCRES18","GENIE MvNCRES")
Definition: Nus18Systs.h:329
const Nus18FlatSyst kNus18FHCNDOscPUnivSyst("FDOscPUniv18","FD oscillation parameters","ND","FHC", 0., 0.)
Definition: Nus18Systs.h:236
const Nus18SystFromHist kNus18FHCFDGENIEDISvnNC2piSyst(kNusAna18FHCSystFile,"FD","FHC","DISvnNC2pi18","GENIE DISvnNC2pi")
Definition: Nus18Systs.h:315
std::string fDet
Definition: Nus18Systs.h:81
const Nus18SystFromHist kNus18RHCFDGENIEMaNCRESSyst(kNusAna18RHCSystFile,"FD","RHC","MaNCRES18","GENIE MaNCRES")
Definition: Nus18Systs.h:333
const Nus18SystFromHist kNus18RHCEXBeamSyst(kNusAna18RHCExtrapSystFile,"EX","RHC","Beam18","All Beam")
Definition: Nus18Systs.h:112
const Nus18SystFromHist kNus18FHCFDGENIEMvNCRESSyst(kNusAna18FHCSystFile,"FD","FHC","MvNCRES18","GENIE MvNCRES")
Definition: Nus18Systs.h:317
const Nus18FlatSyst kNus18FHCFDNormNDSyst("NormND18","Normalisation ND","FD","FHC", 0, 0)
Definition: Nus18Systs.h:268
const Nus18SystFromHist kNus18RHCFDGENIENOvASyst(kNusAna18RHCSystFile,"FD","RHC","GENIEn18","GENIE NOvA Specific Systs")
Definition: Nus18Systs.h:183
const Nus18SystFromHist kNus18RHCFDCalibFlatSyst(kNusAna18RHCSystFile,"FD","RHC","CalFlat18","Flat Miscalibration")
Definition: Nus18Systs.h:151
const Nus18BaseSyst kNus18BaseGENIERadCorrNueSyst("RadCorrNue18","GENIE RadCorrNue")
Definition: Nus18Systs.h:298
const Nus18SystFromHist kNus18FHCFDCalibFlatSyst(kNusAna18FHCSystFile,"FD","FHC","CalFlat18","Flat Miscalibration")
Definition: Nus18Systs.h:149
float bin[41]
Definition: plottest35.C:14
const Nus18SystFromHist kNus18FHCNDGENIEMaCCRESSyst(kNusAna18FHCSystFile,"ND","FHC","MaCCRES18","GENIE MaCCRES")
Definition: Nus18Systs.h:379
const std::string kNusAna18RHCExtrapSystFile
Definition: Nus18Systs.h:99
const Nus18SystFromHist kNus18FHCFDXSecOnOffSyst(kNusAna18FHCSystFile,"FD","FHC","XSecOnOff18","Cross-section On/Off")
Definition: Nus18Systs.h:284
const Nus18SystFromHist kNus18RHCEXCalibRelSyst(kNusAna18RHCExtrapSystFile,"EX","RHC","CalRelFD18","Relative detector calibration")
Definition: Nus18Systs.h:160
const Nus18BaseSyst kNus18BaseGENIEDISvpNC0piSyst("DISvpNC0pi18","GENIE DISvpNC0pi")
Definition: Nus18Systs.h:306
const Nus18SystFromHist kNus18RHCNDCalibShapeSyst(kNusAna18RHCSystFile,"ND","RHC","CalShape18","Calibration shape (ND)")
Definition: Nus18Systs.h:166
const Nus18SystFromHist kNus18FHCFDGENIEMvCCRESSyst(kNusAna18FHCSystFile,"FD","FHC","MvCCRES18","GENIE MvCCRES")
Definition: Nus18Systs.h:384
const Nus18BaseSyst kNus18BaseNormNDSyst("NormND18","ND normalisation syst")
Definition: Nus18Systs.h:266
double sigma(TH1F *hist, double percentile)
const Nus18BaseSyst kNus18BaseGENIEDISvpNC3piSyst("DISvpNC3pi18","GENIE DISvpNC3pi")
Definition: Nus18Systs.h:308
const Nus18SystFromHist kNus18FHCNDBeamSyst(kNusAna18FHCSystFile,"ND","FHC","Beam18","All Beam (ND)")
Definition: Nus18Systs.h:108
const Nus18BaseSyst kNus18BaseKaonSyst("Kaon18","Kaon")
Definition: Nus18Systs.h:115
OStream cout
Definition: OStream.cxx:6
const Nus18SystFromHist kNus18FHCFDGENIEMANCELSyst(kNusAna18FHCSystFile,"FD","FHC","MANCEL18","GENIE MANCEL")
Definition: Nus18Systs.h:313
const Nus18FlatSyst kNus18RHCEXPPFXSyst("PPFX18","Fluxweight EX","EX","RHC", 1.33, 4.63)
Definition: Nus18Systs.h:263
const Nus18SystFromHist kNus18RHCFDGENIEMaCOHpiSyst(kNusAna18RHCSystFile,"FD","RHC","MaCOHpi18","GENIE MaCOHpi")
Definition: Nus18Systs.h:335
const Nus18FlatSyst kNus18FHCFDNueUnivSyst("NueNDUniv18","Nue ND","FD","FHC", 0., 0.)
Definition: Nus18Systs.h:221
const Nus18SystFromHist kNus18FHCNDNeutronSyst(kNusAna18FHCSystFile,"ND","FHC","Neutron18","Neutron (ND)")
Definition: Nus18Systs.h:124
caf::Proxy< caf::SRTruthBranch > mc
Definition: SRProxy.h:2005
const Nus18BaseSyst kNus18BaseGENIEMaCCRESSyst("MaCCRES18","GENIE MaCCRES")
Definition: Nus18Systs.h:371
const Nus18SystFromHist kNus18FHCFDGENIEDISvnNC3piSyst(kNusAna18FHCSystFile,"FD","FHC","DISvnNC3pi18","GENIE DISvnNC3pi")
Definition: Nus18Systs.h:316
const Nus18SystFromHist kNus18RHCEXNeutronSyst(kNusAna18RHCExtrapSystFile,"EX","RHC","Neutron18","Neutron")
Definition: Nus18Systs.h:128
const Nus18FlatSyst kNus18FHCNDTauSyst("TauScale18","Tau Scale (ND)","ND","FHC", 0., 0.)
Definition: Nus18Systs.h:132
std::string fFileName
Definition: Nus18Systs.h:53
const Nus18BaseSyst kNus18BaseBeamSyst("Beam18","All Beam")
Definition: Nus18Systs.h:107
::xsd::cxx::tree::string< char, simple_type > string
Definition: Database.h:154
const Nus18SystFromHist kNus18FHCFDGENIEGenSyst(kNusAna18FHCSystFile,"FD","FHC","GENIEg18","GENIE General Systs")
Definition: Nus18Systs.h:173
const Nus18SystFromHist kNus18RHCNDGENIERadCorrNueSyst(kNusAna18RHCSystFile,"ND","RHC","RadCorrNue18","GENIE RadCorrNue")
Definition: Nus18Systs.h:353
const Nus18SystFromHist kNus18FHCNDXSecOnOffSyst(kNusAna18FHCSystFile,"ND","FHC","XSecOnOff18","Cross-section On/Off")
Definition: Nus18Systs.h:283
const Nus18SystFromHist kNus18RHCEXXSecOnOffSyst(kNusAna18RHCExtrapSystFile,"EX","RHC","XSecOnOff18","Cross-section On/Off")
Definition: Nus18Systs.h:287
std::vector< const ISyst * > GetNus18RHCExtrapSysts()
Definition: Nus18Systs.cxx:727
const Nus18SystFromHist kNus18FHCFDGENIER0COHpiSyst(kNusAna18FHCSystFile,"FD","FHC","R0COHpi18","GENIE R0COHpi")
Definition: Nus18Systs.h:312
const Nus18BaseSyst kNus18BaseNueUnivSyst("NueNDUniv18","Nue ND")
Definition: Nus18Systs.h:219
const Nus18SystFromHist kNus18FHCFDCalibShapeSyst(kNusAna18FHCSystFile,"FD","FHC","CalShape18","Calibration shape")
Definition: Nus18Systs.h:165
string GetString(xmlDocPtr xml_doc, string node_path)
const Nus18BaseSyst kNus18BaseGENIEDISvbarpNC1piSyst("DISvbarpNC1pi18","GENIE DISvbarpNC1pi")
Definition: Nus18Systs.h:300
NusChannel
Definition: NusSysts.h:13
const Nus18SystFromHist kNus18FHCNDGENIEMvCCRESSyst(kNusAna18FHCSystFile,"ND","FHC","MvCCRES18","GENIE MvCCRES")
Definition: Nus18Systs.h:383
const Nus18SystFromHist kNus18RHCNDGENIEDISvnCC0piSyst(kNusAna18RHCSystFile,"ND","RHC","DISvnCC0pi18","GENIE DISvnCC0pi")
Definition: Nus18Systs.h:352
const Nus18SystFromHist kNus18FHCNDGENIEBhBYSyst(kNusAna18FHCSystFile,"ND","FHC","BhtBY18","GENIE BhtBY")
Definition: Nus18Systs.h:397
const Nus18BaseSyst kNus18BaseGENIEMaNCRESSyst("MaNCRES18","GENIE MaNCRES")
Definition: Nus18Systs.h:290
const Nus18BaseSyst kNus18BasePPFXSyst("PPFX18","PPFX syst")
Definition: Nus18Systs.h:258
const Nus18BaseSyst kNus18BaseGENIEFormZoneSyst("FormZone18","GENIE FormZone")
Definition: Nus18Systs.h:291
const Nus18SystFromHist kNus18FHCFDKaonSyst(kNusAna18FHCSystFile,"FD","FHC","Kaon18","Kaon")
Definition: Nus18Systs.h:117
const Nus18SystFromHist kNus18RHCNDCherenkovSyst(kNusAna18RHCSystFile,"ND","RHC","Cherenkov18","Cherenkov (ND)")
Definition: Nus18Systs.h:142
const Nus18SystFromHist kNus18RHCEXLightLSyst(kNusAna18RHCExtrapSystFile,"EX","RHC","CalLight18","Light Level syst")
Definition: Nus18Systs.h:192
const Nus18BaseSyst kNus18BaseCalibFlatSyst("CalFlat18","Flat miscalibration")
Definition: Nus18Systs.h:147
const Nus18SystFromHist kNus18RHCFDGENIEDISvbarpCC0piSyst(kNusAna18RHCSystFile,"FD","RHC","DISvbarpCC0pi18","GENIE DISvbarpCC0pi")
Definition: Nus18Systs.h:344
const Nus18FlatSyst kNus18FHCNDPPFXSyst("PPFX18","Fluxweight ND","ND","FHC", 8.56, 8.78)
Definition: Nus18Systs.h:259
const Nus18BaseSyst kNus18BaseLightLSyst("CalLight18","Light level syst")
Definition: Nus18Systs.h:187
const Nus18SystFromHist kNus18FHCNDGENIEFormZoneSyst(kNusAna18FHCSystFile,"ND","FHC","FormZone18","GENIE FormZone")
Definition: Nus18Systs.h:322
const Nus18SystFromHist kNus18RHCFDTauSyst(kNusAna18RHCSystFile,"FD","RHC","TauScale18","Tau scale")
Definition: Nus18Systs.h:135
void Shift(double sigma, caf::SRProxy *sr, double &weight) const override
Perform the systematic shift.
Definition: Nus18Systs.cxx:337
assert(nhit_max >=nhit_nbins)
const Nus18SystFromHist kNus18FHCFDBeamSyst(kNusAna18FHCSystFile,"FD","FHC","Beam18","All Beam")
Definition: Nus18Systs.h:109
const Nus18FlatSyst kNus18FHCNDNormNDSyst("NormND18","Normalisation ND","ND","FHC", 1.5, 1.5)
Definition: Nus18Systs.h:267
NusChannel GetNusChannel(caf::SRProxy *sr) const
Definition: Nus18Systs.cxx:293
const Nus18SystFromHist kNus18FHCNDGENIEDISvpNC3piSyst(kNusAna18FHCSystFile,"ND","FHC","DISvpNC3pi18","GENIE DISvpNC3pi")
Definition: Nus18Systs.h:332
Nus18FlatSyst(const std::string &systname, const std::string &latexname, const std::string &det, const std::string &polarity, const double &ncWei, const double &bgWei)
Definition: Nus18Systs.cxx:357
const Nus18BaseSyst kNus18BaseTauUnivSyst("TauNDUniv18","Tau ND")
Definition: Nus18Systs.h:227
const Nus18SystFromHist kNus18RHCEXCalibFlatSyst(kNusAna18RHCExtrapSystFile,"EX","RHC","CalFlat18","Flat Miscalibration")
Definition: Nus18Systs.h:152
const Nus18SystFromHist kNus18RHCNDGENIEMvCCRESSyst(kNusAna18RHCSystFile,"ND","RHC","MvCCRES18","GENIE MvCCRES")
Definition: Nus18Systs.h:381
void Format(TGraph *gr, int lcol, int lsty, int lwid, int mcol, int msty, double msiz)
Definition: Style.cxx:154
const Nus18SystFromHist kNus18RHCFDGENIEDISvnCC0piSyst(kNusAna18RHCSystFile,"FD","RHC","DISvnCC0pi18","GENIE DISvnCC0pi")
Definition: Nus18Systs.h:340
const Nus18BaseSyst kNus18BaseOscPUnivSyst("FDOscPUniv18","FD oscillation parameters")
Definition: Nus18Systs.h:235
const Nus18SystFromHist kNus18RHCNDGENIEDISvbarpNC1piSyst(kNusAna18RHCSystFile,"ND","RHC","DISvbarpNC1pi18","GENIE DISvbarpNC1pi")
Definition: Nus18Systs.h:355
const Nus18SystFromHist kNus18FHCNDGENIEMaCOHpiSyst(kNusAna18FHCSystFile,"ND","FHC","MaCOHpi18","GENIE MaCOHpi")
Definition: Nus18Systs.h:323
const Nus18BaseSyst kNus18BaseGENIEMvCCRESSyst("MvCCRES18","GENIE MvCCRES")
Definition: Nus18Systs.h:372
const Nus18SystFromHist kNus18FHCFDGENIEDISvpNC0piSyst(kNusAna18FHCSystFile,"FD","FHC","DISvpNC0pi18","GENIE DISvpNC0pi")
Definition: Nus18Systs.h:318
const Nus18SystFromHist kNus18FHCFDGENIEDISvnNC1piSyst(kNusAna18FHCSystFile,"FD","FHC","DISvnNC1pi18","GENIE DISvnNC1pi")
Definition: Nus18Systs.h:314
const Nus18SystFromHist kNus18RHCFDKaonSyst(kNusAna18RHCSystFile,"FD","RHC","Kaon18","Kaon")
Definition: Nus18Systs.h:119
const Nus18SystFromHist kNus18RHCNDCalibFlatSyst(kNusAna18RHCSystFile,"ND","RHC","CalFlat18","Flat Miscalibration (ND)")
Definition: Nus18Systs.h:150
const Nus18FlatSyst kNus18RHCNDPPFXSyst("PPFX18","Fluxweight ND","ND","RHC", 11.7, 11.4)
Definition: Nus18Systs.h:261
const Nus18SystFromHist kNus18FHCNDGENIER0COHpiSyst(kNusAna18FHCSystFile,"ND","FHC","R0COHpi18","GENIE R0COHpi")
Definition: Nus18Systs.h:324
const Nus18SystFromHist kNus18RHCFDLightLSyst(kNusAna18RHCSystFile,"FD","RHC","CalLight18","Light Level syst")
Definition: Nus18Systs.h:191
const Nus18SystFromHist kNus18RHCNDBeamSyst(kNusAna18RHCSystFile,"ND","RHC","Beam18","All Beam (ND)")
Definition: Nus18Systs.h:110
std::vector< const ISyst * > GetNus18Systs(bool rhc, std::string det_type, std::string syst_type)
Definition: Nus18Systs.cxx:439
const Nus18SystFromHist kNus18RHCFDXSecOnOffSyst(kNusAna18RHCSystFile,"FD","RHC","XSecOnOff18","Cross-section On/Off")
Definition: Nus18Systs.h:286
const Nus18SystFromHist kNus18FHCNDGENIEMANCELSyst(kNusAna18FHCSystFile,"ND","FHC","MANCEL18","GENIE MANCEL")
Definition: Nus18Systs.h:325
const Nus18SystFromHist kNus18RHCNDGENIEMaCCRESSyst(kNusAna18RHCSystFile,"ND","RHC","MaCCRES18","GENIE MaCCRES")
Definition: Nus18Systs.h:377
const Nus18SystFromHist kNus18FHCNDCalibShapeSyst(kNusAna18FHCSystFile,"ND","FHC","CalShape18","Calibration shape (ND)")
Definition: Nus18Systs.h:164
const Nus18SystFromHist kNus18FHCFDGENIEBhBYSyst(kNusAna18FHCSystFile,"FD","FHC","BhtBY18","GENIE BhtBY")
Definition: Nus18Systs.h:398
const Nus18SystFromHist kNus18RHCNDGENIEGenSyst(kNusAna18RHCSystFile,"ND","RHC","GENIEg18","GENIE General Systs (ND)")
Definition: Nus18Systs.h:174
std::string fPolarity
Definition: Nus18Systs.h:55
const Nus18SystFromHist kNus18RHCFDCherenkovSyst(kNusAna18RHCSystFile,"FD","RHC","Cherenkov18","Cherenkov")
Definition: Nus18Systs.h:143
const Nus18SystFromHist kNus18RHCEXKaonSyst(kNusAna18RHCExtrapSystFile,"EX","RHC","Kaon18","Kaon")
Definition: Nus18Systs.h:120
const Nus18SystFromHist kNus18FHCNDLightLSyst(kNusAna18FHCSystFile,"ND","FHC","CalLight18","Light Level syst (ND)")
Definition: Nus18Systs.h:188
static constexpr Double_t sr
Definition: Munits.h:164
const Nus18SystFromHist kNus18RHCFDGENIEFormZoneSyst(kNusAna18RHCSystFile,"FD","RHC","FormZone18","GENIE FormZone")
Definition: Nus18Systs.h:334
std::vector< const ISyst * > GetNus18FHCNDSysts(std::string syst_type)
Definition: Nus18Systs.cxx:534
const Nus18SystFromHist kNus18RHCNDGENIEMaNCRESSyst(kNusAna18RHCSystFile,"ND","RHC","MaNCRES18","GENIE MaNCRES")
Definition: Nus18Systs.h:345
const Nus18BaseSyst kNus18BaseGENIENOvASyst("GENIEn18","GENIE NOvA specific syst")
Definition: Nus18Systs.h:179
const Nus18SystFromHist kNus18RHCEXGENIENOvASyst(kNusAna18RHCExtrapSystFile,"EX","RHC","GENIEn18","GENIE NOvA Specific Systs")
Definition: Nus18Systs.h:184
const Nus18FlatSyst kNus18RHCNDTauSyst("TauScale18","Tau Scale (ND)","ND","RHC", 0., 0.)
Definition: Nus18Systs.h:134
const std::string kNusAna18RHCSystFile
Definition: Nus18Systs.h:98
const Nus18SystFromHist kNus18RHCNDGENIEDISvbarnNC3piSyst(kNusAna18RHCSystFile,"ND","RHC","DISvbarnNC3pi18","GENIE DISvbarnNC3pi")
Definition: Nus18Systs.h:350
caf::Proxy< caf::Det_t > det
Definition: SRProxy.h:227
void Shift(double sigma, caf::SRProxy *sr, double &weight) const override
Perform the systematic shift.
Definition: Nus18Systs.cxx:408
const Nus18SystFromHist kNus18FHCNDGENIEGenSyst(kNusAna18FHCSystFile,"ND","FHC","GENIEg18","GENIE General Systs (ND)")
Definition: Nus18Systs.h:172
const Nus18BaseSyst kNus18BaseGENIEDISvnNC2piSyst("DISvnNC2pi18","GENIE DISvnNC2pi")
Definition: Nus18Systs.h:303