Skip to content
Snippets Groups Projects

Resolve "pi0 resolution for ECal barrel"

Merged Marshall Scott requested to merge 19-pi0-resolution-for-ecal-barrel into master
Compare and Show latest version
1 file
+ 3
2
Compare changes
  • Side-by-side
  • Inline
@@ -19,6 +19,7 @@
@@ -19,6 +19,7 @@
#include "TH1.h"
#include "TH1.h"
#include "TF1.h"
#include "TF1.h"
#include "TH1D.h"
#include "TH1D.h"
 
#include <TFitResult.h>
using ROOT::RDataFrame;
using ROOT::RDataFrame;
using namespace ROOT::VecOps;
using namespace ROOT::VecOps;
@@ -145,7 +146,7 @@ void emcal_barrel_pions_analysis(const char* input_fname = "sim_output/sim_emcal
@@ -145,7 +146,7 @@ void emcal_barrel_pions_analysis(const char* input_fname = "sim_output/sim_emcal
//Energy Resolution Work
//Energy Resolution Work
auto hdE = d1.Histo1D({"hdE", "dE; dE[GeV]; Events", 100, -7.5, 7.5}, "dE");
auto hdE = d1.Histo1D({"hdE", "dE; dE[GeV]; Events", 100, -7.5, 7.5}, "dE");
auto hdE_rel = d1.Histo1D({"hdE_rel", "dE Relative; dE Relative; Events", 100, -7.5, 7.5}, "dE_rel");
auto hdE_rel = d1.Histo1D({"hdE_rel", "dE Relative; dE Relative; Events", 100, -7.5, 7.5}, "dE_rel");
auto f1 = hdE_rel->Fit("gaus", "S");
TFitResultPtr f1 = hdE_rel->Fit("gaus", "S");
const double* res = f1->GetParams();
const double* res = f1->GetParams();
auto tf1 = new TF1("", "TMath::Gaus(x, [0], [1], [2])", -7.5, 7.5);
auto tf1 = new TF1("", "TMath::Gaus(x, [0], [1], [2])", -7.5, 7.5);
tf1 -> SetParameters(res[0], res[1], res[2]);
tf1 -> SetParameters(res[0], res[1], res[2]);
@@ -162,7 +163,7 @@ void emcal_barrel_pions_analysis(const char* input_fname = "sim_output/sim_emcal
@@ -162,7 +163,7 @@ void emcal_barrel_pions_analysis(const char* input_fname = "sim_output/sim_emcal
//Energy Resolution Histogram Plotting
//Energy Resolution Histogram Plotting
auto *cdE = new TCanvas("cdE", "cdE", 700, 500);
auto *cdE = new TCanvas("cdE", "cdE", 700, 500);
cDE->SetLogy(1);
cdE->SetLogy(1);
hdE->GetYaxis()->SetTitleOffset(1.4);
hdE->GetYaxis()->SetTitleOffset(1.4);
hdE->SetLineWidth(2);
hdE->SetLineWidth(2);
hdE->SetLineColor(kBlue);
hdE->SetLineColor(kBlue);
Loading