joint_fit_future_contour_univ.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 "Utilities/rootlogon.C"
18 #include "OscLib/IOscCalc.h"
20 
22 
23 #include "TCanvas.h"
24 #include "TMarker.h"
25 #include "TBox.h"
26 #include "TLatex.h"
27 #include "TColor.h"
28 #include "TGraph.h"
29 #include "TVectorD.h"
30 #include "TF1.h"
31 #include "TLegend.h"
32 #include "TLine.h"
33 #include "TMarker.h"
34 #include "TStyle.h"
35 #include "TSystem.h"
36 #include "TGaxis.h"
37 
38 #include <algorithm>
39 #include <vector>
40 #include <string>
41 
42 using namespace ana;
43 
44 void joint_fit_future_contour_univ(int universes=2,
45  TString uni_tag = "",
46  double deltaCP = 0.18,
47  double dmsq32 = 2.51e-3,
48  double th23 = 0.58,
49  string sign = "plus",
50  double FHCexp = kAna2020FHCPOT,
51  double RHCexp = kAna2020RHCPOT,
52  double FHClive = kAna2020FHCLivetime,
53  double RHClive = kAna2020RHCLivetime,
54  bool corrSysts = false,
55  TString options="joint_mockData_both_onlyIH",
56  bool dmsqSurf = false,
57  bool th13Surf = false)
58 {
59 
60  cout<<"\nLOAD PREDICTIONS\n\n"<<endl;
61  bool nueOnly = options.Contains("nueOnly");
62  bool numuOnly = options.Contains("numuOnly");
63  bool joint = options.Contains("joint");
64  assert (nueOnly || numuOnly || joint);
65 
66  bool FHCOnly = options.Contains("FHCOnly");
67  bool RHCOnly = options.Contains("RHCOnly");
68  bool both = options.Contains("both");
69  assert (FHCOnly || RHCOnly || both);
70 
71  bool onlyNH = options.Contains("onlyNH");
72  bool onlyIH = options.Contains("onlyIH");
73 
74  auto suffix = options;
75  if(dmsqSurf) suffix+= "_dmsq";
76  if(th13Surf) suffix+= "_th13";
77  if(corrSysts) suffix+="_systs";
78  else suffix+="_stats";
79  suffix+=std::to_string(universes);
80 
81  string syst = (corrSysts?"syst":"stat");
82 
83  TString outfilename (syst + "_hist_contours_" + suffix + "_" + uni_tag);
84  TFile * outfile = new TFile(outfilename+".root","recreate");
85 
86  //////////////////////////////////////////////////
87  // Load Nue and Numu experiments
88  //////////////////////////////////////////////////
89  // need numu only for prestage seeds
90  // make map instead of struct in future
91 
92  std::string decomp = ""; // use Pt extrap all the times
93  std::vector <ana::predictions> preds = LoadPredictions (corrSysts, true, decomp, nueOnly || joint, numuOnly || joint, FHCOnly || both, RHCOnly || both);
94  std::vector <ana::predictions> preds_numu_only = LoadPredictions (corrSysts, true, decomp, false, numuOnly || joint, FHCOnly || both, RHCOnly || both);
95  std::vector <Spectrum > data;
96  std::vector <Spectrum > data_numu_only;
97  std::vector <const IExperiment * > expts;
98  std::vector <const IExperiment * > expts_numu_only;
99 
100  auto calc_fake = DefaultOscCalc();
101  if (sign =="minus") dmsq32 = -dmsq32;
102  SetFakeCalc(calc_fake, th23, dmsq32, deltaCP);
103 
104  outfile->cd();
105  TVectorD osc(3);
106  osc[0] = th23;
107  osc[1] = dmsq32;
108  osc[2] = deltaCP;
109  osc.Write("osc_params");
110 
111  for (int j = 0; j< universes; j++){
112  cout<<"universe no "<<j<<endl;
113  cout<<"clear expts and data vectors"<<endl;
114  expts.clear();
115  expts_numu_only.clear();
116  data.clear();
117  data_numu_only.clear();
118  // isn't set for individual fits (only joint nue+numu rhc+fhc)
119  if(!numuOnly){
120  if(FHCOnly || both ) data.push_back(GenerateFutureData(calc_fake, preds[0].pred, preds[0].cos.first, FHCexp, FHClive));
121  if(RHCOnly || both ) data.push_back(GenerateFutureData(calc_fake, preds[1].pred, preds[1].cos.first, RHCexp, RHClive));
122  }
123  if(!nueOnly){
124  if(FHCOnly || both ){
125  std::vector <Spectrum> numu_data;
126  numu_data.push_back(GenerateFutureData(calc_fake, preds[2].pred, preds[2].cos.first, FHCexp, FHClive));
127  numu_data.push_back(GenerateFutureData(calc_fake, preds[3].pred, preds[3].cos.first, FHCexp, FHClive));
128  numu_data.push_back(GenerateFutureData(calc_fake, preds[4].pred, preds[4].cos.first, FHCexp, FHClive));
129  numu_data.push_back(GenerateFutureData(calc_fake, preds[5].pred, preds[5].cos.first, FHCexp, FHClive));
130  data.insert(data.end(),numu_data.begin(), numu_data.end());
131  data_numu_only.insert(data_numu_only.end(),numu_data.begin(), numu_data.end());
132  }
133  if(RHCOnly || both ){
134  std::vector <Spectrum> numu_data;
135  numu_data.push_back(GenerateFutureData(calc_fake, preds[6].pred, preds[6].cos.first, RHCexp, RHClive));
136  numu_data.push_back(GenerateFutureData(calc_fake, preds[7].pred, preds[7].cos.first, RHCexp, RHClive));
137  numu_data.push_back(GenerateFutureData(calc_fake, preds[8].pred, preds[8].cos.first, RHCexp, RHClive));
138  numu_data.push_back(GenerateFutureData(calc_fake, preds[9].pred, preds[9].cos.first, RHCexp, RHClive));
139  data.insert(data.end(),numu_data.begin(), numu_data.end());
140  data_numu_only.insert(data_numu_only.end(),numu_data.begin(), numu_data.end());
141  }
142  }
143 
144  cout<<"check all vector sizes: "<<preds.size()<<" data "<<data.size()<<endl;
145 
146  TDirectory* d = outfile->mkdir(("universe_"+std::to_string(j)).c_str());
147  outfile->cd(("universe_"+std::to_string(j)).c_str());
148 
149  for(int i = 0; i < int(preds.size()); ++i){
150  auto thisdata = data[i];
151  double POT = thisdata.POT();
152  double LT = thisdata.Livetime();
153  thisdata.SaveTo(d, ("data_exp_"+std::to_string(i)).c_str());
154  auto hcos = preds[i].cos.first->ToTH1(LT, kBlack, kSolid, kLivetime);
155  cout<<i<<" "<<preds[i].name<<" POT "<<POT<<" tot MC "<<preds[i].pred->Predict(calc_fake).Integral(POT)<<
156  " cos "<<hcos->Integral()<<" cos er "<<preds[i].cos.second<<" analyze data "<<thisdata.Integral(POT)<<endl;
157  expts.push_back(new SingleSampleExperiment(preds[i].pred, thisdata, *preds[i].cos.first, preds[i].cos.second, true));
158  }
159 
160  cout<<"Make numu only experiment to get the seeds"<<endl;
161  //make numu only experiment for seeds:
162  for(int i = 0; i < (int) preds_numu_only.size(); ++i){
163  auto thisdata = data_numu_only[i];
164  double POT = thisdata.POT();
165  double LT = thisdata.Livetime();
166  auto hcos = preds_numu_only[i].cos.first->ToTH1(LT, kBlack, kSolid, kLivetime);
167  cout<<i<<" "<<preds_numu_only[i].name<<" POT "<<POT<<" tot MC "<<preds_numu_only[i].pred->Predict(calc_fake).Integral(POT)<<
168  " cos "<<hcos->Integral()<<" cos er "<<preds_numu_only[i].cos.second<<" analyze data "<<thisdata.Integral(POT)<<endl;
169  expts_numu_only.push_back(new SingleSampleExperiment(preds_numu_only[i].pred, thisdata, *preds_numu_only[i].cos.first, preds_numu_only[i].cos.second, true));
170  }
171 
172  //////////////////////////////////////////////////
173  // Add constraints, make experiments
174  //////////////////////////////////////////////////
175  std::cout << "\nCreating multiexperiment\n" << std::endl;
176  if(!th13Surf){
177  std::cout << "Adding WorldReactorConstraint2017\n";
178  expts.push_back(WorldReactorConstraint2019());
179  }
180  if(nueOnly) {
181  std::cout << "Adding Dmsq32ConstraintPDG2017\n";
182  expts.push_back(&kDmsq32ConstraintPDG2019);
183  }
184  std::cout << "Creating Multiexperiment with a total of "
185  << expts.size() << " experiments\n\n" << std::endl;
186  auto exptThis = new MultiExperiment(expts);
187 
188  std::cout << "Creating Multiexperiment of numu only SimpleExp with a total of "
189  << expts_numu_only.size() << " experiments\n\n" << std::endl;
190  auto exptThis_numu_only = new MultiExperiment(expts_numu_only);
191 
192 
193  ////////////////////////////////////////////////////////////
194  // Systematics
195  ////////////////////////////////////////////////////////////
196  std::cout << "Systematics for the fit:\n";
197 
198  bool ptExtrap = true;
199  auto systs = GetJointFitSystematicList(corrSysts, nueOnly, numuOnly, FHCOnly||both, RHCOnly||both, true, ptExtrap);
200 
201  int nnumu = 4;
202  std::cout << "\n\nSystematic correlations...\n";
203  if(!nueOnly && ! numuOnly && corrSysts){
204  if(FHCOnly){
205  exptThis->SetSystCorrelations(0, GetCorrelations(true, true, ptExtrap));
206  auto notfornumu = GetCorrelations(false, true, ptExtrap);
207  for(int i =0; i < nnumu; ++i) exptThis->SetSystCorrelations(i+1, notfornumu);
208  }
209  if(RHCOnly){
210  exptThis->SetSystCorrelations(0, GetCorrelations(true, false, ptExtrap));
211  auto notfornumu = GetCorrelations(false, false, ptExtrap);
212  for(int i =0; i < nnumu; ++i) exptThis->SetSystCorrelations(i+1, notfornumu);
213  }
214  if(both){
215  exptThis->SetSystCorrelations(0, GetCorrelations(true, true, ptExtrap));
216  exptThis->SetSystCorrelations(1, GetCorrelations(true, false, ptExtrap));
217  auto notfornumufhc = GetCorrelations(false, true, ptExtrap);
218  for(int i =0; i < 4; ++i) exptThis->SetSystCorrelations(i+2, notfornumufhc);
219  auto notfornumurhc = GetCorrelations(false, false, ptExtrap);
220  for(int i =0; i < 4; ++i) exptThis->SetSystCorrelations(i+6, notfornumurhc);
221  }
222  }
223  if (nueOnly && corrSysts){
224  if (FHCOnly) exptThis->SetSystCorrelations(0, GetCorrelations(true, true, ptExtrap));
225  if (RHCOnly) exptThis->SetSystCorrelations(0, GetCorrelations(true, false, ptExtrap));
226  if (both) {
227  exptThis->SetSystCorrelations(0, GetCorrelations(true, true, ptExtrap));
228  exptThis->SetSystCorrelations(1, GetCorrelations(true, false, ptExtrap));
229  }
230  }
231 
232  std::cout << "Systematics for the numu only fit:\n";
233  auto systs_numu_only = GetJointFitSystematicList(corrSysts, false, true, FHCOnly||both, RHCOnly||both, true, ptExtrap);
234 
235  if (corrSysts && numuOnly && both){
236  auto notfornumufhc = GetCorrelations(false, true, ptExtrap);
237  for(int i =0; i < 4; ++i) {
238  exptThis->SetSystCorrelations(i, notfornumufhc);
239  exptThis_numu_only->SetSystCorrelations(i, notfornumufhc);
240  }
241  auto notfornumurhc = GetCorrelations(false, false, ptExtrap);
242  for(int i =0; i < 4; ++i) {
243  exptThis->SetSystCorrelations(i+4, notfornumurhc);
244  exptThis_numu_only->SetSystCorrelations(i+4, notfornumurhc);
245  }
246  }
247 
248  ////////////////////////////////////////////////////////////
249  // Fit
250  ////////////////////////////////////////////////////////////
251  std::cout << "Starting the fit" << std::endl;
252 
254 
255  SystShifts auxShifts = SystShifts::Nominal();
256  // In case some systs need different seeds
257  std::vector <SystShifts> seedShifts = {};
258 
259  //////////////////////////////////////////////////////////////////////
260  /////////////////////////// Seed controller ////////////////////////////
261  ////////////////////////////////////////////////////////////////////////
262 
263 
264  cout<<"------------------- Start prestage seeds --------------------------"<<endl;
265 
266  double minchi_numu = 1E20;
267  double pre_seed_th23;
268  double pre_seed_dmsq;
269  ResetOscCalcToDefault(calc);
270  auxShifts.ResetToNominal();
271 
272  double maxmix = 0.514; // from the numu results
273  double numu_pre_seedLONH, numu_pre_seedUONH, numu_pre_seedLOIH, numu_pre_seedUOIH, dmsq_numu_pre_seedNH, dmsq_numu_pre_seedIH;
274 
275  for(int hie:{1}){
276  std::cout << "\n\nFinding test best fit " << (hie>0? "NH " : "IH ") << "\n\n";
277  MinuitFitter fitnumu_only(exptThis_numu_only, {&kFitSinSqTheta23, &kFitDmSq32Scaled}, {});
278 
279  auto thisminchi = fitnumu_only.Fit(calc, auxShifts ,
280  SeedList({{&kFitDmSq32Scaled,{hie*2.5}},
281  {&kFitSinSqTheta23, {0.4} }}), {},// seedShifts
283 
284  if(thisminchi < minchi_numu) minchi_numu = thisminchi;
285  }
286  pre_seed_th23 = kFitSinSqTheta23.GetValue(calc);
287  pre_seed_dmsq = kFitDmSq32Scaled.GetValue(calc);
288 
289  numu_pre_seedLONH = ((pre_seed_th23>maxmix)?(2*maxmix-pre_seed_th23):pre_seed_th23);
290  numu_pre_seedUONH = ((pre_seed_th23>maxmix)?pre_seed_th23:(2*maxmix-pre_seed_th23));
291 
292  ResetOscCalcToDefault(calc);
293  auxShifts.ResetToNominal();
294 
295  cout<<"------------------- End prestage seeds --------------------------"<<endl;
296 
297  struct th23helper{
298  std::vector<double> seeds;
299  const IFitVar * var;
300  TString label;
301  };
302 
303 
304  std::vector <th23helper> th23seeds;
305 
306  th23helper temp;
307  temp.seeds = {0.3};
308  temp.var = &kFitSinSqTheta23LowerOctant;
309  temp.label = "LO";
310 
311  //for NH:
312  th23seeds.push_back( { {0.499, numu_pre_seedLONH}, &kFitSinSqTheta23LowerOctant, "LO"});
313  th23seeds.push_back( { {0.501, numu_pre_seedUONH}, &kFitSinSqTheta23UpperOctant, "UO"});
314  std::vector<double> th23_all_seeds_NH = {numu_pre_seedLONH, 0.5, numu_pre_seedUONH};
315 
316  std::vector<double> delta_seeds = {0, 0.5, 1., 1.5};
317  std::vector<double> th23_old_seeds = {0.45, 0.5, 0.55};
318 
319  /////////////////////////////////////////////////////////////////////////
320  //////////////////////////// Different best fit searches //////////////////
321  ///////////////////////////////////////////////////////////////////////////
322 
323  double minchi23 = 1E20; double thisdmsq = -1; double thisth23 = -1; double thisdcp = -1; double thisth13 = -1;
324  double curdmsq, curth23, curdcp, curth13;
325 
326  for(int hie:{-1,1}){
327  for (auto & thseed: th23seeds){
328  std::cout << "\n\nFinding best fit "
329  << thseed.label
330  << (hie>0? " NH " : " IH ")
331  << "\n\n";
332  for (auto const & s:thseed.seeds) std::cout << s << ", ";
333  std::cout << std::endl;
334  cout<<"pre seed from numu is "<<pre_seed_dmsq<<endl;
335  std::vector <const IFitVar*> fitvars = {&kFitDeltaInPiUnits,
336  thseed.var,
339 
340  MinuitFitter fit23(exptThis, fitvars, systs);
341  auto thisminchi = fit23.Fit(calc, auxShifts, SeedList({
342  {&kFitDmSq32Scaled,{hie*pre_seed_dmsq}},
343  {thseed.var, thseed.seeds},
344  {&kFitDeltaInPiUnits, delta_seeds},
345  {&kFitSinSq2Theta13, {0.082}} }),
347  );
348  curdmsq = kFitDmSq32Scaled.GetValue(calc);
349  curth13 = kFitSinSq2Theta13.GetValue(calc);
350  curth23 = thseed.var->GetValue(calc);
351  curdcp = kFitDeltaInPiUnits.GetValue(calc);
352  TVectorD v(5);
353  v[0] = thisminchi;
354  v[1] = curdmsq;
355  v[2] = curth23;
356  v[3] = curdcp;
357  v[4] = curth13;
358  string hietag = (hie>0? "NH": "IH");
359  v.Write("chi_"+std::to_string(j)+"_"+hietag+"_"+thseed.label);
360  if(thisminchi<minchi23){
361  thisdmsq = kFitDmSq32Scaled.GetValue(calc);
362  thisth13 = kFitSinSq2Theta13.GetValue(calc);
363  thisth23 = thseed.var->GetValue(calc);
364  thisdcp = kFitDeltaInPiUnits.GetValue(calc);
365  cout <<"this values (dmsq, th13, th23, dcp): "<<thisdmsq<<" "<<thisth13<<" "<<thisth23<<" "<<thisdcp<<endl;
366  }
367  minchi23= min(minchi23, thisminchi);
368  ResetOscCalcToDefault(calc);
369  auxShifts.ResetToNominal();
370  }//end th23
371  }//end hie
372  std::cout << "\nFound overall minchi " << minchi23 << std::endl;
373 
374  TVectorD v(5);
375  v[0] = minchi23;
376  v[1] = thisdmsq;
377  v[2] = thisth23;
378  v[3] = thisdcp;
379  v[4] = thisth13;
380  cout<<"minchi wrote into the file "<<minchi23<<endl;
381  v.Write(("bf_"+std::to_string(j)).c_str());
382 
383  int steps = 30;//10;// 5;
384  if(dmsqSurf){
385  std::cerr << "\n WARNING Using 20 bins for dmsq surface\n\n";
386  steps = 20;
387  }
388  //Now create all the surfaces
389  for(int hie: {-1, +1}){
390 
391  if((onlyNH && hie<0) || (onlyIH && hie>0)) continue;
392 
393  std::cout << "Starting surface " << (hie>0? "NH ": "IH") << "\n\n";
394  cout<<"the delta seeds are ";
395  for (auto const & s:delta_seeds) std::cout << s << ", ";
396  std::string hieStr = hie>0 ? "NH" : "IH";
397 
398  if(!th13Surf && ! dmsqSurf){
399  ResetOscCalcToDefault(calc);
400  calc->SetDmsq32(hie*fabs(calc->GetDmsq32()));
401  double low = (nueOnly)?0:0.3;
402  double high = (nueOnly)?1:0.7;
403  cout<<"low "<<low<<" high "<<high<<endl;
404  FrequentistSurface surf23(exptThis, calc,
405  &kFitDeltaInPiUnits,steps, 0, 2,
406  &kFitSinSqTheta23, steps, low, high,
408  //{},seedShifts
409  );
410 
411  auto surf1=surf23.ToTH2(minchi23);
412  surf1->Write((TString)"delta_th23_univ"+std::to_string(j)+"_"+hieStr);
413  surf23.SaveTo(d, (TString)"surf_delta_th23_univ"+std::to_string(j)+"_"+hieStr);
414  }
415  if(!th13Surf && dmsqSurf){
416  calc = DefaultOscCalc();
417  calc->SetDmsq32(hie*fabs(calc->GetDmsq32()));
418  double lowth23 = (RHCOnly)?0.2:0.35;
419  double highth23 = (RHCOnly)?1:0.7;
420  cout<<"lowth23 "<<lowth23<<" highth23 "<<highth23<<endl;
421  double lowdmsq = (hie>0?(RHCOnly?2.0:2.1):(RHCOnly?-3.0:-2.7));
422  double highdmsq = (hie>0?(RHCOnly?3.0:2.7):(RHCOnly?-2.0:-2.2));
423  FrequentistSurface surf23m(exptThis, calc,
424  &kFitSinSqTheta23, steps,lowth23, highth23,
425  &kFitDmSq32Scaled, steps, lowdmsq, highdmsq,
427  SeedList({{&kFitDeltaInPiUnits, delta_seeds}}));
428  auto surf6=surf23m.ToTH2(minchi23);
429  surf6->Write((TString)"th23_dm32_univ"+std::to_string(j)+"_"+(hie>0?"NH":"IH"));
430  surf23m.SaveTo(d, (TString)"surf_th23_dm32_univ"+std::to_string(j)+"_"+(hie>0?"NH":"IH"));
431 
432  }
433  if(th13Surf){
434  calc = DefaultOscCalc();
435  calc->SetDmsq32(hie*fabs(calc->GetDmsq32()));
436 
437  FrequentistSurface surf13(exptThis, calc,
438  &kFitSinSq2Theta13, steps, 0, (RHCOnly?1:0.35),
439  &kFitDeltaInPiUnits,steps, 0, 2,
441  SeedList({{&kFitSinSqTheta23, th23_all_seeds_NH}}));//, seedShifts);
442  auto surf4 = surf13.ToTH2(minchi23);
443  outfile->cd();
444  surf4->Write((TString)"th13_delta_univ"+std::to_string(j)+"_"+(hie>0?"NH":"IH"));
445  surf13.SaveTo(d, (TString)"surf_th13_delta_univ"+std::to_string(j)+"_"+(hie>0?"NH":"IH"));
446  }
447  } //end hie
448  }
449 
450  delete outfile;
451  std::cout << "\nSurfaces saved to " << outfilename << std::endl;
452  return;
453 
454 }
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
fvar< T > fabs(const fvar< T > &x)
Definition: fabs.hpp:15
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
const FitSinSqTheta23UpperOctant kFitSinSqTheta23UpperOctant
Definition: FitVars.cxx:16
const Dmsq32Constraint kDmsq32ConstraintPDG2019(2.444e-3, 0.034e-3, 2.55e-3, 0.04e-3)
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)
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
Spectrum GenerateFutureData(osc::IOscCalc *calc, const IPrediction *pred, Spectrum *cosmics, double futurePOT, double futureLT, bool randomSystShifts=false, bool asimov=false)
virtual void SetDmsq32(const T &dmsq32)=0
const char * label
const XML_Char const XML_Char * data
Definition: expat.h:268
Log-likelihood scan across two parameters.
const XML_Char * s
Definition: expat.h:262
string outfilename
knobs that need extra care
virtual std::unique_ptr< IFitSummary > Fit(osc::IOscCalcAdjustable *seed, SystShifts &bestSysts=junkShifts, const SeedList &seedPts=SeedList(), const std::vector< SystShifts > &systSeedPts={}, Verbosity verb=kVerbose) const
Master fitting method. Depends on FitHelper and FitHelperSeeded.
Definition: IFitter.cxx:69
const double kAna2020FHCLivetime
Definition: Exposures.h:237
Float_t d
Definition: plot.C:236
const double j
Definition: BetheBloch.cxx:29
virtual T GetDmsq32() const
Definition: IOscCalc.h:91
const ConstrainedFitVarWithPrior fitDmSq32Scaled_UniformPrior & kFitDmSq32Scaled
const double kAna2020FHCPOT
Definition: Exposures.h:233
void joint_fit_future_contour_univ(int universes=2, TString uni_tag="", double deltaCP=0.18, double dmsq32=2.51e-3, double th23=0.58, string sign="plus", double FHCexp=kAna2020FHCPOT, double RHCexp=kAna2020RHCPOT, double FHClive=kAna2020FHCLivetime, double RHClive=kAna2020RHCLivetime, bool corrSysts=false, TString options="joint_mockData_both_onlyIH", bool dmsqSurf=false, bool th13Surf=false)
void SetFakeCalc(osc::IOscCalcAdjustable *calc, double ssth23=-5, double dmsq32=-5, double dCP_Pi=-5)
const double kAna2020RHCPOT
Definition: Exposures.h:235
Oscillation probability calculators.
Definition: Calcs.h:5
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
TH2 * ToTH2(double minchi=-1) const
Definition: ISurface.cxx:161
Combine multiple component experiments.
double dmsq32
void SaveTo(TDirectory *dir, const std::string &name) const
const FitSinSqTheta23LowerOctant kFitSinSqTheta23LowerOctant
Definition: FitVars.cxx:17
const double kAna2020RHCLivetime
Definition: Exposures.h:238
void ResetToNominal()
Definition: SystShifts.cxx:144
const ConstrainedFitVarWithPrior fitSsqTh23_UniformPriorSsqTh23 & kFitSinSqTheta23
T cos(T number)
Definition: d0nt_math.hpp:78
assert(nhit_max >=nhit_nbins)
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
std::string to_string(ModuleType mt)
Definition: ModuleType.h:32
Float_t e
Definition: plot.C:35
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)
FILE * outfile
Definition: dump_event.C:13
def sign(x)
Definition: canMan.py:197
Compare a single data spectrum to the MC + cosmics expectation.
Perform MINUIT fits in one or two dimensions.
Definition: MinuitFitter.h:17
enum BeamMode string