#include "CAFAna/Core/Utilities.h"
#include "CAFAna/Analysis/Plots.h"
#include "NDAna/numucc_inc/Multiverse.h"
#include "TH1.h"
#include "TH2.h"
#include "TH3.h"
#include "TFile.h"
#include "TAxis.h"
#include "TCanvas.h"
#include "TLegend.h"
#include <string>
#include <vector>
#include <map>
#include <iostream>
Go to the source code of this file.
Functions | |
const TAxis | angleAxis (1, 0.5, 1.0) |
const TAxis | muoneAxis (1, 0.5, 2.5) |
const TAxis | uncertAxis (1,-0.2, 0.2) |
const TAxis | enuAxis (1, 0.0, 5.0) |
const TAxis | q2Axis (1, 0.0, 2.8) |
void | FixAxisRangeQ2 (TH1 *hist) |
void | FixAxisRangeENu (TH1 *hist) |
void | FixAxisRange2D (TH2 *hist) |
void | AddUpDwUncerts (TH1 *destHist, TH1 *upHist, TH1 *dwHist) |
void | AddUpDwUncerts2D (TH2 *destHist, TH2 *upHist, TH2 *dwHist) |
TH3D * | Load3DXSec (string syst) |
TH2D * | XSec2D (string syst) |
TH1D * | XSecENu (string syst) |
TH1D * | XSecQ2 (string syst) |
TH2D * | XSec2DUncert (string syst) |
TH1D * | XSecENuUncert (string syst) |
TH1D * | XSecQ2Uncert (string syst) |
void | LoadNominal (string syst) |
void | LoadSyst (string syst) |
void | LoadUncerts (string syst) |
void | LoadStatUncert (string nom) |
void | AddQuadrature (TH1 *dest, TH1 *hist) |
void | AddQuadrature (TH1 *dest, vector< TH1 * > hists) |
void | AddQuadrature2D (TH2 *dest, TH2 *hist) |
void | AddQuadrature2D (TH2 *dest, vector< TH2 * > hists) |
TH1 * | GetMaxUpDown (TH1 *upHist, TH1 *dwHist) |
TH2 * | GetMaxUpDown2D (TH2 *upHist, TH2 *dwHist) |
TH1 * | GetAbsolute (TH1 *hist) |
TH2 * | GetAbsolute2D (TH2 *hist) |
TH1 * | GetSliceHist (TH2 *hist, int ibinx) |
TH2 * | GetTotalBeamUncert2D () |
TH1 * | GetTotalBeamUncertENu () |
TH1 * | GetTotalBeamUncertQ2 () |
void | LimitTMuBins (TH1 *hist, int ibiny) |
void | MakeSystematicPlots (vector< string > systs, string systFilename) |
void | PlotXSec (string filename, string outputFolder) |
Variables | |
map< string, string > | systTitles |
vector< string > | standardSysts |
map< string, pair< string, string > > | standardSystsUpDown |
const map< string, string > | otherNomSysts |
vector< string > | beamSysts |
map< string, Color_t > | systColors |
map< int, double > | maxTMuBins |
const string | var3DName = "EAvail" |
string | uncertLabel = "_uncert" |
const vector< string > | vars3D |
TH3D * | nom3DXSec |
TH2D * | nom2DXSec |
string | defaultNominal = "cv" |
map< string, TH3D * > | nominalXSecs3D |
map< string, TH2D * > | nominalXSecs2D |
map< string, TH1D * > | nominalXSecsENu |
map< string, TH1D * > | nominalXSecsQ2 |
map< string, TH3D * > | all3DXSecs |
map< string, TH2D * > | xSecs2D |
map< string, TH1D * > | xSecsENu |
map< string, TH1D * > | xSecsQ2 |
map< string, TH2D * > | uncerts2D |
map< string, TH1D * > | uncertsENu |
map< string, TH1D * > | uncertsQ2 |
TFile * | inputFile |
TFile * | outFile |
TCanvas * | c1 |
const unsigned int | N_GENIE = 1000 |
const unsigned int | N_PPFX = 100 |
void AddQuadrature | ( | TH1 * | dest, |
TH1 * | hist | ||
) |
Definition at line 437 of file PlotXSec.C.
References ana::assert(), make_syst_table_plots::ibin, cet::pow(), and std::sqrt().
Referenced by AddQuadrature(), and MakeSystematicPlots().
void AddQuadrature | ( | TH1 * | dest, |
vector< TH1 * > | hists | ||
) |
Definition at line 444 of file PlotXSec.C.
References AddQuadrature(), ana::assert(), and analysePickle::hist.
void AddQuadrature2D | ( | TH2 * | dest, |
TH2 * | hist | ||
) |
Definition at line 451 of file PlotXSec.C.
References ana::assert(), cet::pow(), and std::sqrt().
Referenced by AddQuadrature2D(), and MakeSystematicPlots().
void AddQuadrature2D | ( | TH2 * | dest, |
vector< TH2 * > | hists | ||
) |
Definition at line 466 of file PlotXSec.C.
References AddQuadrature2D(), ana::assert(), and analysePickle::hist.
void AddUpDwUncerts | ( | TH1 * | destHist, |
TH1 * | upHist, | ||
TH1 * | dwHist | ||
) |
Definition at line 177 of file PlotXSec.C.
References abs(), ana::assert(), cet::sqlite::max(), cet::pow(), and std::sqrt().
Referenced by GetTotalBeamUncertENu(), and GetTotalBeamUncertQ2().
void AddUpDwUncerts2D | ( | TH2 * | destHist, |
TH2 * | upHist, | ||
TH2 * | dwHist | ||
) |
Definition at line 190 of file PlotXSec.C.
References abs(), ana::assert(), cet::sqlite::max(), cet::pow(), and std::sqrt().
Referenced by GetTotalBeamUncert2D().
const TAxis angleAxis | ( | 1 | , |
0. | 5, | ||
1. | 0 | ||
) |
Referenced by FixAxisRange2D().
const TAxis enuAxis | ( | 1 | , |
0. | 0, | ||
5. | 0 | ||
) |
Referenced by FixAxisRangeENu().
void FixAxisRange2D | ( | TH2 * | hist | ) |
Definition at line 168 of file PlotXSec.C.
References angleAxis(), and muoneAxis().
Referenced by XSec2D(), and XSec2DUncert().
void FixAxisRangeENu | ( | TH1 * | hist | ) |
Definition at line 159 of file PlotXSec.C.
References enuAxis().
Referenced by XSecENu(), and XSecENuUncert().
void FixAxisRangeQ2 | ( | TH1 * | hist | ) |
Definition at line 151 of file PlotXSec.C.
References q2Axis().
Referenced by XSecQ2(), and XSecQ2Uncert().
TH1* GetAbsolute | ( | TH1 * | hist | ) |
Definition at line 493 of file PlotXSec.C.
References abs(), make_syst_table_plots::ibin, and ana::UniqueName().
Referenced by GetSliceHist(), and MakeSystematicPlots().
TH2* GetAbsolute2D | ( | TH2 * | hist | ) |
Definition at line 502 of file PlotXSec.C.
References abs(), and ana::UniqueName().
Referenced by MakeSystematicPlots().
TH1* GetMaxUpDown | ( | TH1 * | upHist, |
TH1 * | dwHist | ||
) |
Definition at line 473 of file PlotXSec.C.
References abs(), make_syst_table_plots::ibin, cet::sqlite::max(), and ana::UniqueName().
Referenced by MakeSystematicPlots().
TH2* GetMaxUpDown2D | ( | TH2 * | upHist, |
TH2 * | dwHist | ||
) |
Definition at line 482 of file PlotXSec.C.
References abs(), cet::sqlite::max(), and ana::UniqueName().
Referenced by MakeSystematicPlots().
TH1* GetSliceHist | ( | TH2 * | hist, |
int | ibinx | ||
) |
Definition at line 512 of file PlotXSec.C.
References GetAbsolute(), string, art::to_string(), and ana::UniqueName().
Referenced by MakeSystematicPlots().
TH2* GetTotalBeamUncert2D | ( | ) |
Definition at line 523 of file PlotXSec.C.
References AddUpDwUncerts2D(), beamSysts, plot_validation_datamc::Clone(), nominalXSecs2D, and uncerts2D.
Referenced by MakeSystematicPlots().
TH1* GetTotalBeamUncertENu | ( | ) |
Definition at line 537 of file PlotXSec.C.
References AddUpDwUncerts(), beamSysts, plot_validation_datamc::Clone(), nominalXSecsENu, and uncertsENu.
Referenced by MakeSystematicPlots().
TH1* GetTotalBeamUncertQ2 | ( | ) |
Definition at line 551 of file PlotXSec.C.
References AddUpDwUncerts(), beamSysts, plot_validation_datamc::Clone(), nominalXSecsQ2, and uncertsQ2.
Referenced by MakeSystematicPlots().
Definition at line 566 of file PlotXSec.C.
References make_syst_table_plots::ibin, and maxTMuBins.
Referenced by MakeSystematicPlots().
TH3D* Load3DXSec | ( | string | syst | ) |
Definition at line 206 of file PlotXSec.C.
References all3DXSecs, inputFile, systTitles, and var3DName.
Referenced by LoadNominal(), LoadSyst(), and XSec2D().
Definition at line 348 of file PlotXSec.C.
References dir, Load3DXSec(), nominalXSecs2D, nominalXSecs3D, nominalXSecsENu, nominalXSecsQ2, outFile, XSec2D(), XSecENu(), and XSecQ2().
Referenced by PlotXSec().
Definition at line 398 of file PlotXSec.C.
References plot_validation_datamc::Clone(), GenerateCanaryReport::content, nominalXSecs2D, nominalXSecsENu, nominalXSecsQ2, uncerts2D, uncertsENu, and uncertsQ2.
Referenced by PlotXSec().
Definition at line 371 of file PlotXSec.C.
References dir, Load3DXSec(), outFile, XSec2D(), XSecENu(), and XSecQ2().
Referenced by PlotXSec().
Definition at line 385 of file PlotXSec.C.
References dir, outFile, XSec2DUncert(), XSecENuUncert(), and XSecQ2Uncert().
Referenced by PlotXSec().
Definition at line 579 of file PlotXSec.C.
References AddQuadrature(), AddQuadrature2D(), ana::AutoPlaceLegend(), plot_validation_datamc::Clone(), om::cout, allTimeWatchdog::endl, GetAbsolute(), GetAbsolute2D(), GetMaxUpDown(), GetMaxUpDown2D(), ana::Multiverse::GetMinusOneSigmaShift(), ana::Multiverse::GetPlusOneSigmaShift(), GetSliceHist(), GetTotalBeamUncert2D(), GetTotalBeamUncertENu(), GetTotalBeamUncertQ2(), analysePickle::hist, hists, MECModelEnuComparisons::leg, LimitTMuBins(), N_GENIE, N_PPFX, nominalXSecs2D, nominalXSecsENu, nominalXSecsQ2, push_back(), standardSysts, standardSystsUpDown, systColors, systTitles, art::to_string(), uncerts2D, uncertsENu, uncertsQ2, xSecs2D, xSecsENu, and xSecsQ2.
Referenced by PlotXSec().
const TAxis muoneAxis | ( | 1 | , |
0. | 5, | ||
2. | 5 | ||
) |
Referenced by FixAxisRange2D().
Definition at line 796 of file PlotXSec.C.
References beamSysts, c1, make_mec_shifts_plots::GetMaximum(), analysePickle::hist, inputFile, kBlue, kRed, LoadNominal(), LoadStatUncert(), LoadSyst(), LoadUncerts(), MakeSystematicPlots(), N_GENIE, N_PPFX, nominalXSecs2D, nominalXSecsENu, nominalXSecsQ2, otherNomSysts, outFile, standardSysts, standardSystsUpDown, art::to_string(), xSecsENu, and xSecsQ2.
const TAxis q2Axis | ( | 1 | , |
0. | 0, | ||
2. | 8 | ||
) |
Referenced by FixAxisRangeQ2().
const TAxis uncertAxis | ( | 1 | , |
-0. | 2, | ||
0. | 2 | ||
) |
TH2D* XSec2D | ( | string | syst | ) |
Definition at line 221 of file PlotXSec.C.
References FixAxisRange2D(), Load3DXSec(), systTitles, and xSecs2D.
Referenced by LoadNominal(), and LoadSyst().
TH2D* XSec2DUncert | ( | string | syst | ) |
Definition at line 272 of file PlotXSec.C.
References ana::assert(), om::cout, allTimeWatchdog::endl, FixAxisRange2D(), nominalXSecs2D, otherNomSysts, uncerts2D, and xSecs2D.
Referenced by LoadUncerts().
TH1D* XSecENu | ( | string | syst | ) |
Definition at line 244 of file PlotXSec.C.
References FixAxisRangeENu(), inputFile, systTitles, and xSecsENu.
Referenced by LoadNominal(), and LoadSyst().
TH1D* XSecENuUncert | ( | string | syst | ) |
Definition at line 300 of file PlotXSec.C.
References ana::assert(), om::cout, allTimeWatchdog::endl, FixAxisRangeENu(), nominalXSecsENu, otherNomSysts, uncertsENu, and xSecsENu.
Referenced by LoadUncerts().
TH1D* XSecQ2 | ( | string | syst | ) |
Definition at line 258 of file PlotXSec.C.
References FixAxisRangeQ2(), inputFile, systTitles, and xSecsQ2.
Referenced by LoadNominal(), and LoadSyst().
TH1D* XSecQ2Uncert | ( | string | syst | ) |
Definition at line 324 of file PlotXSec.C.
References ana::assert(), om::cout, allTimeWatchdog::endl, FixAxisRangeQ2(), nominalXSecsQ2, otherNomSysts, uncertsQ2, and xSecsQ2.
Referenced by LoadUncerts().
map<string, TH3D*> all3DXSecs |
Definition at line 125 of file PlotXSec.C.
Referenced by Load3DXSec().
vector<string> beamSysts |
Definition at line 65 of file PlotXSec.C.
Referenced by GetTotalBeamUncert2D(), GetTotalBeamUncertENu(), GetTotalBeamUncertQ2(), and PlotXSec().
TCanvas* c1 |
Definition at line 138 of file PlotXSec.C.
Referenced by PlotXSec().
string defaultNominal = "cv" |
Definition at line 118 of file PlotXSec.C.
TFile* inputFile |
Definition at line 134 of file PlotXSec.C.
Referenced by CalculateXSec(), combineFiles(), FindUniverseSpectra(), Load3DXSec(), make_tmva_NCPi0s_2selection(), PlotXSec(), XSecENu(), and XSecQ2().
map<int, double> maxTMuBins |
Definition at line 94 of file PlotXSec.C.
Referenced by LimitTMuBins().
const unsigned int N_GENIE = 1000 |
Definition at line 148 of file PlotXSec.C.
Referenced by MakeSystematicPlots(), and PlotXSec().
const unsigned int N_PPFX = 100 |
Definition at line 149 of file PlotXSec.C.
Referenced by MakeSystematicPlots(), and PlotXSec().
TH2D* nom2DXSec |
Definition at line 115 of file PlotXSec.C.
TH3D* nom3DXSec |
Definition at line 114 of file PlotXSec.C.
map<string, TH2D*> nominalXSecs2D |
Definition at line 120 of file PlotXSec.C.
Referenced by GetTotalBeamUncert2D(), LoadNominal(), LoadStatUncert(), MakeSystematicPlots(), PlotXSec(), and XSec2DUncert().
map<string, TH3D*> nominalXSecs3D |
Definition at line 119 of file PlotXSec.C.
Referenced by LoadNominal().
map<string, TH1D*> nominalXSecsENu |
Definition at line 121 of file PlotXSec.C.
Referenced by GetTotalBeamUncertENu(), LoadNominal(), LoadStatUncert(), MakeSystematicPlots(), PlotXSec(), and XSecENuUncert().
map<string, TH1D*> nominalXSecsQ2 |
Definition at line 122 of file PlotXSec.C.
Referenced by GetTotalBeamUncertQ2(), LoadNominal(), LoadStatUncert(), MakeSystematicPlots(), PlotXSec(), and XSecQ2Uncert().
Definition at line 57 of file PlotXSec.C.
Referenced by PlotXSec(), XSec2DUncert(), XSecENuUncert(), and XSecQ2Uncert().
TFile* outFile |
Definition at line 135 of file PlotXSec.C.
Referenced by accum_pot_equivalent_fhc(), NDPredictionHandler::AddVar(), FDPredictionHandler::AddVar(), Analyse_Data2DataComp(), Analyse_Data2DataComp_HigherEnergyCuts(), Analyse_Data2DataComp_kNumu2020ND(), AnalyzeNus18Pred(), AnalyzeNus18Systs(), AnalyzeSysts(), ApplyOscillations(), CalcCutVals(), calculateWrongSignNue(), calculateWrongSignNumuQ1(), calculateWrongSignNumuQ2(), calculateWrongSignNumuQ3(), calculateWrongSignNumuQ4(), CalculateXSec(), combineFiles(), Compare_NoExtrap(), Compare_Spectra(), ComparisonPlots_Data(), ComparisonPlots_MC(), CosmicPred(), demo2p5a(), DoTraining(), DrawExtrapSurface(), Evaluate_BDTMLP_Algs_PredNoExtrap(), Evaluate_BDTMLP_Algs_Spectra(), eventListToTextFile(), example_macro(), FillSpectra(), FillTrainingTrees(), FOMPlot(), GenerateCovMx(), get_numi_data_histogram(), LoadNominal(), LoadSyst(), LoadUncerts(), make_dst_cosrejbdttrain(), make_nue_ana2018_pot(), make_nue_ana2019_epoch7d_pot(), make_nue_ana2019_epoch8b_pot(), make_nue_ana2019_fhc_ub_pot(), make_nue_ana2019_rhc_ub_pot(), make_nue_thirdana_pot(), make_numu_thirdana_pot(), make_nus17_pot(), make_ratios(), make_rhcpred_2017(), make_rockpred(), make_rockpred_2017(), MakeCosmicSpectra(), MakeCovMx(), MakeExtrapSurface(), MakeISysts(), MakeNumuCovMx(), MakeNus18ExtrapPred(), MakeNus18SidebandPred(), MakeNus18Systs(), makePIDCutTuning(), makePrediction(), MakePrediction(), MakePredictionNoOsc_FHC_FD(), MakePredictionNoOsc_FHC_ND(), MakePredictionNoOsc_RHC_FD(), MakePredictionNoOsc_RHC_ND(), MakeSurface(), MakeSurfaceBinningStudy(), mcTruthPredictions(), meanWeight_macro(), MergePredictions(), MergeSurface(), MergeSurfaces(), MichelDecompTest(), MRDiFStudy_FHC_Step2(), MRDiFStudy_RHC_Step2(), multiverse_efficiency_macro(), NoExtrap(), nuCrystalBall(), nue_michelDataMC(), NueExtrap(), NuMu2020_TrimCAFs(), NumuCosmic(), NumuExtrap(), NuSCalculateCorr(), NuSTreeMaker(), PlotCovariance(), PlotNus18Sideband(), PlotXSec(), RunCalibration(), runTwoSampleDecomp(), SaveSpectra(), SystematicComp(), test_micheldecomp(), ThrowFakeData(), ThrowNDFDFakeData(), TrimCAFs(), UnfoldXSec(), FDPredictionHandler::~FDPredictionHandler(), and NDPredictionHandler::~NDPredictionHandler().
vector<string> standardSysts |
Definition at line 41 of file PlotXSec.C.
Referenced by MakeSystematicPlots(), and PlotXSec().
Definition at line 48 of file PlotXSec.C.
Referenced by MakeSystematicPlots(), and PlotXSec().
map<string, Color_t> systColors |
Definition at line 80 of file PlotXSec.C.
Referenced by MakeSystematicPlots().
Definition at line 23 of file PlotXSec.C.
Referenced by Load3DXSec(), MakeSystematicPlots(), XSec2D(), XSecENu(), and XSecQ2().
string uncertLabel = "_uncert" |
Definition at line 107 of file PlotXSec.C.
map<string, TH2D*> uncerts2D |
Definition at line 129 of file PlotXSec.C.
Referenced by GetTotalBeamUncert2D(), LoadStatUncert(), MakeSystematicPlots(), and XSec2DUncert().
map<string, TH1D*> uncertsENu |
Definition at line 130 of file PlotXSec.C.
Referenced by GetTotalBeamUncertENu(), LoadStatUncert(), MakeSystematicPlots(), and XSecENuUncert().
map<string, TH1D*> uncertsQ2 |
Definition at line 131 of file PlotXSec.C.
Referenced by GetTotalBeamUncertQ2(), LoadStatUncert(), MakeSystematicPlots(), and XSecQ2Uncert().
const string var3DName = "EAvail" |
Definition at line 106 of file PlotXSec.C.
Referenced by Load3DXSec().
const vector<string> vars3D |
Definition at line 109 of file PlotXSec.C.
map<string, TH2D*> xSecs2D |
Definition at line 126 of file PlotXSec.C.
Referenced by MakeSystematicPlots(), XSec2D(), and XSec2DUncert().
map<string, TH1D*> xSecsENu |
Definition at line 127 of file PlotXSec.C.
Referenced by MakeSystematicPlots(), PlotXSec(), XSecENu(), and XSecENuUncert().
map<string, TH1D*> xSecsQ2 |
Definition at line 128 of file PlotXSec.C.
Referenced by MakeSystematicPlots(), PlotXSec(), XSecQ2(), and XSecQ2Uncert().