#include "TCanvas.h"
#include "TFile.h"
#include "TGraph.h"
#include "TGraphAsymmErrors.h"
#include "TH1D.h"
#include "TLine.h"
#include "TLatex.h"
#include "TLegend.h"
#include "TStyle.h"
#include "TSystem.h"
#include "CAFAna/Analysis/Exposures.h"
#include "CAFAna/Analysis/Plots.h"
#include "CAFAna/Core/Binning.h"
#include "CAFAna/Core/Spectrum.h"
#include "CAFAna/Core/SpectrumLoader.h"
#include <iostream>
#include <sstream>
#include <fstream>
#include <vector>
#include <string>
#include <TROOT.h>
Go to the source code of this file.
Classes | |
struct | LoadedHistograms |
struct | LoadedCanvases |
Functions | |
std::vector< LoadedHistograms > | LoadFile_GetHists (std::vector< std::string > FileLocs, std::string CTier) |
TH1D * | GetSpectToHist (TFile *MyF, std::string HNam, std::string CTier, std::string Axis) |
TH1D * | MakeRatio (TH1D *num, TH1D *denom, int Col, std::string FType) |
void | SetRange (TH1D *H1, std::vector< TH1D * > Shift, std::vector< TH1D * > Ratio, double XLow, double XHigh, double H_YLow, double H_YHigh, double R_YLow, double R_YHigh) |
void | FindAxisRange (double &XLow, double &XHigh, double &H_YLow, double &H_YHigh, double &R_YLow, double &R_YHigh, double MaxVal, bool &SetLogy, std::string Name) |
void | FindAxisRange_DataMC (double &XLow, double &XHigh, double &H_YLow, double &H_YHigh, double &R_YLow, double &R_YHigh, double MaxVal, bool &SetLogy, std::string Name) |
void | MakeSplitCans (TCanvas *Can, std::string DirNa, std::string CanTi, std::string FType, std::string CTier, TFile *OutF, TH1D *Nom, std::vector< TH1D * > Shi) |
void | ProducePlots (LoadedHistograms NomHists, std::vector< LoadedHistograms > SubSysts, std::string FType, std::string CTier) |
void | PlotHistProp (TH1D *Hist, TLegend *L) |
void | Preliminary () |
void | MakeTextFile (std::string Cut, std::string PTitle, std::string Name) |
void | DoThePlots () |
void | DoThePlots (std::string WhichSyst) |
Variables | |
const int | Colours [4] = { 2, 1, 4, 6 } |
std::string | LegNames [4] = { "Nom", "Sh1", "Sh2", "Sh3"} |
double | POTNom = kAna2017POT |
double | LivNom = kAna2017Livetime |
const int | NumCut = 4 |
const std::string | CutNames [NumCut] |
const int | NumQuant = 5 |
const std::string | QuantNames [NumQuant] |
unsigned int | NumSysts = 0 |
std::string | MySys = "" |
const bool | SingleCut = true |
const bool | SingleQuant = true |
const bool | PlotMean = false |
const bool | PlotTest = false |
const bool | UseLightNominal = false |
const std::string | CornName [4] = { "TopL", "TopR", "BotL", "BotR" } |
void DoThePlots | ( | ) |
Definition at line 252 of file DoThePlots.C.
References om::cout, and allTimeWatchdog::endl.
void DoThePlots | ( | std::string | WhichSyst | ) |
Definition at line 258 of file DoThePlots.C.
References om::cout, cut, CutNames, allTimeWatchdog::endl, ff, ana::kAna2017Livetime, ana::kAna2017POT, LegNames, LivNom, LoadFile_GetHists(), ana::Spectrum::LoadFrom(), MySys, NumCut, NumQuant, NumSysts, POTNom, ProducePlots(), QuantNames, SingleCut, SingleQuant, string, and UseLightNominal.
void FindAxisRange | ( | double & | XLow, |
double & | XHigh, | ||
double & | H_YLow, | ||
double & | H_YHigh, | ||
double & | R_YLow, | ||
double & | R_YHigh, | ||
double | MaxVal, | ||
bool & | SetLogy, | ||
std::string | Name | ||
) |
Definition at line 630 of file DoThePlots.C.
References e.
Referenced by MakeSplitCans().
void FindAxisRange_DataMC | ( | double & | XLow, |
double & | XHigh, | ||
double & | H_YLow, | ||
double & | H_YHigh, | ||
double & | R_YLow, | ||
double & | R_YHigh, | ||
double | MaxVal, | ||
bool & | SetLogy, | ||
std::string | Name | ||
) |
Definition at line 590 of file DoThePlots.C.
Referenced by MakeSplitCans().
TH1D * GetSpectToHist | ( | TFile * | MyF, |
std::string | HNam, | ||
std::string | CTier, | ||
std::string | Axis | ||
) |
Definition at line 512 of file DoThePlots.C.
References ana::CenterTitles(), ana::kLivetime, LivNom, ana::Spectrum::LoadFrom(), POTNom, and string.
Referenced by LoadFile_GetHists().
std::vector< LoadedHistograms > LoadFile_GetHists | ( | std::vector< std::string > | FileLocs, |
std::string | CTier | ||
) |
Definition at line 417 of file DoThePlots.C.
References om::cerr, allTimeWatchdog::endl, GetSpectToHist(), LoadedHistograms::hCVNCosmicScor, LoadedHistograms::hCVNNuMuIDScor, LoadedHistograms::hHadFracEnergy, LoadedHistograms::hHadroEnPerHit, LoadedHistograms::hHadronEnergy, LoadedHistograms::hHitsPerSlice, LoadedHistograms::hMuonEnergy, LoadedHistograms::hMuonEnPerHit, LoadedHistograms::hNuMuContPID, LoadedHistograms::hReconstEnergy, LoadedHistograms::hRemIDScore, LoadedHistograms::hReTrOverTrNuE, LoadedHistograms::hSANuMuContPID, LoadedHistograms::hSliceTimeFull, LoadedHistograms::hSliceTimeZoom, LoadedHistograms::hTrkEndX, LoadedHistograms::hTrkEndY, LoadedHistograms::hTrkEndZ, LoadedHistograms::hTrkLenXY, LoadedHistograms::hTrkStartX, LoadedHistograms::hTrkStartY, LoadedHistograms::hTrkStartZ, and LoadedHistograms::hTrueNuEnergy.
Referenced by DoThePlots().
TH1D * MakeRatio | ( | TH1D * | num, |
TH1D * | denom, | ||
int | Col, | ||
std::string | FType | ||
) |
Definition at line 533 of file DoThePlots.C.
References art::to_string().
Referenced by MakeSplitCans().
void MakeSplitCans | ( | TCanvas * | Can, |
std::string | DirNa, | ||
std::string | CanTi, | ||
std::string | FType, | ||
std::string | CTier, | ||
TFile * | OutF, | ||
TH1D * | Nom, | ||
std::vector< TH1D * > | Shi | ||
) |
Definition at line 705 of file DoThePlots.C.
References AddEntry(), cd(), ana::CenterTitles(), Colours, Draw(), FindAxisRange(), FindAxisRange_DataMC(), make_mec_shifts_plots::GetMaximum(), GetName(), GetXaxis(), GetYaxis(), ana::GraphWithPoissonErrors(), LegNames, make_syst_table_plots::line, MakeRatio(), MakeTextFile(), MySys, NumSysts, PlotHistProp(), PlotMean, POTNom, Preliminary(), Rebin(), SaveAs(), SetBorderSize(), SetFillStyle(), SetLineColor(), SetLineWidth(), SetLogy(), SetMarkerStyle(), SetRange(), SetTextSize(), string, Write(), submit_syst::x, and submit_syst::y.
Referenced by ProducePlots().
void MakeTextFile | ( | std::string | Cut, |
std::string | PTitle, | ||
std::string | Name | ||
) |
Definition at line 687 of file DoThePlots.C.
References om::cout, allTimeWatchdog::endl, confusionMatrixTree::out, and string.
Referenced by MakeSplitCans().
void PlotHistProp | ( | TH1D * | Hist, |
TLegend * | L | ||
) |
Definition at line 667 of file DoThePlots.C.
References AddEntry().
Referenced by MakeSplitCans().
void Preliminary | ( | ) |
void ProducePlots | ( | LoadedHistograms | NomHists, |
std::vector< LoadedHistograms > | SubSysts, | ||
std::string | FType, | ||
std::string | CTier | ||
) |
Definition at line 946 of file DoThePlots.C.
References om::cout, allTimeWatchdog::endl, LoadedHistograms::hCVNCosmicScor, LoadedHistograms::hCVNNuMuIDScor, LoadedHistograms::hHadFracEnergy, LoadedHistograms::hHadroEnPerHit, LoadedHistograms::hHadronEnergy, LoadedHistograms::hHitsPerSlice, LoadedHistograms::hMuonEnergy, LoadedHistograms::hMuonEnPerHit, LoadedHistograms::hNuMuContPID, LoadedHistograms::hReconstEnergy, LoadedHistograms::hRemIDScore, LoadedHistograms::hReTrOverTrNuE, LoadedHistograms::hSANuMuContPID, LoadedHistograms::hSliceTimeFull, LoadedHistograms::hSliceTimeZoom, LoadedHistograms::hTrkEndX, LoadedHistograms::hTrkEndY, LoadedHistograms::hTrkEndZ, LoadedHistograms::hTrkLenXY, LoadedHistograms::hTrkStartX, LoadedHistograms::hTrkStartY, LoadedHistograms::hTrkStartZ, LoadedHistograms::hTrueNuEnergy, MakeSplitCans(), NumSysts, OutFile, PlotTest, and string.
Referenced by DoThePlots().
void SetRange | ( | TH1D * | H1, |
std::vector< TH1D * > | Shift, | ||
std::vector< TH1D * > | Ratio, | ||
double | XLow, | ||
double | XHigh, | ||
double | H_YLow, | ||
double | H_YHigh, | ||
double | R_YLow, | ||
double | R_YHigh | ||
) |
Definition at line 558 of file DoThePlots.C.
References GetXaxis(), GetYaxis(), and NumSysts.
Referenced by MakeSplitCans().
const int Colours[4] = { 2, 1, 4, 6 } |
Definition at line 193 of file DoThePlots.C.
Referenced by MakeSplitCans(), and PlotMCOnly().
const std::string CornName[4] = { "TopL", "TopR", "BotL", "BotR" } |
Definition at line 226 of file DoThePlots.C.
Referenced by PlotMCOnly().
const std::string CutNames[NumCut] |
Definition at line 199 of file DoThePlots.C.
Referenced by DoThePlots().
std::string LegNames[4] = { "Nom", "Sh1", "Sh2", "Sh3"} |
Definition at line 194 of file DoThePlots.C.
Referenced by DoThePlots(), and MakeSplitCans().
double LivNom = kAna2017Livetime |
Definition at line 196 of file DoThePlots.C.
Referenced by DoThePlots(), and GetSpectToHist().
std::string MySys = "" |
Definition at line 217 of file DoThePlots.C.
Referenced by DoThePlots(), GetSpectToHist(), LoadFile_GetHists(), MakeSplitCans(), MakeTextFile(), and ProducePlots().
const int NumCut = 4 |
Definition at line 198 of file DoThePlots.C.
Referenced by DoThePlots(), and PlotMCOnly().
const int NumQuant = 5 |
Definition at line 206 of file DoThePlots.C.
Referenced by DoThePlots(), and PlotMCOnly().
unsigned int NumSysts = 0 |
Definition at line 215 of file DoThePlots.C.
Referenced by DoThePlots(), MakeSplitCans(), ProducePlots(), and SetRange().
const bool PlotMean = false |
Definition at line 220 of file DoThePlots.C.
Referenced by MakeSplitCans().
const bool PlotTest = false |
Definition at line 221 of file DoThePlots.C.
Referenced by ProducePlots().
double POTNom = kAna2017POT |
Definition at line 195 of file DoThePlots.C.
Referenced by DoThePlots(), GetSpectToHist(), and MakeSplitCans().
const std::string QuantNames[NumQuant] |
Definition at line 207 of file DoThePlots.C.
Referenced by Compare_NoExtrap(), Compare_Spectra(), ComparisonPlots_Data(), ComparisonPlots_MC(), DoThePlots(), EnergyCont_macro(), neutKEsyst(), neutronE_macro(), NoExtrap(), PlotMCOnly(), resolution2018(), and SystematicComp().
const bool SingleCut = true |
Definition at line 218 of file DoThePlots.C.
Referenced by DoThePlots().
const bool SingleQuant = true |
Definition at line 219 of file DoThePlots.C.
Referenced by DoThePlots().
const bool UseLightNominal = false |
Definition at line 223 of file DoThePlots.C.
Referenced by DoThePlots().