Skip to content

Commit e45b4e0

Browse files
committed
Add ptshape suffix to input histos and output files in makenormyields
1 parent 3b2c568 commit e45b4e0

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

machine_learning_hep/analysis/analyzerdhadrons.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -486,11 +486,13 @@ def makenormyields(self): # pylint: disable=import-outside-toplevel, too-many-b
486486
if not os.path.exists(fileouteff):
487487
self.logger.fatal("Efficiency file %s could not be found", fileouteff)
488488

489-
fileoutcross = f"{self.d_resultsallpdata}/finalcross{self.case}{self.typean}.root"
489+
ptshape = "_ptshape" if self.do_ptshape else ""
490+
fileoutcross = f"{self.d_resultsallpdata}/finalcross{self.case}{self.typean}{ptshape}.root"
490491

491492
namehistoeffprompt = "eff"
492-
namehistoefffeed = "eff_fd"
493+
namehistoefffeed = f"eff_fd{ptshape}"
493494
nameyield = "hyields0"
495+
self.logger.info("Using efficiency histos %s, %s", namehistoeffprompt, namehistoefffeed)
494496

495497
histonorm = TH1F("histonorm", "histonorm", 1, 0, 1)
496498

@@ -537,7 +539,8 @@ def makenormyields(self): # pylint: disable=import-outside-toplevel, too-many-b
537539
fileoutcross,
538540
)
539541

540-
fileoutcrosstot = TFile.Open(f"{self.d_resultsallpdata}/finalcross{self.case}{self.typean}tot.root", "recreate")
542+
fileoutcrosstot = TFile.Open(f"{self.d_resultsallpdata}/finalcross{self.case}{self.typean}tot{ptshape}.root",
543+
"recreate")
541544

542545
f_fileoutcross = TFile.Open(fileoutcross)
543546
if f_fileoutcross:

0 commit comments

Comments
 (0)