Skip to content

Commit fa23bc5

Browse files
committed
Ruff autofix
1 parent fe5884d commit fa23bc5

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

machine_learning_hep/analysis/analyzerdhadrons_mult.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ def efficiency(self):
537537

538538
legsl.AddEntry(h_sel_pr_sl, legeffstring, "LEP")
539539
h_sel_pr_sl.GetXaxis().SetTitle("#it{p}_{T} (GeV/#it{c})")
540-
h_sel_pr_sl.GetYaxis().SetTitle("Signal loss (prompt) %s" % (self.p_latexnhadron))
540+
h_sel_pr_sl.GetYaxis().SetTitle(f"Signal loss (prompt) {self.p_latexnhadron}")
541541
h_sel_pr_sl.SetMinimum(0.7)
542542
h_sel_pr_sl.SetMaximum(1.0)
543543

@@ -558,7 +558,7 @@ def efficiency(self):
558558
h_sel_pr.Write()
559559
legeff.AddEntry(h_sel_pr, legeffstring, "LEP")
560560
h_sel_pr.GetXaxis().SetTitle("#it{p}_{T} (GeV/#it{c})")
561-
h_sel_pr.GetYaxis().SetTitle("Acc x efficiency (prompt) %s" % (self.p_latexnhadron))
561+
h_sel_pr.GetYaxis().SetTitle(f"Acc x efficiency (prompt) {self.p_latexnhadron}")
562562
h_sel_pr.SetMinimum(0.0004)
563563
h_sel_pr.SetMaximum(0.4)
564564

@@ -613,7 +613,7 @@ def efficiency(self):
613613

614614
legslFD.AddEntry(h_sel_fd_sl, legeffstring, "LEP")
615615
h_sel_fd_sl.GetXaxis().SetTitle("#it{p}_{T} (GeV/#it{c})")
616-
h_sel_fd_sl.GetYaxis().SetTitle("Signal loss (feeddown) %s" % (self.p_latexnhadron))
616+
h_sel_fd_sl.GetYaxis().SetTitle(f"Signal loss (feeddown) {self.p_latexnhadron}")
617617
h_sel_fd_sl.SetMinimum(0.7)
618618
h_sel_fd_sl.SetMaximum(1.0)
619619

@@ -634,7 +634,7 @@ def efficiency(self):
634634
h_sel_fd.Write()
635635
legeffFD.AddEntry(h_sel_fd, legeffFDstring, "LEP")
636636
h_sel_fd.GetXaxis().SetTitle("#it{p}_{T} (GeV/#it{c})")
637-
h_sel_fd.GetYaxis().SetTitle("Acc x efficiency feed-down %s" % (self.p_latexnhadron))
637+
h_sel_fd.GetYaxis().SetTitle(f"Acc x efficiency feed-down {self.p_latexnhadron}")
638638
h_sel_fd.SetMinimum(0.0004)
639639
h_sel_fd.SetMaximum(0.4)
640640

@@ -688,7 +688,7 @@ def plotter(self):
688688
norm = 2 * self.p_br * self.p_nevents / (self.p_sigmamb * 1e12)
689689
hcross.Scale(1.0 / norm)
690690
fileoutcross.cd()
691-
hcross.GetXaxis().SetTitle("#it{p}_{T} %s (GeV/#it{c})" % self.p_latexnhadron)
691+
hcross.GetXaxis().SetTitle(f"#it{{p}}_{{T}} {self.p_latexnhadron} (GeV/#it{{c}})")
692692
hcross.GetYaxis().SetTitle(f"d#sigma/d#it{{p}}_{{T}} ({self.p_latexnhadron}) {self.typean}")
693693
hcross.SetName("hcross%d" % imult)
694694
hcross.GetYaxis().SetRangeUser(1e1, 1e10)
@@ -725,7 +725,7 @@ def plotter(self):
725725
print("pt", ipt)
726726
for imult in range(self.p_nbin2):
727727
hcrossvsvar2[ipt].SetLineColor(ipt + 1)
728-
hcrossvsvar2[ipt].GetXaxis().SetTitle("%s" % self.p_latexbin2var)
728+
hcrossvsvar2[ipt].GetXaxis().SetTitle(f"{self.p_latexbin2var}")
729729
hcrossvsvar2[ipt].GetYaxis().SetTitle(self.p_latexnhadron)
730730
hcrossvsvar2[ipt].SetBinContent(imult + 1, listvalues[imult][ipt])
731731
hcrossvsvar2[ipt].SetBinError(imult + 1, listvalueserr[imult][ipt])
@@ -898,7 +898,7 @@ def plotternormyields(self):
898898
hcross.Scale(1.0 / (self.p_sigmamb * 1e12))
899899
hcross.SetLineColor(imult + 1)
900900
hcross.SetMarkerColor(imult + 1)
901-
hcross.GetXaxis().SetTitle("#it{p}_{T} %s (GeV/#it{c})" % self.p_latexnhadron)
901+
hcross.GetXaxis().SetTitle(f"#it{{p}}_{{T}} {self.p_latexnhadron} (GeV/#it{{c}})")
902902
hcross.GetYaxis().SetTitleOffset(1.3)
903903
hcross.GetYaxis().SetTitle(f"Corrected yield/events ({self.p_latexnhadron}) {self.typean}")
904904
hcross.GetYaxis().SetRangeUser(1e-10, 1)

0 commit comments

Comments
 (0)