1 #include "CAFAna/Core/Binning.h" 4 #include "CAFAna/Core/Var.h" 52 std::string filenameCosmicsData =
"prod_mrbremcaf_R19-11-18-prod5reco.i_fd_cosmic_fhc_full_v1_goodruns_underP9";
53 std::string filenameCRYMC =
"prod_mrbremcaf_R19-11-18-prod5reco.m_fd_cry_fhc_full_v3";
54 std::string filenameGENIEFluxswap =
"prod_caf_R19-11-18-prod5reco.f_fd_genie_N1810j0211a_fluxswap_fhc_nova_v08_full_v1";
57 filenameCosmicsData =
"prod_mrbremcaf_R19-11-18-prod5reco.i_fd_cosmic_rhc_full_v1_goodruns";
58 filenameCRYMC =
"prod_mrbremcaf_R19-11-18-prod5reco.m_fd_cry_rhc_full_v3";
59 filenameGENIEFluxswap =
"prod_caf_R19-11-18-prod5reco.f_fd_genie_N1810j0211a_fluxswap_rhc_nova_v08_full_v1";
90 {
"periph_presel", kNue2020PeripheralPresel_MRBrem},
91 {
"periph_preselbdt", kNue2020PeripheralPresel_MRBrem &&
kCosPIDPeriBDT > 0.57},
92 {
"periph_preselcvn", kNue2020PeripheralPresel_MRBrem &&
kCVNe_looseptp >= 0.97},
93 {
"periph_preselen", kNue2020PeripheralPresel_MRBrem &&
kShwE > 1},
103 for(
int selIdx = 0; selIdx <
kNumSels; ++selIdx){
104 for (
int varIdx=0; varIdx<
kNumVars;varIdx++){
112 loaderCosmicsData.
Go();
114 loaderGENIEFluxswap.
Go();
116 TFile *
file =
new TFile((
"MRbrem_extract_weights_"+
mode+
".root").c_str(),
"recreate");
117 for(
int selIdx = 0; selIdx <
kNumSels; ++selIdx){
118 TDirectory*
d = file->mkdir(sels[selIdx].
name.c_str());
119 for (
int varIdx=0; varIdx<
kNumVars;varIdx++){
120 const char*
name = defs[varIdx].
name.c_str();
const SpillCut kStandardSpillCuts_FD_Prod4MotivatedDQ
const Var kShwE([](const caf::SRProxy *sr){double maxe=-99.0;if(!sr->vtx.elastic.IsValid) return-99999.0;if(sr->vtx.elastic.fuzzyk.npng< 1) return-99999.0;for(unsigned int i=0;i< sr->vtx.elastic.fuzzyk.npng;i++){if(maxe< sr->vtx.elastic.fuzzyk.png[i].shwlid.shwE){maxe=sr->vtx.elastic.fuzzyk.png[i].shwlid.shwE;}}return maxe;})
Cuts and Vars for the 2020 FD DiF Study.
const Cut kNue2020FD_MRBrem
const Cut kNue2020CorePresel_MRBrem
void SetSpillCut(const SpillCut &cut)
Representation of a spectrum in any variable, with associated POT.
Struct to hold cut information.
virtual void Go() override
Load all the registered spectra.
void SaveTo(TDirectory *dir, const std::string &name) const
const HistDef defs[kNumVars]
const Cut kNue2020FDPeripheral_MRBrem(kNue2020FDPeripheralFunc_MRBrem)
std::vector< float > Spectrum
const SystShifts kNoShift
void mrbrem_get_initial_spectra(std::string mode="fhc")
Collaborates with Spectrum and OscillatableSpectrum to fill spectra from CAF files.
const Cut kInCosmicTimingWindow_FD_MR
const SpillCut kStandardSpillCuts
Apply this unless you're doing something special.
void Format(TGraph *gr, int lcol, int lsty, int lwid, int mcol, int msty, double msiz)
const Var kShwAngle([](const caf::SRProxy *sr){double maxe=-99.0;double cosz=-1.0;if(!sr->vtx.elastic.IsValid) return-99999.0;if(sr->vtx.elastic.fuzzyk.npng< 1) return-99999.0;for(unsigned int i=0;i< sr->vtx.elastic.fuzzyk.npng;i++){if(maxe< sr->vtx.elastic.fuzzyk.png[i].shwlid.shwE){maxe=sr->vtx.elastic.fuzzyk.png[i].shwlid.shwE;cosz=sr->vtx.elastic.fuzzyk.png[i].shwlid.dir.z;}}return cosz;})
static Binning Simple(int n, double lo, double hi, const std::vector< std::string > &labels={})
const Var kCosPIDPeriBDT
2020 nue cosmic rejection BDT variable - peripheral
const Cut kNoCut
The simplest possible cut: pass everything, used as a default.