Functions
test_fc_numu.C File Reference
#include "OscLib/OscCalcPMNSOpt.h"
#include "CAFAna/Cuts/Cuts.h"
#include "3FlavorAna/Cuts/NumuCuts.h"
#include "CAFAna/FC/FCCollection.h"
#include "CAFAna/FC/FCPoint.h"
#include "CAFAna/FC/FCSurface.h"
#include "CAFAna/Fit/MinuitFitter.h"
#include "CAFAna/Vars/FitVars.h"
#include "CAFAna/Core/Loaders.h"
#include "CAFAna/Core/LoadFromFile.h"
#include "CAFAna/Experiment/MultiExperiment.h"
#include "CAFAna/Prediction/PredictionNoExtrap.h"
#include "CAFAna/Prediction/PredictionInterp.h"
#include "CAFAna/Analysis/Plots.h"
#include "CAFAna/Core/Progress.h"
#include "CAFAna/Experiment/SingleSampleExperiment.h"
#include "CAFAna/Core/SpectrumLoader.h"
#include "CAFAna/Fit/FrequentistSurface.h"
#include "CAFAna/Systs/Systs.h"
#include "CAFAna/Core/Utilities.h"
#include "CAFAna/Vars/Vars.h"
#include "TCanvas.h"
#include "TFile.h"
#include "TH2.h"
#include "TLegend.h"
#include "TMarker.h"
#include "TRandom3.h"
#include "3FlavorAna/Vars/NumuVars.h"

Go to the source code of this file.

Functions

osc::IOscCalcAdjustabledefault_calc ()
 
void load_files ()
 
void fill_col (int nTrials, bool genSysts, bool fitSysts)
 
void plots (bool genSysts, bool fitSysts)
 
void test_fc_numu (int nexpts=1000000, bool genSysts=false, bool fitSysts=false)
 

Function Documentation

osc::IOscCalcAdjustable* default_calc ( )

Definition at line 34 of file test_fc_numu.C.

References std::asin(), calc, e, osc::_IOscCalcAdjustable< T >::SetdCP(), osc::_IOscCalcAdjustable< T >::SetDmsq21(), osc::_IOscCalcAdjustable< T >::SetDmsq32(), osc::_IOscCalcAdjustable< T >::SetL(), osc::_IOscCalcAdjustable< T >::SetRho(), osc::_IOscCalcAdjustable< T >::SetTh12(), osc::_IOscCalcAdjustable< T >::SetTh13(), osc::_IOscCalcAdjustable< T >::SetTh23(), and std::sqrt().

Referenced by fill_col(), load_files(), and plots().

35 {
36  // Make a calculator. Any of the variants is fine
38 
39  calc->SetL(810);
40  calc->SetRho(2.75);
41  calc->SetDmsq21(7.6e-5);
42  calc->SetDmsq32(2.35e-3);
43  calc->SetTh12(asin(sqrt(.87))/2); // PDG
44  calc->SetTh13(asin(sqrt(.10))/2);
45  calc->SetTh23(TMath::Pi()/4);
46  calc->SetdCP(0);
47 
48  return calc;
49 }
virtual void SetL(double L)=0
_OscCalcPMNSOpt< double > OscCalcPMNSOpt
virtual void SetDmsq21(const T &dmsq21)=0
T sqrt(T number)
Definition: d0nt_math.hpp:156
virtual void SetTh13(const T &th13)=0
osc::OscCalcDumb calc
virtual void SetDmsq32(const T &dmsq32)=0
virtual void SetRho(double rho)=0
virtual void SetTh23(const T &th23)=0
Float_t e
Definition: plot.C:35
virtual void SetTh12(const T &th12)=0
virtual void SetdCP(const T &dCP)=0
T asin(T number)
Definition: d0nt_math.hpp:60
void fill_col ( int  nTrials,
bool  genSysts,
bool  fitSysts 
)

Definition at line 82 of file test_fc_numu.C.

