31 Color_t color_one, color_two;
32 Style_t line_one = kSolid, line_two = kSolid;
33 int color_pal = kFuchsia;
37 horn_one =
"fhc"; name_one =
"FHC";
38 horn_two =
"rhc"; name_two =
"RHC";
39 color_one =
kBlue-7; color_two = kMagenta+1;
41 horn_one =
"rhc"; name_one =
"RHC";
42 horn_two =
"fhc"; name_two =
"FHC";
43 color_one = kMagenta+1; color_two =
kBlue-7;
53 TFile* infile1= TFile::Open(
pnfs2xrootd(filename1).c_str());
54 TFile* infile2= TFile::Open(
pnfs2xrootd(filename2).c_str());
55 TH2* quanthist1 = (TH2*)infile1->Get(
"FDSpec2D" );
56 TH2* quanthist2 = (TH2*)infile2->Get(
"FDSpec2D" );
60 std::vector< TH1* > hist_bound1;
61 std::vector< TH1* > hist_bound2;
64 for(
int thisQuant = 0; thisQuant <
nQuant; thisQuant++){
65 TH1* h_temp1 = quanthist1->ProjectionX();
68 double bound1 = QuantBounds1[
bin][thisQuant];
71 hist_bound1.push_back(h_temp1);
73 for(
int thisQuant = 0; thisQuant <
nQuant; thisQuant++){
74 TH1* h_temp2 = quanthist2->ProjectionX();
77 double bound2 = QuantBounds2[
bin][thisQuant];
80 hist_bound2.push_back(h_temp2);
83 gStyle->SetPalette(color_pal);
84 gStyle->SetPadRightMargin(0.11);
85 new TCanvas(
"canvas");
86 gPad->SetFillStyle(0);
87 TH2*
axes =
new TH2F(
"axes",
"", 20, 0.0, 5.0, 10, 0., 1.);
90 name_colz =
"_colzbkg";
91 quanthist1->
Draw(
"colz");
92 quanthist1->SetTitle(
"");
93 quanthist1->GetYaxis()->SetTitle(
"E_{had} / E_{#nu}");
94 quanthist1->GetXaxis()->CenterTitle();
95 quanthist1->GetYaxis()->CenterTitle();
99 axes->GetXaxis()->SetTitle(
"Reconstructed Neutrino Energy (GeV)");
100 axes->GetYaxis()->SetTitle(
"E_{had} / E_{#nu}");
101 axes->GetXaxis()->CenterTitle();
102 axes->GetYaxis()->CenterTitle();
105 for(
int thisQuant = 1; thisQuant <
nQuant; thisQuant++){
110 hist_bound1[thisQuant] ->
Draw(
"hist same][");
111 hist_bound2[thisQuant] ->
Draw(
"hist same][");
118 TLegend *
legend =
new TLegend(0.15,0.70,0.30,0.85);
119 legend->AddEntry(hist_bound1[1], Form(
"%s", name_one.c_str()),
"l");
120 legend->AddEntry(hist_bound2[1], Form(
"%s", name_two.c_str()),
"l");
121 legend->SetTextSize(0.05);
122 legend->SetBorderSize(0);
123 legend->SetFillStyle(0);
128 TString outname =
"quantiles_" + horn_one +
"_" + horn_two +
"_full_numu2020" + name_colz;
129 gPad->
Print(outname +
".pdf");
130 gPad->
Print(outname +
".png");
Cuts and Vars for the 2020 FD DiF Study.
void plot_quantile_boundaries_twosamples_2020(bool isFHC, 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)
std::string getenv(std::string const &name)
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="")