37 SpectrumLoader fd_nonswap(
"prod_caf_R19-11-18-prod5reco.f_fd_genie_N1810j0211a_nonswap_fhc_nova_v08_full_v1");
38 SpectrumLoader fd_fluxswap(
"prod_caf_R19-11-18-prod5reco.f_fd_genie_N1810j0211a_fluxswap_fhc_nova_v08_full_v1");
58 TFile *
file = TFile::Open(fileName.c_str(),
"RECREATE");
61 hPred[
i]->SaveTo(file , (p.
fname).c_str() );
64 nonSwapDenom.SaveTo(file,
"nonSwapDenom");
65 swapDenom.SaveTo(file,
"swapDenom");
83 unsigned int fhcStart = 1551204000;
87 fFiles =
"defname: " + samdef + Form(
" and online.subrunendtime <= '%u' and online.subrunendtime >= '%u'", timestamp, fhcStart);
89 fFiles =
"defname: " + samdef + Form(
" and online.subrunendtime >= '%u' and online.subrunendtime <= '%u' and online.subrunendtime >= '%u'", timestamp - 86400*nDays, timestamp, fhcStart);
92 fFiles =
"defname: " + samdef;
93 SpectrumLoader
loader(fFiles);
121 Spectrum potTime(
"Date",
"POT #times Mass", loader,
ana::Binning::Simple(nDays<3 ? 24*nDays : nDays,timestamp - 86400*nDays,timestamp),
SIMPLEVAR(hdr.unixtime),
ana::Binning::Simple(500,0,50e12),
kMassFracPOT,
kNoCut,
kNoShift,
kUnweighted);
131 TFile *
file = TFile::Open(fileName.c_str(),
"RECREATE");
135 hData[
i]->SaveTo(file , (
"data_"+p.
fname).c_str() );
136 hBkg[
i]->SaveTo(file, (
"bkg_"+p.
fname).c_str() );
139 potTime.SaveTo(file ,
"potTime" );
140 massDenom.SaveTo(file,
"massDenom");
141 massNum.SaveTo(file,
"massNum");
Represent the binning of a Spectrum's x-axis.
std::vector< double > Spectrum
const Var kSliceTime([](const caf::SRProxy *sr){return sr->slc.meantime/1000;})
const Var kMassFracPOT([](const caf::SRProxy *sr){return sr->spill.spillpot *(sr->hdr.diblast-sr->hdr.dibfirst+1)/14.;})
const Var kDirZ([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks< 1) return-5.f;return sr->trk.kalman.tracks[0].dir.Z();})
Track finder for cosmic rays.
const Var kPtP
Transverse momentum fraction in slice.
====================================================================== ///
void getData(unsigned int timestamp, unsigned int nDays, std::string naming, std::string samdef)
const Var kBoxMaxY([](const caf::SRProxy *sr){return sr->slc.boxmax.Y()/100;})
const std::vector< Plot > plots
const Var kWOscDumbHere([](const caf::SRProxy *sr){if(sr->mc.nu.size()==0) return 0.;return kWOscDumb(sr);})
const SpillVar kSpillPOT([](const caf::SRSpillProxy *spill){return spill->spillpot;})
const SystShifts kNoShift
void getPredictions(unsigned int timestamp, unsigned int nDays, std::string naming)
#define SIMPLEVAR(CAFNAME)
static Binning Simple(int n, double lo, double hi, const std::vector< std::string > &labels={})
static NullLoader kNullLoader
Dummy loader that doesn't load any files.