@@ -589,9 +589,6 @@ def fit(self):
589589 if iptjet is None :
590590 if not fitcfg .get ("per_ptjet" ):
591591 for jptjet in range (get_nbins (h , 1 )):
592- self .logger .info (
593- "Overwriting roows_ptjet for %s iptjet %s ipt %d" , level , jptjet , ipt
594- )
595592 self .roows [(jptjet , ipt )] = roo_ws .Clone ()
596593 self .roo_ws [(level , jptjet , ipt )] = roo_ws .Clone ()
597594 if level in ("data" , "mc" ):
@@ -705,10 +702,7 @@ def _subtract_sideband(self, hist, var, mcordata, ipt):
705702 self .logger .info ("Scaling sidebands in ptjet-%s bins: %s using %s" , label , bins_ptjet , fh_sideband )
706703 hx = project_hist (fh_sideband , (0 ,), {}) if get_dim (fh_sideband ) > 1 else fh_sideband
707704 for iptjet in bins_ptjet :
708- if iptjet :
709- n = hx .GetBinContent (iptjet )
710- self .logger .info ("Need to scale in ptjet %i: %g" , iptjet , n )
711- if n <= 0 :
705+ if iptjet and hx .GetBinContent (iptjet ) <= 0 :
712706 continue
713707 rws = self .roo_ws .get ((mcordata , iptjet , ipt ))
714708 if not rws :
@@ -1071,6 +1065,7 @@ def estimate_feeddown(self):
10711065 """Estimate feeddown from legacy Run 2 trees or gen-only simulation"""
10721066 match self .cfg ("fd_input" , "tree" ):
10731067 case "tree" :
1068+ self .logger .info ("Reading feeddown information from trees" )
10741069 with TFile (self .cfg ("fd_root" )) as rfile :
10751070 powheg_xsection = rfile .Get ("fHistXsection" )
10761071 powheg_xsection_scale_factor = powheg_xsection .GetBinContent (1 ) / powheg_xsection .GetEntries ()
@@ -1126,6 +1121,8 @@ def estimate_feeddown(self):
11261121 if fh := rfile .Get (f"h_mass-ptjet-pthf{ label } " ):
11271122 h3_fd_gen_orig [var ] = project_hist (fh , list (range (1 , get_dim (fh ))), {})
11281123 ensure_sumw2 (h3_fd_gen_orig [var ])
1124+ self ._save_hist (project_hist (h3_fd_gen_orig [var ], [0 , 2 ], {}), f"fd/h_ptjet-{ var } _feeddown_genonly_noeffscaling.png" )
1125+ powheg_xsection_scale_factor = 1. # FIXME: retrieve cross section
11291126
11301127 case fd_input :
11311128 self .logger .critical ("Invalid feeddown input %s" , fd_input )
0 commit comments