Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding JME nano in autoNano #44087

Merged
merged 10 commits into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Configuration/Applications/python/ConfigBuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -1813,7 +1813,7 @@ def prepare_NANO(self, stepSpec = '' ):
_nanoCustoms = [cust if cust!='' else self.NANODefaultCustom for cust in _nanoCustoms]
# build and inject the sequence
if len(_nanoSeq) < 1 and '@' in stepSpec:
raise Exception(f'The specified mapping: {stepSpec} generates an empty NANO sequence. Please provide a valid mappign')
raise Exception(f'The specified mapping: {stepSpec} generates an empty NANO sequence. Please provide a valid mapping')
_seqToSchedule = []
for _subSeq in _nanoSeq:
if '.' in _subSeq:
Expand Down
13 changes: 11 additions & 2 deletions Configuration/PyReleaseValidation/python/relval_nano.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,10 @@ def subnext(self):
steps['EGMNano_mc13.0'] = merge([{'-s':'NANO:@EGM,DQM:@nanoAODDQM', '-n' : '1000'},
steps['NANO_mc13.0']])


steps['jmeNano_data13.0'] = merge([{'-s':'NANO:@JME', '-n' : '1000'},
steps['NANO_data13.0']])

steps['lepTimeLifeNANO_data13.0']=merge([{'-s' : 'NANO:@LepTimeLife,DQM:@nanoAODDQM',
'-n' : '1000'},
steps['NANO_data13.0']])
Expand All @@ -196,6 +200,9 @@ def subnext(self):
steps['EGMNano_mc13.2'] = merge([{'-s':'NANO:@EGM,DQM:@nanoAODDQM', '-n' : '1000'},
steps['NANO_mc13.2']])

steps['jmeNANO_mc13.2']=merge([{'-s' : 'NANO:@JME ', '-n' : '1000'},
steps['NANO_mc13.2']])

steps['lepTimeLifeNANO_mc13.2']=merge([{'-s' : 'NANO:@LepTimeLife,DQM:@nanoAODDQM',
'-n' : '1000'},
steps['NANO_mc13.2']])
Expand Down Expand Up @@ -257,16 +264,18 @@ def subnext(self):
workflows[_wfn()] = ['NANOdata130Xrun3', ['MuonEG2023MINIAOD13.0', 'NANO_data13.0_prompt', 'HRV_NANO_data']]
workflows[_wfn()] = ['muDPGNANO130Xrun3', ['ZMuSkim2023DRAWRECO13.0', 'muDPGNANO_data13.0']]
workflows[_wfn()] = ['muDPGNANOBkg130Xrun3', ['ZeroBias2023DRAW13.0', 'muDPGNANOBkg_data13.0']]
workflows[_wfn()] = ['muPOGNANO_data13.0', ['MuonEG2023MINIAOD13.0', 'muPOGNANO_data13.0']]
workflows[_wfn()] = ['muPOGNANO130Xrun3', ['MuonEG2023MINIAOD13.0', 'muPOGNANO_data13.0']]
workflows[_wfn()] = ['EGMNANOdata130Xrun3', ['MuonEG2023MINIAOD13.0', 'EGMNano_data13.0']]
workflows[_wfn()] = ['jmeNANOdata130Xrun3', ['MuonEG2023MINIAOD13.0', 'jmeNano_data13.0']]
workflows[_wfn()] = ['lepTimeLifeNANO_data13.0', ['MuonEG2023MINIAOD13.0', 'lepTimeLifeNANO_data13.0']]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mbluj : can you please create a set of PR to follow the NANOdata130Xrun3 and NANOmc132X suffix syntax ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, but let me understand better: do you want me to add "lepTimeLifeNANO" test workflows to NANOdata130Xrun3 and NANOmc132X workflow chains? Or you mean something else?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lepTimeLifeNANO_data13.0 --> lepTimeLifeNANOdata130Xrun3, etc

vlimant marked this conversation as resolved.
Show resolved Hide resolved

_wfn.next()
################
#13.2 workflows
workflows[_wfn()] = ['NANOmc132X', ['TTBarMINIAOD13.2', 'NANO_mc13.2', 'HRV_NANO_mc']]
workflows[_wfn()] = ['muPOGNANO_mc13.2', ['TTBarMINIAOD13.2', 'muPOGNANO_mc13.2']]
workflows[_wfn()] = ['muPOGNANOmc132X', ['TTBarMINIAOD13.2', 'muPOGNANO_mc13.2']]
workflows[_wfn()] = ['EGMNANOmc132X', ['TTBarMINIAOD13.2', 'EGMNano_mc13.2']]
workflows[_wfn()] = ['jmeNANOmc132X', ['TTBarMINIAOD13.2', 'jmeNANO_mc13.2']]
workflows[_wfn()] = ['lepTimeLifeNANO_mc13.2', ['TTBarMINIAOD13.2', 'lepTimeLifeNANO_mc13.2']]
vlimant marked this conversation as resolved.
Show resolved Hide resolved

_wfn.next()
Expand Down
2 changes: 2 additions & 0 deletions PhysicsTools/NanoAOD/python/autoNANO.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ def expandNanoMapping(seqList, mapping, key):
# L1 flavours: add tables through customize, supposed to be combined with PHYS
'L1' : {'customize': 'nanoL1TrigObjCustomize'},
'L1FULL' : {'customize': 'nanoL1TrigObjCustomizeFull'},
'JME' : { 'sequence': '@PHYS',
'customize': '@PHYS+PhysicsTools/NanoAOD/custom_jme_cff.PrepJMECustomNanoAOD'},
# Muon POG flavours : add tables through customize, supposed to be combined with PHYS
'MUPOG' : {'customize' : 'PhysicsTools/NanoAOD/custom_muon_cff.PrepMuonCustomNanoAOD'},
# MUDPG flavours: use their own sequence
Expand Down
16 changes: 5 additions & 11 deletions PhysicsTools/NanoAOD/python/custom_jme_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -1232,8 +1232,11 @@ def RemoveAllJetPtCuts(proc):
# CUSTOMIZATION function
#
#===========================================================================
def PrepJMECustomNanoAOD(process,runOnMC):

def PrepJMECustomNanoAOD(process):
## TODO : find a better way to handle data or MC by modifying the proper Tasks
runOnMC=True
if hasattr(process,"NANOEDMAODoutput") or hasattr(process,"NANOAODoutput"):
runOnMC = False
############################################################################
# Remove all default jet pt cuts from jets_cff.py
############################################################################
Expand Down Expand Up @@ -1343,12 +1346,3 @@ def addAK4JetTasks(proc, addAK4CHSJetTasks, addAK4PuppiJetTasks):
process.genWeightsTable.keepAllPSWeights = True

return process

def PrepJMECustomNanoAOD_MC(process):
process = PrepJMECustomNanoAOD(process,runOnMC=True)

return process

def PrepJMECustomNanoAOD_Data(process):
process = PrepJMECustomNanoAOD(process,runOnMC=False)
return process