29 #include "CAFAna/Core/Var.h" 30 #include "CAFAna/Core/Cut.h" 82 const int kNumPlots2D = 3;
84 Plot2D plots2D[kNumPlots2D] = {
93 {
"MuonE_hist_act",
"Reco Muon Track Length (m)",
97 {
"MuonE_hist_actAndCat",
"Reco Muon Track Length (m)",
101 {
"MuonE_hist_cat",
"Reco Muon Track Length in Catcher (m)",
112 for(
int i = 0;
i < kNumPlots2D;
i++)
122 for(
int i = 0;
i < kNumPlots2D;
i++)
125 sSpect2D[
i]->
SaveTo(fout, p.name);
Represent the binning of a Spectrum's x-axis.
Cuts and Vars for the 2020 FD DiF Study.
const Cut kMuonIDCut([](const caf::SRProxy *sr){return muonid_classifier::kMuonID(sr) >=kMuonIDCutVal;})
void Plot2D(TH1 *total, std::map< std::string, TH1 * > systs, std::vector< std::string > to_plot, std::string basename)
void SetSpillCut(const SpillCut &cut)
const Cut kActive([](const caf::SRProxy *sr){int ibesttrk=muonid_classifier::kBestMuonTrack(sr);if(sr->trk.kalman.ntracks< 1||ibesttrk< 0||ibesttrk >=int(sr->trk.kalman.ntracks)) return false;const caf::SRKalmanTrackProxy &bestmuon=sr->trk.kalman.tracks[ibesttrk];return(bestmuon.leninact > 0 && bestmuon.lenincat< 0);})
Representation of a spectrum in any variable, with associated POT.
const Binning kTrkLenCatBinning
const Var kTrkLenCat([](const caf::SRProxy *sr){int ibesttrk=muonid_classifier::kBestMuonTrack(sr);if(sr->trk.kalman.ntracks< 1||ibesttrk< 0||ibesttrk >=int(sr->trk.kalman.ntracks)) return-1000.f;const caf::SRKalmanTrackProxy &bestmuon=sr->trk.kalman.tracks[ibesttrk]; if(bestmuon.leninact > 0 && bestmuon.lenincat< 0) return 0.f; if(bestmuon.leninact > 0 && bestmuon.lenincat > 0) return float(bestmuon.lenincat/100.); if(bestmuon.leninact< 0 && bestmuon.lenincat > 0) return float((bestmuon.leninact/100.) +(bestmuon.lenincat/100.));return-1000.f;})
const Binning kMuonECatBinning
virtual void Go() override
Load all the registered spectra.
void SaveTo(TDirectory *dir, const std::string &name) const
const Var kTrkLenAct([](const caf::SRProxy *sr){int ibesttrk=muonid_classifier::kBestMuonTrack(sr);if(sr->trk.kalman.ntracks< 1||ibesttrk< 0||ibesttrk >=int(sr->trk.kalman.ntracks)) return-1000.f;const caf::SRKalmanTrackProxy &bestmuon=sr->trk.kalman.tracks[ibesttrk]; if(bestmuon.leninact > 0 && bestmuon.lenincat< 0) return float((bestmuon.leninact/100.) +(bestmuon.lenincat/100.)); if(bestmuon.leninact > 0 && bestmuon.lenincat > 0) return float(bestmuon.leninact/100.); if(bestmuon.leninact< 0 && bestmuon.lenincat > 0) return 0.f;return-1000.f;})
std::vector< float > Spectrum
void estimate_energy(string outfileName="numubar_energy_estimate.root")
const std::string nominal_dataset
Dataset definitions.
const SystShifts kNoShift
const Binning kMuonEActBinning
Collaborates with Spectrum and OscillatableSpectrum to fill spectra from CAF files.
const Binning kTrkLenActBinning
const Cut kActiveAndCatcher([](const caf::SRProxy *sr){int ibesttrk=muonid_classifier::kBestMuonTrack(sr);if(sr->trk.kalman.ntracks< 1||ibesttrk< 0||ibesttrk >=int(sr->trk.kalman.ntracks)) return false;const caf::SRKalmanTrackProxy &bestmuon=sr->trk.kalman.tracks[ibesttrk];return(bestmuon.leninact > 0 && bestmuon.lenincat > 0);})
const SpillCut kStandardSpillCuts
Apply this unless you're doing something special.