#include "CAFAna/Core/Spectrum.h"
#include "CAFAna/Core/SpectrumLoader.h"
#include "CAFAna/Core/LoadFromFile.h"
#include "CAFAna/Cuts/SpillCuts.h"
#include "3FlavorAna/Cuts/NueCuts2017.h"
#include "CAFAna/Vars/Vars.h"
#include "3FlavorAna/Vars/NueVars.h"
#include "CAFAna/Vars/GenieWeights.h"
#include "CAFAna/Vars/PPFXWeights.h"
#include "CAFAna/Vars/HistAxes.h"
#include "TCanvas.h"
#include "TH2.h"
#include "TFile.h"
#include "TLegend.h"
#include "TPad.h"
#include "TLine.h"
#include <vector>
#include <string>
Go to the source code of this file.
Functions | |
std::vector< Spectrum * > | MakeCutFlowSpectra (SpectrumLoader *l, Var wei) |
std::vector< HistAxis > | InitAxes () |
std::vector< Spectrum * > | MakeKinSpectra (SpectrumLoader *l, Var wei, Cut sel) |
std::vector< Spectrum * > | MakeKin2DSpectra (SpectrumLoader *l, Var wei, Cut sel) |
void | CreateAndFillSpectra (std::string fname) |
void | CenterTitles (TH1 *h) |
void | MakePlot (std::string fname, std::string name, std::string xtitle) |
void | Make2DPlot (std::string fname, std::string name, std::string ytitle) |
void | MakePlots (std::string fname) |
void | nd_datastability (bool fillSpectra, std::string fname) |
Variables | |
const Var | kRun = SIMPLEVAR(hdr.run) |
const Var | kEPH ([](const caf::SRProxy *sr){if(sr->slc.nhit==0) return float(-1);return float(sr->slc.calE/sr->slc.nhit);}) |
const Var | kHadCalE ([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return float(-1);if(sr->vtx.elastic.fuzzyk.nshwlid< 1) return float(sr->slc.calE);return float(sr->slc.calE- sr->vtx.elastic.fuzzyk.png[0].shwlid.calE);}) |
const Var | kShwLIDE ([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return float(-1);if(sr->vtx.elastic.fuzzyk.nshwlid< 1) return float(-1);return float(sr->vtx.elastic.fuzzyk.png[0].shwlid.calE);}) |
const Var | kShwLIDEPH ([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return float(-1);if(sr->vtx.elastic.fuzzyk.nshwlid< 1) return float(-1);float cale=sr->vtx.elastic.fuzzyk.png[0].shwlid.calE;int nhit=sr->vtx.elastic.fuzzyk.png[0].shwlid.nhit;float eph=(nhit > 0)?cale/nhit:-1;return eph;}) |
void CenterTitles | ( | TH1 * | h | ) |
Definition at line 184 of file nue_nd_datastability.C.
Referenced by DrawContourCanvas(), febrates(), febshutoff(), FourBinAxis(), main(), MatrixElementContours(), MuonFit(), NusContoursPlusMINOS(), PID2DAxis(), plot_beam_peak(), PlotSystShifts(), and tbrecoplots().
void CreateAndFillSpectra | ( | std::string | fname | ) |
Definition at line 118 of file nue_nd_datastability.C.
References ana::assert(), om::cout, allTimeWatchdog::endl, ana::SpectrumLoader::Go(), makeTrainCVSamples::int, ana::kCVNe, ana::kNue2017NDPresel, ana::kPPFXFluxCVWgt, ana::kStandardSpillCuts, ana::kXSecCVWgt2017, MakeCutFlowSpectra(), MakeKin2DSpectra(), MakeKinSpectra(), confusionMatrixTree::out, and ana::SpectrumLoaderBase::SetSpillCut().
Referenced by nd_datastability().
std::vector<HistAxis> InitAxes | ( | ) |
Definition at line 76 of file nue_nd_datastability.C.
References file_size_ana::axes, ana::kCaloE, kEPH, ana::kHadCalE, ana::kNHit, ana::kPtP, kShwLIDE, kShwLIDEPH, and ana::Binning::Simple().
Referenced by MakeKin2DSpectra(), and MakeKinSpectra().
void Make2DPlot | ( | std::string | fname, |
std::string | name, | ||
std::string | ytitle | ||
) |
Definition at line 288 of file nue_nd_datastability.C.
References allTimeWatchdog::can, ana::CenterTitles(), plot_validation_datamc::fname, MECModelEnuComparisons::i, kBlue, kGreen, kRed, MECModelEnuComparisons::leg, pot, ana::Spectrum::POT(), runNovaSAM::release, and ana::Spectrum::ToTH2().
Referenced by MakePlots().
std::vector<Spectrum*> MakeCutFlowSpectra | ( | SpectrumLoader * | l, |
Var | wei | ||
) |
Definition at line 55 of file nue_nd_datastability.C.
References allInOneTrainingPlots::axis, cut, update_sam_good_runs_metadata::cuts, ana::kCaloE, ana::kCVNe, ana::kNoCut, ana::kNoShift, ana::kNue2017NDContain, ana::kNue2017NDEnergy, ana::kNue2017NDFiducial, ana::kNue2017NDFrontPlanes, ana::kNue2017NDNHits, ana::kNue2017NDProngLength, ana::kNueDQ2017CVN, runNovaSAM::ret, and ana::Binning::Simple().
Referenced by CreateAndFillSpectra().
std::vector<Spectrum*> MakeKin2DSpectra | ( | SpectrumLoader * | l, |
Var | wei, | ||
Cut | sel | ||
) |
Definition at line 102 of file nue_nd_datastability.C.
References file_size_ana::axes, allInOneTrainingPlots::axis, InitAxes(), ana::kNoShift, runNovaSAM::ret, and ana::Binning::Simple().
Referenced by CreateAndFillSpectra().
std::vector<Spectrum*> MakeKinSpectra | ( | SpectrumLoader * | l, |
Var | wei, | ||
Cut | sel | ||
) |
Definition at line 91 of file nue_nd_datastability.C.
References file_size_ana::axes, allInOneTrainingPlots::axis, InitAxes(), ana::kNoShift, and runNovaSAM::ret.
Referenced by CreateAndFillSpectra().
void MakePlot | ( | std::string | fname, |
std::string | name, | ||
std::string | xtitle | ||
) |
Definition at line 190 of file nue_nd_datastability.C.
References allTimeWatchdog::can, ana::CenterTitles(), e, plot_validation_datamc::fname, kBlue, kGreen, kRed, MECModelEnuComparisons::leg, cet::sqlite::max(), std::max(), ana::Spectrum::POT(), runNovaSAM::release, and ana::Spectrum::ToTH1().
Referenced by MakePlots().
void MakePlots | ( | std::string | fname | ) |
Definition at line 354 of file nue_nd_datastability.C.
References Make2DPlot(), and MakePlot().
Referenced by nd_datastability().
void nd_datastability | ( | bool | fillSpectra, |
std::string | fname | ||
) |
Definition at line 382 of file nue_nd_datastability.C.
References CreateAndFillSpectra(), and MakePlots().
const Var kEPH([](const caf::SRProxy *sr){if(sr->slc.nhit==0) return float(-1);return float(sr->slc.calE/sr->slc.nhit);}) |
Referenced by InitAxes().
const Var kHadCalE([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return float(-1);if(sr->vtx.elastic.fuzzyk.nshwlid< 1) return float(sr->slc.calE);return float(sr->slc.calE- sr->vtx.elastic.fuzzyk.png[0].shwlid.calE);}) |
Definition at line 26 of file nue_nd_datastability.C.
const Var kShwLIDE([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return float(-1);if(sr->vtx.elastic.fuzzyk.nshwlid< 1) return float(-1);return float(sr->vtx.elastic.fuzzyk.png[0].shwlid.calE);}) |
Referenced by InitAxes().
const Var kShwLIDEPH([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return float(-1);if(sr->vtx.elastic.fuzzyk.nshwlid< 1) return float(-1);float cale=sr->vtx.elastic.fuzzyk.png[0].shwlid.calE;int nhit=sr->vtx.elastic.fuzzyk.png[0].shwlid.nhit;float eph=(nhit > 0)?cale/nhit:-1;return eph;}) |
Referenced by InitAxes().