#include "StandardRecord/Proxy/SRProxy.h"
#include "CAFAna/Core/Binning.h"
#include "CAFAna/Core/Spectrum.h"
#include "CAFAna/Core/SpectrumLoader.h"
#include "CAFAna/Core/EventList.h"
#include "CAFAna/Core/Utilities.h"
#include "CAFAna/Cuts/Cuts.h"
#include "CAFAna/Vars/Vars.h"
#include "3FlavorAna/Vars/NueVarsExtra.h"
#include "3FlavorAna/Vars/NumuVarsExtra.h"
#include "3FlavorAna/Cuts/NueCuts2020.h"
#include "3FlavorAna/Cuts/NumuCuts2020.h"
#include "NuXAna/Vars/NusVars.h"
#include "NuXAna/Cuts/NusCuts20.h"
#include "NuXAna/Cuts/NusCuts.h"
#include "NuXAna/macros/Nus20/Selection/CutFlow.h"
#include "NuXAna/macros/Nus20/Selection/CutVariables.h"
#include "NuXAna/macros/Nus20/Selection/FOMUtilities.h"
#include "NuXAna/macros/Nus20/Selection/DecorrelateMatrix.h"
#include "TFile.h"
#include "TString.h"
#include "TH1.h"
#include "TCanvas.h"
#include "TPad.h"
#include "THStack.h"
#include "TLegend.h"
#include "TBox.h"
#include "TLatex.h"
#include "TStyle.h"
#include "/nashome/a/alister1/NOvAPlotting.h"
Go to the source code of this file.
Enumerations | |
enum | Detector { kNear, kFar } |
helper plotting scripts More... | |
Functions | |
void | LoopHistograms (TFile *spectraFile, Detector thisDet) |
void | StyleHistograms (TH1D *h, Detector det, bool isBeamData, bool isCosmic, bool isTotal) |
void | SetupCanvas (TPad *topPad, TPad *botPad, TPad *thisPad) |
bool | PlotData (std::string name) |
void | StyleLegend (TLegend *leg) |
void | DrawBoxes (TH1D *histMCTotal, std::vector< double > cutValues, CutSide thisCutSide) |
void | DrawRatio (TPad *thisPad, TH1D *mc, TH1D *dat) |
void | GetFractionalUncertainties (TFile *covmx, std::vector< float > *nd, std::vector< float > *fd) |
void | InitialiseHistograms (TFile *spectraFile, Detector thisDet, int iCut, int iVar, std::string dirName, std::string histPathPre, std::string histPath) |
void | InitialiseFOMHists (Detector thisDet, int iCut, int iVar) |
void | DrawFOM (std::set< FomType >, int iVar) |
void | PrintSelectedEvents (int iCut, int iVar) |
void | DrawDataMC (Detector thisDet, int iCut, int iVar, bool isLogPlot, bool isCosmic, bool isAreaNormalised) |
void | DrawMCOnly (Detector thisDet, int iCut, int iVar, bool isLogPlot, bool isCosmic) |
void | DrawIndependentSpectra (Detector thisDet, int iCut, int iVar) |
TLegend * | GetStandardLegend () |
Variables | |
std::vector< float > | ndFractionalUncertainties = {} |
std::vector< float > | fdFractionalUncertainties = {} |
std::string | dirName |
std::vector< VarContainer > | vars |
std::vector< CutContainer > | cuts |
std::vector< CutContainer > | subcuts |
TH1D * | histTotal = new TH1D() |
TH1D * | histMCTotal = new TH1D() |
total sig + bg More... | |
TH1D * | histMCSignal = new TH1D() |
total mc only More... | |
TH1D * | histMCSignalNoCut = new TH1D() |
total mc signal More... | |
TH1D * | histCosmic = new TH1D() |
total mc signal (no cut) More... | |
TH1D * | histMCBg = new TH1D() |
total cosmic More... | |
TH1D * | histData = new TH1D() |
mc-only bg (no cosmic) More... | |
TH1D * | EffTimesPurHist = new TH1D() |
total data More... | |
TH1D * | SOverSBHist = new TH1D() |
TH1D * | SOverSSBHist = new TH1D() |
TH1D * | BinnedSOverSSBSystHist = new TH1D() |
TH2D * | histMCTotalEnergy = nullptr |
TH2D * | histMCSignalEnergy = nullptr |
bool | isAreaNorm = true |
TCanvas * | cRatio = new TCanvas("cRatio", "cRatio", 600, 600) |
TPad * | topPad = new TPad("topPad", "", 0.005, 0.3, 0.995, 0.995) |
TPad * | botPad = new TPad("botPad", "", 0.005, 0.005, 0.995, 0.3) |
TCanvas * | cNoRatio = new TCanvas("cNoRatio", "cNoRatio", 600, 500) |
TPad * | thisPad = new TPad("thisPad", "", 0.005, 0.005, 0.995, 0.995) |
enum Detector |
Definition at line 233 of file PlotSpectra.C.
References ana::kBoth, kHigh, and kLow.
Referenced by DrawDataMC(), DrawIndependentSpectra(), and DrawMCOnly().
void DrawDataMC | ( | Detector | thisDet, |
int | iCut, | ||
int | iVar, | ||
bool | isLogPlot, | ||
bool | isCosmic, | ||
bool | isAreaNormalised | ||
) |
Definition at line 437 of file PlotSpectra.C.
References botPad, cRatio, update_sam_good_runs_metadata::cuts, dirName, DrawBoxes(), DrawRatio(), GetStandardLegend(), histCosmic, histData, histMCBg, histMCSignal, histMCTotal, histTotal, kNear, MECModelEnuComparisons::leg, scale, Scale(), string, topPad, and vars.
Referenced by LoopHistograms().
Definition at line 352 of file PlotSpectra.C.
References EffTimesPurHist, kEffTimesPurity, kSOverSB, kSOverSSB, SOverSBHist, SOverSSBHist, StyleLegend(), and vars.
Referenced by LoopHistograms().
Definition at line 583 of file PlotSpectra.C.
References cNoRatio, update_sam_good_runs_metadata::cuts, dirName, DrawBoxes(), histCosmic, histMCBg, histMCSignal, histMCTotal, histTotal, kRed, std::max(), StyleLegend(), thisPad, and vars.
Referenced by LoopHistograms().
Definition at line 513 of file PlotSpectra.C.
References cNoRatio, update_sam_good_runs_metadata::cuts, dirName, DrawBoxes(), GetStandardLegend(), histCosmic, histMCBg, histMCSignal, histMCTotal, histTotal, kNear, MECModelEnuComparisons::leg, scale, string, thisPad, and vars.
Referenced by LoopHistograms().
void DrawRatio | ( | TPad * | thisPad, |
TH1D * | mc, | ||
TH1D * | dat | ||
) |
void GetFractionalUncertainties | ( | TFile * | covmx, |
std::vector< float > * | nd, | ||
std::vector< float > * | fd | ||
) |
Definition at line 287 of file PlotSpectra.C.
References MECModelEnuComparisons::i, and std::sqrt().
TLegend* GetStandardLegend | ( | ) |
Definition at line 623 of file PlotSpectra.C.
References histData, histMCSignal, histTotal, MECModelEnuComparisons::leg, and StyleLegend().
Referenced by DrawDataMC(), and DrawMCOnly().
Definition at line 308 of file PlotSpectra.C.
References BinnedSOverSSBSystHist, update_sam_good_runs_metadata::cuts, dirName, EffTimesPurHist, fdFractionalUncertainties, getFOMHist(), histMCSignal, histMCSignalEnergy, histMCSignalNoCut, histMCTotal, histMCTotalEnergy, histTotal, kBinnedSOverSSB, kEffTimesPurity, kNear, kSOverSB, kSOverSSB, ndFractionalUncertainties, SOverSBHist, SOverSSBHist, StyleFOMs(), and vars.
Referenced by LoopHistograms().
void InitialiseHistograms | ( | TFile * | spectraFile, |
Detector | thisDet, | ||
int | iCut, | ||
int | iVar, | ||
std::string | dirName, | ||
std::string | histPathPre, | ||
std::string | histPath | ||
) |
Definition at line 396 of file PlotSpectra.C.
References update_sam_good_runs_metadata::cuts, histCosmic, histData, histMCBg, histMCSignal, histMCSignalEnergy, histMCSignalNoCut, histMCTotal, histMCTotalEnergy, histTotal, string, StyleHistograms(), and vars.
Referenced by LoopHistograms().
Definition at line 16 of file PlotSpectra.C.
References om::cout, update_sam_good_runs_metadata::cuts, cutsFD, cutsND, dirName, DrawDataMC(), DrawFOM(), DrawIndependentSpectra(), DrawMCOnly(), allTimeWatchdog::endl, fdFractionalUncertainties, GetDecorrelatedUncertainty(), histCosmic, histMCSignal, histMCSignalNoCut, histMCTotal, MECModelEnuComparisons::i, InitialiseFOMHists(), InitialiseHistograms(), makeTrainCVSamples::int, kFar, kNear, ndFractionalUncertainties, PlotData(), PrintSelectedEvents(), string, subcuts, subCutsFD, subCutsND, vars, varsFD, and varsND.
Referenced by PlotSpectra().
bool PlotData | ( | std::string | name | ) |
Definition at line 382 of file PlotSpectra.C.
References om::cout, update_sam_good_runs_metadata::cuts, allTimeWatchdog::endl, histCosmic, histMCBg, histMCSignal, histTotal, and vars.
Referenced by LoopHistograms().
void SetupCanvas | ( | TPad * | topPad, |
TPad * | botPad, | ||
TPad * | thisPad | ||
) |
Definition at line 186 of file PlotSpectra.C.
References cNoRatio, and cRatio.
Referenced by PlotSpectra().
Definition at line 101 of file PlotSpectra.C.
References kFar, kNear, rootlogon::kNovaFont, and kOrange.
Referenced by InitialiseHistograms().
void StyleLegend | ( | TLegend * | leg | ) |
Definition at line 225 of file PlotSpectra.C.
Referenced by DrawFOM(), DrawIndependentSpectra(), and GetStandardLegend().
TH1D* BinnedSOverSSBSystHist = new TH1D() |
Definition at line 66 of file PlotSpectra.h.
Referenced by InitialiseFOMHists().
TPad* botPad = new TPad("botPad", "", 0.005, 0.005, 0.995, 0.3) |
Definition at line 75 of file PlotSpectra.h.
Referenced by DrawDataMC(), makeRandomUniverseHistograms(), and PlotSpectra().
TCanvas* cNoRatio = new TCanvas("cNoRatio", "cNoRatio", 600, 500) |
Definition at line 77 of file PlotSpectra.h.
Referenced by DrawIndependentSpectra(), DrawMCOnly(), and SetupCanvas().
TCanvas* cRatio = new TCanvas("cRatio", "cRatio", 600, 600) |
Definition at line 73 of file PlotSpectra.h.
Referenced by DrawDataMC(), and SetupCanvas().
std::vector<CutContainer> cuts |
Definition at line 49 of file PlotSpectra.h.
std::string dirName |
Definition at line 47 of file PlotSpectra.h.
Referenced by cmf::EventList::AddEvent(), ana::AddNusAna2020FileSysts(), Analyse_Data2DataComp(), Analyse_Data2DataComp_HigherEnergyCuts(), Analyse_Data2DataComp_kNumu2020ND(), Analyse_OverlayStudies(), nova::database::Table::CreateFromDB(), nova::database::Table::CreateFromXML(), nova::dbi::Table::CreateFromXML(), cmf::EventListManipulator::Deserialize(), DrawDataMC(), DrawIndependentSpectra(), DrawMCOnly(), GetBestFitPoint(), GetContours(), GetDeltaChiSqr(), GetMedianDeltaChiSqr(), GetNuePrediction2017(), GetNuePrediction2018(), GetNuePrediction2019(), GetNuePredictionFuture(), getStabilitySpectra(), InitialiseFOMHists(), LoopHistograms(), MakeCovMx(), makeMedianContours(), runCheatDecomp(), Save1DContour(), util::SaveObj(), nutools::dbi::Table::Table(), nova::dbi::Table::Table(), test_nue2017Prediction(), and test_nue2018_fitter().
TH1D* EffTimesPurHist = new TH1D() |
total data
Definition at line 63 of file PlotSpectra.h.
Referenced by DrawFOM(), InitialiseFOMHists(), PlotPreSelectionPlots(), and PlotSelectionPlots().
std::vector<float> fdFractionalUncertainties = {} |
Definition at line 45 of file PlotSpectra.h.
Referenced by InitialiseFOMHists(), and LoopHistograms().
TH1D* histCosmic = new TH1D() |
total mc signal (no cut)
Definition at line 57 of file PlotSpectra.h.
Referenced by DrawDataMC(), DrawIndependentSpectra(), DrawMCOnly(), InitialiseHistograms(), LoopHistograms(), and PrintSelectedEvents().
TH1D* histData = new TH1D() |
mc-only bg (no cosmic)
Definition at line 59 of file PlotSpectra.h.
Referenced by DrawDataMC(), GetStandardLegend(), and InitialiseHistograms().
TH1D* histMCBg = new TH1D() |
total cosmic
Definition at line 58 of file PlotSpectra.h.
Referenced by DrawDataMC(), DrawIndependentSpectra(), DrawMCOnly(), InitialiseHistograms(), and PrintSelectedEvents().
TH1D* histMCSignal = new TH1D() |
total mc only
Definition at line 55 of file PlotSpectra.h.
Referenced by DrawDataMC(), DrawIndependentSpectra(), DrawMCOnly(), GetStandardLegend(), InitialiseFOMHists(), InitialiseHistograms(), LoopHistograms(), and PrintSelectedEvents().
TH2D* histMCSignalEnergy = nullptr |
Definition at line 69 of file PlotSpectra.h.
Referenced by InitialiseFOMHists(), and InitialiseHistograms().
TH1D* histMCSignalNoCut = new TH1D() |
total mc signal
Definition at line 56 of file PlotSpectra.h.
Referenced by InitialiseFOMHists(), InitialiseHistograms(), and LoopHistograms().
TH1D* histMCTotal = new TH1D() |
total sig + bg
Definition at line 54 of file PlotSpectra.h.
Referenced by DrawDataMC(), DrawIndependentSpectra(), DrawMCOnly(), InitialiseFOMHists(), InitialiseHistograms(), and LoopHistograms().
TH2D* histMCTotalEnergy = nullptr |
Definition at line 68 of file PlotSpectra.h.
Referenced by InitialiseFOMHists(), and InitialiseHistograms().
TH1D* histTotal = new TH1D() |
Definition at line 53 of file PlotSpectra.h.
Referenced by DrawDataMC(), DrawIndependentSpectra(), DrawMCOnly(), energyResolution(), GetStandardLegend(), InitialiseFOMHists(), InitialiseHistograms(), and PrintSelectedEvents().
bool isAreaNorm = true |
Definition at line 71 of file PlotSpectra.h.
std::vector<float> ndFractionalUncertainties = {} |
Definition at line 44 of file PlotSpectra.h.
Referenced by InitialiseFOMHists(), and LoopHistograms().
TH1D* SOverSBHist = new TH1D() |
Definition at line 64 of file PlotSpectra.h.
Referenced by DrawFOM(), InitialiseFOMHists(), PlotPreSelectionPlots(), and PlotSelectionPlots().
TH1D* SOverSSBHist = new TH1D() |
Definition at line 65 of file PlotSpectra.h.
Referenced by DrawFOM(), InitialiseFOMHists(), PlotPreSelectionPlots(), and PlotSelectionPlots().
std::vector<CutContainer> subcuts |
Definition at line 50 of file PlotSpectra.h.
Referenced by addVars(), and LoopHistograms().
TPad* thisPad = new TPad("thisPad", "", 0.005, 0.005, 0.995, 0.995) |
Definition at line 78 of file PlotSpectra.h.
Referenced by DrawIndependentSpectra(), DrawMCOnly(), PlotPreSelectionPlots(), PlotSelectionPlots(), and PlotSpectra().
TPad* topPad = new TPad("topPad", "", 0.005, 0.3, 0.995, 0.995) |
Definition at line 74 of file PlotSpectra.h.
Referenced by DrawDataMC(), makeCalibSystRatioPlots(), makeRandomUniverseHistograms(), PlotPreSelectionPlots(), PlotSelectionPlots(), and PlotSpectra().
std::vector<VarContainer> vars |
Definition at line 48 of file PlotSpectra.h.