34 std::string nd_data =
"prod_sumdecaf_R17-03-01-prod3reco.d_nd_numi_fhc_full_v1_goodruns_numu2017";
35 std::string nd_nonswap =
"prod_sumdecaf_R17-03-01-prod3reco.d_nd_genie_nonswap_fhc_nova_v08_full_v1_numu2017";
36 std::string fd_nonswap =
"prod_caf_R17-03-01-prod3reco.l_fd_genie_nonswap_fhc_nova_v08_full_v1";
37 std::string fd_fluxswap =
"prod_caf_R17-03-01-prod3reco.l_fd_genie_fluxswap_fhc_nova_v08_full_v1";
38 std::string fd_tau =
"prod_caf_R17-03-01-prod3reco.l_fd_genie_tau_fhc_nova_v08_full_v1";
64 std::string quantpath =
"/pnfs/nova/persistent/analysis/numu/Ana2017/all_FD_histo_for_quantile_cuts.root";
65 TFile* quantfile = TFile::Open(
pnfs2xrootd(quantpath).c_str());
66 TH2* quanthist = (TH2*)quantfile->Get(
"dir_FDSpec2D/FDSpec2D");
73 const Cut kNumuCosmicRejSA(
85 std::vector<NumuExtrapGenerator*> NumuCCExtrapVec;
86 std::vector<PredictionInterp*> predictionVec;
94 for(
auto thisCut : QuantCuts){
96 predictionVec.push_back(
new PredictionInterp({}, &calc_nonMax, *(NumuCCExtrapVec.back()), loaders));
106 std::string OutFileName =
"pred_3A_prod3_AllQuants.root";
108 TFile *
f = TFile::Open(OutFileName.c_str(),
"RECREATE");
109 prediction_SA.SaveTo(f,
"prediction_SA");
110 prediction_OR.SaveTo(f,
"prediction_OR");
115 for(
size_t quant=1; quant <= predictionVec.size();quant++){
116 auto prediction = predictionVec[quant-1];
117 OutFileName =
"pred_3A_prod3_" + (
std::string)Form(
"Quant%d", quant) +
".root";
118 std::cerr <<
"Saving Quantile " << quant <<
" to Prediction file: " << OutFileName <<
std::endl;
119 TFile *f = TFile::Open(OutFileName.c_str(),
"RECREATE");
120 prediction ->
SaveTo(f,
"prediction");
Near Detector underground.
Implements systematic errors by interpolation between shifted templates.
Far Detector at Ash River.
Cuts and Vars for the 2020 FD DiF Study.
void ResetOscCalcToDefault(osc::IOscCalcAdjustable *calc)
Reset calculator to default assumptions for all parameters.
void SaveTo(const osc::IOscCalc &x, TDirectory *dir, const std::string &name)
Proxy for caf::StandardRecord.
Collection of SpectrumLoaders for many configurations.
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 ...
const Cut kNumuContainFD([](const caf::SRProxy *sr){ std::pair< int, int > planes=calcFirstLastLivePlane(sr->slc.firstplane, std::bitset< 14 >(sr->hdr.dibmask));int planestofront=sr->slc.firstplane-planes.first;int planestoback=planes.second-sr->slc.lastplane;return( sr->slc.ncellsfromedge > 1 &&planestofront > 1 &&planestoback > 1 &&sr->sel.contain.kalfwdcell > 10 &&sr->sel.contain.kalbakcell > 10 &&sr->sel.contain.cosfwdcell > 0 &&sr->sel.contain.cosbakcell > 0);})
std::string pnfs2xrootd(std::string loc, bool unauth)
caf::Proxy< caf::SRCosRej > cosrej
void Go()
Call Go() on all the loaders.
void SetSpillCut(const SpillCut &cut)
void makePred(bool usesysts=true, bool useFakeNDData=false)
caf::Proxy< unsigned int > nhit
const HistAxis kNumuCCAxis("Reconstructed Neutrino Energy (GeV)", kNumuEnergyBinning, kCCE)
Optimized version of OscCalcPMNS.
void setLoadersPathNumu2017(Loaders &loaders, bool fakenddata)
void SetTh23(const T &th23) override
const Cut kNumuNCRej([](const caf::SRProxy *sr){return(sr->sel.remid.pid >0.75);})
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'...
const SystShifts kNoShift
void SetDmsq32(const T &dmsq32) override
caf::Proxy< caf::SRSlice > slc
void SetdCP(const T &dCP) override
caf::Proxy< float > anglekal
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 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.