References ana::FCCollection::AddPoint(), calc, default_calc(), demo5::expt, fin, ana::IFitter::Fit(), ana::ConstrainedFitVarWithPrior::GetValue(), ana::kFitDmSq32Scaled, ana::kFitSinSqTheta23, ana::kNCScaleSyst, ana::kNormSyst, ana::IFitter::kQuiet, ana::LoadFrom< IPrediction >(), ana::LogLikelihood(), demo4::mock, ana::Spectrum::MockData(), plot_validation_datamc::pred, ana::IPrediction::PredictSyst(), cacheDefinitionData::prog, gen_flatrecord::pt, runNovaSAM::release, generate_hists::rnd, ana::FCCollection::SaveToFile(), ana::Progress::SetProgress(), ana::SystShifts::SetShift(), ana::ConstrainedFitVarWithPrior::SetValue(), and ana::Spectrum::ToTH1().

83 {
84  TFile* fin = new TFile("~/dev_fc/CAFAna/first_ana_fc_numu_pred.root");
86  IPrediction* predQE = LoadFrom<IPrediction>(fin, "qe").release();
87 
89 
90  FCCollection fccol;
91 
92  // std::map<int, double> bestChis;
93 
94  TRandom3 rnd(0); // zero seeds randomly
95 
96  Progress prog("Performing mock experiments");
97  for(int iTrial = 0; iTrial < nTrials; ++iTrial){
98  const double trueX = rnd.Uniform(.25, .75);
99  const double trueY = rnd.Uniform(1.5, 3.5);
100  kFitSinSqTheta23.SetValue(calc, trueX);
101  kFitDmSq32Scaled.SetValue(calc, trueY);
102 
103  SystShifts shifts;
104  if(genSysts){
105  shifts.SetShift(&kNormSyst, rnd.Gaus(0, 1));
106  shifts.SetShift(&kNCScaleSyst, rnd.Gaus(0, 1));
107  }
108 
109  // What we expect to observe at those oscillation parameters
110  Spectrum obs = pred->PredictSyst(calc, shifts);
111  Spectrum obsQE = predQE->PredictSyst(calc, shifts);
112 
113  std::unique_ptr<TH1> hobs(obs.ToTH1(1e20));
114  std::unique_ptr<TH1> hobsQE(obsQE.ToTH1(1e20));
115 
116  // Poisson fluctuations
117  Spectrum mock = obs.MockData(1e20);
118  Spectrum mockQE = obsQE.MockData(1e20);
119 
120  std::unique_ptr<TH1> hmock(mock.ToTH1(1e20));
121  std::unique_ptr<TH1> hmockQE(mockQE.ToTH1(1e20));
122 
123  SingleSampleExperiment exptCC(pred, mock);
124  SingleSampleExperiment exptQE(predQE, mockQE);
125  MultiExperiment expt({&exptCC, &exptQE});
126 
127  double trueChi;
128  if(fitSysts){
129  MinuitFitter fit(&expt, {}, {&kNormSyst, &kNCScaleSyst});
130  kFitSinSqTheta23.SetValue(calc, trueX);
131  kFitDmSq32Scaled.SetValue(calc, trueY);
132  trueChi = fit.Fit(calc, IFitter::kQuiet)->EvalMetricVal();
133  }
134  else{
135  trueChi = LogLikelihood(hobs.get(), hmock.get()) + LogLikelihood(hobsQE.get(), hmockQE.get());
136  }
137 
138  // TODO, this is a dumb way to work this count out
139  // TH1* h = mock.ToTH1(mock.POT());
140  // const int nMock = h->Integral();
141  // delete h;
142 
143  // if(true){//bestChis.find(nMock) == bestChis.end()){
144  std::vector<const ISyst*> systlist = {&kNormSyst, &kNCScaleSyst};
145  if(!fitSysts) systlist = {};
146 
147  MinuitFitter fit(&expt, {&kFitSinSqTheta23, &kFitDmSq32Scaled}, systlist);
148 
149  // TODO: this number doesn't seem to be stable for the N=0 case!
150  // bestChis.insert(std::make_pair(nMock, ));
151 
152  const double bestChi = fit.Fit(calc, IFitter::kQuiet)->EvalMetricVal();//bestChis[nMock];
153 
154  const double bestX = kFitSinSqTheta23.GetValue(calc);
155  const double bestY = kFitDmSq32Scaled.GetValue(calc);
156 
157  FCPoint pt(trueX, trueY, trueChi,
158  bestX, bestY, bestChi,
159  0); // Don't know seed or rng state
160 
161  fccol.AddPoint(pt);
162 
163  prog.SetProgress((iTrial+1.)/nTrials);
164  }
165 
166  fccol.SaveToFile("fccol_numu.root");
167 
168  // std::cout << "#events\tbest chisq" << std::endl;
169  // for(auto it: bestChis) std::cout << it.first << "\t" << it.second << std::endl;
170 
171  delete pred;
172 }
TString fin
Definition: Style.C:24
double GetValue(const osc::IOscCalcAdjustable *osc) const override
TH1D * ToTH1(double exposure, Color_t col=kBlack, Style_t style=kSolid, EExposureType expotype=kPOT, EBinType bintype=kBinContent) const
Histogram made from this Spectrum, scaled to some exposure.
Definition: Spectrum.cxx:209
Simple record of shifts applied to systematic parameters.
Definition: SystShifts.h:20
void AddPoint(const FCPoint &p)
Definition: FCCollection.h:17
osc::OscCalcDumb calc
double LogLikelihood(const Eigen::ArrayXd &ea, const Eigen::ArrayXd &oa, bool useOverflow)
The log-likelihood formula from the PDG.
Definition: EigenUtils.cxx:36
Representation of a spectrum in any variable, with associated POT.
Definition: Spectrum.h:33
Represents the results of a single Feldman-Cousins pseudo-experiment.
Definition: FCPoint.h:8
const NormSyst kNormSyst
Definition: Systs.cxx:14
expt
Definition: demo5.py:34
void SetValue(osc::IOscCalcAdjustable *osc, double val) const override
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:64
virtual Spectrum PredictSyst(osc::IOscCalc *calc, const SystShifts &syst) const
Definition: IPrediction.cxx:72
const ConstrainedFitVarWithPrior fitDmSq32Scaled_UniformPrior & kFitDmSq32Scaled
std::unique_ptr< IPrediction > LoadFrom< IPrediction >(TDirectory *dir, const std::string &label)
Definition: IPrediction.cxx:28
osc::IOscCalcAdjustable * default_calc()
Definition: test_fc_numu.C:34
Combine multiple component experiments.
Spectrum MockData(double pot, int idx=0) const
Mock data is FakeData with Poisson fluctuations applied.
Definition: Spectrum.cxx:384
const ConstrainedFitVarWithPrior fitSsqTh23_UniformPriorSsqTh23 & kFitSinSqTheta23
A simple ascii-art progress bar.
Definition: Progress.h:9
Standard interface to all prediction techniques.
Definition: IPrediction.h:57
void SaveToFile(const std::string &fname) const
mock
Definition: demo4.py:28
const NCScaleSyst kNCScaleSyst
Definition: Systs.cxx:16
void SetShift(const ISyst *syst, double shift, bool force=false)
Definition: SystShifts.cxx:78
Compare a single data spectrum to the MC + cosmics expectation.
Collection of FCPoint. Serializable to/from a file.
Definition: FCCollection.h:12
Perform MINUIT fits in one or two dimensions.
Definition: MinuitFitter.h:17
void load_files ( )

