#include "CAFAna/Analysis/Exposures.h"
#include "CAFAna/Analysis/Plots.h"
#include "CAFAna/Analysis/Calcs.h"
#include "3FlavorAna/Plotting/NuePlotStyle.h"
#include "CAFAna/Analysis/Style.h"
#include "CAFAna/Core/Binning.h"
#include "CAFAna/Core/HistAxis.h"
#include "CAFAna/Core/LoadFromFile.h"
#include "CAFAna/Core/Utilities.h"
#include "CAFAna/Prediction/IPrediction.h"
#include "CAFAna/Prediction/PredictionInterp.h"
#include "CAFAna/Prediction/PredictionExtrap.h"
#include "CAFAna/Prediction/PredictionNoExtrap.h"
#include "3FlavorAna/Prediction/PredictionExtendToPeripheral.h"
#include "3FlavorAna/Prediction/PredictionSystJoint2018.h"
#include "CAFAna/Vars/FitVars.h"
#include "CAFAna/Decomp/IDecomp.h"
#include "CAFAna/Extrap/IExtrap.h"
#include "CAFAna/Extrap/ModularExtrap.h"
#include "CAFAna/Extrap/ModularExtrapComponent.h"
#include "OscLib/OscCalcDumb.h"
#include "OscLib/IOscCalc.h"
#include "TStyle.h"
#include "TFile.h"
#include "TH1.h"
#include "TCanvas.h"
#include "TGraph.h"
#include "TGraphAsymmErrors.h"
#include "TGaxis.h"
#include "TLatex.h"
#include "TPaveText.h"
#include "TLegend.h"
#include "TLine.h"
#include "TSystem.h"
#include <iostream>
#include <fstream>
#include <iomanip>
#include "tex_tables_util.h"
Go to the source code of this file.
Classes | |
struct | ana::DataMCComponents |
Namespaces | |
ana | |
Cuts and Vars for the 2020 FD DiF Study. | |
Functions | |
osc::IOscCalc * | GetCalculator (bool usingdumb) |
TH1 * | PrettyRatio (TH1 *shi, TH1 *nom, int color, double alpha=1., TString titley="Shift / Nom") |
double | FindLimitY (std::vector< TH1 * > histos, bool doMax=true) |
void | FormatErrorBand (TH1 *hplus, TH1 *hminus, bool signal=false, bool fixbins=false) |
TH1 * | HistNumuOpt (TH1 *orig) |
void | PrettyTag (TString pid, int color, double xndc, double yndc) |
void | PIDTag (TString pid) |
void | HTag (TString hie) |
TLegend * | CustomLegend (std::vector< TH1 * >h, std::vector< TString > titles, std::vector< TString > option, double x1=kLegendDefaultX1, double y1=kLegendDefaultY1, double x2=kLegendDefaultX2, double y2=kLegendDefaultY2) |
void | FixLegend (TLegend *leg, TString opt="default") |
TGraph * | DummyGraph (int color=kBlack, int style=1, int linewidth=2, int markerstyle=kFullCircle) |
TLegend * | DefaultNueLegend (bool sig=true, bool tot=true, bool data=false, double x1=kLegendDefaultX1, double y1=kLegendDefaultY1, double x2=kLegendDefaultX2, double y2=kLegendDefaultY2) |
TLegend * | DefaultNumuLegend (bool sig=true, bool tot=true, bool data=false, double x1=kLegendDefaultX1, double y1=kLegendDefaultY1, double x2=kLegendDefaultX2, double y2=kLegendDefaultY2) |
void | PrintCanvasAll (TCanvas *c, const TString outname, const TString outdir="plots/", const std::vector< TString > exts={"pdf","png","root"}) |
TH1 * | RebinToShortAxis (TH1 *h) |
void | NuePID3bin (TH1 *h, TString pidtag, bool binlabels=true) |
TCanvas * | ExPIDPlot (std::vector< TH1 * > topHistos, std::vector< TString > topOption) |
TCanvas * | RatioPlot (std::vector< TH1 * > topHistos, std::vector< TString > topOption, std::vector< TH1 * > bottomHistos, std::vector< TString > bottomOption, TString pidtag, AxisType pidaxis=kNue1bin) |
void | PlotDataMC (std::vector< TH1 * >vnom, std::vector< bool >isdata, TLegend *leg, TString pidtag="", TString htag="", TString out_name="plot_FD", bool ratioplot=false, bool ratioerrors=false, AxisType pidaxis=kNue1bin) |
void | PlotNDDataTotalMCComparison (TH1 *hdata, std::vector< TH1 * > htots, TLegend *leg, TString pidtag="", TString out_name="plot_nd", bool ratioplot=false, AxisType pidaxis=kNue1bin) |
void | PlotMCComponentsComparison (std::vector< TH1 * >vnom, std::vector< TH1 * >vshi, TLegend *leg, TString pidtag="", TString out_name="plot_nd", bool ratioplot=false, bool ratioerrors=false, AxisType pidaxis=kNue1bin) |
void | PlotMCComponentsErrorBand (std::vector< TH1 * >vnom, std::vector< TH1 * >vshi, TLegend *leg, TString pidtag="", TString out_name="plot_nd", bool ratioplot=false, bool ratioerrors=false, AxisType pidaxis=kNue1bin) |
void | ana::DefaultFormatNue (DataMCComponents &comp, int linestyle=1) |
const DataMCComponents | ana::GetNDComponents (const IDecomp *decomp) |
struct DataMCComponets | ana::GetFDMCComponents (osc::IOscCalc *calc, IPrediction *pred_no, TString output_name="nue", int linestyle=1, bool bkgdetails=false) |
void | ana::CompareNDDataOneMC (DataMCComponents h_no, DataMCComponents h_sh, TString plottitle, TString out_name, TString pidtag, AxisType pidaxis, bool printtable=true) |
void | ana::CompareNDDataTwoMC (DataMCComponents hnom, DataMCComponents hplu, DataMCComponents hmin, TString plottitle, TString out_name, TString pidtag, AxisType pidaxis, bool printtable=true) |
const IDecomp * | ana::GetDecomp (IPrediction *prediction, EModExtrapComps modExtrapComp) |
void | ana::CompareNDDataMCFromVector (PredictionSystJoint2018 *predictionSyst, const ISyst *syst, EModExtrapComps modExtrapComp, TString plottitle, TString out_name, TString tag, AxisType pidaxis, bool printtable=true) |
void | ana::CompareOneShiftPred (IPrediction *pred_no, IPrediction *pred_sh, TString plottitle, TString out_name, TString pidtag, bool printtable=true, AxisType pidaxis=kNue1bin, bool PrintParams=false) |
void | ana::CompareTwoShiftPred (IPrediction *pred_no, IPrediction *pred_pl, IPrediction *pred_mi, TString plottitle, TString out_name, TString pidtag, bool printtable=true, AxisType pidaxis=kNue1bin, bool PrintParams=false) |
void | ana::ComparePredictionsFromVector (PredictionSystJoint2018 *predictionSyst, const ISyst *syst, TString plottitle, TString out_name, bool printtable=true, AxisType pidaxis=kNue3bin) |
Variables | |
static bool | isFHC =true |
const bool | printratioplots =true |
bool | usedumb = false |
bool | mergePeripheral =false |
const double | kLegendDefaultX1 = 0.63 |
const double | kLegendDefaultX2 = 0.85 |
const double | kLegendDefaultY1 = 0.68 |
const double | kLegendDefaultY2 = 0.88 |
enum AxisType |
Enumerator | |
---|---|
kNue1bin | |
kNue3bin | |
kNue4bin | |
kNumuOpt | |
kNumuOther | |
kNue1bin | |
kNue3bin | |
kNumuOpt | |
kNumuOther | |
kNue1bin | |
kNue3bin | |
kNumuOpt | |
kNumuOther | |
kNue1bin | |
kNue3bin | |
kNueNDbin | |
kNumuOpt | |
kNumuOther |
Definition at line 50 of file draw_plots_util.h.
TLegend* CustomLegend | ( | std::vector< TH1 * > | h, |
std::vector< TString > | titles, | ||
std::vector< TString > | option, | ||
double | x1 = kLegendDefaultX1 , |
||
double | y1 = kLegendDefaultY1 , |
||
double | x2 = kLegendDefaultX2 , |
||
double | y2 = kLegendDefaultY2 |
||
) |
Definition at line 170 of file draw_plots_util.h.
References MECModelEnuComparisons::leg, registry_explorer::v, x1, submit_syst::x2, y1, and submit_syst::y2.
TLegend* DefaultNueLegend | ( | bool | sig = true , |
bool | tot = true , |
||
bool | data = false , |
||
double | x1 = kLegendDefaultX1 , |
||
double | y1 = kLegendDefaultY1 , |
||
double | x2 = kLegendDefaultX2 , |
||
double | y2 = kLegendDefaultY2 |
||
) |
Definition at line 221 of file draw_plots_util.h.
References DummyGraph(), ana::kBeamNueBackgroundColor, ana::kNCBackgroundColor, ana::kNueSignalColor, ana::kNumuBackgroundColor, ana::kTotalMCColor, MECModelEnuComparisons::leg, PandAna.Demos.pi0_spectra::tot, x1, submit_syst::x2, y1, and submit_syst::y2.
TLegend* DefaultNumuLegend | ( | bool | sig = true , |
bool | tot = true , |
||
bool | data = false , |
||
double | x1 = kLegendDefaultX1 , |
||
double | y1 = kLegendDefaultY1 , |
||
double | x2 = kLegendDefaultX2 , |
||
double | y2 = kLegendDefaultY2 |
||
) |
Definition at line 240 of file draw_plots_util.h.
References DummyGraph(), isNumuAna, ana::kBeamNueBackgroundColor, ana::kNCBackgroundColor, ana::kNueSignalColor, ana::kNumuBackgroundColor, ana::kNuTauBackgroundColor, ana::kTotalMCColor, MECModelEnuComparisons::leg, PandAna.Demos.pi0_spectra::tot, x1, submit_syst::x2, y1, and submit_syst::y2.
TGraph* DummyGraph | ( | int | color = kBlack , |
int | style = 1 , |
||
int | linewidth = 2 , |
||
int | markerstyle = kFullCircle |
||
) |
TCanvas* ExPIDPlot | ( | std::vector< TH1 * > | topHistos, |
std::vector< TString > | topOption | ||
) |
Definition at line 311 of file draw_plots_util.h.
References plot_validation_datamc::Clone(), Ebins, FindLimitY(), make_syst_table_plots::h, he, calib::j, and pidBins.
double FindLimitY | ( | std::vector< TH1 * > | histos, |
bool | doMax = true |
||
) |
Definition at line 93 of file draw_plots_util.h.
References make_mec_shifts_plots::GetMaximum(), MECModelEnuComparisons::i, cet::sqlite::max(), and min().
void FixLegend | ( | TLegend * | leg, |
TString | opt = "default" |
||
) |
Definition at line 185 of file draw_plots_util.h.
References kLegendDefaultX1, kLegendDefaultX2, kLegendDefaultY1, kLegendDefaultY2, and MECModelEnuComparisons::opt.
void FormatErrorBand | ( | TH1 * | hplus, |
TH1 * | hminus, | ||
bool | signal = false , |
||
bool | fixbins = false |
||
) |
Definition at line 108 of file draw_plots_util.h.
References om::cout, allTimeWatchdog::endl, MECModelEnuComparisons::i, kBlue, kRed, ana::kTotalMCErrorBandColor, kViolet, cet::sqlite::max(), and min().
osc::IOscCalc* GetCalculator | ( | bool | usingdumb | ) |
Definition at line 55 of file draw_plots_util.h.
References calc, osc::OscCalcDumb::Copy(), osc::_IOscCalc< T >::Copy(), ana::DefaultOscCalc(), dmsq32, ana::kFitDeltaInPiUnits, ana::kFitDmSq32, ana::kFitSinSqTheta23, ana::FitVarWithPrior::SetValue(), ana::ConstrainedFitVarWithPrior::SetValue(), ana::FitDmSq32::SetValue(), and ssth23.
TH1* HistNumuOpt | ( | TH1 * | orig | ) |
Definition at line 134 of file draw_plots_util.h.
References runNovaSAM::ret, and ana::UniqueName().
void HTag | ( | TString | hie | ) |
Definition at line 159 of file draw_plots_util.h.
References kOrange, and PrettyTag().
void NuePID3bin | ( | TH1 * | h, |
TString | pidtag, | ||
bool | binlabels = true |
||
) |
Definition at line 304 of file draw_plots_util.h.
References ana::Nue2018ThreeBinDivisions(), and ana::Nue2018ThreeBinLabels().
void PIDTag | ( | TString | pid | ) |
void PlotDataMC | ( | std::vector< TH1 * > | vnom, |
std::vector< bool > | isdata, | ||
TLegend * | leg, | ||
TString | pidtag = "" , |
||
TString | htag = "" , |
||
TString | out_name = "plot_FD" , |
||
bool | ratioplot = false , |
||
bool | ratioerrors = false , |
||
AxisType | pidaxis = kNue1bin |
||
) |
Definition at line 466 of file draw_plots_util.h.
References bin, demo5::c2, FixLegend(), genie::utils::style::Format(), ana::GraphWithPoissonErrors(), HTag(), kNue3bin, ana::Nue2018ThreeBinDivisions(), ana::Nue2018ThreeBinLabels(), submit_concat_project::out_name, PrettyRatio(), PrettyTag(), PrintCanvasAll(), ana::PrintLatexFigure(), RatioPlot(), and registry_explorer::v.
void PlotMCComponentsComparison | ( | std::vector< TH1 * > | vnom, |
std::vector< TH1 * > | vshi, | ||
TLegend * | leg, | ||
TString | pidtag = "" , |
||
TString | out_name = "plot_nd" , |
||
bool | ratioplot = false , |
||
bool | ratioerrors = false , |
||
AxisType | pidaxis = kNue1bin |
||
) |
Definition at line 594 of file draw_plots_util.h.
References demo5::c2, FixLegend(), kNue3bin, NuePID3bin(), submit_concat_project::out_name, PIDTag(), PrettyRatio(), PrintCanvasAll(), ana::PrintLatexFigure(), RatioPlot(), ana::UniqueName(), and registry_explorer::v.
void PlotMCComponentsErrorBand | ( | std::vector< TH1 * > | vnom, |
std::vector< TH1 * > | vshi, | ||
TLegend * | leg, | ||
TString | pidtag = "" , |
||
TString | out_name = "plot_nd" , |
||
bool | ratioplot = false , |
||
bool | ratioerrors = false , |
||
AxisType | pidaxis = kNue1bin |
||
) |
Definition at line 650 of file draw_plots_util.h.
References ana::DataMCComponents::beam, ana::DataMCComponents::bkg, demo5::c2, ana::CenterTitles(), plot_validation_datamc::Clone(), ana::DataMCComponents::data, ana::DefaultFormatNue(), FixLegend(), FormatErrorBand(), make_mec_shifts_plots::GetMaximum(), ana::kBeamNueBackgroundColor, ana::kNCBackgroundColor, kNue3bin, ana::kNueSignalColor, ana::kNueSignalWSColor, ana::kNumuBackgroundColor, ana::kTotalMCColor, ana::DataMCComponents::nc, NuePID3bin(), ana::DataMCComponents::nuetonumu, ana::DataMCComponents::nuetonutau, ana::DataMCComponents::numu, ana::DataMCComponents::numutonumu, ana::DataMCComponents::numutonutau, submit_concat_project::out_name, PIDTag(), PrettyRatio(), PrintCanvasAll(), ana::PrintLatexFigure(), RatioPlot(), ana::DataMCComponents::sig, ana::DataMCComponents::tau, registry_explorer::v, and ana::DataMCComponents::wrongSign.
void PlotNDDataTotalMCComparison | ( | TH1 * | hdata, |
std::vector< TH1 * > | htots, | ||
TLegend * | leg, | ||
TString | pidtag = "" , |
||
TString | out_name = "plot_nd" , |
||
bool | ratioplot = false , |
||
AxisType | pidaxis = kNue1bin |
||
) |
Definition at line 549 of file draw_plots_util.h.
References demo5::c1, FixLegend(), make_mec_shifts_plots::GetMaximum(), make_syst_table_plots::h, kNue3bin, NuePID3bin(), submit_concat_project::out_name, PIDTag(), PrettyRatio(), PrintCanvasAll(), ana::PrintLatexFigure(), PandAna.reco_validation.prod5_pid_validation::ratio(), and RatioPlot().
TH1* PrettyRatio | ( | TH1 * | shi, |
TH1 * | nom, | ||
int | color, | ||
double | alpha = 1. , |
||
TString | titley = "Shift / Nom" |
||
) |
Definition at line 80 of file draw_plots_util.h.
References ana::UniqueName().
void PrintCanvasAll | ( | TCanvas * | c, |
const TString | outname, | ||
const TString | outdir = "plots/" , |
||
const std::vector< TString > | exts = {"pdf","png","root"} |
||
) |
Definition at line 260 of file draw_plots_util.h.
References plot_validation_datamc::c, galleryMaker::ext, and outdir.
TCanvas* RatioPlot | ( | std::vector< TH1 * > | topHistos, |
std::vector< TString > | topOption, | ||
std::vector< TH1 * > | bottomHistos, | ||
std::vector< TString > | bottomOption, | ||
TString | pidtag, | ||
AxisType | pidaxis = kNue1bin |
||
) |
Definition at line 375 of file draw_plots_util.h.
References plot_validation_datamc::c, plot_validation_datamc::Clone(), FindLimitY(), make_syst_table_plots::h, h1, h3, kNue3bin, cet::sqlite::max(), NuePID3bin(), plot_validation_datamc::p1, and plot_validation_datamc::p2.
TH1* RebinToShortAxis | ( | TH1 * | h | ) |
Definition at line 278 of file draw_plots_util.h.
References it, runNovaSAM::ret, and ana::UniqueName().
|
static |
Definition at line 45 of file draw_plots_util.h.
Referenced by ana::GetNDComponents().
const double kLegendDefaultX1 = 0.63 |
Definition at line 165 of file draw_plots_util.h.
const double kLegendDefaultX2 = 0.85 |
Definition at line 166 of file draw_plots_util.h.
const double kLegendDefaultY1 = 0.68 |
Definition at line 167 of file draw_plots_util.h.
const double kLegendDefaultY2 = 0.88 |
Definition at line 168 of file draw_plots_util.h.
bool mergePeripheral =false |
Definition at line 53 of file draw_plots_util.h.
const bool printratioplots =true |
Definition at line 48 of file draw_plots_util.h.
bool usedumb = false |
Definition at line 52 of file draw_plots_util.h.