syst_table_fit.C
Go to the documentation of this file.
7 #include "CAFAna/Fit/Fit.h"
9 #include "CAFAna/Systs/Systs.h"
12 #include "CAFAna/Analysis/Plots.h"
13 
14 #include <fstream>
15 
16 using namespace ana;
17 
18 void GetLimits( const TGraph* plot, float& hi, float& low )
19 
20 {
21  const int N = plot->GetN();
22  low = plot->GetX()[0];
23  hi = plot->GetX()[N-1];
24  float min = plot->GetY()[0];
25  float bf = plot->GetX()[0];
26  int bfp = 0;
27 
28  for ( int i = 0; i < N; ++i )
29  {
30  float y = plot->GetY()[i];
31  if ( y < min ) { min = y; bf = plot->GetX()[i]; bfp = i; }
32  }
33 
34  std::cout << "min = " << min << ", bf = " << bf << ", bfp = " << bfp << std::endl;
35  const float chi2th = 1.0; // Chi squared threshold
36 
37  for ( int i = bfp; i > 0; --i )
38  {
39  float y1 = plot->GetY()[i-1];
40  float y2 = plot->GetY()[i];
41  if ( y1 > chi2th && y2 < chi2th )
42  {
43  float x1 = plot->GetX()[i-1];
44  float x2 = plot->GetX()[i];
45  low = x1 + ( chi2th - y1 ) * ( x2 - x1 ) / ( y2 - y1 );
46  std::cout << "Crossed chisq of " << chi2th << ", descending, with x value of: " << low << std::endl;
47  break;
48  }
49  }
50 
51  for ( int i = bfp; i < N-1; ++i )
52  {
53  float y1 = plot->GetY()[i];
54  float y2 = plot->GetY()[i+1];
55  if ( y1 < chi2th && y2 > chi2th )
56  {
57  float x1 = plot->GetX()[i];
58  float x2 = plot->GetX()[i+1];
59  hi = x1 + ( chi2th - y1 ) * ( x2 - x1 ) / ( y2 - y1 );
60  std::cout << "Crossed chisq of " << chi2th << ", ascending, with x value of: " << hi << std::endl;
61  break;
62  }
63  }
64 }
65 
66 
67 void simulation()
68 {
69  TLatex* prelim = new TLatex(.9, .93, "NOvA Simulation");
70  prelim->SetTextColor(kGray+1);
71  prelim->SetNDC();
72  prelim->SetTextSize(1.5/30.);
73  prelim->SetTextAlign(32);
74  prelim->Draw();
75 }
76 
77 void WriteUncertainty( ofstream& txt, double plus, double minus )
78 {
79  txt<< " & +" << plus << " / -" << minus;
80  //txt << Form( " & +%.3e / -%.3e", plus, minus );
81 }
82 
83 typedef std::vector<std::pair<const ISyst*,const ISyst*> > Correlations;
84 typedef std::pair<SingleSampleExperiment*,Correlations> ExptCorr;
85 
86 void AddExptCorrNue( std::vector<ExptCorr>& exptCorrs, osc::IOscCalc* calc, std::string beam, bool ptExtrap, bool fakeNDData )
87 {
88  bool isFHC = beam == "fhc";
89  bool corrSysts = true;
90  bool isNue = true;
91  double POT = isFHC ? kAna2020FHCPOT : kAna2020RHCPOT;
92  std::string decomp = isFHC ? "combo" : "prop";
93  if ( !ptExtrap ) decomp += "_noPt";
94 
95  auto pred = GetNuePrediction2020( decomp, DefaultOscCalc(), corrSysts, beam, fakeNDData );
96  auto cosmics = GetNueCosmics2020( beam );
97  Spectrum* fakeData = GetFakeData( pred, calc, POT, cosmics.first );
98  SingleSampleExperiment* expt = new SingleSampleExperiment( pred, *fakeData, *cosmics.first, cosmics.second, true );
99  exptCorrs.emplace_back( expt, GetCorrelations( isNue, isFHC, ptExtrap ) );
100 }
101 
102 void AddExptCorrNumu( std::vector<ExptCorr>& exptCorrs, osc::IOscCalc* calc, std::string beam, bool ptExtrap, bool fakeNDData )
103 {
104  bool isFHC = beam == "fhc";
105  bool useSysts = true;
106  bool isNue = false;
107  double POT = isFHC ? kAna2020FHCPOT : kAna2020RHCPOT;
108  int nEhadQuants = 4;
109  std::string decomp = ptExtrap ? "" : "noPt";
110 
111  auto preds = GetNumuPredictions2020( nEhadQuants, decomp, DefaultOscCalc(), useSysts, beam, fakeNDData );
112  auto cosmics = GetNumuCosmics2020( nEhadQuants, beam );
113  auto corrs = GetCorrelations( isNue, isFHC, ptExtrap );
114 
115  for ( int i = 0; i < nEhadQuants; ++i )
116  {
117  Spectrum* fakeData = GetFakeData( preds[i], calc, POT, cosmics[i].first );
118  SingleSampleExperiment* expt = new SingleSampleExperiment( preds[i], *fakeData, *cosmics[i].first, cosmics[i].second, true );
119  exptCorrs.emplace_back( expt, corrs );
120  }
121 }
122 
123 void syst_table_fit_new( const TString option )
124 {
125 
126  const bool full = option.Contains( "full" );
127  const bool ptExtrap = option.Contains( "ptExtrap" );
128  const bool fakeNDData = option.Contains( "fakeND" );
129  const bool seeds = option.Contains( "seeds" );
130 
131  std::string outStr = "";
132  if ( ptExtrap ) outStr += "ptExtrap_";
133  if ( fakeNDData ) outStr += "fakeND_";
134  if ( seeds ) outStr += "withSeeds_";
135  outStr += full ? "full" : "short";
136  //std::cout << "outStr = " << outStr << std::endl;
137 
138  std::string cwd = gSystem->GetWorkingDirectory();
139  std::string outDir = cwd + "/syst_tables";
140  if ( gSystem->AccessPathName( outDir.c_str() ) ) gSystem->mkdir( outDir.c_str() );
141 
142  // 2019 Best Fit
143  //std::string calcfile = "/nova/ana/nu_e_ana/Ana2019/Results/BestFits/bestfits_joint_realData_both_systs.root";
144  //TFile *calcf = new TFile(calcfile.c_str());
145  //auto calctemp = LoadFrom<osc::IOscCalc>(calcf, "NH_UO_calc").release();
146  //auto calc = (osc::IOscCalcAdjustable*)calctemp->Copy();
147 
148  //double dmsq32 = kFitDmSq32.GetValue(calc);
149  //double ssth23 = kFitSinSqTheta23.GetValue(calc);
150  //double dCP = kFitDeltaInPiUnits.GetValue(calc);
151  // 2020 Best Fit
152  /*double dmsq32 = 2.406e-3;
153  double ssth23 = .568;
154  double ss2th13 = .085;
155  double dCP = .820;*/
156 
157  // 2020 Best Fit
158  std::string calcfile = "/nova/ana/3flavor/Ana2020/Fits/RealData/WithSeeds/bestfits_joint_realData_both_systs.root";
159 
160  TFile *calcf = new TFile(calcfile.c_str());
161  auto calctemp = LoadFrom<osc::IOscCalc>(calcf, "NH_UO_calc").release();
162  auto calc = (osc::IOscCalcAdjustable*)calctemp->Copy();
163 
164  double dmsq32 = kFitDmSq32.GetValue(calc);
168 
169  std::cout << "Best fit points:" << std::endl;
170  std::cout << "dmsq32 = " << dmsq32 << std::endl;
171  std::cout << "ssth23 = " << ssth23 << std::endl;
172  std::cout << "dCP = " << dCP << std::endl;
173 
174  // Experiments and correlations
175  std::vector<ExptCorr> exptCorrs;
176  AddExptCorrNue( exptCorrs, calc, "fhc", ptExtrap, fakeNDData );
177  AddExptCorrNue( exptCorrs, calc, "rhc", ptExtrap, fakeNDData );
178  AddExptCorrNumu( exptCorrs, calc, "fhc", ptExtrap, fakeNDData );
179  AddExptCorrNumu( exptCorrs, calc, "rhc", ptExtrap, fakeNDData );
180 
181  auto exptThis = new MultiExperiment();
182  for ( unsigned int i = 0; i < exptCorrs.size(); ++i )
183  {
184  std::cout << "Adding experiment " << i+1 << std::endl;
185  exptThis->Add( exptCorrs[i].first );
186  exptThis->SetSystCorrelations( i, exptCorrs[i].second );
187  }
188  exptThis->Add( WorldReactorConstraint2019() );
189 
190  // All Joint Systs
191  bool smallgenie = true;
192  bool isFit = true;
193  std::vector<const ISyst*> allSysts = get3FlavorAna2020AllSysts( EAnaType2020::k3FlavorAna, smallgenie, BeamType2020::kBoth, isFit, ptExtrap );
194 
195  // Syst Categories
196  std::vector<const ISyst*> xsecSysts;
197  Add3FlavorAna2020XSecSysts( xsecSysts );
198  std::vector<const ISyst*> fluxSysts;
199  Add3FlavorAna2020BeamSysts( fluxSysts );
200  std::vector<const ISyst*> calibSysts;
201  Add3FlavorAna2020CalibSysts( calibSysts );
202  std::vector<const ISyst*> lightSysts;
203  Add3FlavorAna2020LightSysts( lightSysts );
204  std::vector<const ISyst*> leptonRecoSysts;
205  Add3FlavorAna2020MuEnergySysts( leptonRecoSysts );
206  Add3FlavorAna2020LeptonAngleSysts( leptonRecoSysts, ptExtrap );
207  std::vector<const ISyst*> neutronSysts;
208  Add3FlavorAna2020NeutronSysts( neutronSysts );
209  std::vector<const ISyst*> nearFarSysts;
211  Add3FlavorAna2020MichelTagSysts( nearFarSysts );
212  Add3FlavorAna2020NormSysts( nearFarSysts );
213  AddNonLoadable2020Systs( nearFarSysts );
214 
215  std::map< std::string, std::vector<const ISyst*> > mapSystVecs;
216  mapSystVecs[ "Neutrino Cross Sections" ] = xsecSysts;
217  mapSystVecs[ "Beam Flux" ] = fluxSysts;
218  mapSystVecs[ "Detector Calibration" ] = calibSysts;
219  mapSystVecs[ "Detector Response" ] = lightSysts;
220  mapSystVecs[ "Lepton Reconstruction" ] = leptonRecoSysts;
221  mapSystVecs[ "Neutron Uncertainty" ] = neutronSysts;
222  mapSystVecs[ "Near-Far Uncor." ] = nearFarSysts;
223 
224  std::map <const IFitVar *, std::vector <double> > th23_seeds = {{&kFitDeltaInPiUnits, {dCP}}, { &kFitDmSq32, {dmsq32}}};
225  std::map <const IFitVar *, std::vector <double> > delta_seeds = {{&kFitSinSqTheta23, {ssth23}}, { &kFitDmSq32, {dmsq32}}, {&kFitSinSq2Theta13, {.085}}};
226  std::map <const IFitVar *, std::vector <double> > dmsq32_seeds = {{&kFitSinSqTheta23, {ssth23}}, {&kFitDeltaInPiUnits, {dCP}}};
227  if(seeds)
228  {
229  delta_seeds = { {&kFitSinSqTheta23, {.466, .5, ssth23}}, { &kFitDmSq32, {dmsq32}}, {&kFitSinSq2Theta13, {.085}} };
230  th23_seeds = { {&kFitDeltaInPiUnits, {.0, .5, 1.0, 1.5}}, { &kFitDmSq32, {dmsq32}} };
231  dmsq32_seeds = { {&kFitSinSqTheta23, {.466, .5, ssth23}}, {&kFitDeltaInPiUnits, {.0, .5, 1.0, 1.5}}};
232  }
233 
234  // Define what to profile over
235  const int steps = 60;
236  struct ProfDef{
237  const IFitVar * fitvar;
238  double minx;
239  double maxx;
240  std::vector<const IFitVar *> profvars;
241  std::map <const IFitVar *, std::vector <double> >profseeds;
242  //const SeedList profseeds;
243  double bf;
244  int oom;
247  std::string suffix;
248  };
249 
250  std::vector<ProfDef> profiles = {
251  {&kFitSinSqTheta23, 0.3, 0.7, {&kFitDmSq32, &kFitDeltaInPiUnits, &kFitSinSq2Theta13}, th23_seeds,
252  ssth23, 0, "$\\mathrm{sin}^2\\theta_{23}$", "Uncertainty in sin^{2}#theta_{23}", "th23"},
253  {&kFitDeltaInPiUnits, -.5, 2.2, {&kFitDmSq32, &kFitSinSqTheta23, &kFitSinSq2Theta13}, delta_seeds,
254  dCP, 0, "$\\delta_{CP}/\\pi$", "Uncertainty in #delta_{CP}/#pi", "dcp"},
255  {&kFitDmSq32, 2e-3, 3e-3, {&kFitDeltaInPiUnits, &kFitSinSqTheta23, &kFitSinSq2Theta13}, dmsq32_seeds,
256  dmsq32, 3, "$\\vert\\Delta m^2_{32}\\vert$ ($\\times 10^{-3}~\\mathrm{eV}^2$)", "Uncertainty in #Delta m^{2}_{32} (#times10^{-3} eV^{2})", "dmsq"}
257  };
258 
259  // outputs
260  TFile* fOut = new TFile( ( outDir + "/syst_table_profiles_" + outStr + ".root" ).c_str(), "RECREATE" );
261 
262  ofstream txt;
263  txt.open( ( outDir + "/syst_table_" + outStr + ".txt" ).c_str() );
264 
265  txt<<std::setprecision(2);
266 
267  // Profiles n things
268  SetFakeCalc(calc, ssth23, dmsq32, dCP);
269  kFitSinSq2Theta13.SetValue(calc, ss2th13);
270 
271  double range;
272  float hi, low;
273  std::map<std::string, double> statup;
274  std::map<std::string, double> statdn;
275  std::map<std::string,std::map<std::string,std::pair<double,double>>> bars;
276 
277  txt<< "Source of Uncertainty";
278  for(auto prof: profiles) txt<< " & " << prof.latex;
279  txt<< " \\\\" << std::endl;
280  txt<< "\\hline" << std::endl;
281 
282  // Stat only
283  for(auto prof: profiles){
284  SetFakeCalc(calc, ssth23, dmsq32, dCP);
285  kFitSinSq2Theta13.SetValue(calc, ss2th13);
286 
287  TGraph* plot = (TGraph*)Profile(exptThis, calc,
288  prof.fitvar,
289  steps, prof.minx, prof.maxx, -1,
290  prof.profvars,
291  {},
292  prof.profseeds);
293 
294  plot -> Write((prof.suffix+"_stat").c_str());
295 
296  GetLimits(plot, hi, low);
297 
298  double up = hi-prof.bf;
299  double dn = prof.bf-low;
300 
301  statup[prof.suffix] = up;
302  statdn[prof.suffix] = dn;
303  }
304 
305  // Systs
306  if(!full){
307  for(auto const &systVec: mapSystVecs) {
308  if ( systVec.second.empty() )
309  {
310  std::cout << "Skipping " << systVec.first << " with empty syst vector" << std::endl;
311  continue;
312  }
313  txt<< systVec.first ;
314 
315  for(auto prof: profiles){
318 
319  TGraph* systplot = (TGraph*)Profile(exptThis, calc,
320  prof.fitvar,
321  steps, prof.minx, prof.maxx, -1,
322  prof.profvars,
323  systVec.second,
324  prof.profseeds);
325  systplot -> Write((prof.suffix+"_" + systVec.first).c_str());
326 
327  GetLimits(systplot, hi, low);
328 
329  double plus = sqrt( fabs( (hi-prof.bf)*(hi-prof.bf) - (statup[prof.suffix]*statup[prof.suffix]) ) ) * pow(10,prof.oom);
330  double minus = sqrt( fabs( (prof.bf-low)*(prof.bf-low) - (statdn[prof.suffix]*statdn[prof.suffix]) ) ) * pow(10,prof.oom);
331 
332  WriteUncertainty( txt, plus, minus );
333 
334  bars[prof.suffix][systVec.first] = {minus,plus};
335  }
336  txt<< " \\\\" <<std::endl;
337  }
338  }
339 
340  if(full){
341  for(const ISyst* syst: allSysts) {
342  txt<< syst->LatexName() ;
343  for(auto prof: profiles){
346 
347  TGraph* systplot = (TGraph*)Profile(exptThis, calc,
348  prof.fitvar,
349  steps, prof.minx, prof.maxx, -1,
350  prof.profvars,
351  {syst},
352  prof.profseeds);
353 
354  systplot -> Write((prof.suffix+"_" + syst->ShortName()).c_str());
355 
356  GetLimits(systplot, hi, low);
357 
358  double plus = sqrt( fabs( (hi-prof.bf)*(hi-prof.bf) - (statup[prof.suffix]*statup[prof.suffix]) ) ) * pow(10,prof.oom);
359  double minus = sqrt( fabs( (prof.bf-low)*(prof.bf-low) - (statdn[prof.suffix]*statdn[prof.suffix]) ) ) * pow(10,prof.oom);
360 
361  WriteUncertainty( txt, plus, minus );
362 
363  bars[prof.suffix][syst->ShortName()] = {minus, plus};
364  }
365  txt<< " \\\\" <<std::endl;
366  }
367  }
368 
369  txt<< "\\hline" <<std::endl;
370 
371  // Total uncertainty
372  txt<< "Systematic Uncertainty" ;
373  for(auto prof: profiles){
375 
376  TGraph* totplot = (TGraph*)Profile(exptThis, calc,
377  prof.fitvar,
378  steps, prof.minx, prof.maxx, -1,
379  prof.profvars,
380  allSysts,
381  prof.profseeds);
382  totplot -> Write((prof.suffix+"_totError").c_str());
383 
384  GetLimits(totplot, hi, low);
385 
386  double plus = sqrt( fabs( (hi-prof.bf)*(hi-prof.bf) - (statup[prof.suffix]*statup[prof.suffix]) ) ) * pow(10,prof.oom);
387  double minus = sqrt( fabs( (prof.bf-low)*(prof.bf-low) - (statdn[prof.suffix]*statdn[prof.suffix]) ) ) * pow(10,prof.oom);
388 
389  WriteUncertainty( txt, plus, minus );
390 
391  }
392  txt<< " \\\\" <<std::endl;
393 
394  txt<< "Statistical Uncertainty" ;
395  for(auto prof: profiles){
396 
397  double plus = statup[prof.suffix] * pow(10,prof.oom);
398  double minus = statdn[prof.suffix] * pow(10,prof.oom);
399  WriteUncertainty( txt, plus, minus );
400  }
402 
403  fOut -> Close();
404  delete fOut;
405 
406  for(auto prof: profiles){
407  TCanvas *c;
408  ErrorBarChart(bars[prof.suffix],{statdn[prof.suffix]*pow(10,prof.oom),statup[prof.suffix]*pow(10,prof.oom)},prof.root);
409  gPad->SetLeftMargin(0.35);
410  gPad->SetBottomMargin(0.15);
411  simulation();
412  gPad->Print( ( outDir + "/syst_table_" + prof.suffix + "_" + outStr + ".pdf" ).c_str() );
413  gPad->Print( ( outDir + "/syst_table_" + prof.suffix + "_" + outStr + ".png" ).c_str() );
414  gPad->Print( ( outDir + "/syst_table_" + prof.suffix + "_" + outStr + ".C" ).c_str() );
415  }
416 
417 }
Spectrum * GetFakeData(const IPrediction *pred, osc::IOscCalc *calc, const double pot, TH1D *cosmics=0)
void latex(double x, double y, std::string txt, double ang=0, int align=22, double size=0.042)
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
void AddExptCorrNumu(std::vector< ExptCorr > &exptCorrs, osc::IOscCalc *calc, std::string beam, bool ptExtrap, bool fakeNDData)
double ssth23
fvar< T > fabs(const fvar< T > &x)
Definition: fabs.hpp:15
Float_t y1[n_points_granero]
Definition: compare.C:5
double GetValue(const osc::IOscCalcAdjustable *osc) const override
double GetValue(const osc::IOscCalcAdjustable *osc) const override
Forward to wrapped Var&#39;s GetValue()
const FitDmSq32 kFitDmSq32
Definition: FitVars.cxx:18
Float_t x1[n_points_granero]
Definition: compare.C:5
double GetValue(const osc::IOscCalcAdjustable *osc) const override
Definition: FitVars.cxx:171
T sqrt(T number)
Definition: d0nt_math.hpp:156
General interface to oscillation calculators.
Definition: StanTypedefs.h:22
constexpr T pow(T x)
Definition: pow.h:75
float GetLimits(TH1F *plot, float &hi, float &low)
TGraph * Profile(const IExperiment *expt, osc::IOscCalcAdjustable *calc, const IFitVar *v, int nbinsx, double minx, double maxx, double input_minchi, const std::vector< const IFitVar * > &profVars, const std::vector< const ISyst * > &profSysts, const SeedList &seedPts, const std::vector< SystShifts > &systSeedPts, std::map< const IFitVar *, TGraph * > &profVarsMap, std::map< const ISyst *, TGraph * > &profSystsMap, MinuitFitter::FitOpts opts)
scan in one variable, profiling over all others
Definition: Fit.cxx:48
void AddNonLoadable2020Systs(std::vector< const ISyst * > &systs, const EAnaType2020 ana)
void Add3FlavorAna2020NeutronSysts(std::vector< const ISyst * > &systs)
void SetValue(osc::IOscCalcAdjustable *osc, double val) const override
Definition: FitVars.cxx:48
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)
double GetValue(const osc::IOscCalcAdjustable *osc) const override
Definition: FitVars.cxx:42
osc::OscCalcDumb calc
osc::IOscCalcAdjustable * DefaultOscCalc()
Create a new calculator with default assumptions for all parameters.
Definition: Calcs.cxx:49
Encapsulate code to systematically shift a caf::SRProxy.
Definition: ISyst.h:14
std::string outDir
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)
void Add3FlavorAna2020MichelTagSysts(std::vector< const ISyst * > &systs, const EAnaType2020 ana, const BeamType2020 beam)
TSpline3 hi("hi", xhi, yhi, 18,"0")
expt
Definition: demo5.py:34
std::pair< SingleSampleExperiment *, Correlations > ExptCorr
void syst_table_fit_new(const TString option)
Definition: lz4.cxx:387
void simulation()
def cwd()
Definition: g4zmq.py:52
std::vector< std::pair< const ISyst *, const ISyst * > > Correlations
double dCP
root
Link up the nodes tree #####.
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)
void Add3FlavorAna2020LeptonAngleSysts(std::vector< const ISyst * > &systs, const bool ptExtrap)
const double kAna2020FHCPOT
Definition: Exposures.h:233
TLatex * prelim
Definition: Xsec_final.C:133
void SetFakeCalc(osc::IOscCalcAdjustable *calc, double ssth23=-5, double dmsq32=-5, double dCP_Pi=-5)
const double kAna2020RHCPOT
Definition: Exposures.h:235
c1 Close()
static bool isFHC
void AddExptCorrNue(std::vector< ExptCorr > &exptCorrs, osc::IOscCalc *calc, std::string beam, bool ptExtrap, bool fakeNDData)
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)
static float min(const float a, const float b, const float c)
Definition: absgeo.cxx:45
Combine multiple component experiments.
void Add3FlavorAna2020LightSysts(std::vector< const ISyst * > &systs)
void Add3FlavorAna2020NueAcceptSysts(std::vector< const ISyst * > &systs, const EAnaType2020 ana, const BeamType2020 beam, const bool ptExtrap)
void Add3FlavorAna2020NormSysts(std::vector< const ISyst * > &systs, const BeamType2020 beam)
void Add3FlavorAna2020MuEnergySysts(std::vector< const ISyst * > &systs, const EAnaType2020 ana)
double dmsq32
double ss2th13
const ConstrainedFitVarWithPrior fitSsqTh23_UniformPriorSsqTh23 & kFitSinSqTheta23
void WriteUncertainty(ofstream &txt, double plus, double minus)
void Add3FlavorAna2020XSecSysts(std::vector< const ISyst * > &systs, const EAnaType2020 ana, bool smallgenie)
std::vector< const ISyst * > get3FlavorAna2020AllSysts(const EAnaType2020 ana, const bool smallgenie, const BeamType2020 beam, const bool isFit, const bool ptExtrap)
void ErrorBarChart(const std::map< std::string, std::pair< double, double >> &systErrors, const std::pair< double, double > &statErr, const std::string &label)
Make a simple plot of relative size of different errors.
Definition: Plots.cxx:798
Interface definition for fittable variables.
Definition: IFitVar.h:16
std::vector< std::pair< const ISyst *, const ISyst * > > GetCorrelations(bool isNue, bool isFHC, bool ptExtrap)
const ReactorExperiment * WorldReactorConstraint2019()
Reactor constraint from PDG 2019.
const FitSinSq2Theta13 kFitSinSq2Theta13
Definition: FitVars.cxx:13
void Add3FlavorAna2020BeamSysts(std::vector< const ISyst * > &systs, const EAnaType2020 ana)
Float_t e
Definition: plot.C:35
const FitVarWithPrior fitDeltaInPiUnits_UniformPriordCP & kFitDeltaInPiUnits
void Add3FlavorAna2020CalibSysts(std::vector< const ISyst * > &systs)
virtual IOscCalc * Copy() const override
Definition: OscCalcDumb.h:19
T minus(const T &x)
Definition: minus.hpp:15
Compare a single data spectrum to the MC + cosmics expectation.
void plot(std::string label, std::map< std::string, std::map< std::string, Spectrum * >> &plots, bool log)
gm Write()
enum BeamMode string