Skip to content

Commit f6e0fc4

Browse files
authored
Merge pull request #45419 from hqucms/xpog/update-nano-relval-matrix
Update nano relval matrix
2 parents f40626c + b6ce4d4 commit f6e0fc4

File tree

9 files changed

+381
-345
lines changed

9 files changed

+381
-345
lines changed

Configuration/Applications/python/ConfigBuilder.py

-14
Original file line numberDiff line numberDiff line change
@@ -1007,7 +1007,6 @@ def define_Configs(self):
10071007
self.RECOSIMDefaultCFF="Configuration/StandardSequences/RecoSim_cff"
10081008
self.PATDefaultCFF="Configuration/StandardSequences/PAT_cff"
10091009
self.NANODefaultCFF="PhysicsTools/NanoAOD/nano_cff"
1010-
self.NANOGENDefaultCFF="PhysicsTools/NanoAOD/nanogen_cff"
10111010
self.SKIMDefaultCFF="Configuration/StandardSequences/Skims_cff"
10121011
self.POSTRECODefaultCFF="Configuration/StandardSequences/PostRecoGenerator_cff"
10131012
self.VALIDATIONDefaultCFF="Configuration/StandardSequences/Validation_cff"
@@ -1057,7 +1056,6 @@ def define_Configs(self):
10571056
self.PATDefaultSeq='miniAOD'
10581057
self.PATGENDefaultSeq='miniGEN'
10591058
#TODO: Check based of file input
1060-
self.NANOGENDefaultSeq='nanogenSequence'
10611059
self.NANODefaultSeq='nanoSequence'
10621060
self.NANODefaultCustom='nanoAOD_customizeCommon'
10631061

@@ -1844,18 +1842,6 @@ def prepare_NANO(self, stepSpec = '' ):
18441842
self._options.customise_commands = self._options.customise_commands + " \n"
18451843
self._options.customise_commands = self._options.customise_commands + "process.unpackedPatTrigger.triggerResults= cms.InputTag( 'TriggerResults::"+self._options.hltProcess+"' )\n"
18461844

1847-
def prepare_NANOGEN(self, stepSpec = "nanoAOD"):
1848-
''' Enrich the schedule with NANOGEN '''
1849-
# TODO: Need to modify this based on the input file type
1850-
fromGen = any([x in self.stepMap for x in ['LHE', 'GEN', 'AOD']])
1851-
_,_nanogenSeq,_nanogenCff = self.loadDefaultOrSpecifiedCFF(stepSpec,self.NANOGENDefaultCFF)
1852-
self.scheduleSequence(_nanogenSeq,'nanoAOD_step')
1853-
custom = "customizeNanoGEN" if fromGen else "customizeNanoGENFromMini"
1854-
if self._options.runUnscheduled:
1855-
self._options.customisation_file_unsch.insert(0, '.'.join([_nanogenCff, custom]))
1856-
else:
1857-
self._options.customisation_file.insert(0, '.'.join([_nanogenCff, custom]))
1858-
18591845
def prepare_SKIM(self, stepSpec = "all"):
18601846
''' Enrich the schedule with skimming fragments'''
18611847
skimConfig,sequence,_ = self.loadDefaultOrSpecifiedCFF(stepSpec,self.SKIMDefaultCFF)

Configuration/PyReleaseValidation/python/relval_generator.py

-5
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,3 @@
3838
#workflows[543]=['',['Upsilon4sBaBarExample_BpBm_Dstarpipi_D0Kpi_nonres_forSTEAM_13TeV_TuneCUETP8M1','HARVESTGEN']]
3939
#workflows[544]=['',['LambdaBToLambdaMuMuToPPiMuMu_forSTEAM_13TeV_TuneCUETP8M1','HARVESTGEN']]
4040
workflows[545]=['',['BsToMuMu_forSTEAM_13TeV','HARVESTGEN']]
41-
42-
# Miscellaneous
43-
workflows[546]=['',['DYToLL_M-50_13TeV_pythia8','NANOGENFromGen']]
44-
workflows[547]=['',['DYToll01234Jets_5f_LO_MLM_Madgraph_LHE_13TeV','Hadronizer_TuneCP5_13TeV_MLM_5f_max4j_LHE_pythia8','NANOGENFromGen']]
45-
workflows[548]=['',['TTbar_Pow_LHE_13TeV','Hadronizer_TuneCP5_13TeV_powhegEmissionVeto2p_pythia8','NANOGENFromGen']]

