Skip to content
Snippets Groups Projects
Commit 179c190c authored by Whitney Armstrong's avatar Whitney Armstrong
Browse files

modified: benchmarks/barrel_ecal/scripts/e_pi_separation.cxx

parent 55a2a8ce
No related branches found
No related tags found
1 merge request!30Simple e/pi separation
...@@ -102,6 +102,7 @@ void e_pi_separation(const char* input_fname = ...@@ -102,6 +102,7 @@ void e_pi_separation(const char* input_fname =
.Define("nhits", nhits, {"EcalBarrelHits"}) .Define("nhits", nhits, {"EcalBarrelHits"})
.Define("Esim", Esim, {"EcalBarrelHits"}) .Define("Esim", Esim, {"EcalBarrelHits"})
.Define("Esim_front", Esim_front, {"EcalBarrelHits"}) .Define("Esim_front", Esim_front, {"EcalBarrelHits"})
.Define("Eratio", "Esim_front/Esim")
.Define("fsam", fsam, {"Esim", "Ethr"}); .Define("fsam", fsam, {"Esim", "Ethr"});
// Define Histograms // Define Histograms
...@@ -119,9 +120,13 @@ void e_pi_separation(const char* input_fname = ...@@ -119,9 +120,13 @@ void e_pi_separation(const char* input_fname =
auto hEsim_front = d1.Histo1D( auto hEsim_front = d1.Histo1D(
{"hEsim_front", "; Front Energy Deposit [GeV]; Events", 100, 0.0, 0.2}, {"hEsim_front", "; Front Energy Deposit [GeV]; Events", 100, 0.0, 0.2},
"Esim_front"); "Esim_front");
auto hfsam = d1.Histo1D( auto hfsam = d1.Histo1D(
{"hfsam", "Sampling Fraction; Sampling Fraction; Events", 100, 0.0, 0.1}, {"hfsam", "Sampling Fraction; Sampling Fraction; Events", 100, 0.0, 0.1},
"fsam"); "fsam");
auto hEratio = d1.Histo1D(
{"Eratio", "E_front/E_tot; Sampling Fraction; Events", 100, 0.0, 1.0},
"Eratio");
// Event Counts // Event Counts
auto nevents_thrown = d1.Count(); auto nevents_thrown = d1.Count();
...@@ -169,14 +174,14 @@ void e_pi_separation(const char* input_fname = ...@@ -169,14 +174,14 @@ void e_pi_separation(const char* input_fname =
{ {
TCanvas* c4 = new TCanvas("c4", "c4", 700, 500); TCanvas* c4 = new TCanvas("c4", "c4", 700, 500);
c4->SetLogy(1); c4->SetLogy(1);
auto h = hfsam->DrawCopy(); auto h = hEratio->DrawCopy();
//h->GetYaxis()->SetTitleOffset(1.4); //h->GetYaxis()->SetTitleOffset(1.4);
h->SetLineWidth(2); h->SetLineWidth(2);
h->SetLineColor(kBlue); h->SetLineColor(kBlue);
//h->Fit("gaus", "", "", 0.01, 0.1); //h->Fit("gaus", "", "", 0.01, 0.1);
//h->GetFunction("gaus")->SetLineWidth(2); //h->GetFunction("gaus")->SetLineWidth(2);
//h->GetFunction("gaus")->SetLineColor(kRed); //h->GetFunction("gaus")->SetLineColor(kRed);
c4->SaveAs("results/emcal_barrel_electrons_fsam.png"); c4->SaveAs("results/emcal_barrel_Eratio.png");
c4->SaveAs("results/emcal_barrel_electrons_fsam.pdf"); c4->SaveAs("results/emcal_barrel_Eratio.pdf");
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment