goodness_of_fit.C
Go to the documentation of this file.
3 #include "CAFAna/Fit/Fit.h"
12 #include "CAFAna/FC/FCSurface.h"
16 #include "CAFAna/Vars/FitVars.h"
17 #include "OscLib/IOscCalc.h"
19 
20 #include "TCanvas.h"
21 #include "TBox.h"
22 #include "TColor.h"
23 #include "TGraph.h"
24 #include "TVectorD.h"
25 #include "TF1.h"
26 #include "TLegend.h"
27 #include "TText.h"
28 #include "TLatex.h"
29 #include "TPad.h"
30 #include "TLine.h"
31 #include "TMarker.h"
32 #include "TStyle.h"
33 #include "TSystem.h"
34 #include "TGaxis.h"
35 
36 #include <algorithm>
37 #include <vector>
38 #include <string>
39 
40 using namespace ana;
41 
42 void goodness_of_fit(int num = 1, bool throwexp = true, bool corrSysts = false,
43  TString options="joint_realData_both", TString nametag = "test_fake2019")
44 {
45  bool nueOnly = options.Contains("nueOnly");
46  bool numuOnly = options.Contains("numuOnly");
47  bool joint = options.Contains("joint");
48  assert (nueOnly || numuOnly || joint);
49 
50  bool FHCOnly = options.Contains("FHCOnly");
51  bool RHCOnly = options.Contains("RHCOnly");
52  bool both = options.Contains("both");
53  assert (FHCOnly || RHCOnly || both);
54 
55  bool fake2019 = nametag.Contains("fake2019");
56 
57  TString outdir = "./";
58 
59  if(throwexp){
60  //////////////////////////////////////////////////
61  // Load Nue and Numu experiments
62  //////////////////////////////////////////////////
63  //need numu only for prestage seeds
64 
65  struct predictions {
66  const string name;
67  const IPrediction * pred;
68  std::pair <TH1D*, double> cos;
69  double pot;
70  };
71 
72  std::vector <predictions> preds;
73  std::vector <predictions> preds_numu_only;
74  std::vector <Spectrum * > data;
75  std::vector <Spectrum * > data_numu_only;
76  std::vector <const IExperiment * > expts;
77  std::vector <const IExperiment * > expts_numu_only;
78 
79  auto calc_fake = DefaultOscCalc();
80  double th23, dmsq, dcp;
81  if(fake2019) {th23 = 0.565; dmsq = 2.48e-3; dcp = 1.99;}
82 
83  if(!numuOnly) {
84  if(FHCOnly || both ) {
85  preds.push_back({"nue_fhc", GetNuePrediction2019("combo", DefaultOscCalc(), corrSysts, "fhc", false, true), GetNueCosmics2019("fhc", true), GetPOT()});
86  }
87  if(RHCOnly || both ) {
88  preds.push_back({"nue_fhc", GetNuePrediction2019("prop", DefaultOscCalc(), corrSysts, "rhc", false, true), GetNueCosmics2019("rhc", true), GetPOT(false)});
89  }
90  }
91  int nnumu = 4;
92  if(!nueOnly) {
93  if(FHCOnly || both ) {
94  auto numu_preds = GetNumuPredictions2019(nnumu, corrSysts, "fhc", true);
95  auto numu_cosmics = GetNumuCosmics2019(nnumu, "fhc", true);
96  for (int i = 0; i< nnumu; i++ ){
97  preds.push_back({"numu_fhc_"+std::to_string(i+1), numu_preds[i], numu_cosmics[i], GetPOT()});
98  preds_numu_only.push_back({"numu_fhc_"+std::to_string(i+1), numu_preds[i], numu_cosmics[i], GetPOT()});
99  }
100  }
101  if(RHCOnly || both ) {
102  auto numu_preds = GetNumuPredictions2019(nnumu, corrSysts, "rhc", true);
103  auto numu_cosmics = GetNumuCosmics2019(nnumu, "rhc", true);
104  for (int i = 0; i< nnumu; i++ ){
105  preds.push_back({"numu_rhc_"+std::to_string(i+1), numu_preds[i], numu_cosmics[i], GetPOT(false)});
106  preds_numu_only.push_back({"numu_rhc_"+std::to_string(i+1), numu_preds[i], numu_cosmics[i], GetPOT(false)});
107  }
108  }
109  }
110 
111  TFile* histNH_file = new TFile("/cvmfs/nova.osgstorage.org/analysis/nue/Ana2019/goodness/hist_contours_2019_"+options+"_onlyNH_systs.root","read");
112  TFile* histIH_file = new TFile("/cvmfs/nova.osgstorage.org/analysis/nue/Ana2019/goodness/hist_contours_2019_"+options+"_onlyIH_systs.root","read");
113 
114  TH2F* histNH_pdf = new TH2F("histNH_pdf","histNH_pdf", 30, 0, 2*M_PI, 30, 0.3, 0.7);
115  TH2F* histIH_pdf = new TH2F("histIH_pdf","histIH_pdf", 30, 0, 2*M_PI, 30, 0.3, 0.7);
116 
117  auto histNH = (TH2F*)histNH_file->Get("delta_th23_NH");
118  auto histIH = (TH2F*)histIH_file->Get("delta_th23_IH");
119 
120  for(int i = 1; i<=30; i++){
121  for(int j = 1; j<=30; j++){
122  double binNH = histNH->GetBinContent(i,j);
123  histNH_pdf->SetBinContent(i, j, exp(-binNH/2.0));
124  double binIH = histIH->GetBinContent(i,j);
125  histIH_pdf->SetBinContent(i, j, exp(-binIH/2.0));
126  }
127  }
128 
129  new TCanvas();
130  histNH_pdf->Draw("colz");
131  gPad->Print(outdir+"pdf_transform_hist2d_delta_th23_nh_"+options+"_"+nametag+".pdf");
132 
133  new TCanvas();
134  histIH_pdf->Draw("colz");
135  gPad->Print(outdir+"pdf_transform_hist2d_delta_th23_ih_"+options+"_"+nametag+".pdf");
136 
137  cout<<"integrals: "<<histNH_pdf->Integral()<<" and ih is "<<histIH_pdf->Integral()<<endl;
138  double sep = histNH_pdf->Integral()/(histNH_pdf->Integral()+histIH_pdf->Integral());
139 
140  cout<<"probablilty to get the NH is "<<histNH_pdf->Integral()/(histNH_pdf->Integral()+histIH_pdf->Integral())<<" and to get the ih is "<<histIH_pdf->Integral()/(histNH_pdf->Integral()+histIH_pdf->Integral())<<endl;
141 
142  TFile* dmsq_file = new TFile("/cvmfs/nova.osgstorage.org/analysis/nue/Ana2019/goodness/hist_slices_2019_"+options+"_systs_dmsq_noOct.root","read");
143 
144  TH1F* histdmsqNH_pdf = new TH1F("histdmsqNH_pdf", "histdmsqNH_pdf", 60, 2e-3, 3e-3);
145  TH1F* histdmsqIH_pdf = new TH1F("histdmsqIH_pdf", "histdmsqIH_pdf", 60, -3e-3, -2e-3);
146 
147  auto histdmsqNH = (TH1F*)dmsq_file->Get("slice_dmsq_NH");
148  auto histdmsqIH = (TH1F*)dmsq_file->Get("slice_dmsq_IH");
149 
150  for(int i = 1; i<=60; i++){
151  double binNH = histdmsqNH->GetBinContent(i);
152  histdmsqNH_pdf->SetBinContent(i, exp(-binNH/2.0));
153  double binIH = histdmsqIH->GetBinContent(i);
154  histdmsqIH_pdf->SetBinContent(i, exp(-binIH/2.0));
155  }
156 
157  new TCanvas();
158  histdmsqNH_pdf->Draw("hist");
159  gPad->Print(outdir+"pdf_transform_dmsq32_nh_"+options+"_"+nametag+".pdf");
160 
161  new TCanvas();
162  histdmsqIH_pdf->Draw("hist");
163  gPad->Print(outdir+"pdf_transform_dmsq32_ih_"+options+"_"+nametag+".pdf");
164 
165  auto filename = outdir+ "throw_exp_"+options + (corrSysts?"_with_syst_":"_just_stat_")+std::to_string(num)+"_exp_"+nametag+".root";
166 
167  TFile* file = new TFile(filename,"recreate");
168 
169  for (int j = 0; j<num; j++){
170 
171  file->cd();
172 
173  TDirectory* d = file->mkdir(("ex_"+std::to_string(j)).c_str());
174  file->cd(("ex_"+std::to_string(j)).c_str());
175 
176  TRandom3 rnd(0);
177 
178  double hie = rnd.Uniform(1);
179  cout<<"hie is "<<hie<<" hie separator is "<<sep<<endl;
180  bool isNH;
181  if(hie<sep) isNH = true;
182  else isNH = false;
183  double thisdcp, thisth23, thisdmsq, thisth13;
184  if (isNH) {
185  histNH_pdf->GetRandom2(thisdcp, thisth23);
186  thisdmsq= histdmsqNH_pdf->GetRandom();
187  }
188  else{
189  histIH_pdf->GetRandom2(thisdcp, thisth23);
190  thisdmsq = histdmsqIH_pdf->GetRandom();
191  }
192  thisth13 = rnd.Gaus(0.082, 0.004);
193 
194  calc_fake->SetdCP(thisdcp*M_PI);
195  calc_fake->SetTh23(asin(sqrt(thisth23)));
196  calc_fake->SetDmsq32(thisdmsq);
197  calc_fake->SetTh13(asin(sqrt(thisth13))/2);
198 
199  TVectorD v(4);
200  v[0] = thisdmsq;
201  v[1] = thisth23;
202  v[2] = thisdcp;
203  v[3] = thisth13;
204  v.Write((std::to_string(j)+"_osc_pars").c_str());
205  cout<<"osc pars in exp "<<j<<" are "<<thisdmsq<<" "<<thisth23<<" "<<thisdcp<<endl;
206 
207  struct systshifts{
208  double shift;
209  TString systname;
210  };
211  std::vector <systshifts> shifts;
212 
213  auto systs = GetJointFitSystematicList(corrSysts, false, false, true, true, true);
214 
215  for (auto &s:systs){
216  auto sh = rnd.Gaus(0, 1);
217  shifts.push_back({sh, s->ShortName().c_str()});
218  cout<<s->ShortName().c_str()<<"("<<sh<<"), ";
219  TVectorD vs(1);
220  vs[0] = sh;
221  vs.Write((std::to_string(j)+"_"+s->ShortName()).c_str());
222  }
223  cout<<"\n\n";
224 
225  for(int i = 0; i < (int) preds.size(); ++i){
226 
227  double POT = preds[i].pot;
228 
229  SystShifts sshifts;
230 
231  if(corrSysts){
232  if(both){
233  if(i==0) systs = getAllAna2018Systs(kNueAna2018, true, kFHC);
234  if(i==1) systs = getAllAna2018Systs(kNueAna2018, true, kRHC);
235  if(i>= 2) systs = getAllAna2018Systs(kNumuAna2018); // doesn't play any role
236  }
237  if(FHCOnly || RHCOnly){
238  if(i==0) systs = getAllAna2018Systs(kNueAna2018, true, (FHCOnly?kFHC:kRHC));
239  if(i>= 1) systs = getAllAna2018Systs(kNumuAna2018);
240  }
241  for (auto &s:systs){
242  for(auto &sh:shifts){ if(s->ShortName() == sh.systname) {sshifts.SetShift(s, sh.shift); cout<<s->ShortName()<<" "<<sh.shift<<", ";} }
243  }
244  }
245  cout<<"\n\n";
246 
247  auto tempmock = preds[i].pred->PredictSyst(calc_fake, sshifts).MockData(POT);
248  auto tempfake = preds[i].pred->PredictSyst(calc_fake, sshifts).FakeData(POT);
249 
250  tempmock += Spectrum(preds[i].cos.first, POT,0).MockData(POT);
251  tempfake += Spectrum(preds[i].cos.first, POT,0);
252 
253  auto thisdatamock = new Spectrum(tempmock);
254  thisdatamock->SaveTo(d, (std::to_string(i)+"_check_mockdata").c_str());
255  auto thisdatafake = new Spectrum(tempfake);
256  thisdatafake->SaveTo(d, (std::to_string(i)+"_check_fakedata").c_str());
257  auto thisdata =thisdatamock;
258  thisdata->SaveTo(d, (std::to_string(i)+"_mockdata").c_str());
259  cout<<i<<" "<<preds[i].name<<" POT "<<POT<<" tot MC "<<preds[i].pred->Predict(calc_fake).Integral(POT)<<" cos "<<preds[i].cos.first->Integral()<<" cos er "<<preds[i].cos.second<<" analyze data "<<thisdata->Integral(POT)<<endl;
260  expts.push_back(new SingleSampleExperiment(preds[i].pred, *thisdata, preds[i].cos.first, preds[i].cos.second));
261  //auto single_exp = new SingleSampleExperiment(preds[i].pred, *thisdata, preds[i].cos.first, preds[i].cos.second); // this is heavy
262  //single_exp->SaveTo(d, ("single_exp_"+std::to_string(i)).c_str()); // this is heavy
263  }
264 
265  ////////////////////////////////////////////////////////////
266  // Add constraints, make experiments
267  ////////////////////////////////////////////////////////////
268 
269  std::cout << "\nCreating multiexperiment\n" << std::endl;
270 
271  expts.push_back(WorldReactorConstraint2017()); std::cout << "Adding WorldReactorConstraint2017\n";
272  if(nueOnly) {
273  std::cout << "Adding Dmsq32ConstraintPDG2017\n";
274  expts.push_back(&kDmsq32ConstraintPDG2017);
275  }
276  std::cout << "Creating Multiexperiment with a total of "
277  << expts.size() << " experiments\n\n" << std::endl;
278  auto exptThis = new MultiExperiment(expts);
279  //file->Close();
280 
281  ////////////////////////////////////////////////////////////
282  // Systematics
283  ////////////////////////////////////////////////////////////
284  std::cout << "Systematics for the fit:\n";
285  systs = GetJointFitSystematicList(corrSysts, numuOnly, nueOnly, true, true, true);
286 
287  std::cout << "\n\nSystematic correlations...\n";
288  if(!nueOnly && ! numuOnly && corrSysts){
289  if(FHCOnly){
290  exptThis->SetSystCorrelations(0, GetCorrelations(true, true));
291  auto notfornumu = GetCorrelations(false, true);
292  for(int i =0; i < nnumu; ++i) exptThis->SetSystCorrelations(i+1, notfornumu);
293  }
294  if(RHCOnly){
295  exptThis->SetSystCorrelations(0, GetCorrelations(true, false));
296  auto notfornumu = GetCorrelations(false, true);
297  for(int i =0; i < nnumu; ++i) exptThis->SetSystCorrelations(i+1, notfornumu);
298  }
299  if(both){
300  exptThis->SetSystCorrelations(0, GetCorrelations(true, true));
301  exptThis->SetSystCorrelations(1, GetCorrelations(true, false));
302  auto notfornumu = GetCorrelations(false, true);
303  for(int i =0; i < 8; ++i) exptThis->SetSystCorrelations(i+2, notfornumu);
304  }
305  }
306 
307  std::cout << "Systematics for the numu only fit:\n";
308  auto systs_numu_only = GetJointFitSystematicList(corrSysts, false, true, true, true, true);
309 
310  ////////////////////////////////////////////////////////////
311  // Fit
312  ////////////////////////////////////////////////////////////
313  std::cout << "Starting the fit" << std::endl;
314 
316 
317  SystShifts auxShifts = SystShifts::Nominal();
318 
319  // In case some systs need different seeds
320  std::vector <SystShifts> seedShifts = {};
321 
322 //////////////////////////////////////////////////////////////////////
323 ///////////////////////// Seed controller ////////////////////////////
324 //////////////////////////////////////////////////////////////////////
325 
326 
327  struct th23helper{
328  std::vector<double> seeds;
329  const IFitVar * var;
330  TString label;
331  };
332 
333  std::vector <th23helper> th23seeds;
334 
335  th23helper temp;
336  temp.seeds = {0.3};
337  temp.var = kFitSinSqTheta23LowerOctant;
338  temp.label = "LO";
339  bool octantSlice =true;
340  //for NH:
341  if(octantSlice) {
342  th23seeds.push_back( { {0.499, 0.45}, kFitSinSqTheta23LowerOctant, "LO"});
343  th23seeds.push_back( { {0.501, 0.55}, kFitSinSqTheta23UpperOctant, "UO"});
344  }
345  else th23seeds.push_back({ {0.45, 0.5, 0.55}, &kFitSinSqTheta23, ""});
346 
347  std::vector<double> delta_seeds = {0, 0.5, 1., 1.5};
348  std::vector<double> th23_old_seeds = {0.45, 0.5, 0.55};
349 
350 /////////////////////////////////////////////////////////////////////////
351 ////////////////////////// Different best fit searches //////////////////
352 /////////////////////////////////////////////////////////////////////////
353 
354  file->cd(("ex_"+std::to_string(j)).c_str());
355  // Find the best fit points
356  TVectorD lchi(5);
357  double minchi23 = 1E20;
358  for(int hie:{-1, 1}){
359  for (auto & thseed:th23seeds){
360 
361  std::cout << "\n\nFinding best fit " << (hie > 0 ? "NH " : "IH ")
362  << thseed.label << ", "
363  << "ssth23 seeds ";
364  for (auto const & s:thseed.seeds) std::cout << s << ", ";
365  std::cout << std::endl;
366  std::vector <const IFitVar*> fitvars = {&kFitDeltaInPiUnits,
367  thseed.var,
370  Fitter fit23(exptThis, fitvars, systs);
371  auto thisminchi = fit23.Fit(calc, auxShifts,
372  {
373  { &kFitDmSq32Scaled, {hie*2.5} },
374  { thseed.var, thseed.seeds },
375  { &kFitDeltaInPiUnits, delta_seeds },
376  { &kFitSinSq2Theta13, {0.082} }
377  }, seedShifts,
378  Fitter::kQuiet);
379  minchi23= min(minchi23, thisminchi);
380  cout<<minchi23<<endl;
381 
382  lchi[0] = thisminchi;
383  lchi[1] = kFitDeltaInPiUnits.GetValue(calc);
384  lchi[2] = thseed.var->GetValue(calc);
385  lchi[3] = kFitDmSq32Scaled.GetValue(calc);
386  lchi[4] = kFitSinSq2Theta13.GetValue(calc);
387  lchi.Write((hie>0?"NH_":"IH_")+thseed.label+"_osc_pars");
388 
389  ResetOscCalcToDefault(calc);
390  auxShifts.ResetToNominal();
391  }
392  }
393  TVectorD chi(1);
394  chi[0] = minchi23;
395  chi.Write("best_chi");
396  expts.clear();
397 
398  std::cout << "\nFound overall minchi " << minchi23 << "\n\n";
399  }
400  file->Close();
401 }
402 
403 if(!throwexp){
404 
405  int min = 110; int max = 250; int bins = 140;
406  if(RHCOnly || FHCOnly) {min = 40; max = 140; bins = 100;}
407  TH1F* chisq = new TH1F("chisq", "best chisq in each mock exp", bins, min, max);
408  double LLreal;
409  if(both) LLreal = 157.146;
410  if(RHCOnly) LLreal = 82.1438;
411  if(FHCOnly) LLreal = 73.2594;
412  int counter = 0;
413 
414  outdir = "/pnfs/nova/scratch/users/lkolupae/2019/goodness/";
415 
416  for (int j=0; j<num; j++){
417  auto filename = outdir+ "throw_exp_"+options + (corrSysts?"_with_syst_":"_just_stat_")+"5_exp_thr"+std::to_string(j)+"_fake2019.root";
418  TFile* file = new TFile(filename,"read");
419  for (int k =0; k<5; k++){
420  auto min =* (TVectorD*)file->Get(("ex_"+std::to_string(k)+"/best_chi").c_str());
421  double minchi = min[0];
422  if(minchi>LLreal) counter++;
423  chisq->Fill(minchi);
424  cout<<minchi<<endl;
425  }
426  }
427 
428  TLine* line = new TLine(LLreal, 0, LLreal, 20);
429  line->SetLineColor(kRed);
430  cout<<"chisq intgr "<<chisq->Integral()<<endl;
431  cout<<"events with N> data chisq "<<counter;
432  cout<<" out of "<<chisq->Integral()<<endl;
433  new TCanvas;
434  chisq->Draw("hist");
435  line->Draw();
436  gPad->Print("exp_"+options+".pdf");
437 
438 }
439 
440 
441 }
enum BeamMode kRed
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
void ResetOscCalcToDefault(osc::IOscCalcAdjustable *calc)
Reset calculator to default assumptions for all parameters.
Definition: Calcs.cxx:23
std::vector< SystGroupDef > systs
Definition: syst_header.h:385
double GetValue(const osc::IOscCalcAdjustable *osc) const override
double th23
Definition: runWimpSim.h:98
double GetValue(const osc::IOscCalcAdjustable *osc) const override
Forward to wrapped Var&#39;s GetValue()
Simple record of shifts applied to systematic parameters.
Definition: SystShifts.h:20
std::vector< const IPrediction * > GetNumuPredictions2019(const int nq=4, bool useSysts=true, std::string beam="fhc", bool GetFromUPS=false, ENu2018ExtrapType numuExtrap=kNuMu, bool minimizeMemory=false, bool NERSC=false)
const Dmsq32Constraint kDmsq32ConstraintPDG2017(2.45e-3, 0.05e-3, 2.52e-3, 0.05e-3)
T sqrt(T number)
Definition: d0nt_math.hpp:156
const FitSinSqTheta23UpperOctant kFitSinSqTheta23UpperOctant
Definition: FitVars.cxx:16
string filename
Definition: shutoffs.py:106
static SystShifts Nominal()
Definition: SystShifts.h:34
osc::OscCalcDumb calc
osc::IOscCalcAdjustable * DefaultOscCalc()
Create a new calculator with default assumptions for all parameters.
Definition: Calcs.cxx:49
const IPrediction * GetNuePrediction2019(std::string decomp, osc::IOscCalc *calc, bool corrSysts, std::string beam, bool isFakeData, bool GetFromUPS=false, bool minimizeMemory=false, bool NERSC=false)
#define M_PI
Definition: SbMath.h:34
const char * label
const XML_Char const XML_Char * data
Definition: expat.h:268
const XML_Char * s
Definition: expat.h:262
std::vector< const ISyst * > getAllAna2018Systs(const EAnaType2018 ana, const bool smallgenie, const BeamType2018 beam, bool isFit)
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
Float_t d
Definition: plot.C:236
const ReactorExperiment * WorldReactorConstraint2017()
Reactor constraint from PDG 2017.
const double j
Definition: BetheBloch.cxx:29
const ConstrainedFitVarWithPrior fitDmSq32Scaled_UniformPrior & kFitDmSq32Scaled
std::vector< float > Spectrum
Definition: Constants.h:610
const char sep
OStream cout
Definition: OStream.cxx:6
std::vector< double > POT
static float min(const float a, const float b, const float c)
Definition: absgeo.cxx:45
const Binning bins
Definition: NumuCC_CPiBin.h:8
Combine multiple component experiments.
std::vector< std::pair< TH1D *, double > > GetNumuCosmics2019(const int nq=4, std::string beam="fhc", bool GetFromUPS=false, bool NERSC=false)
const FitSinSqTheta23LowerOctant kFitSinSqTheta23LowerOctant
Definition: FitVars.cxx:17
void ResetToNominal()
Definition: SystShifts.cxx:144
int num
Definition: f2_nu.C:119
const ConstrainedFitVarWithPrior fitSsqTh23_UniformPriorSsqTh23 & kFitSinSqTheta23
TFile * file
Definition: cellShifts.C:17
assert(nhit_max >=nhit_nbins)
void goodness_of_fit(int num=1, bool throwexp=true, bool corrSysts=false, TString options="joint_realData_both", TString nametag="test_fake2019")
Interface definition for fittable variables.
Definition: IFitVar.h:16
double GetPOT(bool isFHC=true)
std::vector< std::pair< const ISyst *, const ISyst * > > GetCorrelations(bool isNue, bool isFHC, bool ptExtrap)
Standard interface to all prediction techniques.
Definition: IPrediction.h:57
const FitSinSq2Theta13 kFitSinSq2Theta13
Definition: FitVars.cxx:13
std::string to_string(ModuleType mt)
Definition: ModuleType.h:32
std::pair< Spectrum *, double > cos
Float_t e
Definition: plot.C:35
T max(sqlite3 *const db, std::string const &table_name, std::string const &column_name)
Definition: statistics.h:68
#define for
Definition: msvc_pragmas.h:3
const FitVarWithPrior fitDeltaInPiUnits_UniformPriordCP & kFitDeltaInPiUnits
std::vector< const ISyst * > GetJointFitSystematicList(bool corrSysts, bool nueExclusive=false, bool numuExclusive=false, bool isFHC=true, bool isRHC=true, bool intersection=true, bool ptExtrap=true)
void SetShift(const ISyst *syst, double shift, bool force=false)
Definition: SystShifts.cxx:81
const std::string outdir
T asin(T number)
Definition: d0nt_math.hpp:60
std::pair< TH1D *, double > GetNueCosmics2019(std::string beam, bool GetFromUPS=false, bool NERSC=false)
Compare a single data spectrum to the MC + cosmics expectation.