Skip to content
Snippets Groups Projects
Commit 86e90f54 authored by Maria Zurek's avatar Maria Zurek
Browse files

Adjust histograms

parent dba978d0
No related branches found
No related tags found
1 merge request!153Draft: Resolve "Add energy scan for Barrel Ecal"
...@@ -121,20 +121,20 @@ std::tuple <double, double, double, double, double, double, double, double> extr ...@@ -121,20 +121,20 @@ std::tuple <double, double, double, double, double, double, double, double> extr
.Define("fsamClusterScFi", fsam, {"EClusterScFi", "Ethr"}); .Define("fsamClusterScFi", fsam, {"EClusterScFi", "Ethr"});
// Define Histograms // Define Histograms
auto hEthr = d1.Histo1D({"hEthr", "Thrown Energy; Thrown Energy [GeV]; Events", 100, 0.0, 25.0},"Ethr").GetPtr(); auto hEthr = d1.Histo1D({"hEthr", "Thrown Energy; Thrown Energy [GeV]; Events", 100, 0.0, 25.0},"Ethr");
auto hEdigiImg = d1.Histo1D({"hEdigiImg", "Digi energy deposit; Amplitude [QCD]; Events", 1000, 0, 200000},"EdigiImg").GetPtr(); auto hEdigiImg = d1.Histo1D({"hEdigiImg", "Digi energy deposit; Amplitude [QCD]; Events", 1000, 0, 200000},"EdigiImg");
auto hErecImg = d1.Histo1D({"hErecImg", "Reconstructed energy deposit; Energy Deposit [GeV]; Events", 500, 0.0, 0.5},"ErecImg").GetPtr(); auto hErecImg = d1.Histo1D({"hErecImg", "Reconstructed energy deposit; Energy Deposit [GeV]; Events", 500, 0.0, 0.5},"ErecImg");
auto hEClusterImg = d1.Histo1D({"hEClusterImg", "Cluster Energy; Cluster Energy [GeV]; Events", 200, 0.0, 25.0},"EClusterImg").GetPtr(); auto hEClusterImg = d1.Histo1D({"hEClusterImg", "Cluster Energy; Cluster Energy [GeV]; Events", 200, 0.0, 25.0},"EClusterImg");
auto hNClusterImg = d1.Histo1D({"hNClusterImg", "Number of Clusters; # of Clusters; Events", 100, 0.0, 100.0}, "NClusterImg").GetPtr(); auto hNClusterImg = d1.Histo1D({"hNClusterImg", "Number of Clusters; # of Clusters; Events", 100, 0.0, 100.0}, "NClusterImg");
auto hfsamImg = d1.Histo1D({"hfsamImg", "Cluster Energy/E true; Cluster Energy/E true; Events", 100, 0.0, 1.5},"fsamClusterImg").GetPtr(); auto hfsamImg = d1.Histo1D({"hfsamImg", "Cluster Energy/E true; Cluster Energy/E true; Events", 100, 0.0, 1.5},"fsamClusterImg");
auto hfsamRecImg = d1.Histo1D({"hfsamRecImg", "Reco Hits Energy/E true; Reco Hits Energy/E true; Events", 50, 0.0, 0.1},"fsamRecImg").GetPtr(); auto hfsamRecImg = d1.Histo1D({"hfsamRecImg", "Reco Hits Energy/E true; Reco Hits Energy/E true; Events", 50, 0.0, 0.1},"fsamRecImg");
auto hErecScFi = d1.Histo1D({"hErecScFi", "Reconstructed energy deposit; Energy Deposit [GeV]; Events", 500, 0.0, 15.0},"ErecScFi").GetPtr(); auto hErecScFi = d1.Histo1D({"hErecScFi", "Reconstructed energy deposit; Energy Deposit [GeV]; Events", 500, 0.0, 15.0},"ErecScFi");
auto hEdigiScFi = d1.Histo1D({"hEdigiScFi", "Digi energy deposit; Amplitude [QCD]; Events", 1000, 0, 200000},"EdigiScFi").GetPtr(); auto hEdigiScFi = d1.Histo1D({"hEdigiScFi", "Digi energy deposit; Amplitude [QCD]; Events", 1000, 0, 200000},"EdigiScFi");
auto hEClusterScFi = d1.Histo1D({"hEClusterScFi", "Cluster Energy; Cluster Energy [GeV]; Events", 500, 0.0, 25.0},"EClusterScFi").GetPtr(); auto hEClusterScFi = d1.Histo1D({"hEClusterScFi", "Cluster Energy; Cluster Energy [GeV]; Events", 500, 0.0, 25.0},"EClusterScFi");
auto hNClusterScFi = d1.Histo1D({"hNClusterScFi", "Number of Clusters; # of Clusters; Events", 100, 0.0, 100.0}, "NClusterScFi").GetPtr(); auto hNClusterScFi = d1.Histo1D({"hNClusterScFi", "Number of Clusters; # of Clusters; Events", 100, 0.0, 100.0}, "NClusterScFi");
auto hfsamScFi = d1.Histo1D({"hfsamScFi", "Cluster Energy/E true; Cluster Energy/E true; Events", 100, 0.8, 1.2},"fsamClusterScFi").GetPtr(); auto hfsamScFi = d1.Histo1D({"hfsamScFi", "Cluster Energy/E true; Cluster Energy/E true; Events", 100, 0.8, 1.2},"fsamClusterScFi");
auto hfsamRecScFi = d1.Histo1D({"hfsamRecScFi", "Reco Hits Energy/E true; Reco Hits Energy/E true; Events", 50, 0.0, 0.25},"fsamRecScFi").GetPtr(); auto hfsamRecScFi = d1.Histo1D({"hfsamRecScFi", "Reco Hits Energy/E true; Reco Hits Energy/E true; Events", 50, 0.0, 0.25},"fsamRecScFi");
// Event Counts // Event Counts
auto nevents_thrown = d1.Count(); auto nevents_thrown = d1.Count();
...@@ -156,25 +156,25 @@ std::tuple <double, double, double, double, double, double, double, double> extr ...@@ -156,25 +156,25 @@ std::tuple <double, double, double, double, double, double, double, double> extr
hEdigiImg->SetLineWidth(2); hEdigiImg->SetLineWidth(2);
hEdigiImg->SetLineColor(kBlue); hEdigiImg->SetLineColor(kBlue);
hEdigiImg->DrawClone(); hEdigiImg->DrawClone();
set_histo_range(hEdigiImg.GetPtr()); set_histo_range(hEdigiImg->GetPtr());
c2->cd(2); c2->cd(2);
hEdigiScFi->GetYaxis()->SetTitleOffset(1.4); hEdigiScFi->GetYaxis()->SetTitleOffset(1.4);
hEdigiScFi->SetLineWidth(2); hEdigiScFi->SetLineWidth(2);
hEdigiScFi->SetLineColor(kBlue); hEdigiScFi->SetLineColor(kBlue);
hEdigiScFi->DrawClone(); hEdigiScFi->DrawClone();
set_histo_range(hEdigiScFi.GetPtr()); set_histo_range(hEdigiScFi->GetPtr());
c2->cd(3); c2->cd(3);
hErecImg->GetYaxis()->SetTitleOffset(1.4); hErecImg->GetYaxis()->SetTitleOffset(1.4);
hErecImg->SetLineWidth(2); hErecImg->SetLineWidth(2);
hErecImg->SetLineColor(kBlue); hErecImg->SetLineColor(kBlue);
hErecImg->DrawClone(); hErecImg->DrawClone();
set_histo_range(hErecImg.GetPtr()); set_histo_range(hErecImg->GetPtr());
c2->cd(4); c2->cd(4);
hErecScFi->GetYaxis()->SetTitleOffset(1.4); hErecScFi->GetYaxis()->SetTitleOffset(1.4);
hErecScFi->SetLineWidth(2); hErecScFi->SetLineWidth(2);
hErecScFi->SetLineColor(kBlue); hErecScFi->SetLineColor(kBlue);
hErecScFi->DrawClone(); hErecScFi->DrawClone();
set_histo_range(hErecScFi.GetPtr()); set_histo_range(hErecScFi->GetPtr());
save_canvas(c2, "E_digi_rec", E_label, particle_label); save_canvas(c2, "E_digi_rec", E_label, particle_label);
{ {
TCanvas* c3 = new TCanvas("c3", "c3", 1400, 500); TCanvas* c3 = new TCanvas("c3", "c3", 1400, 500);
...@@ -184,13 +184,13 @@ std::tuple <double, double, double, double, double, double, double, double> extr ...@@ -184,13 +184,13 @@ std::tuple <double, double, double, double, double, double, double, double> extr
hfsamRecImg->SetLineWidth(2); hfsamRecImg->SetLineWidth(2);
hfsamRecImg->SetLineColor(kBlue); hfsamRecImg->SetLineColor(kBlue);
hfsamRecImg->DrawClone(); hfsamRecImg->DrawClone();
set_histo_range(hfsamRecImg.GetPtr()); set_histo_range(hfsamRecImg->GetPtr());
c3->cd(2); c3->cd(2);
hfsamRecScFi->GetYaxis()->SetTitleOffset(1.4); hfsamRecScFi->GetYaxis()->SetTitleOffset(1.4);
hfsamRecScFi->SetLineWidth(2); hfsamRecScFi->SetLineWidth(2);
hfsamRecScFi->SetLineColor(kBlue); hfsamRecScFi->SetLineColor(kBlue);
hfsamRecScFi->DrawClone(); hfsamRecScFi->DrawClone();
set_histo_range(hfsamRecScFi.GetPtr()); set_histo_range(hfsamRecScFi->GetPtr());
save_canvas(c3, "fsam_digi_rec", E_label, particle_label); save_canvas(c3, "fsam_digi_rec", E_label, particle_label);
} }
{ {
...@@ -199,7 +199,7 @@ std::tuple <double, double, double, double, double, double, double, double> extr ...@@ -199,7 +199,7 @@ std::tuple <double, double, double, double, double, double, double, double> extr
hEClusterScFi->SetLineWidth(2); hEClusterScFi->SetLineWidth(2);
hEClusterScFi->SetLineColor(kBlue); hEClusterScFi->SetLineColor(kBlue);
hEClusterScFi->DrawClone(); hEClusterScFi->DrawClone();
set_histo_range(hEClusterScFi.GetPtr()); set_histo_range(hEClusterScFi->GetPtr());
save_canvas(c5, "EClusterSCFi", E_label, particle_label); save_canvas(c5, "EClusterSCFi", E_label, particle_label);
} }
{ {
...@@ -209,7 +209,7 @@ std::tuple <double, double, double, double, double, double, double, double> extr ...@@ -209,7 +209,7 @@ std::tuple <double, double, double, double, double, double, double, double> extr
hEClusterImg->SetLineWidth(2); hEClusterImg->SetLineWidth(2);
hEClusterImg->SetLineColor(kBlue); hEClusterImg->SetLineColor(kBlue);
hEClusterImg->DrawClone(); hEClusterImg->DrawClone();
set_histo_range(hEClusterImg.GetPtr()); set_histo_range(hEClusterImg->GetPtr());
save_canvas(c6, "EClusterImg", E_label, particle_label); save_canvas(c6, "EClusterImg", E_label, particle_label);
} }
...@@ -222,7 +222,7 @@ std::tuple <double, double, double, double, double, double, double, double> extr ...@@ -222,7 +222,7 @@ std::tuple <double, double, double, double, double, double, double, double> extr
double down_fit = hfsamImg->GetMean() - 5*hfsamImg->GetStdDev(); double down_fit = hfsamImg->GetMean() - 5*hfsamImg->GetStdDev();
if(down_fit <=0 ) down_fit = hfsamImg->GetXaxis()->GetBinUpEdge(1); if(down_fit <=0 ) down_fit = hfsamImg->GetXaxis()->GetBinUpEdge(1);
hfsamImg->Fit("gaus", "", "", down_fit, up_fit); hfsamImg->Fit("gaus", "", "", down_fit, up_fit);
set_histo_range(hfsamImg.GetPtr()); set_histo_range(hfsamImg->GetPtr());
TF1 *gausImg = hfsamImg->GetFunction("gaus"); TF1 *gausImg = hfsamImg->GetFunction("gaus");
gausImg->SetLineWidth(2); gausImg->SetLineWidth(2);
gausImg->SetLineColor(kRed); gausImg->SetLineColor(kRed);
...@@ -242,7 +242,7 @@ std::tuple <double, double, double, double, double, double, double, double> extr ...@@ -242,7 +242,7 @@ std::tuple <double, double, double, double, double, double, double, double> extr
down_fit = hfsamScFi->GetMean() - 5*hfsamScFi->GetStdDev(); down_fit = hfsamScFi->GetMean() - 5*hfsamScFi->GetStdDev();
if(down_fit <=0 ) down_fit = hfsamScFi->GetXaxis()->GetBinUpEdge(1); if(down_fit <=0 ) down_fit = hfsamScFi->GetXaxis()->GetBinUpEdge(1);
hfsamScFi->Fit("gaus", "", "", down_fit, up_fit); hfsamScFi->Fit("gaus", "", "", down_fit, up_fit);
set_histo_range(hfsamScFi.GetPtr()); set_histo_range(hfsamScFi->GetPtr());
TF1 *gaus = hfsamScFi->GetFunction("gaus"); TF1 *gaus = hfsamScFi->GetFunction("gaus");
gaus->SetLineWidth(2); gaus->SetLineWidth(2);
gaus->SetLineColor(kRed); gaus->SetLineColor(kRed);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment