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 ak4JetTableTask = cms.Task(ak4ScoutingJets,ak4ScoutingJetParticleNetJetTagInfos,ak4ScoutingJetParticleNetJetTags,ak4ScoutingJetTable)
14 ak8JetTableTask = cms.Task(ak8ScoutingJets,ak8ScoutingJetsSoftDrop,ak8ScoutingJetsSoftDropMass,ak8ScoutingJetEcfNbeta1,ak8ScoutingJetNjettiness,ak8ScoutingJetParticleNetJetTagInfos,ak8ScoutingJetParticleNetJetTags,ak8ScoutingJetParticleNetMassRegressionJetTags,ak8ScoutingJetTable)
15 
16 muonScoutingTableTask = cms.Task(muonScoutingTable)
17 displacedvertexScoutingTableTask = cms.Task(displacedvertexScoutingTable)
18 
19 # from 2024, there are two scouting muon collections
20 from Configuration.Eras.Modifier_run3_scouting_nanoAOD_post2023_cff import run3_scouting_nanoAOD_post2023
21 run3_scouting_nanoAOD_post2023.toReplaceWith(muonScoutingTableTask, cms.Task(muonVtxScoutingTable, muonNoVtxScoutingTable))\
22  .toReplaceWith(displacedvertexScoutingTableTask, cms.Task(displacedvertexVtxScoutingTable, displacedvertexNoVtxScoutingTable))
23 
24 
25 gtStage2DigisScouting = gtStage2Digis.clone(InputLabel="hltFEDSelectorL1")
26 l1bitsScouting = l1bits.clone(src="gtStage2DigisScouting")
27 
28 
30 l1MuScoutingTable = l1MuTable.clone(src=cms.InputTag("gtStage2DigisScouting","Muon"))
31 l1JetScoutingTable = l1JetTable.clone(src=cms.InputTag("gtStage2DigisScouting","Jet"))
32 l1EGScoutingTable = l1EGTable.clone(src=cms.InputTag("gtStage2DigisScouting","EGamma"))
33 l1TauScoutingTable = l1TauTable.clone(src=cms.InputTag("gtStage2DigisScouting","Tau"))
34 l1EtSumScoutingTable = l1EtSumTable.clone(src=cms.InputTag("gtStage2DigisScouting","EtSum"))
35 
36 #reduce the variables to the core variables as only these are available in gtStage2Digis
37 l1EGScoutingTable.variables = cms.PSet(l1EGReducedVars)
38 l1MuScoutingTable.variables = cms.PSet(l1MuonReducedVars)
39 l1JetScoutingTable.variables = cms.PSet(l1JetReducedVars)
40 l1TauScoutingTable.variables = cms.PSet(l1TauReducedVars)
41 l1EtSumScoutingTable.variables = cms.PSet(l1EtSumReducedVars)
42 
43 triggerTask = cms.Task(
44  gtStage2DigisScouting, l1bitsScouting,
45  l1MuScoutingTable, l1EGScoutingTable, l1TauScoutingTable, l1JetScoutingTable, l1EtSumScoutingTable,
46 )
47 triggerSequence = cms.Sequence(L1TRawToDigi+cms.Sequence(triggerTask))
48 
49 # MC tasks
50 genJetTask = cms.Task(ak4ScoutingJetMatchGen,ak4ScoutingJetExtTable,ak8ScoutingJetMatchGen,ak8ScoutingJetExtTable)
51 puTask = cms.Task(puTable)
52 
53 nanoTableTaskCommon = cms.Task(photonScoutingTable,muonScoutingTableTask,electronScoutingTable,primaryvertexScoutingTable,displacedvertexScoutingTableTask,jetScoutingTable,rhoScoutingTable,metScoutingTable,particleTask,ak4JetTableTask,ak8JetTableTask)
54 
55 nanoSequenceCommon = cms.Sequence(triggerSequence,nanoTableTaskCommon)
56 
57 nanoSequence = cms.Sequence(nanoSequenceCommon)
58 
59 nanoSequenceMC = cms.Sequence(nanoSequenceCommon + cms.Sequence(cms.Task(genJetTask,puTask)))
60 
62  return process
L1 objects.