2 #include "CAFAna/Core/Binning.h" 3 #include "CAFAna/Core/Cut.h" 4 #include "CAFAna/Core/HistAxis.h" 20 #include "TObjectTable.h" 35 std::vector<TString> xptype;
39 outfilename =
"pred_nue_reduced_" + suffix +
".root";
40 TString
folder =
"/nova/ana/nu_e_ana/Ana2017/Predictions/provisional_singles/latest/";
42 folder+
"pred_nxp_EnergyCVN2D_full_nueconcat_other.root",
43 folder+
"pred_nxp_EnergyCVN2D_full_nueconcat_XSecSyst_part1.root",
44 folder+
"pred_nxp_EnergyCVN2D_full_nueconcat_XSecSyst_part2.root",
45 folder+
"pred_xp_prop_EnergyCVN2D_full_nueconcat_other.root",
46 folder+
"pred_xp_prop_EnergyCVN2D_full_nueconcat_XSecSyst_part1.root",
47 folder+
"pred_xp_prop_EnergyCVN2D_full_nueconcat_XSecSyst_part2.root",
48 folder+
"pred_xp_combo_EnergyCVN2D_full_nueconcat_other.root",
49 folder+
"pred_xp_combo_EnergyCVN2D_full_nueconcat_XSecSyst_part1.root",
50 folder+
"pred_xp_combo_EnergyCVN2D_full_nueconcat_XSecSyst_part2.root" 52 xptype = {
"pred_nxp",
"pred_xp_combo"};
56 outfilename =
"pred_numu_reduced_" + suffix +
".root";
58 "/nova/ana/nu_mu_ana/Ana2017/Predictions/provisional/singles/fromShiqi/TO_NUMU_XP.root",
59 "/nova/ana/nu_mu_ana/Ana2017/Predictions/provisional/pred_nxp_Energy_AllQuantiles_full_numuconcat_numuconcat_Everything_v2.root" 62 xptype = {
"pred_nxp",
"pred_xp_numu"};
66 std::cout <<
"\n\t ReduceNue is " << ReduceNue <<
" ==> outfilename is " << outfilename <<
"\n" <<
std::endl;
69 auto outfile =
new TFile(outfilename,
"recreate");
71 systnames.push_back({
"Nominal" ,{
"noShift"}});
73 for(
auto const &
filename:filenames){
76 for (
auto const &
S:systnames ){
78 std::vector<TString> Sigmas =
S.sigma_names;
83 if (
S.syst_name ==
"Lightlevel") Sigmas = {
"plusOne",
"noShift",
"minusOne"};
85 for (
auto const & xp:xptype ){
86 auto dir =
infile->GetDirectory(xp +
"_" +
S.syst_name);
88 if(!ReduceNue &&
S.syst_name.Contains(
"SumSmallXSecJoint2017") && xp ==
"pred_xp_numu" && !
filename.Contains(
"Shiqi")) {
96 for (
uint s = 0;
s<Sigmas.size(); ++
s){
101 TString VarNa =
"nue_pred_EnergyCVN2D";
102 auto dirSigma =
dir->GetDirectory(Sigmas[
s] +
"/" + VarNa );
104 std::cerr <<
"\n\nI can't find " << Sigmas[
s] +
"/" + VarNa <<
". Check the name" <<
std::endl;
117 for (
uint qu=1; qu<5; ++qu) {
119 if(thisquantile > 0 && qu !=thisquantile)
continue;
124 auto dirSigma =
dir->GetDirectory( Sigmas[
s] +
"/" + QuantNa );
126 if(
filename.Contains(
"Shiqi")) dirSigma =
dir->GetDirectory( Sigmas[
s] +
"_Quant" + std::to_string(qu) +
"/" + QuantNa );
129 std::cerr <<
"\n\nI can't find " << Sigmas[
s] +
"/" + QuantNa <<
". Check the name" <<
std::endl;
Cuts and Vars for the 2020 FD DiF Study.
std::vector< SNameDef > GetShiftNames2017(const TString opt="all")
string outfilename
knobs that need extra care
std::unique_ptr< IPrediction > LoadFrom< IPrediction >(TDirectory *dir, const std::string &label)
std::string systnames(TString systslist)
std::string to_string(ModuleType mt)
void reduce_the_predfile_nue_numu(const bool ReduceNue=false, const TString suffix="v2", const int thisquantile=-1)