Skip to content

Commit

Permalink
Merge pull request #44391 from vlimant/l1nano_include
Browse files Browse the repository at this point in the history
l1nano import location
  • Loading branch information
cmsbuild authored Apr 2, 2024
2 parents a471799 + 310cc3e commit 5a1a2f7
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 20 deletions.
8 changes: 4 additions & 4 deletions Configuration/DataProcessing/python/Reco.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ def promptReco(self, globalTag, **args):
if a['dataTier'] == 'MINIAOD':
miniAODStep = ',PAT'
if a['dataTier'] in ['NANOAOD', 'NANOEDMAOD']:
nanoAODStep = ',NANO'
if "nanoFlavours" in args:
nanoAODStep += nanoFlavours(args['nanoFlavours'])
args['customs'].append('PhysicsTools/NanoAOD/nano_cff.nanoL1TrigObjCustomize')

nanoAODStep = ',NANO'+nanoFlavours(args['nanoFlavours'])
else:
nanoAODStep = ',NANO:@PHYS+@L1'

self._checkRepackedFlag(options, **args)

if 'customs' in args:
Expand Down
7 changes: 4 additions & 3 deletions Configuration/PyReleaseValidation/python/relval_nano.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,9 @@ def subnext(self):
steps['NANO_data12.4']=merge([{'--era':'Run3,run3_nanoAOD_124',
'--conditions':'auto:run3_data'},
_NANO_data])
steps['NANO_data12.4_prompt']=merge([{'--customise' : 'PhysicsTools/NanoAOD/nano_cff.nanoL1TrigObjCustomize', '-n' : '1000'},
steps['NANO_data12.4_prompt']=merge([{'-n' : '1000'},
steps['NANO_data12.4']])
steps['NANO_data12.4_prompt']['-s']=steps['NANO_data12.4_prompt']['-s'].replace('NANO','NANO:@PHYS+@L1')

###13.0 workflows
steps['TTBarMINIAOD13.0'] = {'INPUT':InputInfo(location='STD',
Expand All @@ -152,8 +153,9 @@ def subnext(self):
'--conditions':'auto:run3_data'},
_NANO_data])

steps['NANO_data13.0_prompt']=merge([{'--customise' : 'PhysicsTools/NanoAOD/nano_cff.nanoL1TrigObjCustomize', '-n' : '1000'},
steps['NANO_data13.0_prompt']=merge([{'-n' : '1000'},
steps['NANO_data13.0']])
steps['NANO_data13.0_prompt']['-s']=steps['NANO_data13.0_prompt']['-s'].replace('NANO','NANO:@PHYS+@L1')


steps['muDPGNANO_data13.0']=merge([{'-s' : 'RAW2DIGI,NANO:@MUDPG',
Expand Down Expand Up @@ -213,7 +215,6 @@ def subnext(self):
steps['jmeNANO_mc13.2']=merge([{'-s' : 'NANO:@JME ', '-n' : '1000'},
steps['NANO_mc13.2']])



##13.X INPUT
steps['ScoutingPFRun32022DRAW13.X']={'INPUT':InputInfo(dataSet='/ScoutingPFRun3/Run2022D-v1/RAW',label='2022D',events=100000,location='STD', ls=Run2022D)}
Expand Down
4 changes: 2 additions & 2 deletions PhysicsTools/NanoAOD/python/autoNANO.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ def expandNanoMapping(seqList, mapping, key):
'PHYS': {'sequence': '',
'customize': ''},
# L1 flavours: add tables through customize, supposed to be combined with PHYS
'L1' : {'customize': 'nanoL1TrigObjCustomize'},
'L1FULL' : {'customize': 'nanoL1TrigObjCustomizeFull'},
'L1' : {'customize': 'PhysicsTools/NanoAOD/l1trig_cff.nanoL1TrigObjCustomize'},
'L1FULL' : {'customize': 'PhysicsTools/NanoAOD/l1trig_cff.nanoL1TrigObjCustomizeFull'},
#scouting nano
'Scout' : {'sequence': 'PhysicsTools/NanoAOD/custom_run3scouting_cff'},
'JME' : { 'sequence': '@PHYS',
Expand Down
15 changes: 13 additions & 2 deletions PhysicsTools/NanoAOD/python/l1trig_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,23 @@ def setL1NanoToReduced(process):
process.l1JetTable.variables = cms.PSet(l1JetReducedVars)
process.l1TauTable.variables = cms.PSet(l1TauReducedVars)
process.l1EtSumTable.variables = cms.PSet(l1EtSumReducedVars)

#apply cuts
process.l1EGTable.cut="pt>=10"
process.l1TauTable.cut="pt>=24"
process.l1JetTable.cut="pt>=30"
process.l1MuTable.cut="pt>=3 && hwQual>=8"
process.l1EtSumTable.cut="(getType==8 || getType==1 || getType==2 || getType==3)"


return process

def nanoL1TrigObjCustomize(process):
process.load("PhysicsTools.NanoAOD.l1trig_cff")
process.nanoTableTaskCommon.add(process.l1TablesTask)
process = setL1NanoToReduced(process)
return process

def nanoL1TrigObjCustomizeFull(process):
process.load("PhysicsTools.NanoAOD.l1trig_cff")
process.nanoTableTaskCommon.add(process.l1TablesTask)
return process
9 changes: 0 additions & 9 deletions PhysicsTools/NanoAOD/python/nano_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
from PhysicsTools.NanoAOD.NanoAODEDMEventContent_cff import *
from PhysicsTools.NanoAOD.fsrPhotons_cff import *
from PhysicsTools.NanoAOD.softActivity_cff import *
from PhysicsTools.NanoAOD.l1trig_cff import *

nanoMetadata = cms.EDProducer("UniqueStringProducer",
strings = cms.PSet(
Expand Down Expand Up @@ -278,11 +277,3 @@ def nanoWmassGenCustomize(process):
process.genParticleTable.variables.eta.precision=cms.string(etaPrecision)
return process

def nanoL1TrigObjCustomize(process):
process.nanoTableTaskCommon.add(process.l1TablesTask)
process = setL1NanoToReduced(process)
return process

def nanoL1TrigObjCustomizeFull(process):
process.nanoTableTaskCommon.add(process.l1TablesTask)
return process

0 comments on commit 5a1a2f7

Please sign in to comment.