20 #include "CAFAna/numu/Analysis2018/includes.h" 23 #include "CAFAna/Vars/NueEnergy2018.h" 44 std::vector<std::string>
gSelTypeNames({
"NuE",
"NuMuQ1",
"NuMuQ2",
"NuMuQ3",
"NuMuQ4"});
56 fhc = (curName.find(
"FHC") != std::string::npos) ?
true :
false;
75 if(selection ==
lNue){
82 std::string quantFile =
"/cvmfs/nova.opensciencegrid.org/externals/numudata/v00.00/NULL/ana2018/Quantiles/";
83 quantFile += (fhc) ?
"quantiles__fhc_full__numu2018.root" :
"quantiles__rhc_full__numu2018.root";
84 TFile qtf(quantFile.c_str(),
"READ");
85 TH2F *FDSpec2D =
dynamic_cast<TH2F*
>(qtf.Get(
"FDSpec2D"));
104 std::string base =
"prod_sumdecaf_R17-11-14-prod4reco." + recolet +
"_fd_genie_";
105 SpectrumLoader nonSwapLoader (base +
"nonswap_" + lowerCur +
"_nova_v08_full_v1_" + lowerSel +
"2018");
106 SpectrumLoader fluxSwapLoader(base +
"fluxswap_" + lowerCur +
"_nova_v08_full_v1_" + lowerSel +
"2018");
107 SpectrumLoader tauSwapLoader (base +
"tau_" + lowerCur +
"_nova_v08_full_v1_" + lowerSel +
"2018");
130 totName += (osc) ?
"Oscillated" :
"Unoscillated";
138 TH1D*
hist =
nullptr;
140 hist = cafPred->Predict(calc).ToTH1(
pot);
143 hist = cafPred->PredictUnoscillated().ToTH1(
pot);
147 hist->SetDirectory(0);
150 hist->SetName((HistName(osc)).c_str());
194 outFileName += (fhc) ?
"fhc_" :
"rhc_";
196 outFileName +=
".root";
197 TFile*
outfile =
new TFile(outFileName.c_str(),
"RECREATE");
203 oscHist->SetDirectory(outfile);
207 noOscHist->SetDirectory(outfile);
Represent the binning of a Spectrum's x-axis.
Cuts and Vars for the 2020 FD DiF Study.
PredictionNoExtrap * cafPred
CAFAna prediction object.
const HistAxis kHadEFracAxis("E_{had.} / E_{#nu}", Binning::Simple(200, 0, 1), kHadEFrac)
HistAxis that implements Hadronic Energy fraction binning used by L.Vinton to derive Hadronic Energy ...
virtual void SetTh13(const T &th13)=0
osc::IOscCalcAdjustable * DefaultOscCalc()
Create a new calculator with default assumptions for all parameters.
const XML_Char int const XML_Char int const XML_Char * base
virtual void SetDmsq32(const T &dmsq32)=0
const Var kNue2018AnaBin([](const caf::SRProxy *sr){int selBin=kNue2018SelectionBin(sr);float nuE=kNueEnergy2018(sr);int nuEBin=nuE/0.5;assert(nuEBin<=8 &&"An event with nuE > 4.5 should never happen");int anaBin=9 *selBin+nuEBin;return anaBin;})
Use this Analysis Binning for Ana2018, official Binning.
std::string HistName(bool osc)
std::vector< std::string > gSelTypeNames({"NuE","NuMuQ1","NuMuQ2","NuMuQ3","NuMuQ4"})
double pot
total POT for horn current
virtual void Go() override
Load all the registered spectra.
const Binning kNue2018Binning
const HistAxis kNumuCCOptimisedAxis("Reconstructed Neutrino Energy (GeV)", kNumuCCEOptimisedBinning, kCCE)
HistAxis that implements optimised numuCCE from L. Vinton. See docdb 16332. This was close to 'custC'...
Oscillation probability calculators.
void SetOscillationParameters(osc::IOscCalcAdjustable *calc)
const SystShifts kNoShift
const Cut kHasNeutrino([](const caf::SRProxy *sr){return(sr->mc.nnu!=0);})
Check if MC slice has neutrino information (useful for in-and-out tests)
const double kAna2019RHCPOT
void cafe_FD_predictions(bool fhc, int sel)
SelType_t selection
numu + quantile or nue
std::string curName
string horn current value
Collaborates with Spectrum and OscillatableSpectrum to fill spectra from CAF files.
virtual void SetTh23(const T &th23)=0
TH1D * SpectrumFromPrediction(bool osc, osc::IOscCalcAdjustable *calc)
const Binning kNumuCCEOptimisedBinning
Optimised binning for numuCCE from L. Vinton. See docdb 16332. This was close to 'custC' in that talk...
const Cut kNue2018FDAllSamples
std::vector< Cut > QuantileCutsFromTH2(TH2 *quantileHist, const HistAxis &independentAxis, const HistAxis &quantileAxis, const unsigned int &numQuantiles, const bool verbose)
: Do the same as the QuantileCuts function but taking in the TH2 instead of making it...
const Cut kInBeamSpill([](const caf::SRProxy *sr){if(sr->spill.run > util::kLastBadTimingRun) return kInBeamSpill_main(sr);else return kInBeamSpill_main(sr)||kInBeamSpill_shifted(sr);}, [](const caf::SRSpillProxy *spill){if(spill->run > util::kLastBadTimingRun) return kInBeamSpill_main.Livetime(spill);else return kInBeamSpill_main.Livetime(spill)+kInBeamSpill_shifted.Livetime(spill);}, [](const caf::SRSpillProxy *spill) -> double{return spill->spillpot;})
Does the event fall inside the window we call the beam spill?
const double kAna2019FHCPOT
bool fhc
true for FHC, false for RHC
PredictionInfo(std::string const &hornCur, SelType_t const &selType)
virtual void SetdCP(const T &dCP)=0