Configuration/PyReleaseValidation/python/relval_nano.py

+325-270
Large diffs are not rendered by default.

Configuration/PyReleaseValidation/python/relval_steps.py

-5
Original file line numberDiff line numberDiff line change
@@ -4214,16 +4214,11 @@ def gen2023HiMix(fragment,howMuch):
42144214
steps['MINIAODMCUP18FS'] =merge([{'--filein':'file:step1.root','--fast':'','--conditions':'auto:phase1_2018_realistic','--era':'Run2_2018_FastSim'},stepMiniAODMC])
42154215

42164216
stepNanoAODDefaults = { '-s': 'NANO,DQM:@nanoAODDQM', '-n': 1000 }
4217-
stepNanoGenDefaults = { '-s': 'NANOGEN,DQM:@nanogenDQM', '-n': 1000 }
42184217
stepNanoAODData = merge([{ '--data':'', '--eventcontent' : 'NANOAOD,DQM' ,'--datatier': 'NANOAOD,DQMIO' }, stepNanoAODDefaults ])
42194218
stepNanoAODMC = merge([{ '--mc':'' , '--eventcontent' : 'NANOAODSIM,DQM','--datatier': 'NANOAODSIM,DQMIO' }, stepNanoAODDefaults ])
42204219
stepNanoEDMData = merge([{ '--data':'', '--eventcontent' : 'NANOEDMAOD,DQM' ,'--datatier': 'NANOAOD,DQMIO' }, stepNanoAODDefaults ])
42214220
stepNanoEDMMC = merge([{ '--mc':'' , '--eventcontent' : 'NANOEDMAODSIM,DQM','--datatier': 'NANOAODSIM,DQMIO' }, stepNanoAODDefaults ])
42224221
stepNanoEDMMCProd = merge([{ '--mc':'', '-s': 'NANO', '--eventcontent' : 'NANOEDMAODSIM','--datatier': 'NANOAODSIM' }, stepNanoAODDefaults ])
4223-
stepNanoGen = merge([{ '--mc':'' , '--eventcontent' : 'NANOAODGEN,DQM','--datatier': 'NANOAODSIM,DQMIO' }, stepNanoGenDefaults ])
4224-
4225-
steps['NANOGENFromGen'] = merge([{'--conditions': 'auto:run2_mc', '--customise' : 'PhysicsTools/NanoAOD/nanogen_cff.customizeNanoGEN'}, stepNanoGen ])
4226-
steps['NANOGENFromMini'] = merge([{'--conditions': 'auto:run2_mc'}, stepNanoGen ])
42274222

42284223
steps['NANOEDMMC2018_PROD'] = merge([{'--conditions': 'auto:phase1_2018_realistic', '--era': 'Run2_2018', '--filein':'file:step3_inMINIAODSIM.root'}, stepNanoEDMMCProd ])
42294224
steps['NANOUP15'] = merge([{ '--conditions':'auto:run2_mc', '--era':'Run2_2016','-n':'10', '--filein':'file:step3_inMINIAODSIM.root','--nThreads':'2'}, stepNanoEDMMCProd ])

Configuration/PyReleaseValidation/scripts/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ MC workflows for pp collisions:
327327
| 12834.7 | RelValTTbar_14TeV | phase1_2023_realistic | Run3_2024 | mkFit |
328328
| 14034.0 | RelValTTbar_14TeV | phase1_2023_realistic | Run3_2023_FastSim | *FastSim* |
329329
| 14234.0 | RelValTTbar_14TeV | phase1_2023_realistic | Run3_2023_FastSim | *FastSim* Run3_Flat55To75_PoissonOOTPU |
330-
| 2500.4 | RelValTTbar_14TeV | phase1_2022_realistic | Run3 | NanoAOD from existing MINI |
330+
| 2500.201 | RelValTTbar_14TeV | phase1_2022_realistic | Run3 | NanoAOD from existing MINI |
331331
| | | | | |
332332
| **Phase2** | | | | **Geometry** |
333333
| | | | | |

