Go to the documentation of this file.
10 using namespace ana;
12 #include "OscLib/IOscCalc.h"
14 #include "TH1.h"
15 #include "TPad.h"
17 #include <iostream>
19 // "" = classic nested CAFs. Other possible strings are "multitree" and
20 // "singletree"
22 {
23  const std::string prefix = flat.empty() ? "" : "bckhouse_"+flat+"_flatcaf_";
25  SpectrumLoader loader_nonswap (prefix+"prod_sumdecaf_R17-11-14-prod4reco.neutron-respin.c_fd_genie_nonswap_fhc_nova_v08_period5_v1_numu2018");
26  SpectrumLoader loader_fluxswap(prefix+"prod_sumdecaf_R17-11-14-prod4reco.neutron-respin.c_fd_genie_fluxswap_fhc_nova_v08_period5_v1_numu2018");
28  // All the interesting parts of the cut are apparently failed by these prod4
29  // files (they want prod5).
30  PredictionNoExtrap pred(loader_nonswap, loader_fluxswap, kNullLoader, kNumuCCOptimisedAxis, kNumuQuality && kNumuContainFD2020); // && kNumu2020PID && kNumu2020CosRej && k3flavor2020FDVeto);
32  loader_nonswap.Go();
33  loader_fluxswap.Go();
35  pred.Predict(DefaultOscCalc()).ToTH1(9e20, kBlack, kSolid, kPOT, kBinDensity)->Draw("hist");
36  std::cout << pred.Predict(DefaultOscCalc()).Integral(9e20) << " events" << std::endl;
37  gPad->Print("demo_flat_spect.pdf");
38 }
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
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:176
Divide bin contents by bin widths.
Definition: UtilsExt.h:31
double Integral(double exposure, double *err=0, EExposureType expotype=kPOT) const
Return total number of events scaled to pot.
Definition: Spectrum.cxx:277
osc::IOscCalcAdjustable * DefaultOscCalc()
Create a new calculator with default assumptions for all parameters.
Definition: Calcs.cxx:49
void demo_flat(std::string flat="")
Definition: demo_flat.C:21
Spectrum Predict(osc::IOscCalc *calc) const override
const Cut kNumuContainFD2020
Definition: NumuCuts2020.h:42
virtual void Go() override
Load all the registered spectra.
const HistAxis kNumuCCOptimisedAxis("Reconstructed Neutrino Energy (GeV)", kNumuCCEOptimisedBinning, kCCE)
HistAxis that implements optimised numuCCE from L. Vinton. See docdb 16332. This was close to &#39;custC&#39;...
Definition: HistAxes.h:24
const XML_Char * prefix
Definition: expat.h:380
OStream cout
Definition: OStream.cxx:6
Collaborates with Spectrum and OscillatableSpectrum to fill spectra from CAF files.
Prediction that just uses FD MC, with no extrapolation.
const Cut kNumuQuality
Definition: NumuCuts.h:18
static NullLoader kNullLoader
Dummy loader that doesn&#39;t load any files.
enum BeamMode string