@@ -173,7 +173,7 @@ def draw_info(lat_label, particle):
173173 lat_label .DrawLatex (0.19 , 0.16 , fnonprompt )
174174
175175
176- def save_canvas (canvas , particle , pt_mins , pt_maxs , ipt , mult ):
176+ def save_canvas (canvas , particle , pt_mins , pt_maxs , ind_pt , mult ):
177177 """
178178 Helper method to save canvas according to particle
179179
@@ -194,9 +194,9 @@ def save_canvas(canvas, particle, pt_mins, pt_maxs, ipt, mult):
194194 elif particle == LAMBDAC_TO_PK0S :
195195 name = "LambdacToPKzeroShort"
196196
197- mult = f"{ mult [ipt ]} _" if mult [ipt ] else ""
197+ mult = f"{ mult [ind_pt ]} _" if mult [ind_pt ] else ""
198198 for ext in ["pdf" , "png" , "eps" ]:
199- canvas .SaveAs (f"{ out_dir } InvMassFit{ name } _{ mult } Pt_{ pt_mins [ipt ]:.0f} _{ pt_maxs [ipt ]:.0f} .{ ext } " )
199+ canvas .SaveAs (f"{ out_dir } InvMassFit{ name } _{ mult } Pt_{ pt_mins [ind_pt ]:.0f} _{ pt_maxs [ind_pt ]:.0f} .{ ext } " )
200200
201201
202202# pylint: disable=too-many-locals,too-many-statements
@@ -224,8 +224,8 @@ def main(particle, i_pt, cfg, batch):
224224
225225 print (f"Plotting for { pt_mins [i_pt ]} -{ pt_maxs [i_pt ]} " )
226226
227- # name_infile_promptEnhanced, name_infile_FDEnhanced = \
228- # get_name_infile(particle, f"{pt_mins[i_pt]:.0f}{pt_maxs[i_pt]:.0f}")
227+ name_infile_promptEnhanced , name_infile_FDEnhanced = \
228+ get_name_infile (particle , f"{ pt_mins [i_pt ]:.0f} { pt_maxs [i_pt ]:.0f} " )
229229
230230 file_promptEnhanced = TFile .Open (name_infile_promptEnhanced )
231231 # file_FDEnhanced = TFile.Open(name_infile_FDEnhanced)
@@ -256,8 +256,8 @@ def main(particle, i_pt, cfg, batch):
256256 ymin_promptEnhanced = 0.8 * (hmass_promptEnhanced .GetMinimum () - hmass_promptEnhanced .GetBinError (bin_min ))
257257 # ymin_FDEnhanced, ymax_FDEnhanced = 0., 1.2*(hmass_FDEnhanced.GetMaximum() + hmass_FDEnhanced.GetBinError(bin_max))
258258
259- title = f"{ pt_mins [i_pt ]:.0f} < #it{{p}}_{{T}} < { pt_maxs [i_pt ]:.0f} GeV/#it{{c}};{ title_xaxis } ;" \ # pylint: disable=unnecessary-semicolon
260- f"Counts per { width_bin * GEV2MEV :.0f} MeV/#it{{c}}^{{2}}"
259+ title = f"{ pt_mins [i_pt ]:.0f} < #it{{p}}_{{T}} < { pt_maxs [i_pt ]:.0f} GeV/#it{{c}};{ title_xaxis } ;" \
260+ f"Counts per { width_bin * GEV2MEV :.0f} MeV/#it{{c}}^{{2}}" # pylint: disable=unnecessary-semicolon
261261
262262 # fit_tot_promptEnhanced = file_promptEnhanced.Get(f"totalTF_{pt_mins[i_pt]:.0f}_{pt_maxs[i_pt]:.0f}")
263263 fit_tot_promptEnhanced = file_promptEnhanced .Get (f"total_func_lc_pt{ pt_mins [i_pt ]:.0f} _{ pt_maxs [i_pt ]:.0f} " )
0 commit comments