Skip to content
Snippets Groups Projects
Unverified Commit c33b1cf0 authored by Shyam Kumar's avatar Shyam Kumar Committed by GitHub
Browse files

Adding resolutions of DCAT and DCAz to the benchmark (#106)

parent 26b21468
No related branches found
No related tags found
No related merge requests found
Pipeline #107918 canceled
...@@ -94,15 +94,31 @@ rule tracking_performance_summary_at_eta: ...@@ -94,15 +94,31 @@ rule tracking_performance_summary_at_eta:
], ],
MOMENTUM=[0.5, 1.0, 2.0, 5.0, 10.0, 20.0], MOMENTUM=[0.5, 1.0, 2.0, 5.0, 10.0, 20.0],
), ),
script="benchmarks/tracking_performances/doCompare_truth_real_widebins_mom.C", script_mom="benchmarks/tracking_performances/doCompare_truth_real_widebins_mom.C",
script_dcaT="benchmarks/tracking_performances/doCompare_truth_real_widebins_dcaT.C",
script_dcaz="benchmarks/tracking_performances/doCompare_truth_real_widebins_dcaz.C",
output: output:
expand( expand(
"{{CAMPAIGN}}/Debug_Plots/{SEEDING}/pi-/mom/{SEEDING}_mom_resol_mom{MOMENTUM:.1f}_{{ETA_MIN}}_eta_{{ETA_MAX}}.png", "{{CAMPAIGN}}/Debug_Plots/{SEEDING}/pi-/mom/{SEEDING}_mom_resol_mom{MOMENTUM:.1f}_{{ETA_MIN}}_eta_{{ETA_MAX}}.png",
SEEDING=["real", "truth"], SEEDING=["real", "truth"],
MOMENTUM=[0.5, 1.0, 2.0, 5.0, 10.0, 20.0], MOMENTUM=[0.5, 1.0, 2.0, 5.0, 10.0, 20.0],
), ),
expand(
"{{CAMPAIGN}}/Debug_Plots/{SEEDING}/pi-/dca/{SEEDING}_dcaxy_resol_mom{MOMENTUM:.1f}_{{ETA_MIN}}_eta_{{ETA_MAX}}.png",
SEEDING=["real", "truth"],
MOMENTUM=[0.2, 0.3, 0.5,1.0, 1.5, 2.0, 5.0, 8.0, 10., 15.0],
),
expand(
"{{CAMPAIGN}}/Debug_Plots/{SEEDING}/pi-/dca/{SEEDING}_dcaz_resol_mom{MOMENTUM:.1f}_{{ETA_MIN}}_eta_{{ETA_MAX}}.png",
SEEDING=["real", "truth"],
MOMENTUM=[0.2, 0.3, 0.5,1.0, 1.5, 2.0, 5.0, 8.0, 10., 15.0],
),
"{CAMPAIGN}/Final_Results/pi-/mom/mom_resol_{ETA_MIN}_eta_{ETA_MAX}.png", "{CAMPAIGN}/Final_Results/pi-/mom/mom_resol_{ETA_MIN}_eta_{ETA_MAX}.png",
"{CAMPAIGN}/Final_Results/pi-/mom/mom_resol_{ETA_MIN}_eta_{ETA_MAX}.root", "{CAMPAIGN}/Final_Results/pi-/mom/mom_resol_{ETA_MIN}_eta_{ETA_MAX}.root",
"{CAMPAIGN}/Final_Results/pi-/dca/dcaxy_resol_{ETA_MIN}_eta_{ETA_MAX}.png",
"{CAMPAIGN}/Final_Results/pi-/dca/dcaxy_resol_{ETA_MIN}_eta_{ETA_MAX}.root",
"{CAMPAIGN}/Final_Results/pi-/dca/dcaz_resol_{ETA_MIN}_eta_{ETA_MAX}.png",
"{CAMPAIGN}/Final_Results/pi-/dca/dcaz_resol_{ETA_MIN}_eta_{ETA_MAX}.root",
shell: shell:
""" """
if [[ "{wildcards.CAMPAIGN}" == "local" ]]; then if [[ "{wildcards.CAMPAIGN}" == "local" ]]; then
...@@ -119,8 +135,12 @@ if [[ "{wildcards.CAMPAIGN}" == "local" ]]; then ...@@ -119,8 +135,12 @@ if [[ "{wildcards.CAMPAIGN}" == "local" ]]; then
else else
EXTRA_LEGEND="ePIC Simulation {wildcards.CAMPAIGN}" EXTRA_LEGEND="ePIC Simulation {wildcards.CAMPAIGN}"
fi fi
hadd -f {wildcards.CAMPAIGN}/truthseed/pi-/dca/final_hist_dca_truthseed.root {wildcards.CAMPAIGN}/truthseed/pi-/dca/Performances_dca*
hadd -f {wildcards.CAMPAIGN}/realseed/pi-/dca/final_hist_dca_realseed.root {wildcards.CAMPAIGN}/realseed/pi-/dca/Performances_dca*
cd {wildcards.CAMPAIGN} cd {wildcards.CAMPAIGN}
root -l -b -q ../{input.script}'("pi-", {wildcards.ETA_MIN}, {wildcards.ETA_MAX}, 1., true, "'"$EXTRA_LEGEND"'")' root -l -b -q ../{input.script_mom}'("pi-", {wildcards.ETA_MIN}, {wildcards.ETA_MAX}, 1., true, "'"$EXTRA_LEGEND"'")'
root -l -b -q ../{input.script_dcaT}'("pi-", {wildcards.ETA_MIN}, {wildcards.ETA_MAX}, true, "'"$EXTRA_LEGEND"'")'
root -l -b -q ../{input.script_dcaz}'("pi-", {wildcards.ETA_MIN}, {wildcards.ETA_MAX}, true, "'"$EXTRA_LEGEND"'")'
""" """
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
#include "TMath.h" #include "TMath.h"
void draw_req_DCA(double etamin, double etamax, double xmin=0., double xmax=0.); void draw_req_DCA(double etamin, double etamax, double xmin=0., double xmax=0.);
void doCompare_truth_real_widebins_dcaT(TString particle = "pi-",double etamin=-1.0, double etamax=1.0, Bool_t drawreq=1, TString epic ="24.06.0", TString eicrecon = "v1.14.0") // name = p, pt for getting p or pt dependence fitted results void doCompare_truth_real_widebins_dcaT(TString particle = "pi-",double etamin=-1.0, double etamax=1.0, Bool_t drawreq=1, TString extra_legend = "") // name = p, pt for getting p or pt dependence fitted results
{ {
//=== style of the plot========= //=== style of the plot=========
...@@ -33,10 +33,7 @@ void doCompare_truth_real_widebins_dcaT(TString particle = "pi-",double etamin=- ...@@ -33,10 +33,7 @@ void doCompare_truth_real_widebins_dcaT(TString particle = "pi-",double etamin=-
TString symbolname = ""; TString symbolname = "";
if (particle == "pi-") symbolname = "#pi^{-}"; if (particle == "pi-") symbolname = "#pi^{-}";
else symbolname = particle; else symbolname = particle;
// Write the parameters in text file (for comparison)
ofstream outfile;
outfile.open ("DCAT_resol.txt",ios_base::app);
TF1 *f1=new TF1("f1","FitPointingAngle",0.,30.0,2); TF1 *f1=new TF1("f1","FitPointingAngle",0.,30.0,2);
f1->SetParLimits(0,0.,50000); f1->SetParLimits(0,0.,50000);
...@@ -57,7 +54,8 @@ void doCompare_truth_real_widebins_dcaT(TString particle = "pi-",double etamin=- ...@@ -57,7 +54,8 @@ void doCompare_truth_real_widebins_dcaT(TString particle = "pi-",double etamin=-
lDCAT = new TLegend(0.65,0.80,0.90,0.93); lDCAT = new TLegend(0.65,0.80,0.90,0.93);
lDCAT->SetTextSize(0.03); lDCAT->SetTextSize(0.03);
lDCAT->SetBorderSize(0); lDCAT->SetBorderSize(0);
lDCAT->SetHeader(Form("%s ePIC(%s/%s): %1.1f < #eta < %1.1f",symbolname.Data(),epic.Data(),eicrecon.Data(),etamin,etamax),"C"); lDCAT->SetHeader(extra_legend.Data(), "C");
lDCAT->AddEntry((TObject*)0, Form("%s, %1.1f < #eta < %1.1f", symbolname.Data(), etamin, etamax), "C");
fDCA_truth = TFile::Open(Form("./truthseed/%s/dca/final_hist_dca_truthseed.root",particle.Data())); fDCA_truth = TFile::Open(Form("./truthseed/%s/dca/final_hist_dca_truthseed.root",particle.Data()));
fDCA_real = TFile::Open(Form("./realseed/%s/dca/final_hist_dca_realseed.root",particle.Data())); fDCA_real = TFile::Open(Form("./realseed/%s/dca/final_hist_dca_realseed.root",particle.Data()));
...@@ -88,7 +86,7 @@ void doCompare_truth_real_widebins_dcaT(TString particle = "pi-",double etamin=- ...@@ -88,7 +86,7 @@ void doCompare_truth_real_widebins_dcaT(TString particle = "pi-",double etamin=-
histd0xy_truth_1d->SetTitle(Form("d0_{xy} (truth): %1.1f <#eta< %1.1f && %1.2f <p_{T}< %1.2f",etamin,etamax,ptmin,ptmax)); histd0xy_truth_1d->SetTitle(Form("d0_{xy} (truth): %1.1f <#eta< %1.1f && %1.2f <p_{T}< %1.2f",etamin,etamax,ptmin,ptmax));
histd0xy_truth_1d->SetName(Form("eta_%1.1f_%1.1f_d0xy_truth_pt_%1.1f",etamin,etamax,pt[iptbin])); histd0xy_truth_1d->SetName(Form("eta_%1.1f_%1.1f_d0xy_truth_pt_%1.1f",etamin,etamax,pt[iptbin]));
if (histd0xy_truth_1d->GetEntries()<100) continue; // if (histd0xy_truth_1d->GetEntries()<100) continue;
double mu_truth = histd0xy_truth_1d->GetMean(); double mu_truth = histd0xy_truth_1d->GetMean();
double sigma_truth = histd0xy_truth_1d->GetStdDev(); double sigma_truth = histd0xy_truth_1d->GetStdDev();
func_truth->SetRange(mu_truth-2.0*sigma_truth,mu_truth+2.0*sigma_truth); // fit with in 2 sigma range func_truth->SetRange(mu_truth-2.0*sigma_truth,mu_truth+2.0*sigma_truth); // fit with in 2 sigma range
...@@ -107,7 +105,7 @@ void doCompare_truth_real_widebins_dcaT(TString particle = "pi-",double etamin=- ...@@ -107,7 +105,7 @@ void doCompare_truth_real_widebins_dcaT(TString particle = "pi-",double etamin=-
histd0xy_real_1d->SetTitle(Form("d0_{xy} (real): %1.1f <#eta< %1.1f && %1.2f <p_{T}< %1.2f",etamin,etamax,ptmin,ptmax)); histd0xy_real_1d->SetTitle(Form("d0_{xy} (real): %1.1f <#eta< %1.1f && %1.2f <p_{T}< %1.2f",etamin,etamax,ptmin,ptmax));
histd0xy_real_1d->SetName(Form("eta_%1.1f_%1.1f_d0xy_real_pt_%1.1f",etamin,etamax,pt[iptbin])); histd0xy_real_1d->SetName(Form("eta_%1.1f_%1.1f_d0xy_real_pt_%1.1f",etamin,etamax,pt[iptbin]));
if (histd0xy_real_1d->GetEntries()<100) continue; // if (histd0xy_real_1d->GetEntries()<100) continue;
double mu_real = histd0xy_real_1d->GetMean(); double mu_real = histd0xy_real_1d->GetMean();
double sigma_real = histd0xy_real_1d->GetStdDev(); double sigma_real = histd0xy_real_1d->GetStdDev();
func_real->SetRange(mu_real-2.0*sigma_real,mu_real+2.0*sigma_real); // fit with in 2 sigma range func_real->SetRange(mu_real-2.0*sigma_real,mu_real+2.0*sigma_real); // fit with in 2 sigma range
...@@ -183,16 +181,6 @@ void doCompare_truth_real_widebins_dcaT(TString particle = "pi-",double etamin=- ...@@ -183,16 +181,6 @@ void doCompare_truth_real_widebins_dcaT(TString particle = "pi-",double etamin=-
draw_req_DCA(etamin,etamax,0.,mgDCAT->GetXaxis()->GetXmax()); draw_req_DCA(etamin,etamax,0.,mgDCAT->GetXaxis()->GetXmax());
c_dcaxy->SaveAs(Form("Final_Results/%s/dca/dcaxy_resol_%1.1f_eta_%1.1f.png",particle.Data(),etamin,etamax)); c_dcaxy->SaveAs(Form("Final_Results/%s/dca/dcaxy_resol_%1.1f_eta_%1.1f.png",particle.Data(),etamin,etamax));
// Write the numbers in output file for comparisons
outfile<<"ePIC"<<setw(20)<<epic.Data()<<setw(20)<<"EICRecon"<<setw(20)<<eicrecon.Data()<<endl;
outfile<<"Etamin"<<setw(20)<<"Etamax"<<setw(20)<<"Pt (GeV/c) \t"<<setw(20)<<"DCAT Resol #mum (Real)"<<endl;
for (Int_t i = 0; i<gr1->GetN(); ++i){
double x,ytrue, yreal;
gr2->GetPoint(i,x,yreal);
outfile<<etamin<<setw(20)<<etamax<<setw(20)<<x<<setw(20)<<yreal<<endl;
}
outfile.close();
fout->cd(); fout->cd();
mgDCAT->SetName(Form("dcaxy_resol_%1.1f_eta_%1.1f",etamin,etamax)); mgDCAT->SetName(Form("dcaxy_resol_%1.1f_eta_%1.1f",etamin,etamax));
mgDCAT->Write(); mgDCAT->Write();
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#define mpi 0.139 // 1.864 GeV/c^2 #define mpi 0.139 // 1.864 GeV/c^2
void draw_req_DCA(double etamin, double etamax, double xmin=0., double xmax=0.); void draw_req_DCA(double etamin, double etamax, double xmin=0., double xmax=0.);
void doCompare_truth_real_widebins_dcaz(TString particle = "pi-",double etamin=-1.0, double etamax=1.0, Bool_t drawreq=1, TString epic ="", TString eicrecon = "") // name = p, pt for getting p or pt dependence fitted results void doCompare_truth_real_widebins_dcaz(TString particle = "pi-",double etamin=-1.0, double etamax=1.0, Bool_t drawreq=1, TString extra_legend = "") // name = p, pt for getting p or pt dependence fitted results
{ {
//=== style of the plot========= //=== style of the plot=========
...@@ -33,9 +33,6 @@ void doCompare_truth_real_widebins_dcaz(TString particle = "pi-",double etamin=- ...@@ -33,9 +33,6 @@ void doCompare_truth_real_widebins_dcaz(TString particle = "pi-",double etamin=-
TString symbolname = ""; TString symbolname = "";
if (particle == "pi-") symbolname = "#pi^{-}"; if (particle == "pi-") symbolname = "#pi^{-}";
else symbolname = particle; else symbolname = particle;
// Write the parameters in text file (for comparison)
ofstream outfile;
outfile.open ("DCAZ_resol.txt",ios_base::app);
TF1 *f1=new TF1("f1","FitPointingAngle",0.,30.0,2); TF1 *f1=new TF1("f1","FitPointingAngle",0.,30.0,2);
f1->SetParLimits(0,0.,50000); f1->SetParLimits(0,0.,50000);
...@@ -55,7 +52,8 @@ void doCompare_truth_real_widebins_dcaz(TString particle = "pi-",double etamin=- ...@@ -55,7 +52,8 @@ void doCompare_truth_real_widebins_dcaz(TString particle = "pi-",double etamin=-
lDCAZ = new TLegend(0.70,0.80,0.90,0.93); lDCAZ = new TLegend(0.70,0.80,0.90,0.93);
lDCAZ->SetTextSize(0.03); lDCAZ->SetTextSize(0.03);
lDCAZ->SetBorderSize(0); lDCAZ->SetBorderSize(0);
lDCAZ->SetHeader(Form("%s ePIC(%s/%s): %1.1f < #eta < %1.1f",symbolname.Data(),epic.Data(),eicrecon.Data(),etamin,etamax),"C"); lDCAZ->SetHeader(extra_legend.Data(), "C");
lDCAZ->AddEntry((TObject*)0, Form("%s, %1.1f < #eta < %1.1f", symbolname.Data(), etamin, etamax), "C");
fDCA_truth = TFile::Open(Form("./truthseed/%s/dca/final_hist_dca_truthseed.root",particle.Data())); fDCA_truth = TFile::Open(Form("./truthseed/%s/dca/final_hist_dca_truthseed.root",particle.Data()));
fDCA_real = TFile::Open(Form("./realseed/%s/dca/final_hist_dca_realseed.root",particle.Data())); fDCA_real = TFile::Open(Form("./realseed/%s/dca/final_hist_dca_realseed.root",particle.Data()));
...@@ -85,7 +83,7 @@ void doCompare_truth_real_widebins_dcaz(TString particle = "pi-",double etamin=- ...@@ -85,7 +83,7 @@ void doCompare_truth_real_widebins_dcaz(TString particle = "pi-",double etamin=-
TH1D *histd0z_truth_1d = (TH1D*)hist_d0z_truth->ProjectionX(Form("histd0z_truth_eta%1.1f_%1.1f_pt%1.1f_%1.1f",etamin,etamax,ptmin,ptmax),etamin_bin,etamax_bin,ptmin_bin,ptmax_bin,"o"); TH1D *histd0z_truth_1d = (TH1D*)hist_d0z_truth->ProjectionX(Form("histd0z_truth_eta%1.1f_%1.1f_pt%1.1f_%1.1f",etamin,etamax,ptmin,ptmax),etamin_bin,etamax_bin,ptmin_bin,ptmax_bin,"o");
histd0z_truth_1d->SetTitle(Form("d0_{z} (truth): %1.1f <#eta< %1.1f && %1.2f <p_{T}< %1.2f",etamin,etamax,ptmin,ptmax)); histd0z_truth_1d->SetTitle(Form("d0_{z} (truth): %1.1f <#eta< %1.1f && %1.2f <p_{T}< %1.2f",etamin,etamax,ptmin,ptmax));
histd0z_truth_1d->SetName(Form("eta_%1.1f_%1.1f_d0z_truth_pt_%1.1f",etamin,etamax,pt[iptbin])); histd0z_truth_1d->SetName(Form("eta_%1.1f_%1.1f_d0z_truth_pt_%1.1f",etamin,etamax,pt[iptbin]));
if (histd0z_truth_1d->GetEntries()<100) continue; // if (histd0z_truth_1d->GetEntries()<100) continue;
double mu_truth = histd0z_truth_1d->GetMean(); double mu_truth = histd0z_truth_1d->GetMean();
double sigma_truth = histd0z_truth_1d->GetStdDev(); double sigma_truth = histd0z_truth_1d->GetStdDev();
func_truth->SetRange(mu_truth-2.0*sigma_truth,mu_truth+2.0*sigma_truth); // fit with in 2 sigma range func_truth->SetRange(mu_truth-2.0*sigma_truth,mu_truth+2.0*sigma_truth); // fit with in 2 sigma range
...@@ -104,7 +102,7 @@ void doCompare_truth_real_widebins_dcaz(TString particle = "pi-",double etamin=- ...@@ -104,7 +102,7 @@ void doCompare_truth_real_widebins_dcaz(TString particle = "pi-",double etamin=-
histd0z_real_1d->SetTitle(Form("d0_{z} (real): %1.1f <#eta< %1.1f && %1.2f <p_{T}< %1.2f",etamin,etamax,ptmin,ptmax)); histd0z_real_1d->SetTitle(Form("d0_{z} (real): %1.1f <#eta< %1.1f && %1.2f <p_{T}< %1.2f",etamin,etamax,ptmin,ptmax));
histd0z_real_1d->SetName(Form("eta_%1.1f_%1.1f_d0z_real_pt_%1.1f",etamin,etamax,pt[iptbin])); histd0z_real_1d->SetName(Form("eta_%1.1f_%1.1f_d0z_real_pt_%1.1f",etamin,etamax,pt[iptbin]));
if (histd0z_real_1d->GetEntries()<100) continue; // if (histd0z_real_1d->GetEntries()<100) continue;
double mu_real = histd0z_real_1d->GetMean(); double mu_real = histd0z_real_1d->GetMean();
double sigma_real = histd0z_real_1d->GetStdDev(); double sigma_real = histd0z_real_1d->GetStdDev();
func_real->SetRange(mu_real-2.0*sigma_real,mu_real+2.0*sigma_real); // fit with in 2 sigma range func_real->SetRange(mu_real-2.0*sigma_real,mu_real+2.0*sigma_real); // fit with in 2 sigma range
...@@ -180,16 +178,7 @@ void doCompare_truth_real_widebins_dcaz(TString particle = "pi-",double etamin=- ...@@ -180,16 +178,7 @@ void doCompare_truth_real_widebins_dcaz(TString particle = "pi-",double etamin=-
// draw_req_DCA(etamin,etamax,0.,mgDCAZ->GetXaxis()->GetXmax()); // draw_req_DCA(etamin,etamax,0.,mgDCAZ->GetXaxis()->GetXmax());
c_dcaz->SaveAs(Form("Final_Results/%s/dca/dcaz_resol_%1.1f_eta_%1.1f.png",particle.Data(),etamin,etamax)); c_dcaz->SaveAs(Form("Final_Results/%s/dca/dcaz_resol_%1.1f_eta_%1.1f.png",particle.Data(),etamin,etamax));
// Write the numbers in output file for comparisons fout->cd();
outfile<<"ePIC"<<setw(20)<<epic.Data()<<setw(20)<<"EICRecon"<<setw(20)<<eicrecon.Data()<<endl;
outfile<<"Etamin"<<setw(20)<<"Etamax"<<setw(20)<<"Pt (GeV/c) \t"<<setw(20)<<"DCAz Resol #mum (Real)"<<endl;
for (Int_t i = 0; i<gr1->GetN(); ++i){
double x,ytrue, yreal;
gr2->GetPoint(i,x,yreal);
outfile<<etamin<<setw(20)<<etamax<<setw(20)<<x<<setw(20)<<yreal<<endl;
}
outfile.close();
fout->cd();
mgDCAZ->SetName(Form("dcaz_resol_%1.1f_eta_%1.1f",etamin,etamax)); mgDCAZ->SetName(Form("dcaz_resol_%1.1f_eta_%1.1f",etamin,etamax));
mgDCAZ->Write(); mgDCAZ->Write();
fout->Close(); fout->Close();
......
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