Skip to content
Snippets Groups Projects
Commit cf3f09da authored by Dmitry Kalinkin's avatar Dmitry Kalinkin
Browse files

avoid hardcoding versions in doCompare_truth_real_widebins_mom.C

parent 2c0e81ad
No related branches found
No related tags found
No related merge requests found
Pipeline #98029 passed with warnings with stages
in 1 hour, 17 minutes, and 4 seconds
......@@ -93,7 +93,13 @@ rule tracking_performance_summary_at_eta:
"Final_Results/pi-/mom/mom_resol_{ETA_MIN}_eta_{ETA_MAX}.root",
shell:
"""
root -l -b -q {input.script}'("pi-", {wildcards.ETA_MIN}, {wildcards.ETA_MAX}, 1.)'
set +e
EPIC_VERSION="$(echo $DETECTOR_PATH | sed -n -e 's/.*epic-\([^-]\+\).*/\\1/p')"
EICRECON_VERSION="$(eicrecon -v | sed -n -e 's/.*\(v[0-9.]\+\).*/\\1/p')"
set -e
echo "ePIC version: $EPIC_VERSION"
echo "EICrecon version: $EICRECON_VERSION"
root -l -b -q {input.script}'("pi-", {wildcards.ETA_MIN}, {wildcards.ETA_MAX}, 1., true, "'$EPIC_VERSION'", "'$EICRECON_VERSION'")'
"""
......
......@@ -10,7 +10,7 @@
#define mpi 0.139 // 1.864 GeV/c^2
void draw_req_Mom(double etamin, double etamax, double xmin=0., double xmax=0.);
void doCompare_truth_real_widebins_mom(TString particle = "pi-",double etamin=-1.0, double etamax=1.0, double range =0.3, 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_mom(TString particle = "pi-",double etamin=-1.0, double etamax=1.0, double range =0.3, Bool_t drawreq=1, TString epic ="", TString eicrecon = "") // name = p, pt for getting p or pt dependence fitted results
{
//=== style of the plot=========
......@@ -165,7 +165,7 @@ void doCompare_truth_real_widebins_mom(TString particle = "pi-",double etamin=-1
c_mom->SaveAs(Form("Final_Results/%s/mom/mom_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<<"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)<<"Resol #mum (Truth)"<<setw(20)<<"Resol #mum (Real)"<<endl;
for (Int_t i = 0; i<gr1->GetN(); ++i){
double x,ytrue, yreal;
......
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