Configuration/PyReleaseValidation/scripts/runTheMatrix.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def runSelected(opt):
8787
12834.7, # RelValTTbar_14TeV 2024 mkFit
8888
14034.0, # RelValTTbar_14TeV Run3_2023_FastSim
8989
14234.0, # RelValTTbar_14TeV Run3_2023_FastSim PU = Run3_Flat55To75_PoissonOOTPU
90-
2500.4, # RelValTTbar_14TeV NanoAOD from existing MINI
90+
2500.201, # RelValTTbar_14TeV NanoAOD from existing MINI
9191

9292
# Phase2
9393
29634.0, # RelValTTbar_14TeV phase2_realistic_T33 Extended2026D110 (Phase-2 baseline)

PhysicsTools/NanoAOD/python/NanoAODEDMEventContent_cff.py

-9
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,3 @@
1919
compressionLevel = cms.untracked.int32(9),
2020
compressionAlgorithm = cms.untracked.string("LZMA"),
2121
)
22-
23-
NanoGenOutput = NanoAODEDMEventContent.outputCommands[:]
24-
NanoGenOutput.remove("keep edmTriggerResults_*_*_*")
25-
26-
NANOAODGENEventContent = cms.PSet(
27-
compressionLevel = cms.untracked.int32(9),
28-
compressionAlgorithm = cms.untracked.string("LZMA"),
29-
outputCommands = cms.untracked.vstring(NanoGenOutput)
30-
)
+49-40
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,76 @@
11
def expandNanoMapping(seqList, mapping, key):
2-
maxLevel=30
3-
level=0
4-
while '@' in repr(seqList) and level<maxLevel:
5-
level+=1
2+
maxLevel = 30
3+
level = 0
4+
while '@' in repr(seqList) and level < maxLevel:
5+
level += 1
66
for specifiedCommand in seqList:
77
if specifiedCommand.startswith('@'):
8-
location=specifiedCommand[1:]
8+
location = specifiedCommand[1:]
99
if not location in mapping:
10-
raise Exception("Impossible to map "+location+" from "+repr(mapping))
11-
mappedTo=mapping[location]
10+
raise Exception("Impossible to map " + location + " from " + repr(mapping))
11+
mappedTo = mapping[location]
1212
# no mapping for specified key
1313
# NOTE: mising key of key=None is interpreted differently than empty string:
1414
# - An empty string recalls the default for the given key
1515
# - None is interpreted as "ignore this"
16-
insertAt=seqList.index(specifiedCommand)
16+
insertAt = seqList.index(specifiedCommand)
1717
seqList.remove(specifiedCommand)
1818
if key in mappedTo and mappedTo[key] is not None:
19-
allToInsert=mappedTo[key].split('+')
20-
for offset,toInsert in enumerate(allToInsert):
21-
seqList.insert(insertAt+offset,toInsert)
22-
break;
23-
if level==maxLevel:
24-
raise Exception("Could not fully expand "+repr(seqList)+" from "+repr(mapping))
19+
allToInsert = mappedTo[key].split('+')
20+
for offset, toInsert in enumerate(allToInsert):
21+
seqList.insert(insertAt + offset, toInsert)
22+
break
23+
if level == maxLevel:
24+
raise Exception("Could not fully expand " + repr(seqList) + " from " + repr(mapping))
2525

2626