Definition at line 51 of file test_fc_numu.C.

References ana::bins, default_calc(), ana::Loaders::DisableLoader(), submit_syst::fout, ana::Loaders::Go(), ana::kCCE, ana::kCosmic, caf::kFARDET, ana::Loaders::kFHC, ana::Loaders::kMC, ana::kNCScaleSyst, ana::kNormSyst, ana::kNumuCC, ana::kNumuContainFD, ana::kNumuQESel, ana::kQEE, loaders, plot_validation_datamc::pred, and ana::Binning::Simple().

52 {
53  Loaders loaders("$NOVA_PROD/mc/S14-05-12/fardet/genie/prod_pid_caf_loosened_presel_neutrino2014nightmare_besttoavoid/", Loaders::kFHC);
54  // Don't bother with cosmics for now...
56 
57  const Binning bins = Binning::Simple(10, 0, 5);
58 
59  // PredictionNoExtrap pred(loaders, "", bins, kLEM, kLEM > 0.8);
60 
61  NoExtrapGenerator predGenNonQE(
62  HistAxis("E", bins, kCCE), kNumuCC && kNumuContainFD && !kNumuQESel );
63  PredictionInterp pred({&kNormSyst, &kNCScaleSyst, &kEnergyScaleSyst},
64  default_calc(),
65  predGenNonQE,
66  loaders);
67 
68  NoExtrapGenerator predGenQE(
69  HistAxis("QE E", bins, kQEE), kNumuCC && kNumuContainFD && kNumuQESel );
70  PredictionInterp predQE({&kNormSyst, &kNCScaleSyst, &kEnergyScaleSyst},
71  default_calc(),
72  predGenQE,
73  loaders);
74 
75  loaders.Go();
76 
77  TFile* fout = new TFile("first_ana_fc_numu_pred.root", "RECREATE");
78  pred.SaveTo(fout, "cc");
79  predQE.SaveTo(fout, "qe");
80 }
Implements systematic errors by interpolation between shifted templates.
Far Detector at Ash River.
Definition: SREnums.h:11
Represent the binning of a Spectrum&#39;s x-axis.
Definition: Binning.h:16
Collection of SpectrumLoaders for many configurations.
Definition: Loaders.h:23
const Color_t kMC
const Cut kNumuCC
Definition: NumuCuts.h:70
const Cut kNumuContainFD([](const caf::SRProxy *sr){ std::pair< int, int > planes=calcFirstLastLivePlane(sr->slc.firstplane, std::bitset< 14 >(sr->hdr.dibmask));int planestofront=sr->slc.firstplane-planes.first;int planestoback=planes.second-sr->slc.lastplane;return( sr->slc.ncellsfromedge > 1 &&planestofront > 1 &&planestoback > 1 &&sr->sel.contain.kalfwdcell > 10 &&sr->sel.contain.kalbakcell > 10 &&sr->sel.contain.cosfwdcell > 0 &&sr->sel.contain.cosbakcell > 0);})
Definition: NumuCuts.h:20
Generates FD-only predictions (no extrapolation)
const NormSyst kNormSyst
Definition: Systs.cxx:14
const Cut kNumuQESel([](const caf::SRProxy *sr){std::cout<< "WARNING! Attempting to access kNumuQESel which relies on qepid (which no longer exists.) Aborting..."<< std::endl;abort(); return false;})
Definition: NumuCuts.h:38
const Var kCCE
Definition: NumuVars.h:21
const Binning bins
osc::IOscCalcAdjustable * default_calc()
Definition: test_fc_numu.C:34
std::vector< Loaders * > loaders
Definition: syst_header.h:386
GenericHistAxis< Var > HistAxis
Definition: HistAxis.h:111
const Var kQEE
Energy estimator for quasielastic CC events.
Definition: NumuVars.cxx:28
const NCScaleSyst kNCScaleSyst
Definition: Systs.cxx:16
void plots ( bool  genSysts,
bool  fitSysts 
)

