21 Color_t color_one, color_two;
22 Style_t line_one = kSolid, line_two = kSolid;
23 int color_pal = kFuchsia;
27 horn_one =
"fhc"; name_one =
"FHC";
28 horn_two =
"rhc"; name_two =
"RHC";
29 color_one =
kBlue-7; color_two = kMagenta+1;
32 horn_one =
"rhc"; name_one =
"RHC";
33 horn_two =
"fhc"; name_two =
"FHC";
34 color_one = kMagenta+1; color_two =
kBlue-7;
40 std::string filename1 =
"/nova/ana/nu_mu_ana/Ana2018/Quantiles/quantiles__" + horn_one +
"_full__numu2018.root";
41 std::string filename2 =
"/nova/ana/nu_mu_ana/Ana2018/Quantiles/quantiles__" + horn_two +
"_full__numu2018.root";
43 TFile* infile1= TFile::Open(
pnfs2xrootd(filename1).c_str());
44 TFile* infile2= TFile::Open(
pnfs2xrootd(filename2).c_str());
45 TH2* quanthist1 = (TH2*)infile1->Get(
"FDSpec2D");
46 TH2* quanthist2 = (TH2*)infile2->Get(
"FDSpec2D");
50 std::vector< TH1* > hist_bound1;
51 std::vector< TH1* > hist_bound2;
54 for(
int thisQuant = 0; thisQuant <
nQuant; thisQuant++){
55 TH1* h_temp1 = quanthist1->ProjectionX();
58 double bound1 = QuantBounds1[
bin][thisQuant];
61 hist_bound1.push_back(h_temp1);
63 for(
int thisQuant = 0; thisQuant <
nQuant; thisQuant++){
64 TH1* h_temp2 = quanthist2->ProjectionX();
67 double bound2 = QuantBounds2[
bin][thisQuant];
70 hist_bound2.push_back(h_temp2);
74 gStyle->SetPalette(color_pal);
75 gStyle->SetPadRightMargin(0.11);
76 new TCanvas(
"canvas");
77 gPad->SetFillStyle(0);
78 TH2*
axes =
new TH2F(
"axes",
"", 20, 0.0, 5.0, 10, 0., 1.);
81 name_colz =
"__colzbkg";
82 quanthist1->
Draw(
"colz");
83 quanthist1->GetYaxis()->SetTitle(
"E_{had} / E_{#nu}");
84 quanthist1->GetXaxis()->CenterTitle();
85 quanthist1->GetYaxis()->CenterTitle();
88 axes->GetXaxis()->SetTitle(
"Reconstructed Neutrino Energy (GeV)");
89 axes->GetYaxis()->SetTitle(
"E_{had} / E_{#nu}");
90 axes->GetXaxis()->CenterTitle();
91 axes->GetYaxis()->CenterTitle();
94 for(
int thisQuant = 1; thisQuant <
nQuant; thisQuant++){
99 hist_bound1[thisQuant] ->
Draw(
"hist same][");
100 hist_bound2[thisQuant] ->
Draw(
"hist same][");
103 TLegend *
legend =
new TLegend(0.15,0.70,0.30,0.85);
104 legend->AddEntry(hist_bound1[1], Form(
"%s", name_one.c_str()),
"l");
105 legend->AddEntry(hist_bound2[1], Form(
"%s", name_two.c_str()),
"l");
106 legend->SetTextSize(0.05);
107 legend->SetBorderSize(0);
108 legend->SetFillStyle(0);
113 TString outname =
"ndfd_quantiles__" + horn_one +
"_" + horn_two +
"_full__numu2018" + name_colz;
114 gPad->
Print(outname +
".pdf");
115 gPad->
Print(outname +
".png");
Cuts and Vars for the 2020 FD DiF Study.
void plot_quantbound_twosamples(bool fhc=true, bool colzbkg=true)
const HistAxis kHadEFracAxis("E_{had.} / E_{#nu}", Binning::Simple(200, 0, 1), kHadEFrac)
HistAxis that implements Hadronic Energy fraction binning used by L.Vinton to derive Hadronic Energy ...
std::vector< std::vector< double > > GetQuantileBins(TH2 *quantileHist, const HistAxis &independentAxis, const HistAxis &quantileAxis, const unsigned int &numQuantiles, const bool verbose)
Returns a 2D vector First index is the independentAxis bin number Second index is the high bin edge f...
std::string pnfs2xrootd(std::string loc, bool unauth)
const HistAxis kNumuCCOptimisedAxis("Reconstructed Neutrino Energy (GeV)", kNumuCCEOptimisedBinning, kCCE)
HistAxis that implements optimised numuCCE from L. Vinton. See docdb 16332. This was close to 'custC'...
cout<< "--"<< endl;for(Int_t iP=1;iP<=hyz->GetNbinsX();iP++){for(Int_t iC=1;iC<=hyz->GetNbinsY();iC++){if(hyv->GetBinContent(iP, iC)>-999){goal_hyv-> SetBinContent(iP, iC,-(dy[iP-1][iC-1]))
void Print(std::string prefix, std::string name, std::string suffix="")