2727
autoNANO = {
2828
# PHYS is a mapping to the default NANO config, i.e. empty strings
2929
'PHYS': {'sequence': '',
3030
'customize': ''},
3131
# L1 flavours: add tables through customize, supposed to be combined with PHYS
32-
'L1' : {'customize': 'PhysicsTools/NanoAOD/l1trig_cff.nanoL1TrigObjCustomize'},
33-
'L1FULL' : {'customize': 'PhysicsTools/NanoAOD/l1trig_cff.nanoL1TrigObjCustomizeFull'},
34-
#scouting nano
35-
'Scout' : {'sequence': 'PhysicsTools/NanoAOD/custom_run3scouting_cff'},
36-
'JME' : { 'sequence': '@PHYS',
37-
'customize': '@PHYS+PhysicsTools/NanoAOD/custom_jme_cff.PrepJMECustomNanoAOD'},
38-
'JMErePuppi' : { 'sequence': '@PHYS',
39-
'customize': '@PHYS+@JME+PhysicsTools/NanoAOD/custom_jme_cff.RecomputePuppiWeightsAndMET'},
32+
'L1': {'customize': 'PhysicsTools/NanoAOD/l1trig_cff.nanoL1TrigObjCustomize'},
33+
'L1FULL': {'customize': 'PhysicsTools/NanoAOD/l1trig_cff.nanoL1TrigObjCustomizeFull'},
34+
# scouting nano
35+
'Scout': {'sequence': 'PhysicsTools/NanoAOD/custom_run3scouting_cff'},
36+
# JME nano
37+
'JME': {'sequence': '@PHYS',
38+
'customize': '@PHYS+PhysicsTools/NanoAOD/custom_jme_cff.PrepJMECustomNanoAOD'},
39+
'JMErePuppi': {'sequence': '@PHYS',
40+
'customize': '@PHYS+@JME+PhysicsTools/NanoAOD/custom_jme_cff.RecomputePuppiWeightsAndMET'},
4041
# L1 DPG (standalone with full calo TP info, L1T reemulation customization)
4142
'L1DPG' : {'sequence': 'DPGAnalysis/L1TNanoAOD/l1tNano_cff.l1tNanoSequence',
42-
'customize': 'PhysicsTools/NanoAOD/l1trig_cff.nanoL1TrigObjCustomizeFull,DPGAnalysis/L1TNanoAOD/l1tNano_cff.addCaloFull,L1Trigger/Configuration/customiseReEmul.L1TReEmulFromRAW'},
43+
'customize': ','.join(['PhysicsTools/NanoAOD/l1trig_cff.nanoL1TrigObjCustomizeFull',
44+
'DPGAnalysis/L1TNanoAOD/l1tNano_cff.addCaloFull',
45+
'L1Trigger/Configuration/customiseReEmul.L1TReEmulFromRAW'])},
4346
# Muon POG flavours : add tables through customize, supposed to be combined with PHYS
44-
'MUPOG' : {'sequence': '@PHYS',
45-
'customize' : '@PHYS+PhysicsTools/NanoAOD/custom_muon_cff.PrepMuonCustomNanoAOD'},
47+
'MUPOG': {'sequence': '@PHYS',
48+
'customize': '@PHYS+PhysicsTools/NanoAOD/custom_muon_cff.PrepMuonCustomNanoAOD'},
4649
# MUDPG flavours: use their own sequence
47-
'MUDPG' : {'sequence': 'DPGAnalysis/MuonTools/muNtupleProducer_cff.muDPGNanoProducer',
48-
'customize': 'DPGAnalysis/MuonTools/muNtupleProducer_cff.muDPGNanoCustomize'},
49-
'MUDPGBKG' : {'sequence': 'DPGAnalysis/MuonTools/muNtupleProducerBkg_cff.muDPGNanoProducerBkg',
50-
'customize': 'DPGAnalysis/MuonTools/muNtupleProducerBkg_cff.muDPGNanoBkgCustomize'},
51-
# HCAL favlours:
52-
'HCAL' : {'sequence': 'DPGAnalysis/HcalNanoAOD/hcalNano_cff.hcalNanoTask'},
53-
'HCALCalib' : { 'sequence': 'DPGAnalysis/HcalNanoAOD/hcalNano_cff.hcalNanoTask',
54-
'customize': 'DPGAnalysis/HcalNanoAOD/hcalNano_cff.customiseHcalCalib'},
55-
#EGM flavours: add variables through customize
56-
'EGM' : {'sequence': '@PHYS',
57-
'customize' : '@PHYS+PhysicsTools/NanoAOD/egamma_custom_cff.addExtraEGammaVarsCustomize'},
50+
'MUDPG': {'sequence': 'DPGAnalysis/MuonTools/muNtupleProducer_cff.muDPGNanoProducer',
51+
'customize': 'DPGAnalysis/MuonTools/muNtupleProducer_cff.muDPGNanoCustomize'},
52+
'MUDPGBKG': {'sequence': 'DPGAnalysis/MuonTools/muNtupleProducerBkg_cff.muDPGNanoProducerBkg',
53+
'customize': 'DPGAnalysis/MuonTools/muNtupleProducerBkg_cff.muDPGNanoBkgCustomize'},
54+
# HCAL flavors:
55+
'HCAL': {'sequence': 'DPGAnalysis/HcalNanoAOD/hcalNano_cff.hcalNanoTask'},
56+
'HCALCalib': {'sequence': 'DPGAnalysis/HcalNanoAOD/hcalNano_cff.hcalNanoTask',
57+
'customize': 'DPGAnalysis/HcalNanoAOD/hcalNano_cff.customiseHcalCalib'},
58+
# EGM flavours: add variables through customize
59+
'EGM': {'sequence': '@PHYS',
60+
'customize': '@PHYS+PhysicsTools/NanoAOD/egamma_custom_cff.addExtraEGammaVarsCustomize'},
5861
# PromptReco config: PHYS+L1
59-
'Prompt' : {'sequence': '@PHYS',
60-
'customize': '@PHYS+@L1'},
62+
'Prompt': {'sequence': '@PHYS',
63+
'customize': '@PHYS+@L1'},
6164
# Add lepton track parameters through customize combined with PHYS
6265
'LepTrackInfo' : {'sequence': '@PHYS',
6366
'customize': '@PHYS+PhysicsTools/NanoAOD/leptonTimeLifeInfo_common_cff.addTrackVarsToTimeLifeInfo'},
6467
# Custom BTV Nano for SF measurements or tagger training
65-
'BTV' : {'sequence': '@PHYS',
66-
'customize':'@PHYS+PhysicsTools/NanoAOD/custom_btv_cff.BTVCustomNanoAOD'}
68+
'BTV': {'sequence': '@PHYS',
69+
'customize': '@PHYS+PhysicsTools/NanoAOD/custom_btv_cff.BTVCustomNanoAOD'},
70+
# NANOGEN (from LHE/GEN/AOD)
71+
'GEN': {'sequence': 'PhysicsTools/NanoAOD/nanogen_cff.nanogenSequence',
72+
'customize': 'PhysicsTools/NanoAOD/nanogen_cff.customizeNanoGEN'},
73+
# NANOGEN (from MiniAOD)
74+
'GENFromMini': {'sequence': 'PhysicsTools/NanoAOD/nanogen_cff.nanogenSequence',
75+
'customize': 'PhysicsTools/NanoAOD/nanogen_cff.customizeNanoGENFromMini'},
6776
}

PhysicsTools/NanoAOD/python/nanogen_cff.py

+5
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ def nanoGenCommonCustomize(process):
5757
setGenPhiPrecision(process, CandVars.phi.precision)
5858
setGenMassPrecision(process, CandVars.mass.precision)
5959

60+
for output in ("NANOEDMAODSIMoutput", "NANOAODSIMoutput"):
61+
if hasattr(process, output):
62+
getattr(process, output).outputCommands.append("drop edmTriggerResults_*_*_*")
63+
6064
def customizeNanoGENFromMini(process):
6165
process.nanogenSequence.insert(0, process.genParticles2HepMCHiggsVtx)
6266
process.nanogenSequence.insert(0, process.genParticles2HepMC)
@@ -71,6 +75,7 @@ def customizeNanoGENFromMini(process):
7175
process.genParticleTable.src = "prunedGenParticles"
7276
process.patJetPartonsNano.particles = "prunedGenParticles"
7377
process.particleLevel.src = "genParticles2HepMC:unsmeared"
78+
process.genIso.genPart = "prunedGenParticles"
7479

7580
process.genJetTable.src = "slimmedGenJets"
7681
process.genJetAK8Table.src = "slimmedGenJetsAK8"

0 commit comments

Comments
 (0)