Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:18:29

0001 # Example of simple HLT filter selecting Stage2 L1 muons
0002 # Stage2: Unpackers + GT Emulator + HLT seeding + HLT filter
0003 #
0004 # V.Rekovic
0005 
0006 import FWCore.ParameterSet.Config as cms
0007 
0008 
0009 #from Configuration.Eras.Era_Run2_25ns_cff import Run2_25ns
0010 #process = cms.Process('L1SEQS',Run2_25ns)
0011 from Configuration.Eras.Era_Run2_2016_cff import Run2_2016
0012 process = cms.Process('HLT',Run2_2016)
0013 
0014 
0015 # import of standard configurations
0016 process.load('Configuration.StandardSequences.Services_cff')
0017 process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
0018 process.load('FWCore.MessageService.MessageLogger_cfi')
0019 process.load('Configuration.EventContent.EventContent_cff')
0020 process.load('SimGeneral.MixingModule.mixNoPU_cfi')
0021 process.load('Configuration.StandardSequences.GeometryRecoDB_cff')
0022 process.load('Configuration.StandardSequences.MagneticField_cff')
0023 process.load('Configuration.StandardSequences.Digi_cff')
0024 process.load('Configuration.StandardSequences.SimL1Emulator_cff')
0025 process.load('Configuration.StandardSequences.DigiToRaw_cff')
0026 process.load('Configuration.StandardSequences.EndOfProcess_cff')
0027 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0028 
0029 
0030 process.MessageLogger = cms.Service("MessageLogger",
0031     cerr = cms.untracked.PSet(
0032         enable = cms.untracked.bool(False)
0033     ),
0034     debugModules = cms.untracked.vstring(
0035         'hltL1sL1SingleMuBeamHalo', 
0036         'hltL1fL1SingleMuBeamHaloFiltered0'
0037     ),
0038     files = cms.untracked.PSet(
0039         critical = cms.untracked.PSet(
0040 
0041         ),
0042         detailedInfo = cms.untracked.PSet(
0043             threshold = cms.untracked.string('DEBUG')
0044         )
0045     )
0046 )
0047 
0048 #
0049 # LOCAL CONDITIONS NEEDED FOR RE-EMULATION OF GT
0050 #
0051 
0052 from L1Trigger.L1TGlobal.GlobalParameters_cff import *
0053 from L1Trigger.L1TGlobal.TriggerMenu_cff import *
0054 TriggerMenu.L1TriggerMenuFile = cms.string('L1Menu_Collisions2015_25nsStage1_v7_uGT.xml')
0055 
0056 
0057 # ####################################################
0058 # BEGIN L1T UNPACKER-EMULTATOR SEQUENCE FOR STAGE 2
0059 #
0060 
0061 process.hltGtStage2Digis = cms.EDProducer(
0062     "L1TRawToDigi",
0063     Setup           = cms.string("stage2::GTSetup"),
0064     FedIds          = cms.vint32( 1404 ),
0065 )
0066 
0067 process.hltCaloStage2Digis = cms.EDProducer(
0068     "L1TRawToDigi",
0069     Setup           = cms.string("stage2::CaloSetup"),
0070     FedIds          = cms.vint32( 1360, 1366 ),
0071 )
0072 
0073 process.hltGmtStage2Digis = cms.EDProducer(
0074     "L1TRawToDigi",
0075     Setup = cms.string("stage2::GMTSetup"),
0076     FedIds = cms.vint32(1402),
0077 )
0078 
0079 process.hltGtStage2ObjectMap = cms.EDProducer("L1TGlobalProducer",
0080     MuonInputTag = cms.InputTag("hltGmtStage2Digis","Muon"),
0081     ExtInputTag = cms.InputTag("hltGtStage2Digis"), # (external conditions are not emulated, use unpacked)
0082     EtSumInputTag = cms.InputTag("hltCaloStage2Digis", "EtSum"),
0083     EGammaInputTag = cms.InputTag("hltCaloStage2Digis", "EGamma"),
0084     TauInputTag = cms.InputTag("hltCaloStage2Digis", "Tau"),
0085     JetInputTag = cms.InputTag("hltCaloStage2Digis", "Jet"),
0086     AlgorithmTriggersUnprescaled = cms.bool(True),
0087     AlgorithmTriggersUnmasked = cms.bool(True),
0088 )
0089 
0090 process.HLTL1UnpackerSequence = cms.Sequence(
0091  process.hltGtStage2Digis +
0092  process.hltCaloStage2Digis +
0093  process.hltGmtStage2Digis +
0094  process.hltGtStage2ObjectMap)
0095 
0096 #
0097 # END L1T UNPACKER-EMULATOR SEQUENCE FOR STAGE 2
0098 # ####################################################
0099 
0100 
0101 # ####################################################
0102 # BEGIN HLT SEED SEQUENCE FOR STAGE 2
0103 #
0104 process.hltL1sL1SingleMuBeamHalo = cms.EDFilter( "HLTL1TSeed",
0105     L1SeedsLogicalExpression = cms.string( "L1_SingleMuBeamHalo" ),
0106     L1ObjectMapInputTag  = cms.InputTag("hltGtStage2ObjectMap"),
0107     L1GlobalInputTag     = cms.InputTag("hltGtStage2Digis"),
0108     L1MuonInputTag       = cms.InputTag("hltGmtStage2Digis","Muon"),
0109     L1EGammaInputTag     = cms.InputTag("hltCaloStage2Digis","EGamma"),
0110     L1JetInputTag        = cms.InputTag("hltCaloStage2Digis","Jet"),
0111     L1TauInputTag        = cms.InputTag("hltCaloStage2Digis","Tau"),
0112     L1EtSumInputTag      = cms.InputTag("hltCaloStage2Digis","EtSum"),
0113 )
0114 
0115 process.hltL1fL1SingleMuBeamHaloFiltered0 = cms.EDFilter( 'HLTMuonL1TFilter',
0116     PreviousCandTag   =cms.InputTag('hltL1sL1SingleMuBeamHalo'),
0117     MinPt = cms.double(0.0),
0118     MinN = cms.int32( 1 ),
0119     MaxEta = cms.double(2.5),
0120     CandTag   =cms.InputTag("hltGmtStage2Digis","Muon"),
0121 )
0122 
0123 process.HLT_Muon_0  = cms.Sequence( process.hltL1sL1SingleMuBeamHalo + process.hltL1fL1SingleMuBeamHaloFiltered0 )
0124 
0125 #process.hltTriggerSummaryAOD = cms.EDProducer( "TriggerSummaryProducerAOD",
0126     #processName = cms.string( "@" )
0127 #)
0128 process.hltTriggerSummaryRAW = cms.EDProducer( "TriggerSummaryProducerRAW",
0129     processName = cms.string( "@" )
0130 )
0131 process.HLTTesting  = cms.Sequence(
0132     process.HLT_Muon_0 +
0133     process.hltTriggerSummaryRAW
0134 )
0135 #
0136 # END HLT SEED SEQUENCE FOR STAGE 2
0137 # ####################################################
0138 
0139 # temp for testing
0140 #process.simGtStage2Digis.PrescaleSet = cms.uint32(4)
0141 #process.simGtStage2Digis.AlgorithmTriggersUnprescaled = cms.bool(False)
0142 
0143 
0144 process.maxEvents = cms.untracked.PSet(
0145     input = cms.untracked.int32(100)
0146 )
0147 
0148 # Input source
0149 process.source = cms.Source("PoolSource",
0150     dropDescendantsOfDroppedBranches = cms.untracked.bool(False),
0151 #     fileNames = cms.untracked.vstring('file:/afs/cern.ch/work/g/gflouris/public/SingleMuPt6180_noanti_10k_eta1.root'),
0152     fileNames = cms.untracked.vstring('/store/relval/CMSSW_7_6_0_pre7/RelValTTbar_13/GEN-SIM/76X_mcRun2_asymptotic_v9_realBS-v1/00000/0A812333-427C-E511-A80A-0025905964A2.root',
0153         '/store/relval/CMSSW_7_6_0_pre7/RelValTTbar_13/GEN-SIM/76X_mcRun2_asymptotic_v9_realBS-v1/00000/1E9D9F9B-467C-E511-85B6-0025905A6090.root',
0154         '/store/relval/CMSSW_7_6_0_pre7/RelValTTbar_13/GEN-SIM/76X_mcRun2_asymptotic_v9_realBS-v1/00000/AA4FBC07-3E7C-E511-B9FC-00261894386C.root',
0155         '/store/relval/CMSSW_7_6_0_pre7/RelValTTbar_13/GEN-SIM/76X_mcRun2_asymptotic_v9_realBS-v1/00000/E2072991-3E7C-E511-803D-002618943947.root',
0156         '/store/relval/CMSSW_7_6_0_pre7/RelValTTbar_13/GEN-SIM/76X_mcRun2_asymptotic_v9_realBS-v1/00000/FAE20D9D-467C-E511-AF39-0025905B85D8.root'),
0157     inputCommands = cms.untracked.vstring('keep *',
0158         'drop *_genParticles_*_*',
0159         'drop *_genParticlesForJets_*_*',
0160         'drop *_kt4GenJets_*_*',
0161         'drop *_kt6GenJets_*_*',
0162         'drop *_iterativeCone5GenJets_*_*',
0163         'drop *_ak4GenJets_*_*',
0164         'drop *_ak7GenJets_*_*',
0165         'drop *_ak8GenJets_*_*',
0166         'drop *_ak4GenJetsNoNu_*_*',
0167         'drop *_ak8GenJetsNoNu_*_*',
0168         'drop *_genCandidatesForMET_*_*',
0169         'drop *_genParticlesForMETAllVisible_*_*',
0170         'drop *_genMetCalo_*_*',
0171         'drop *_genMetCaloAndNonPrompt_*_*',
0172         'drop *_genMetTrue_*_*',
0173         'drop *_genMetIC5GenJs_*_*'),
0174     secondaryFileNames = cms.untracked.vstring()
0175 )
0176 
0177 process.options = cms.untracked.PSet(
0178 
0179 )
0180 
0181 # Production Info
0182 process.configurationMetadata = cms.untracked.PSet(
0183     annotation = cms.untracked.string('debug nevts:10'),
0184     name = cms.untracked.string('Applications'),
0185     version = cms.untracked.string('$Revision: 1.19 $')
0186 )
0187 
0188 # Output definition
0189 
0190 process.FEVTDEBUGHLToutput = cms.OutputModule("PoolOutputModule",
0191     dataset = cms.untracked.PSet(
0192         dataTier = cms.untracked.string('GEN-SIM-DIGI-RAW-HLTDEBUG'),
0193         filterName = cms.untracked.string('')
0194     ),
0195     eventAutoFlushCompressedSize = cms.untracked.int32(1048576),
0196     fileName = cms.untracked.string('file:step2.root'),
0197     outputCommands = process.FEVTDEBUGHLTEventContent.outputCommands,
0198     splitLevel = cms.untracked.int32(0)
0199 )
0200 
0201 # Additional output definition
0202 
0203 # Other statements
0204 process.mix.digitizers = cms.PSet(process.theDigitizersValid)
0205 from Configuration.AlCa.GlobalTag import GlobalTag
0206 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run2_mc', '')
0207 
0208 # Path and EndPath definitions
0209 process.digitisation_step = cms.Path(process.pdigi_valid)
0210 process.L1simulation_step = cms.Path(process.SimL1Emulator)
0211 process.digi2raw_step = cms.Path(process.DigiToRaw)
0212 process.hlt_step = cms.Path(process.HLTL1UnpackerSequence)
0213 process.hlt_step2 = cms.Path(process.HLTTesting)
0214 process.endjob_step = cms.EndPath(process.endOfProcess)
0215 process.FEVTDEBUGHLToutput_step = cms.EndPath(process.FEVTDEBUGHLToutput)
0216 
0217 # additional tests:
0218 process.dumpED = cms.EDAnalyzer("EventContentAnalyzer")
0219 process.dumpES = cms.EDAnalyzer("PrintEventSetupContent")
0220 process.load('L1Trigger.L1TCommon.l1tSummaryStage2SimDigis_cfi')
0221 process.load('L1Trigger.L1TCommon.l1tSummaryStage2HltDigis_cfi')
0222 
0223 process.debug_step = cms.Path(
0224     process.dumpES +
0225     process.dumpED +
0226     process.l1tSummaryStage2SimDigis +
0227     process.l1tSummaryStage2HltDigis
0228 )
0229 
0230 # Schedule definition
0231 process.schedule = cms.Schedule(process.digitisation_step,process.L1simulation_step,process.digi2raw_step,process.hlt_step,process.hlt_step2,process.debug_step,process.endjob_step,process.FEVTDEBUGHLToutput_step)