Skip to content

Commit

Permalink
working ntau samples
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-komm authored and matt-komm committed Mar 15, 2023
1 parent 594b3dd commit 0d2230d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions histo/sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def __init__(self, name, ntuple_path, paths, isMC=True, year="2016", cut=None, l
looseMuons_weight_reco_nominal*looseMuons_weight_id_nominal*\
looseElectrons_weight_id_nominal*\
puweight_nominal*genweight*hnlJet_track_weight_nominal*lepton2_track_nominal*\
{lumi[year]}*1000.0*{xsec}/{self.sum_weight}")
{lumi[year]}*1000.0*{xsec}/{self.sum_weight}") #NB: weight will be 1. for HNL


#self.rdf = self.rdf.Define("weightNominalCorrectedUp", "weightNominal*hnlJet_track_weight_adapted_nominal")
Expand All @@ -114,7 +114,8 @@ def __init__(self, name, ntuple_path, paths, isMC=True, year="2016", cut=None, l
weightNormSum = 1.0
self.rdf = self.rdf.Define("weightNominalHNL_{}".format(coupling), f"{filtereff}*weightNominal*LHEWeights_coupling_{coupling}/{weightNormSum}")
else:
self.rdf = self.rdf.Define("weightNominalHNL_{}".format(coupling), f"weightNominal*LHEWeights_coupling_{coupling}/{self.sum_weightHNL[coupling]}")
weightNormSum = self.yieldsHNL[name+"-"+str(year)]['LHEWeights_coupling_'+str(coupling)]
self.rdf = self.rdf.Define("weightNominalHNL_{}".format(coupling), f"weightNominal*LHEWeights_coupling_{coupling}/{weightNormSum}")

else:
self.rdf = self.rdf.Define("weightNominal", "1")
1 change: 1 addition & 0 deletions limits/make_hists.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ def make_hist(process, category_variable, thresholds, weight, cut, region, syst
#parser.add_argument("--ntuple_path", default="/nfs/dust/cms/user/mkomm/HNL/ntuples/24May20")
#parser.add_argument("--output_path", default="/nfs/dust/cms/user/mkomm/HNL/histo/limits/hists")

#parser.add_argument("--ntuple_path", default="/vols/cms/hsfar/nanoAOD_friends/19Jan23")
parser.add_argument("--ntuple_path", default="/vols/cms/hsfar/nanoAOD_friends/09Mar23")
parser.add_argument("--output_path", default="/vols/cms/mkomm/HNL/histo/limits/hists")

Expand Down

0 comments on commit 0d2230d

Please sign in to comment.