joint_fit_2020_loader_tools.h
Go to the documentation of this file.
12 #include "CAFAna/Systs/XSecSysts.h"
13 #include "CAFAna/Vars/FitVars.h"
14 #include "OscLib/IOscCalc.h"
15 #include "CAFAna/Analysis/Style.h"
18 
20 
22 
23 #include "TCanvas.h"
24 #include "TBox.h"
25 #include "TLatex.h"
26 #include "TColor.h"
27 #include "TGraph.h"
28 #include "TVectorD.h"
29 #include "TF1.h"
30 #include "TLegend.h"
31 #include "TLine.h"
32 #include "TMarker.h"
33 #include "TStyle.h"
34 #include "TSystem.h"
35 #include "TGaxis.h"
36 #include "TFile.h"
37 
38 namespace ana {
39  //////////////////////////////////////////////////////////////////////
40  /*
41  TFile* GetGaussianSurface(TString par, TString hier)
42  {
43  std::cout<<"\n\n ============= You're loading gaussian surface ============="<<std::endl;
44  TString subdir = par.Contains("ssth23dmsq32")? "th23_dmsq" : "delta_th23";
45  TString gaussDir = "/nova/ana/nu_e_ana/Ana2018/Results/RHC_and_FHC/contours/"+subdir+"/syst/";
46  TString gaussName = "hist_contours_2018_joint_realData_both_only";
47  gaussName += hier;
48  if(par.Contains("ssth23dmsq32"))
49  gaussName += "combo_dmsq_systs.root";
50  else
51  gaussName += "combo_systs.root";
52 
53  std::cout << "Opening " << gaussDir + gaussName << std::endl;
54  TFile* ret = TFile::Open(gaussDir + gaussName);
55  return ret;
56  }
57 
58  std::string GetNuePredPath(std::string beam, bool isFakeData, bool NERSC) {
59  std::string ret;
60  bool isFHC = true;
61  if(beam == "rhc") isFHC = false;
62 
63  if(!NERSC) return "";
64  else {
65  std::string dir = std::string(getenv("FCHELPERANA2018_LIB_PATH")) + "/Predictions/provisional_singles";
66  if(isFHC && !isFakeData)
67  ret = dir + "/NueProd4SystematicsOnRealNDData_2018-05-22/pred_allxp_Nue2018Axis_full_FHCAllSyst_nueconcat_realNDData_2018-05-22.root";
68  else if(!isFHC && !isFakeData)
69  ret = dir + "/NueProd4SystematicsOnRealNDData_2018-05-22/pred_allxp_Nue2018Axis_full_RHCAllSyst_nueconcat_realNDData_2018-05-22.root";
70  else if(isFHC && isFakeData)
71  ret = dir + "/NueProd4SystematicsOnFakeNDData_2018-05-03/pred_allxp_Nue2018Axis_full_FHCAllSysts_nueconcat_fakeNDData_05_03_2018_merged.root";
72  else if(!isFHC & isFakeData)
73  ret = dir + "/NueProd4SystematicsOnFakeNDData_2018-05-03/pred_allxp_Nue2018Axis_full_RHCAllSysts_nueconcat_fakeNDData_05_03_2018_merged.root";
74  }
75  return ret;
76  }
77  */
78 
81  bool corrSysts,
83  bool isFakeData,
84  bool GetFromUPS=false,
85  bool minimizeMemory = true,
86  bool NERSC = false){
87 
88  std::cout<<"\n\n ============= You're loading " << beam << " Nue predictions ============="<<std::endl;
89 
90  // Set the extrap.
92  bool PtExtrap = true;
93  if ( decomp.find("noPt") != std::string::npos ) {
94  PtExtrap = false;
95  if ( decomp.find("noextrap") != std::string::npos ) extrap = ENu2020ExtrapType::kNoExtrap;
96  if ( decomp.find("prop" ) != std::string::npos ) extrap = ENu2020ExtrapType::kProportional;
97  if ( decomp.find("combo" ) != std::string::npos ) extrap = ENu2020ExtrapType::kCombo;
98  } else {
99  PtExtrap = true;
100  if ( decomp.find("noextrap") != std::string::npos ) extrap = ENu2020ExtrapType::kNoExtrap;
101  if ( decomp.find("prop" ) != std::string::npos ) extrap = ENu2020ExtrapType::kPropPtExtrap;
102  if ( decomp.find("combo" ) != std::string::npos ) extrap = ENu2020ExtrapType::kComboPtExtrap;
103  }
104 
105  PredictionSyst3Flavor2020 * pred_fid;
106  std::string nue_pred_path = "";
107  // Are we loading files with systematics?
108  if(corrSysts){
109  std::cout << "\t Loading systematics." << endl;
110  if (beam=="rhc") pred_fid = new PredictionSyst3Flavor2020 (extrap, calc,
112  beam, isFakeData, true,
113  nue_pred_path, minimizeMemory,
114  NERSC);
115  else if(beam=="fhc") pred_fid = new PredictionSyst3Flavor2020 (extrap, calc,
117  beam, isFakeData, true,
118  nue_pred_path, minimizeMemory,
119  NERSC);
120  else{ std::cout << "Beam mode needs to be either fhc or rhc" << endl; exit(1);}
121  }
122  else {
123  std::cout << "\t Not loading systematics." << std::endl;
124  pred_fid = new PredictionSyst3Flavor2020 (extrap, calc,{},
125  beam, isFakeData, true,
126  nue_pred_path, minimizeMemory,
127  NERSC);
128  }
129 
130 
131  double pot = kAna2020FHCPOT;
132  if(beam=="rhc") pot = kAna2020RHCPOT;
133 
134  std::cout << "--> Nue prediction (no rock)" << pred_fid->Predict(calc).Integral(pot) <<std::endl;
135 
136  std::string dir = "/cvmfs/nova.osgstorage.org/analysis/3flavor/Predictions/";
137  if(NERSC) dir = std::string(std::getenv("FCHELPERANA2020_LIB_PATH")) + "/Predictions/";
138  std::string filename = "fdrock_"+beam+"_both2020.root";
139  std::string name = "pred_FDRock_nue_merge";
140 
141  auto rock = LoadFromFile<PredictionNoExtrap>(dir + filename, name).release();
142  auto nue_pred = new PredictionAddRock (pred_fid, rock);
143 
144  std::cout << "--> Nue prediction (rock added) "<< nue_pred->Predict(calc).Integral(pot) << std::endl;
145  std::cout << "--> Pure rock events: " << nue_pred->Predict(calc).Integral(pot) - pred_fid->Predict(calc).Integral(pot) << std::endl;
146 
147  return nue_pred;
148  }
149 
150  //////////////////////////////////////////////////////////////////////
151 
152  std::pair <Spectrum*, double > GetNueCosmics2020 (std::string beam, bool GetFromUPS=false, bool NERSC=false){
153 
154  std::cout<<"\n\n ============= You're loading " << beam << " Nue cosmics ============="<<std::endl;
155 
156  std::string name = "nue_cos";
157  std::string dir = "/cvmfs/nova.osgstorage.org/analysis/3flavor/Predictions/";
158  if(NERSC) dir = std::string(std::getenv("FCHELPERANA2020_LIB_PATH")) + "/Predictions/";
159  std::string filename = "fd_cosmic_pred_nue_" + beam + "_v2.root";
160 
161  Spectrum* cosm = LoadFromFile<Spectrum>(dir+filename, name ).release();
162 
163  double livetime;
164  if(beam=="rhc") livetime = kAna2020RHCLivetime;
165  else livetime = kAna2020FHCLivetime;
166 
167  double cosmFull = cosm->Integral(cosm->Livetime(), 0, kLivetime);
168  double cosmScale = cosm->Integral(livetime , 0, kLivetime);
169 
170  std::cout << "Total of " << cosmFull << " cosmics, which will scale to " << cosmScale << " in the spill window."
171  << "\n\t The livetime is " << livetime <<", and the internal livetime is "<<cosm->Livetime()
172  << " --> an uncertainty of " << 1/sqrt(cosmFull)
173  << "....Returning the spectrum."
174  << std::endl;
175 
176  return { cosm, 1/sqrt(cosmFull) };
177  }
178 
179  //////////////////////////////////////////////////////////////////////
180 
181  Spectrum* GetNueData2020 (std::string beam, bool GetFromUPS=false){
182 
183  std::cout<<"\n\n ============= You're loading " << beam << " Nue real data ================="<<std::endl;
184 
185  std::string dir = "/cvmfs/nova.osgstorage.org/analysis/3flavor/Predictions/";
186  std::string file = "data_2020_nue_"+beam+"_v4.root";
187  std::string name = "nue_data";
188 
189  Spectrum* intime = LoadFromFile<Spectrum>(dir+file, name).release();
190  double POT, livetime;
191  if(beam == "rhc") {livetime = kAna2020RHCLivetime; POT = kAna2020RHCPOT;}
192  if(beam == "fhc") {livetime = kAna2020FHCLivetime; POT = kAna2020FHCPOT;}
193  std::cout << "Loaded data spectrum:\n"
194  << "POT " << intime->POT()
195  << " (expected " << POT << ")\n"
196  << "Livetime " << intime->Livetime()
197  << " (expected " << livetime << ")\n"
198  << "---> Integral " << intime->Integral(intime->POT())
199  << std::endl;
200 
201  return intime;
202 
203  }
204 
205  //////////////////////////////////////////////////////////////////////
206 
207  std::vector <const IPrediction*> GetNumuPredictions2020(const int nq = 4,
208  std::string decomp = "noPt",
210  bool useSysts = true,
211  std::string beam="fhc",
212  bool isFakeData=false,
213  bool GetFromUPS=false,
214  bool minimizeMemory = true,
215  bool NERSC = false) {
216 
217  std::cout<<"\n\n ============= You're loading " << beam << " Numu predictions ============="<<std::endl;
218 
219  // Set the extrap.
221  bool PtExtrap = true;
222  if ( decomp.find("noPt") != std::string::npos ) {
223  PtExtrap = false;
224  extrap = ENu2020ExtrapType::kNuMu;
225  } else {
226  PtExtrap = true;
228  }
229 
230  std::vector <const IPrediction*> numu_preds;
231  std::string numu_pred_path = "";
232  double pot = kAna2020FHCPOT;
233  if(beam=="rhc") pot = kAna2020RHCPOT;
234 
235  // Are we loading files with systematics?
236  for (int quant = 0; quant < nq; ++quant){
237  if(useSysts){
238  std::cout << "\t Quantile: " << quant << " --> Loading systematics." << endl;
239  if (beam=="rhc") numu_preds.push_back( new PredictionSyst3Flavor2020( extrap, calc, beam, quant+1,
241  isFakeData, numu_pred_path, minimizeMemory, NERSC));
242  else if(beam=="fhc") numu_preds.push_back( new PredictionSyst3Flavor2020( extrap, calc, beam, quant+1,
244  isFakeData, numu_pred_path, minimizeMemory, NERSC));
245  else{ std::cout << "Beam mode needs to be either fhc or rhc" << endl; exit(1);}
246  }
247  else {
248  std::cout << "\t Quantile: " << quant << " --> Not loading systematics." << std::endl;
249  numu_preds.push_back(new PredictionSyst3Flavor2020( extrap, calc, beam, quant+1,
250  {}, isFakeData, numu_pred_path, minimizeMemory,
251  NERSC));
252  }
253  std::cout << "--> Numu, Quartile " << quant << " prediction " << numu_preds.back()->Predict(calc).Integral(pot) <<std::endl;
254  }
255  return numu_preds;
256  }
257 
258  //////////////////////////////////////////////////////////////////////
259 
260  std::vector <std::pair <Spectrum*, double> > GetNumuCosmics2020(const int nq = 4, std::string beam="fhc",
261  bool GetFromUPS=false, bool NERSC = false)
262  {
263 
264  std::cout<<"\n\n ============= You're loading " << beam << " Numu cosmics ============="<<std::endl;
265 
266  std::string dir = "/cvmfs/nova.osgstorage.org/analysis/3flavor/Predictions/";
267  if(NERSC) dir = std::string(std::getenv("FCHELPERANA2020_LIB_PATH")) + "/Predictions/";
268  std::string filename = "fd_cosmic_pred_numu_" + beam + "_v2.root";
269  TFile * fcosm = TFile::Open((dir+filename).c_str());
270 
271  if(fcosm->IsZombie()) {std::cerr<< "bad cosmics\n"; exit(1);}
272  std::vector <std::pair <Spectrum*, double > > numu_cosmics;
273 
274  double livetime;
275  if(beam=="rhc") livetime = kAna2020RHCLivetime;
276  else livetime = kAna2020FHCLivetime;
277 
278  for (int i = 1; i <=nq; ++i) {
279  Spectrum* cosm = Spectrum::LoadFrom(fcosm, ("numu_cos_q"+std::to_string(i)).c_str()).release();
280 
281  double cosmFull = cosm->Integral(cosm->Livetime(), 0, kLivetime);
282  double cosmScale = cosm->Integral(livetime , 0, kLivetime);
283 
284  std::cout << "Quantile " << i << ": A Total of " << cosmFull << " cosmics, which will scale to " << cosmScale << " in the spill window."
285  << "\n\t The livetime is " << livetime <<", and the internal livetime is "<<cosm->Livetime()
286  << " --> an uncertainty of " << 1/sqrt(cosmFull)
287  << "....Returning the spectrum."
288  << std::endl;
289 
290 
291  numu_cosmics.push_back( { cosm, 1/sqrt(cosmFull) } );
292  }//end quantiles
293 
294  for (size_t q=0; q<numu_cosmics.size(); ++q) {
295  std::cout << "Quantile " << q << ", Int = " << numu_cosmics[q].first->Integral(livetime , 0, kLivetime) << std::endl;
296  }
297 
298  return numu_cosmics;
299  }
300 
301  //////////////////////////////////////////////////////////////////////
302 
303  std::vector <Spectrum * > GetNumuData2020(const int nq = 4, std::string beam = "fhc", bool GetFromUPS = false){
304 
305  std::cout<<"\n\n ============= You're loading " << beam << " Numu real data ==============="<<std::endl;
306 
307  std::string dir = "/cvmfs/nova.osgstorage.org/analysis/3flavor/Predictions/";
308  std::string file = "data_2020_numu_"+beam+"_v4.root";
309 
310  double POT, livetime;
311  if(beam == "rhc") {livetime = kAna2020RHCLivetime; POT = kAna2020RHCPOT;}
312  if(beam == "fhc") {livetime = kAna2020FHCLivetime; POT = kAna2020FHCPOT;}
313 
314  std::vector <Spectrum *> intime;
315  for (int i = 1; i <=nq; ++i) {
316  Spectrum* temp = LoadFromFile<Spectrum>(dir+file, "numu_data_q"+std::to_string(i)).release();
317  intime.push_back(temp);
318  std::cout << "Loaded data spectrum:\n"
319  << "POT " << temp->POT()
320  << " (expected " << POT << ")\n"
321  << "Livetime " << temp->Livetime()
322  << " (expected " << livetime << ")\n"
323  << "---> Integral " << temp->Integral(temp->POT())
324  << std::endl;
325  }
326 
327  return intime;
328  }
329 
330  //////////////////////////////////////////////////////////////////////
331 
332  std::vector<const ISyst*> GetJointFitSystematicList(bool corrSysts, bool nueExclusive = false, bool numuExclusive=false,
333  bool isFHC = true, bool isRHC = true , bool intersection = true, bool ptExtrap = true)
334  {
335  std::vector<const ISyst*> ret ={} ;
336  if(corrSysts){
337  if (!intersection){
338  if(nueExclusive) {
339  ret = getAna2020NueOnly(BeamType2020::kBoth, ptExtrap); /// no such syst in numu
340  if(isFHC) ret.push_back(&kAna2020NormRHC); // there is no norm fhc syst in case of rhc beam
341  if(isRHC) ret.push_back(&kAna2020NormFHC); // there is no norm rhc syst in case of fhc beam
342  }
343  if(numuExclusive){ /// no such syst in nue
345  if(isFHC) {
346  Add3FlavorAna2020NotCorrelSysts(ret, EAnaType2020::kNueAna, BeamType2020::kRHC, ptExtrap); /// no such syst in nue fhc
347  ret.push_back(&kAna2020NormRHC);
348  }
349  if(isRHC){
350  Add3FlavorAna2020NotCorrelSysts(ret, EAnaType2020::kNueAna, BeamType2020::kFHC, ptExtrap); /// no such syst in nue rhc
351  ret.push_back(&kAna2020NormFHC);
352  }
353  }
354  }
355  else{
356  if(nueExclusive && isFHC) ret = get3FlavorAna2020AllSysts(EAnaType2020::kNueAna, true, BeamType2020::kFHC, true, ptExtrap);
357  if(nueExclusive && isRHC) ret = get3FlavorAna2020AllSysts(EAnaType2020::kNueAna, true, BeamType2020::kRHC, true, ptExtrap);
358  if(numuExclusive && isFHC) ret = get3FlavorAna2020AllSysts(EAnaType2020::kNumuAna, true, BeamType2020::kFHC, true, ptExtrap);
359  if(numuExclusive && isRHC) ret = get3FlavorAna2020AllSysts(EAnaType2020::kNumuAna, true, BeamType2020::kRHC, true, ptExtrap);
360  if(!nueExclusive && !numuExclusive) ret = get3FlavorAna2020AllSysts(EAnaType2020::k3FlavorAna, true, BeamType2020::kBoth, true, ptExtrap);
361  }
362  }
363  std::cout << "Return list of systematics: " ;
364  for(auto & s:ret) std::cout << s->ShortName() << ", ";
365  std::cout << std::endl;
366  return ret;
367  }
368 
369  std::vector<std::pair<const ISyst*,const ISyst*> > GetCorrelations (bool isNue, bool isFHC, bool ptExtrap)
370  {
371  std::vector<std::pair<const ISyst*,const ISyst*> > ret ={};
372  std::cout<<(isNue?"not nue ":"not numu ")<<(isFHC?" FHC ":" RHC ");
373  //to first approximation if they are not the same they are not correlated.
374  //might have to be more complicated later
375  auto badsyst = GetJointFitSystematicList(true, !isNue, isNue, isFHC, !isFHC, false, ptExtrap);
376  for (auto & s:badsyst) ret.push_back ({s,NULL});
377 
378  return ret;
379  }
380 
381  ///////////// Exposure funstions ///////////
382  double GetPOT(bool isFHC = true){
383  double tmp = kAna2020FHCPOT;
384  if (!isFHC) tmp = kAna2020RHCPOT;
385  return tmp;
386  }
387 
388  //////////////////////////////////////////////////////////////////////
389  double GetLT(bool isFHC = true){
390  double tmp = kAna2020FHCLivetime;
391  if (!isFHC) tmp = kAna2020RHCLivetime;
392  return tmp;
393  }
394 
395  std::pair<double, double> GetExposure(bool isFHC = true){
396  double pot = kAna2020FHCPOT;
397  double lt = kAna2020FHCLivetime;
398  if (!isFHC) {pot = kAna2020RHCPOT; lt = kAna2020RHCLivetime;}
399  return {pot, lt};
400  }
401  ///////////// Make common loaders for all fit scripts //////////////
402 
403  struct predictions {
404  const string name;
405  const IPrediction * pred;
406  std::pair <Spectrum*, double> cos;
407  double pot;
408  double livetime;
409  };
410 
411  std::vector <predictions> LoadPredictions (bool corrSysts = false, bool runOnGrid = false, std::string decomp = "",
412  bool nue = true, bool numu = true, bool fhc = true, bool rhc = true, bool NERSC = false)
413  {
414  std::vector <predictions> ret;
415 
416  if (nue) {
417  if (fhc) {
418  auto nue_pred = GetNuePrediction2020(decomp+"combo", DefaultOscCalc(), corrSysts, "fhc", false, runOnGrid, true, NERSC);
419  auto nue_cosmic = GetNueCosmics2020("fhc", runOnGrid, NERSC);
420  ret.push_back({"nue_fhc", nue_pred, nue_cosmic, GetPOT(), GetLT()});
421  }
422  if (rhc) {
423  auto nue_pred = GetNuePrediction2020(decomp+"prop", DefaultOscCalc(), corrSysts, "rhc", false, runOnGrid, true, NERSC);
424  auto nue_cosmic = GetNueCosmics2020("rhc", runOnGrid, NERSC);
425  ret.push_back({"nue_rhc", nue_pred, nue_cosmic, GetPOT(false), GetLT(false)});
426  }
427  }
428  int nnumu = 4;
429  if (numu) {
430  if (fhc) {
431  auto numu_preds = GetNumuPredictions2020(nnumu, decomp, DefaultOscCalc(), corrSysts, "fhc", false, runOnGrid, true, NERSC);
432  auto numu_cosmics = GetNumuCosmics2020(nnumu, "fhc", runOnGrid, NERSC);
433  for (int i = 0; i< nnumu; i++ ){
434  ret.push_back({"numu_fhc_"+std::to_string(i+1), numu_preds[i], numu_cosmics[i], GetPOT(), GetLT()});
435  }
436  }
437  if (rhc) {
438  auto numu_preds = GetNumuPredictions2020(nnumu, decomp, DefaultOscCalc(), corrSysts, "rhc", false, runOnGrid, true, NERSC);
439  auto numu_cosmics = GetNumuCosmics2020(nnumu, "rhc", runOnGrid, NERSC);
440  for (int i = 0; i< nnumu; i++ ){
441  ret.push_back({"numu_rhc_"+std::to_string(i+1), numu_preds[i], numu_cosmics[i], GetPOT(false), GetLT(false)});
442  }
443  }
444  }
445 
446  return ret;
447  }
448 
449 
450  std::vector <Spectrum * > LoadRealData (bool runOnGrid = false, bool nue = true, bool numu = true, bool fhc = true, bool rhc = true)
451  {
452  std::vector <Spectrum * > ret;
453 
454  if (nue){
455  if (fhc) ret.push_back(GetNueData2020("fhc", runOnGrid));
456  if (rhc) ret.push_back(GetNueData2020("rhc", runOnGrid));
457  }
458  int nnumu = 4;
459  if (numu){
460  if(fhc){
461  auto numu_data = GetNumuData2020(nnumu, "fhc", runOnGrid);
462  ret.insert(ret.end(), numu_data.begin(), numu_data.end());
463  }
464  if(rhc){
465  auto numu_data = GetNumuData2020(nnumu, "rhc", runOnGrid);
466  ret.insert(ret.end(),numu_data.begin(), numu_data.end());
467  }
468  }
469 
470  return ret;
471  }
472 
473 
474 }
const XML_Char * name
Definition: expat.h:151
TCut intime("tave>=217.0 && tave<=227.8")
const DummyAnaSyst kAna2020NormFHC("NormFHC2020","FHC. Norm.")
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
double lt
std::vector< Spectrum * > GetNumuData2020(const int nq=4, std::string beam="fhc", bool GetFromUPS=false)
Loads shifted spectra from files.
T sqrt(T number)
Definition: d0nt_math.hpp:156
General interface to oscillation calculators.
Definition: StanTypedefs.h:22
OStream cerr
Definition: OStream.cxx:7
std::vector< predictions > LoadPredictions(bool corrSysts=false, bool runOnGrid=false, std::string decomp="", bool nue=true, bool numu=true, bool fhc=true, bool rhc=true, bool NERSC=false)
string filename
Definition: shutoffs.py:106
Float_t tmp
Definition: plot.C:36
double Integral(double exposure, double *err=0, EExposureType expotype=kPOT) const
Return total number of events scaled to pot.
Definition: Spectrum.cxx:272
std::vector< const IPrediction * > GetNumuPredictions2020(const int nq=4, std::string decomp="noPt", osc::IOscCalc *calc=DefaultOscCalc(), bool useSysts=true, std::string beam="fhc", bool isFakeData=false, bool GetFromUPS=false, bool minimizeMemory=true, bool NERSC=false)
const DummyAnaSyst kAna2020NormRHC("NormRHC2020","RHC. Norm.")
osc::OscCalcDumb calc
osc::IOscCalcAdjustable * DefaultOscCalc()
Create a new calculator with default assumptions for all parameters.
Definition: Calcs.cxx:49
Representation of a spectrum in any variable, with associated POT.
Definition: Spectrum.h:40
std::pair< Spectrum *, double > GetNueCosmics2020(std::string beam, bool GetFromUPS=false, bool NERSC=false)
const XML_Char * s
Definition: expat.h:262
Spectrum * GetNueData2020(std::string beam, bool GetFromUPS=false)
static std::unique_ptr< Spectrum > LoadFrom(TDirectory *dir, const std::string &name)
Definition: Spectrum.cxx:546
std::string getenv(std::string const &name)
#define pot
const IPrediction * GetNuePrediction2020(std::string decomp, osc::IOscCalc *calc, bool corrSysts, std::string beam, bool isFakeData, bool GetFromUPS=false, bool minimizeMemory=true, bool NERSC=false)
const double kAna2020FHCLivetime
Definition: Exposures.h:237
std::vector< const ISyst * > getAna2020NueOnly(const BeamType2020 beam, const bool ptExtrap)
const double kAna2020FHCPOT
Definition: Exposures.h:233
double POT() const
Definition: Spectrum.h:219
const double kAna2020RHCPOT
Definition: Exposures.h:235
static bool isFHC
OStream cout
Definition: OStream.cxx:6
std::vector< double > POT
std::vector< std::pair< Spectrum *, double > > GetNumuCosmics2020(const int nq=4, std::string beam="fhc", bool GetFromUPS=false, bool NERSC=false)
Spectrum Predict(osc::IOscCalc *calc) const override
std::vector< Spectrum * > LoadRealData(bool runOnGrid=false, bool nue=true, bool numu=true, bool fhc=true, bool rhc=true)
::xsd::cxx::tree::string< char, simple_type > string
Definition: Database.h:154
TDirectory * dir
Definition: macro.C:5
double livetime
Definition: saveFDMCHists.C:21
const double kAna2020RHCLivetime
Definition: Exposures.h:238
void Add3FlavorAna2020NotCorrelSysts(std::vector< const ISyst * > &systs, const EAnaType2020 ana, const BeamType2020 beam, const bool ptExtrap)
exit(0)
std::vector< const ISyst * > get3FlavorAna2020AllSysts(const EAnaType2020 ana, const bool smallgenie, const BeamType2020 beam, const bool isFit, const bool ptExtrap)
TFile * file
Definition: cellShifts.C:17
std::pair< double, double > GetExposure(bool isFHC=true)
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
std::string to_string(ModuleType mt)
Definition: ModuleType.h:32
std::pair< Spectrum *, double > cos
double GetLT(bool isFHC=true)
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)
double Livetime() const
Seconds. For informational purposes only. No calculations use this.
Definition: Spectrum.h:222
void rock(std::string suffix="full")
Definition: rock.C:28