Skip to content

Commit

Permalink
Merge branch 'PODAS23' of https://github.com/cardinia/TauFW into PODAS23
Browse files Browse the repository at this point in the history
  • Loading branch information
cardinia committed Oct 12, 2023
2 parents 7a20a76 + 5de5456 commit 47d4c0d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 12 deletions.
6 changes: 4 additions & 2 deletions Plotter/config/samples_v12.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ def getsampleset(channel,era,**kwargs):
kfactor_zz=1.524 # LO->NNLO+NLO_EW computed for 13.6 TeV
kfactor_wz=1.414 # LO->NNLO+NLO_EW computed for 13.6 TeV

cme=13.6

if '2022_preEE' in era:
expsamples = [ # table of MC samples to be converted to Sample objects
# GROUP NAME TITLE XSEC EXTRA OPTIONS
Expand Down Expand Up @@ -148,8 +150,8 @@ def getsampleset(channel,era,**kwargs):

# STITCH
# Note: titles are set via STYLE.sample_titles
sampleset.stitch("W*LNu*", incl='WJ', name='WJ' ) # W + jets
sampleset.stitch("DYto2L-4Jets_MLL-50*", incl='DYJ', name="DY_M50" ) # Drell-Yan, M > 50 GeV
sampleset.stitch("W*LNu*", incl='WJ', name='WJ', cme=cme ) # W + jets
sampleset.stitch("DYto2L-4Jets_MLL-50*", incl='DYJ', name="DY_M50", cme=cme ) # Drell-Yan, M > 50 GeV

# JOIN
sampleset.join('DY', name='DY' ) # Drell-Yan, M < 50 GeV + M > 50 GeV
Expand Down
19 changes: 12 additions & 7 deletions Plotter/python/plot/CMSStyle.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,21 @@
drawLogo = False
outOfFrame = False
lumi_dict = {
'7': 5.1, '2016': 36.3, 'UL2016_preVFP': 19.5, # actually 19.5, update after reprocessing with new JSON
'8': 19.7, '2017': 41.5, 'UL2016_postVFP': 16.8, # actually 16.8, update after reprocessing with new JSON
'7': 5.1, '2016': 36.3, 'UL2016_preVFP': 19.5,
'8': 19.7, '2017': 41.5, 'UL2016_postVFP': 16.8,
'2012': 19.7, '2018': 59.7, 'UL2016': 36.3, # actually 19.5+16.8=36.3
'Run2': 138, 'UL2017': 41.5, # actually 41.5
'Phase2': 3000, 'UL2018': 59.8, # actually 59.8
'Run2': 138, 'UL2017': 41.5,
'Phase2': 3000, 'UL2018': 59.8,
'2022': 35.0842,
'2022_preEE': 8.077,
'2022_postEE': 27.0072,
}
cme_dict = {
'7': 7, '2016': 13,
'8': 8, '2017': 13,
'2012': 8, '2018': 13,
'Run2': 13, '2022': 13,
'Run3': 13.7, '2023': 13,
'Run2': 13, '2022': 13.6,
'Run3': 13.6, '2023': 13.6,
'Phase2': 14,
}
era_dict = {
Expand All @@ -73,6 +76,8 @@
'UL2016': "UL2016",
'UL2017': "UL2017",
'UL2018': "UL2018",
'2022_preEE': "2022 (preEE)",
'2022_postEE': "2022 (postEE)",
}


Expand Down Expand Up @@ -123,7 +128,7 @@ def setCMSEra(*eras,**kwargs):
if lumi:
if string:
string += ", "
string += "%s fb^{#minus1}"%(lumi)
string += ("%#.3g"%lumi).rstrip('.') + " fb^{#minus1}" # three significant digits
if cme:
string += " (%s TeV)"%(cme)
strings.append(string.strip())
Expand Down
6 changes: 3 additions & 3 deletions Plotter/python/sample/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
LOG = Logger('Sample')
era = None # data period: 2016, 2017, 2018, ...
lumi = -1 # integrated luminosity [fb-1]
cme = 13.6 # center-of-mass energy [TeV]
cme = 13 # center-of-mass energy [TeV]
xsecs_nlo = { # NLO cross sections to compute k-factor for stitching
'DYJetsToLL_M-50': 3*2025.74, # NNLO, FEWZ
'DYJetsToLL_M-10to50': 18610.0, # NLO, aMC@NLO
Expand Down Expand Up @@ -147,7 +147,7 @@ def setera(era_,lumi_=None,**kwargs):
lumi = CMSStyle.lumi_dict.get(year,None)
else:
kwargs['lumi'] = lumi
cme = kwargs.get('cme',13.6)
cme = kwargs.get('cme',13.)
CMSStyle.setCMSEra(era,**kwargs)
LOG.verb("setera: era = %r, lumi = %r/fb, cme = %r TeV"%(era,lumi,cme),kwargs,2)
if not lumi or lumi<0:
Expand Down Expand Up @@ -383,7 +383,7 @@ def stitch(samplelist,*searchterms,**kwargs):
name_incl = kwargs.get('incl', searchterms[0] ) # name of inclusive sample
xsec_incl = kwargs.get('xsec', None ) # (N)NLO cross section to compute k-factor
kfactor = kwargs.get('kfactor', None ) # k-factor
cme = kwargs.get('cme',13.6) # COM energy
cme = kwargs.get('cme',13) # COM energy

verbosity = 2
###### NanoAOD efficiencies -- currently hard-coded
Expand Down

0 comments on commit 47d4c0d

Please sign in to comment.