5 #include "CAFAna/Core/Binning.h" 8 #include "CAFAna/Core/Var.h" 28 #include "TGraphAsymmErrors.h" 33 #include "TMultiGraph.h" 38 #include "TPaveText.h" 42 #include "TAttMarker.h" 54 const double pot = 6e20;
61 std::string fd_nonswap =
"prod_caf_R17-03-01-prod3reco.l_fd_genie_nonswap_fhc_nova_v08_full_v1";
77 return (sr->
mc.
nnu > 0);
82 return sr->
mc.
nnu > 0 && sr->
mc.
nu[0].mode == 0;
87 return sr->
mc.
nnu > 0 && sr->
mc.
nu[0].mode == 1;
92 return sr->
mc.
nnu > 0 && sr->
mc.
nu[0].mode == 2;
97 return sr->
mc.
nnu > 0 && sr->
mc.
nu[0].mode == 3;
102 return sr->
mc.
nnu > 0 && sr->
mc.
nu[0].mode == 10;
105 const Cut kTruthContainFD(
117 const int kNumModes = 6;
119 Modes modes[kNumModes] = {
150 const int kNumCuts = 5;
156 {
"No cuts",
"NoCut", kBasicCut},
159 {
"+ PIDs",
"DQ_contain_NCRej", kBasicCut && kNumuQuality && kNumuContainFD2017 &&
kNumuPID2017},
160 {
"+ Cosmic rej.",
"NumuFD", kBasicCut && kNumuQuality && kNumuContainFD2017 && kNumuPID2017 &&
kNumuCosmicRej2017}
167 for(
int k = 0; k < kNumModes; k++)
175 for(
int j = 0;
j < kNumCuts;
j++)
186 TH1* hHist[
kNumPlots][kNumCuts][kNumModes];
188 for(
int k = 0; k < kNumModes; k++)
192 for(
int j = 0;
j < kNumCuts;
j++)
198 hHist[
i][
j][k]->SetName(histName.c_str());
200 hHist[
i][
j][k]->SetMarkerColor(colours[
j]);
201 hHist[
i][
j][k]->SetLineColor(colours[j]);
206 for(
int k = 0; k < kNumModes; k++)
211 TCanvas*
c1 =
new TCanvas(
"",canvasName.c_str());
213 TLegend*
leg =
new TLegend(0.65,0.18,0.85,0.40);
214 leg->SetFillColor(10);
215 leg->SetLineWidth(0);
216 leg->SetLineColor(10);
218 for (
int j = 1;
j < kNumCuts;
j++)
220 hHist[
i][
j][k]->Divide(hHist[
i][0][k]);
222 std::cout << modes[k].fname.c_str() <<
" " 223 << plots[
i].
fname.c_str() <<
" " 224 << cuts[
j].
fname.c_str() <<
" : " 227 if(
j == 1) hHist[
i][
j][k]->Draw(
"hist");
228 else hHist[
i][
j][k]->Draw(
"hist same");
229 leg->AddEntry(hHist[
i][
j][k], cuts[
j].
label.c_str(),
"l");
233 c1->SaveAs((
"eff/"+canvasName+
".pdf").c_str());
234 c1->SaveAs((
"eff/"+canvasName+
".root").c_str());
const Cut kIsNumuCC(CCFlavSel(14, 14))
Select CC .
Far Detector at Ash River.
Represent the binning of a Spectrum's x-axis.
Cuts and Vars for the 2020 FD DiF Study.
void ResetOscCalcToDefault(osc::IOscCalcAdjustable *calc)
Reset calculator to default assumptions for all parameters.
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.
caf::Proxy< caf::SRContain > contain
Proxy for caf::StandardRecord.
Collection of SpectrumLoaders for many configurations.
caf::Proxy< std::vector< caf::SRNeutrino > > nu
virtual Spectrum PredictUnoscillated() const
caf::Proxy< short int > nnu
void Go()
Call Go() on all the loaders.
void SetSpillCut(const SpillCut &cut)
const Var kTrueE([](const caf::SRProxy *sr){assert(sr->mc.nnu==1);return sr->mc.nu[0].E;})
====================================================================== ///
const Cut kNumuContainFD2017
const std::vector< Plot > plots
Optimized version of OscCalcPMNS.
const Cut kNumuPID2017([](const caf::SRProxy *sr){return(sr->sel.remid.pid > 0.5 &&sr->sel.cvn.numuid > 0.5);})
const Cut kNumuCosmicRej2017([](const caf::SRProxy *sr){return(sr->sel.cosrej.anglekal > 0.5 && sr->sel.cosrej.numucontpid2020 > 0.5 && sr->slc.nhit< 400);})
const SystShifts kNoShift
caf::Proxy< float > missE
caf::Proxy< caf::SRTruthBranch > mc
const Binning kNumuCCEOptimisedBinning
Optimised binning for numuCCE from L. Vinton. See docdb 16332. This was close to 'custC' in that talk...
const SpillCut kStandardSpillCuts
Apply this unless you're doing something special.
caf::Proxy< caf::SRIDBranch > sel
void SetLoaderPath(const std::string &path, caf::Det_t det, DataMC datamc, DataSource src=kBeam, SwappingConfig swap=kNonSwap)
Configure loader via wildcard path.