Definition at line 174 of file test_fc_numu.C.

References ana::FCSurface::Add(), file_size_ana::axes, calc, default_calc(), APDHVSetting::dummy, demo5::expt, ana::Spectrum::FakeData(), fin, ana::Gaussian68Percent2D(), ana::Gaussian90Percent2D(), ana::kFitDmSq32Scaled, ana::kFitSinSqTheta23, ana::kNCScaleSyst, ana::kNormSyst, MECModelEnuComparisons::leg, ana::LoadFrom< IPrediction >(), ana::FCCollection::LoadFromFile(), ana::FCSurface::LoadFromFile(), plot_validation_datamc::pred, ana::IPrediction::Predict(), runNovaSAM::release, ana::FCSurface::SaveToFile(), ana::FCSurface::SurfaceForSignificance(), and ana::Spectrum::ToTH1().

Referenced by test_fc_numu().

175 {
176 #if 0
177  if(genSysts){
178  FCCollection* fccolsyst = FCCollection::LoadFromFile("~/pbs/fc_Aug14/out/numu_syst_nofit/*/fccol.root").release();
179 
180  FCSurface* surffcsyst = new FCSurface(50, .25, .75,
181  50, 1.5, 3.5);
182  surffcsyst->Add(*fccolsyst);
183 
184  delete fccolsyst;
185 
186  surffcsyst->SaveToFile("surffc_numu_syst_nofit.root");
187  return;
188  }
189 
190  FCCollection* fccol = FCCollection::LoadFromFile("~/pbs/fc_Aug14/out/numu/*/fccol.root").release();
191  // FCCollection* fccol = FCCollection::LoadFromFile("~/pbs/fc_Aug14/out/numu/fccol.root").release();
192 
193  // FCCollection* fccolsyst = FCCollection::LoadFromFile("~/pbs/fc_Aug14/out/numu/syst_nofit/?/fccol_numu.root");
194 
195  // FCCollection* fccol = FCCollection::LoadFromFile("fccol.1e6.root");
196 
197  FCSurface* surffc = new FCSurface(50, .25, .75,
198  50, 1.5, 3.5);
199  surffc->Add(*fccol);
200 
201  delete fccol;
202 
203  surffc->SaveToFile("surffc_numu.root");
204  return;
205 #else
206  FCSurface* surffc = FCSurface::LoadFromFile("surffc_numu.root").release();
207  FCSurface* surffcsyst = genSysts ? FCSurface::LoadFromFile("surffc_numu_syst_nofit.root").release() : 0;
208 #endif
209 
210  // FCSurface surffcsyst(50, .25, .75,
211  // 50, 2, 3);
212  // surffcsyst.Add(*fccolsyst);
213 
214  /*
215  for(int i = 10; i < 990; ++i){
216  TH2* h = surffc->SurfaceForSignificance(.001*i);
217  h->SetTitle(TString::Format("%g%%", i/10.));
218  h->Draw("colz");
219  h->SetMinimum(0);
220  gPad->Update();
221  gPad->Print(TString::Format("plots/fc_anim%03d.gif", i));
222  }
223  return;
224  */
225 
226  /*
227  new TCanvas;
228  surffc->GetBin(0, 50)->Draw();
229  new TCanvas;
230  surffc->GetBin(1, 50)->Draw();
231  new TCanvas;
232  surffc->GetBin(2, 50)->Draw();
233  new TCanvas;
234  surffc->GetBin(3, 50)->Draw();
235  new TCanvas;
236  surffc->GetBin(4, 50)->Draw();
237  // surffc->GetBin(25, 25)->Draw();
238  // gPad->Print("plots/bin.eps");
239  */
240 
241  new TCanvas;
242  TH2* fc68 = surffc->SurfaceForSignificance(.6827);
243  fc68->SetTitle("Critical value for 68\% C.L.;sin^{2}#theta_{23};#Deltam^{2}_{32} (10^{-3} eV^{2})");
244  fc68->GetXaxis()->CenterTitle();
245  fc68->GetYaxis()->CenterTitle();
246  fc68->Draw("colz");
247  gPad->Print("plots/numu_fc68.eps");
248 
249  // new TCanvas;
250  // surffcsyst.SurfaceForSignificance(.68)->Draw("colz");
251  // gPad->Print("plots/numu_fc68syst.eps");
252 
253  new TCanvas;
254  TH2* fc90 = surffc->SurfaceForSignificance(.9);
255  fc90->Draw("colz");
256  fc90->SetTitle("Critical value for 90\% C.L.;sin^{2}#theta_{23};#Deltam^{2}_{32} (10^{-3} eV^{2})");
257  fc90->GetXaxis()->CenterTitle();
258  fc90->GetYaxis()->CenterTitle();
259  gPad->Print("plots/numu_fc90.eps");
260 
261  TH2 *fc68syst = 0, *fc90syst = 0;
262  if(genSysts){
263  new TCanvas;
264  fc68syst = surffcsyst->SurfaceForSignificance(.6827);
265  fc68syst->SetTitle("Critical value for 68\% C.L.;sin^{2}#theta_{23};#Deltam^{2}_{32} (10^{-3} eV^{2})");
266  fc68syst->GetXaxis()->CenterTitle();
267  fc68syst->GetYaxis()->CenterTitle();
268  fc68syst->Draw("colz");
269  gPad->Print("plots/numu_fc68_syst_nofit.eps");
270 
271  new TCanvas;
272  fc90syst = surffcsyst->SurfaceForSignificance(.9);
273  fc90syst->Draw("colz");
274  fc90syst->SetTitle("Critical value for 90\% C.L.;sin^{2}2#theta_{23};#Deltam^{2}_{32} (10^{-3} eV^{2})");
275  fc90syst->GetXaxis()->CenterTitle();
276  fc90syst->GetYaxis()->CenterTitle();
277  gPad->Print("plots/numu_fc90_syst_nofit.eps");
278  }
279 
280 
281  new TCanvas;
282 
283  TFile* fin = new TFile("first_ana_fc_numu_pred.root");
285  IPrediction* predQE = LoadFrom<IPrediction>(fin, "qe").release();
286 
288  Spectrum obs = pred->Predict(calc);
289  Spectrum obsQE = predQE->Predict(calc);
290 
291  new TCanvas;
292  obs.ToTH1(1e20)->Draw("hist");
293  gPad->Print("plots/numu_spect_cc.eps");
294  new TCanvas;
295  obsQE.ToTH1(1e20)->Draw("hist");
296  gPad->Print("plots/numu_spect_qe.eps");
297 
298  SingleSampleExperiment exptCC(pred, obs.FakeData(1e20));
299  SingleSampleExperiment exptQE(predQE, obsQE.FakeData(1e20));
300  MultiExperiment expt({&exptCC, &exptQE});
301 
302  FrequentistSurface surfStat(&expt, calc,
303  &kFitSinSqTheta23, 50, .25, .75,
304  &kFitDmSq32Scaled, 50, 1.5, 3.5);
305 
306  FrequentistSurface* surfSyst = &surfStat;
307  if(fitSysts){
308  surfSyst = new FrequentistSurface(&expt, calc,
309  &kFitSinSqTheta23, 50, .25, .75,
310  &kFitDmSq32Scaled, 50, 1.5, 3.5,
311  {}, {&kNormSyst, &kNCScaleSyst});
312  }
313 
314  TH2* axes = new TH2F("", "68% and 90% C.L.s;sin^{2}#theta_{23};#Deltam^{2}_{32} (10^{-3} eV^{2})", 50, .25, .75, 50, 1.9, 3.1);
315  axes->Draw();
316  axes->GetXaxis()->CenterTitle();
317  axes->GetYaxis()->CenterTitle();
318 
319  if(!genSysts) surfStat.DrawContour(Gaussian68Percent2D(surfStat), 7, kRed);
320  surfStat.DrawContour(fc68, 7, kBlue);
321  if(genSysts) surfStat.DrawContour(fc68syst, 7, kGreen+2);
322 // surfSyst->DrawContour(surffcsyst.SurfaceForSignificance(.6827), kSolid, kBlack);
323 
324 // gPad->Print("plots/numu_cont68.eps");
325 
326 // new TCanvas;
327 
328  if(!genSysts) surfStat.DrawContour(Gaussian90Percent2D(surfStat), kSolid, kRed);
329  surfStat.DrawContour(fc90, kSolid, kBlue);
330  if(genSysts) surfStat.DrawContour(fc90syst, kSolid, kGreen+2);
331 // surfSyst->DrawContour(surffcsyst.SurfaceForSignificance(.9), kSolid, kBlack);
332 // gPad->Print("plots/numu_cont90.eps");
333 
334  TMarker* mark = new TMarker(.5, 2.35, kFullCircle);
335  mark->SetMarkerSize(1.5*mark->GetMarkerSize());
336  mark->Draw();
337 
338  TLegend* leg = new TLegend(.125, .1, .3, .3);
339  leg->SetFillStyle(0);
340  TH1* dummy = new TH1F("", "", 1, 0, 1);
341  dummy->SetLineColor(kRed);
342  if(!genSysts) leg->AddEntry(dummy->Clone(), "Gaus", "l");
343  dummy->SetLineColor(kBlue);
344  leg->AddEntry(dummy->Clone(), "FC stat", "l");
345  dummy->SetLineColor(kGreen+2);
346  if(genSysts) leg->AddEntry(dummy->Clone(), "FC syst", "l");
347  leg->Draw();
348 
349  if(genSysts)
350  gPad->Print("plots/numu_both_syst_nofit.eps");
351  else
352  gPad->Print("plots/numu_both.eps");
353 }
TString fin
Definition: Style.C:24
TH1D * ToTH1(double exposure, Color_t col=kBlack, Style_t style=kSolid, EExposureType expotype=kPOT, EBinType bintype=kBinContent) const
Histogram made from this Spectrum, scaled to some exposure.
Definition: Spectrum.cxx:209
virtual Spectrum Predict(osc::IOscCalc *calc) const =0
TH2 * Gaussian68Percent2D(const FrequentistSurface &s)
Up-value surface for 68% confidence in 2D in gaussian approximation.
osc::OscCalcDumb calc
Representation of a spectrum in any variable, with associated POT.
Definition: Spectrum.h:33
Log-likelihood scan across two parameters.
const NormSyst kNormSyst
Definition: Systs.cxx:14
expt
Definition: demo5.py:34
Spectrum FakeData(double pot) const
Fake data is a MC spectrum scaled to the POT expected in the data.
Definition: Spectrum.cxx:402
void SaveToFile(const std::string &fname) const
Definition: FCSurface.cxx:158
const ConstrainedFitVarWithPrior fitDmSq32Scaled_UniformPrior & kFitDmSq32Scaled
void Add(const FCPoint &pt, std::string plot)
Definition: FCSurface.cxx:39
std::unique_ptr< IPrediction > LoadFrom< IPrediction >(TDirectory *dir, const std::string &label)
Definition: IPrediction.cxx:28
osc::IOscCalcAdjustable * default_calc()
Definition: test_fc_numu.C:34
Combine multiple component experiments.
TH2 * Gaussian90Percent2D(const FrequentistSurface &s)
Up-value surface for 90% confidence in 2D in gaussian approximation.
const ConstrainedFitVarWithPrior fitSsqTh23_UniformPriorSsqTh23 & kFitSinSqTheta23
Standard interface to all prediction techniques.
Definition: IPrediction.h:57
TH2 * SurfaceForSignificance(double sig)
Definition: FCSurface.cxx:103
const NCScaleSyst kNCScaleSyst
Definition: Systs.cxx:16
FileContents LoadFromFile(const std::string &filename)
Pseudo-experiments, binned to match a log-likelihood surface.
Definition: FCSurface.h:14
Compare a single data spectrum to the MC + cosmics expectation.
Collection of FCPoint. Serializable to/from a file.
Definition: FCCollection.h:12
void test_fc_numu ( int  nexpts = 1000000,
bool  genSysts = false,
bool  fitSysts = false 
)

Definition at line 355 of file test_fc_numu.C.

References plots().

356 {
357  // load_files();
358  // fill_col(nexpts, genSysts, fitSysts);
359  plots(genSysts, fitSysts);
360 }
void plots(bool genSysts, bool fitSysts)
Definition: test_fc_numu.C:174