12 #include "CAFAna/Extrap/ExtrapSterile.h" 64 std::map<std::string, Cut*>
cuts;
67 std::map<std::string, Spectrum*> sXYs;
68 std::map<std::string, Spectrum*> sXZs;
69 std::map<std::string, Spectrum*> sYZs;
71 for(
const auto& strcut : cuts) {
83 TFile* rootF =
new TFile(outfile.c_str(),
"RECREATE");
86 TDirectory*
tmp = gDirectory;
87 TDirectory* saveDir = gDirectory;
91 for(
const auto& strcut : cuts) {
94 dir =
"sXY" + sep +
label;
95 saveDir = rootF->mkdir(dir.c_str());
96 sXYs[
label]->SaveTo(saveDir);
98 dir =
"sXZ" + sep +
label;
99 saveDir = rootF->mkdir(dir.c_str());
100 sXZs[
label]->SaveTo(saveDir);
102 dir =
"sYZ" + sep +
label;
103 saveDir = rootF->mkdir(dir.c_str());
104 sYZs[
label]->SaveTo(saveDir);
Represent the binning of a Spectrum's x-axis.
Cuts and Vars for the 2020 FD DiF Study.
Proxy for caf::StandardRecord.
std::vector< double > Spectrum
void SetSpillCut(const SpillCut &cut)
caf::Proxy< caf::SRElastic > elastic
_Cut< caf::SRProxy > Cut
Representation of a cut (selection) to be applied to a caf::StandardRecord object.
virtual void Go() override
Load all the registered spectra.
void DataVtxDistributionLoad(std::string outfile)
caf::Proxy< bool > IsValid
Collaborates with Spectrum and OscillatableSpectrum to fill spectra from CAF files.
caf::Proxy< caf::SRVector3D > vtx
const Cut kInBeamSpill([](const caf::SRProxy *sr){if(sr->spill.run > util::kLastBadTimingRun) return kInBeamSpill_main(sr);else return kInBeamSpill_main(sr)||kInBeamSpill_shifted(sr);}, [](const caf::SRSpillProxy *spill){if(spill->run > util::kLastBadTimingRun) return kInBeamSpill_main.Livetime(spill);else return kInBeamSpill_main.Livetime(spill)+kInBeamSpill_shifted.Livetime(spill);}, [](const caf::SRSpillProxy *spill) -> double{return spill->spillpot;})
Does the event fall inside the window we call the beam spill?
const SpillCut kStandardSpillCuts
Apply this unless you're doing something special.
caf::Proxy< caf::SRVertexBranch > vtx
static Binning Simple(int n, double lo, double hi, const std::vector< std::string > &labels={})
const std::vector< std::string > fnamefardata_unblind(MakeUnblindList())