4 #include "CAFAna/Core/Binning.h" 8 #include "CAFAna/Cuts/QuantileCuts.h" 14 #include "CAFAna/Vars/CosmicRejBDTVars.h" 19 #include "CAFAna/Vars/NumuVars.h" 39 std::string sFHC_RHC = (isFHC ==
true ?
"fhc" :
"rhc" );
40 std::string sisEval = (isEval ==
true ?
"Test" :
"Train" );
41 std::string sisBPF = (isBPF ==
true ?
"BPF" :
"Kal" );
45 std::cout <<
"\n\nYou're running over the training datasets....Are you sure you want to do this?" 46 <<
"\nThey should be reserved for training, not evaluating!" 50 std::string OutName =
"BDTSpectra-"+sisData+
"-"+sFHC_RHC+
"-"+sisBPF+
"-"+sIdentifier+
"-"+sisEval+
".root";
53 std::cout <<
"\n\nLots of input parameters, so I'm going to write them out now....;" 54 <<
"\n\t isFHC " << (isFHC ==
true ?
"true --> Run in FHC " :
"false --> Run in RHC" ) <<
" ==> sFHC_RHC is " << sFHC_RHC
55 <<
"\n\t isBPF " << (isBPF ==
true ?
"true --> BPF training" :
"false --> Kal training" ) <<
" ==> sisBPF is " << sisBPF
56 <<
"\n\t Only making spectra, therefore running over data." 57 <<
"\n\t Identifier is " << sIdentifier
58 <<
"\n\t isEval " << (isEval ==
true ?
"true --> Evaluation dataset":
"false --> Training dataset" ) <<
" ==> sisEval is " << sisEval
59 <<
"\n\t Quant " << (Quant ==
true ?
"true --> Make quantile plot":
"false --> Just All Quant" )
60 <<
"\n\n OutName is therefore " << OutName
81 std::string MyDef =
"karlwarb-prod4reco-cosmicrej-fd-cosmics-loose-"+sFHC_RHC+
"-"+sIdentifier+
"_"+sisEval;
92 std::vector<Cut> Cuts;
96 MakeCutVec( sIdentifier, isFHC, isBPF, Quant, BaseCut, Cuts, CutNames );
97 unsigned int NumCuts = Cuts.size();
105 const unsigned int NumBins = 100;
144 for (
unsigned int cc=0;
cc<NumCuts; ++
cc) {
145 Cut ThisCut = Cuts[
cc];
178 TFile *
outFile =
new TFile( OutName.c_str(),
"RECREATE" );
180 for (
unsigned int cc=0;
cc<NumCuts; ++
cc) {
183 sRecoNuE [
cc] ->
SaveTo( outFile->mkdir( TString(
"RecoNuE_" )+TString(CutNames[
cc]) ) );
Represent the binning of a Spectrum's x-axis.
Cuts and Vars for the 2020 FD DiF Study.
void SaveTo(const osc::IOscCalc &x, TDirectory *dir, const std::string &name)
void SetSpillCut(const SpillCut &cut)
Representation of a spectrum in any variable, with associated POT.
void Evaluate_BDTMLP_Algs_Spectra(std::string sIdentifier, bool isFHC, bool isBPF, bool Quant, bool isEval=true)
const Cut kInCosmicTimingWindow
Is the event far from the start and ends of the spill ? For FD cosmic selection.
const Cut kNumuContainFD2017
void MakeCutVec(std::string sIdentifier, bool isFHC, bool isBPF, bool Quants, Cut &kBaseCut, std::vector< Cut > &Cuts, std::vector< std::string > &CutNames)
virtual void Go() override
Load all the registered spectra.
std::vector< float > Spectrum
Collaborates with Spectrum and OscillatableSpectrum to fill spectra from CAF files.
const Cut kNumuPID2018([](const caf::SRProxy *sr){std::cout<< "ERROR::kNumuPID2018, cutting on both cvnProd3Train and cvn2017."<< " Neither branch exists anymore. Returning False."<< std::endl;abort();return false;})
const Binning kNumuCCEOptimisedBinning
Optimised binning for numuCCE from L. Vinton. See docdb 16332. This was close to 'custC' in that talk...
const unsigned int NumBins
const SpillCut kStandardSpillCuts
Apply this unless you're doing something special.
static Binning Simple(int n, double lo, double hi, const std::vector< std::string > &labels={})
std::vector< std::string > CutNames