CMS 3D CMS Logo

custom_run3scouting_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
3 from PhysicsTools.NanoAOD.globals_cff import puTable
4 from PhysicsTools.NanoAOD.triggerObjects_cff import unpackedPatTrigger, triggerObjectTable, l1bits
6 from EventFilter.L1TRawToDigi.gtStage2Digis_cfi import gtStage2Digis
10 
11 # common tasks
12 particleTask = cms.Task(scoutingPFCands)
13 particleTableTask = cms.Task(particleScoutingTable)
14 ak4JetTableTask = cms.Task(ak4ScoutingJets,ak4ScoutingJetParticleNetJetTagInfos,ak4ScoutingJetParticleNetJetTags,ak4ScoutingJetTable)
15 ak8JetTableTask = cms.Task(ak8ScoutingJets,ak8ScoutingJetsSoftDrop,ak8ScoutingJetsSoftDropMass,ak8ScoutingJetEcfNbeta1,ak8ScoutingJetNjettiness,ak8ScoutingJetParticleNetJetTagInfos,ak8ScoutingJetParticleNetJetTags,ak8ScoutingJetParticleNetMassRegressionJetTags,ak8ScoutingJetTable)
16 
17 
18 gtStage2DigisScouting = gtStage2Digis.clone(InputLabel="hltFEDSelectorL1")
19 l1bitsScouting = l1bits.clone(src="gtStage2DigisScouting")
20 patTriggerScouting = patTrigger.clone(l1tAlgBlkInputTag="gtStage2DigisScouting",l1tExtBlkInputTag="gtStage2DigisScouting")
21 
22 
24 l1MuScoutingTable = l1MuTable.clone(src=cms.InputTag("gtStage2DigisScouting","Muon"))
25 l1JetScoutingTable = l1JetTable.clone(src=cms.InputTag("gtStage2DigisScouting","Jet"))
26 l1EGScoutingTable = l1EGTable.clone(src=cms.InputTag("gtStage2DigisScouting","EGamma"))
27 l1TauScoutingTable = l1TauTable.clone(src=cms.InputTag("gtStage2DigisScouting","Tau"))
28 l1EtSumScoutingTable = l1EtSumTable.clone(src=cms.InputTag("gtStage2DigisScouting","EtSum"))
29 
30 #reduce the variables to the core variables as only these are available in gtStage2Digis
31 l1EGScoutingTable.variables = cms.PSet(l1EGReducedVars)
32 l1MuScoutingTable.variables = cms.PSet(l1MuonReducedVars)
33 l1JetScoutingTable.variables = cms.PSet(l1JetReducedVars)
34 l1TauScoutingTable.variables = cms.PSet(l1TauReducedVars)
35 l1EtSumScoutingTable.variables = cms.PSet(l1EtSumReducedVars)
36 
37 selectedPatTriggerScouting = selectedPatTrigger.clone(src="patTriggerScouting")
38 slimmedPatTriggerScouting = slimmedPatTrigger.clone(src="selectedPatTriggerScouting")
39 unpackedPatTriggerScouting = unpackedPatTrigger.clone(patTriggerObjectsStandAlone="slimmedPatTriggerScouting")
40 triggerObjectTableScouting = triggerObjectTable.clone(src="unpackedPatTriggerScouting")
41 
42 triggerTask = cms.Task(
43  gtStage2DigisScouting, l1MuScoutingTable, l1EGScoutingTable, l1TauScoutingTable, l1JetScoutingTable, l1EtSumScoutingTable,
44  unpackedPatTriggerScouting,triggerObjectTableScouting,l1bitsScouting
45 )
46 triggerSequence = cms.Sequence(L1TRawToDigi+patTriggerScouting+selectedPatTriggerScouting+slimmedPatTriggerScouting+cms.Sequence(triggerTask))
47 
48 # MC tasks
49 genJetTask = cms.Task(ak4ScoutingJetMatchGen,ak4ScoutingJetExtTable,ak8ScoutingJetMatchGen,ak8ScoutingJetExtTable)
50 puTask = cms.Task(puTable)
51 
52 nanoTableTaskCommon = cms.Task(photonScoutingTable,muonScoutingTable,electronScoutingTable,trackScoutingTable,primaryvertexScoutingTable,displacedvertexScoutingTable,rhoScoutingTable,metScoutingTable,particleTask,particleTableTask,ak4JetTableTask,ak8JetTableTask)
53 
54 nanoSequenceCommon = cms.Sequence(triggerSequence,nanoTableTaskCommon)
55 
56 nanoSequence = cms.Sequence(nanoSequenceCommon)
57 
58 nanoSequenceMC = cms.Sequence(nanoSequenceCommon + cms.Sequence(cms.Task(genJetTask,puTask)))
59 
61  return process
L1 objects.