From 46db8f9770b476df83ccd7b99951c470ba24652b Mon Sep 17 00:00:00 2001 From: Cristina Date: Fri, 15 Jan 2021 12:03:10 -0600 Subject: [PATCH] modify deep name --- bs_select.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bs_select.py b/bs_select.py index e6a9c06..44009f6 100644 --- a/bs_select.py +++ b/bs_select.py @@ -38,6 +38,7 @@ ########################################### # Deduce set name from input file setname = args.input.replace('.root','').split('/')[-1] +outputname = setname setname = '_'.join(setname.split('_')[:-1]) # Flags - https://twiki.cern.ch/twiki/bin/view/CMS/MissingETOptionalFiltersRun2 @@ -139,7 +140,7 @@ def run(args): # Finally discriminate on top tag final = a.Discriminate("top_tag_cut","top_tag==1") - outfile = ROOT.TFile.Open('Presel_%s.root'%(setname),'RECREATE') + outfile = ROOT.TFile.Open('Presel_%s.root'%(outputname),'RECREATE') hpass = final["pass"].DataFrame.Histo2D(('MtwvMtPass','MtwvMtPass',60, 50, 350, 70, 500, 4000),'mtop','mtw','norm') hfail = final["fail"].DataFrame.Histo2D(('MtwvMtFail','MtwvMtFail',60, 50, 350, 70, 500, 4000),'mtop','mtw','norm') outfile.cd()