5 #include "Utilities/func/MathUtil.h" 24 type+
"/"+type+
"_MCTrueME").
release();
27 TH1 *hda = da->
ToTH1(pot);
29 TH1 *hme = me->
ToTH1(pot);
30 TH1 *hbg = mc->
ToTH1(pot);
37 for (
int i = 1;
i <= hmc->GetNbinsX();
i++){
38 hda->SetBinContent(
i,1
e-3*hda->GetBinContent(
i));
39 hda->SetBinError(
i,1
e-3*hda->GetBinError(
i));
42 hmc->SetLineColor(
kRed);
43 hbg->SetLineColor(
kGreen+2);
44 hme->SetLineColor(
kBlue);
46 hmc->SetMaximum(1.2*
std::max(hmc->GetMaximum(),hda->GetMaximum()));
49 hmc->GetXaxis()->CenterTitle();
50 hmc->GetYaxis()->SetTitle(
"10^{3} Events / 8.09#times10^{20}");
51 hmc->GetYaxis()->CenterTitle();
54 hbg->Draw(
"hist,same");
55 hme->Draw(
"hist,same");
59 leg->AddEntry(hda,
"Data",
"le");
60 leg->AddEntry(hmc,
"Total MC",
"l");
61 leg->AddEntry(hme,
"True Michel",
"l");
62 leg->AddEntry(hbg,
"Non-Michel Bkgd",
"l");
68 TCanvas *canMID =
new TCanvas();
70 TCanvas *canInput =
new TCanvas(
UniqueName().c_str(),
"",1000,750);
71 canInput->Divide(2,2);
T max(const caf::Proxy< T > &a, T b)
void MakePlots(std::string fname)
Cuts and Vars for the 2020 FD DiF Study.
void nue_draw_michelDataMC(std::string fname)
TH1D * ToTH1(double exposure, Color_t col=kBlack, Style_t style=kSolid, EExposureType expotype=kPOT, EBinType bintype=kBinContent) const
Histogram made from this Spectrum, scaled to some exposure.
void MakePlot(std::string fname, std::string type)
Representation of a spectrum in any variable, with associated POT.
TLegend * AutoPlaceLegend(double dx, double dy, double yPin)
Create a legend, maximizing distance from all histograms.
std::string UniqueName()
Return a different string each time, for creating histograms.