17 class TGraphAsymmErrors;
41 const IPrediction*
mc,
43 const SystShifts & shifts =
kNoShift,
55 const IPrediction*
mc,
63 const IPrediction*
mc,
68 double miny = 0,
double maxy = 3);
72 const IPrediction*
mc,
74 double miny = 0,
double maxy = 3);
78 double miny = 0,
double maxy = 3);
82 const IPrediction*
mc,
84 double miny = 0,
double maxy = 3);
90 double miny = 0,
double maxy = 1.2);
101 const IPrediction*
pred,
102 std::vector<const ISyst*>
systs,
103 std::vector<TH1*> &hUps,
104 std::vector<TH1*> &hDns,
121 const IPrediction*
pred,
122 std::vector<const ISyst*>
systs,
123 const SystShifts &bfshifts,
124 std::vector<TH1*> &hUps,
125 std::vector<TH1*> &hDns,
145 const std::vector<const ISyst*>&
systs,
148 int col = -1,
int errCol = -1,
149 float headroom = 1.3,
167 const std::vector<Spectrum>& upShifts,
168 const std::vector<Spectrum>& downShifts,
170 int col = -1,
int errCol = -1,
171 float headroom = 1.3,
bool newaxis=
true,
176 std::vector<TH1*>& upShifts,
177 std::vector<TH1*>& downShifts,
178 int col = -1,
int errCol = -1,
179 float headroom = 1.3,
185 const std::vector<Spectrum>& upShifts,
186 const std::vector<Spectrum>& downShifts,
188 const std::vector<Spectrum>& upShifts2,
189 const std::vector<Spectrum>& downShifts2,
191 int col = -1,
int errCol = -1,
192 float headroom = 1.3,
bool newaxis=
true,
204 const std::vector<const ISyst*>&
systs,
207 int col = -1,
int errCol = -1,
209 bool newaxis =
true);
214 const std::vector<Spectrum>& upShifts,
215 const std::vector<Spectrum>& downShifts,
217 int col = -1,
int errCol = -1,
224 std::vector<TH1*>& upShifts,
225 std::vector<TH1*>& downShifts,
226 int col = -1,
int errCol = -1,
228 bool newaxis =
true);
243 const std::vector<const ISyst*>&
systs,
246 int col = -1,
int errCol = -1,
247 float headroom = 1.3,
264 std::vector<Spectrum> upShifts,
265 std::vector<Spectrum> downShifts,
267 int col = -1,
int errCol = -1,
268 float headroom = 1.3,
bool newaxis=
true,
273 THStack*
ToTHStack(
const std::vector<std::pair<const Spectrum&, Color_t>>&
s,
290 const std::pair<double, double> & statErr =
std::make_pair(0., 0.),
301 TGraphAsymmErrors*
GraphWithPoissonErrors(
const TH1*
h,
bool noErrorsXaxis =
false,
bool drawEmptyBins =
true);
304 TGraphAsymmErrors*
GraphWithPoissonErrors2(
const TH1*
h,
const TH1*
h2,
bool noErrorsXaxis =
false,
bool drawEmptyBins =
true);
358 void PimpHist(TH1* hist, Style_t linestyle, Color_t linecolor,
int linewidth, Style_t markerstyle, Color_t markercolor,
double markersize);
384 TH1*
PlotSystShifts(
const SystShifts & shifts,
bool sortName =
true);
387 TGraph*
JoinGraphs(TGraph*
a, TGraph*
b,
int fillcol = 0);
392 double xmax = 2,
double y = 1);
void PlotWithAreaSystErrorBand(IPrediction *pred, const std::vector< const ISyst * > &systs, osc::IOscCalc *calc, double pot, int col, int errCol, float headroom, bool newaxis, EBinType bintype)
Plot prediction with +/-1sigma shape-only error band.
void DataMCRatio(const Spectrum &data, const IPrediction *mc, osc::IOscCalc *calc, double miny, double maxy)
Plot data/MC ratio for the given spectrum. Normalize MC to Data by POT.
Cuts and Vars for the 2020 FD DiF Study.
std::map< std::string, double > xmax
TH1 * PlotSystShifts(const SystShifts &shifts, bool sortName)
void MakeHistCanvasReady_Quant(const int quant, TH1 *hist, double ymax)
TGraphAsymmErrors * PlotWithSystErrorBand(IPrediction *pred, const std::vector< const ISyst * > &systs, osc::IOscCalc *calc, double pot, int col, int errCol, float headroom, bool newaxis, EBinType bintype, double alpha)
Plot prediction with +/-1sigma error band.
General interface to oscillation calculators.
TPaveText * DrawQuantLabel(int quant)
std::pair< Spectrum *, CheatDecomp * > make_pair(SpectrumLoaderBase &loader_data, SpectrumLoaderBase &loader_mc, HistAxis *axis, Cut *cut, const SystShifts &shift, const Var &wei)
void CenterTitles(TH1 *histo)
TGraphAsymmErrors * GraphWithPoissonErrors(const TH1 *h, bool noErrorsXaxis, bool drawEmptyBins)
Calculate statistical errors appropriate for small Poisson numbers.
void SplitCanvas(double ysplit, TPad *&p1, TPad *&p2)
Split the current pad into two vertically stacked pieces, suitable for ratio plots and so on...
TCanvas * canvas(const char *nm, const char *ti, const char *a)
void GetSystBands(osc::IOscCalc *calc, const IPrediction *pred, std::vector< const ISyst * > systs, std::vector< TH1 * > &hUps, std::vector< TH1 * > &hDns, double pot, Flavors::Flavors_t flav, Current::Current_t curr, Sign::Sign_t sign)
TGraph * RatioAsymmError(TH1 *data, TH1 *pred)
TGraphAsymmErrors * ProfileQuantile(const TH2 *hist, const std::string &axisName, const std::string &graphName, const std::pair< double, double > &quantileDivisions)
Calculate profile with error bars corresponding to specified quantiles of a 2D distribution (by defau...
void PimpHist(TH1 *hist, Style_t linestyle, Color_t linecolor, int linewidth, Style_t markerstyle, Color_t markercolor, double markersize)
Pimp histogram once and for all.
const XML_Char const XML_Char * data
void drawBFSingle(double bfSin, double bfDm, Color_t color, Style_t marker, double size=1.5)
Draw a single BF point.
Interactions of both types.
void PlotWithSystErrorBandTwoPreds(const Spectrum &nominal, const std::vector< Spectrum > &upShifts, const std::vector< Spectrum > &downShifts, const Spectrum &alternative, const std::vector< Spectrum > &upShiftsAlt, const std::vector< Spectrum > &downShiftsAlt, double pot, int col1, int col2, float headroom, bool newaxis, EBinType bintype)
Plot two different predictions with +/-1sigma shape-only error bands.
TH1 * DataMCComparisonAreaNormalized(const Spectrum &data, const Spectrum &mc)
TGraph * graphAsymmErrorScaled(TH1 *histScaled, TH1 *hist, double overallScale)
TPaveText * DrawBeamLabel(bool isFHC)
Put the standardized beam label in the left corner of the active canvas.
TGraph * ShadeBetweenHistograms(TH1 *hmin, TH1 *hmax)
TGraphAsymmErrors * GraphWithPoissonErrors2(const TH1 *h, const TH1 *h2, bool noErrorsXaxis, bool drawEmptyBins)
Same as above but use a reference histogram to determine which empty bins to draw.
TGraph * ExtendGraphToTop(TGraph *g, int col, double xmin, double xmax, double y)
std::vector< float > Spectrum
TGraph * JoinGraphs(TGraph *a, TGraph *b, int fillcol)
Join graphs and set a fill color. Useful for contours.
const SystShifts kNoShift
TGraph * RatioAsymmErrorWithBkg(TH1 *data, TH1 *pred, TH1 *bkgd)
void CountingExperimentErrorBarChart(const std::map< std::string, double > &systbars, double statErr, bool bkgdOrSig, bool shortchart)
Make a simple plot of relative size of different errors.
void DataMCAreaNormalizedRatio(const Spectrum &data, const IPrediction *mc, osc::IOscCalc *calc, double miny, double maxy)
Plot data/MC ratio for the given spectrum. Normalize MC to Data by area.
TGraph * graphAsymmErrorWithBkgScaled(TH1 *data, TH1 *bkgd, double overallScale)
TH1 * DataMCComparisonComponents(const Spectrum &data, const IPrediction *mc, osc::IOscCalc *calc)
Plot MC broken down into flavour components, overlayed with data.
TGraphAsymmErrors * PlotWithSystErrorBand_Quant(const int quant, IPrediction *pred, const std::vector< const ISyst * > &systs, osc::IOscCalc *calc, double pot, int col, int errCol, float maxy, bool newaxis)
void GetBFSystBands(osc::IOscCalc *calc, const IPrediction *pred, std::vector< const ISyst * > systs, const SystShifts &bfshifts, std::vector< TH1 * > &hUps, std::vector< TH1 * > &hDns, double pot, Flavors::Flavors_t flav, Current::Current_t curr, Sign::Sign_t sign)
TGraph * RatioAsymmErrorWithBkgScaled(TH1 *data, TH1 *pred, TH1 *bkgd, double overallScale)
void ErrorBarChart(const std::map< std::string, std::pair< double, double >> &systErrors, const std::pair< double, double > &statErr, const std::string &label)
Make a simple plot of relative size of different errors.
THStack * ToTHStack(const std::vector< std::pair< const Spectrum &, Color_t >> &s, double pot)
Can call like ToTHStack({{h1, kRed}, {h2, kBlue}}, pot)
Both neutrinos and antineutrinos.
TLegend * AutoPlaceLegend(double dx, double dy, double yPin)
Create a legend, maximizing distance from all histograms.
void SplitCanvasQuant(TCanvas *&canvas, TPad *&pad1, TPad *&pad2, TPad *&pad3, TPad *&pad4)
TGraph * RatioAsymmErrorScaled(TH1 *data, TH1 *pred, double overallScale)
TH1 * DataMCComparison(const Spectrum &data, const Spectrum &mc, EBinType bintype)
All neutrinos, any flavor.
TCanvas * RatioPlot(std::vector< TH1 * > topHistos, std::vector< TString > topOption, std::vector< TH1 * > bottomHistos, std::vector< TString > bottomOption, TString pidtag, bool pidaxis=false)
void drawBFMirror(double bfSin, double bfDm, Color_t color, Style_t marker, double size=1.5)
Draw best fit at both octants. Truth for neutrinos, not sure about antineutrinos. ...