Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:31:44

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 process = cms.Process("TestL1MatcherExtended")
0004 
0005 process.load("FWCore.MessageService.MessageLogger_cfi")
0006 process.load('Configuration.StandardSequences.Services_cff')
0007 process.load('Configuration.StandardSequences.Geometry_cff')
0008 process.load('Configuration.StandardSequences.MagneticField_cff')
0009 process.load("Configuration.StandardSequences.RawToDigi_Data_cff")
0010 process.load("Configuration.StandardSequences.Reconstruction_cff")
0011 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0012 process.GlobalTag.globaltag = 'GR_R_36X_V12::All'
0013 
0014 process.MessageLogger.cerr.FwkReport.reportEvery = 100 
0015 process.options   = cms.untracked.PSet( wantSummary = cms.untracked.bool(True) )
0016 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) )
0017 
0018 process.source = cms.Source("PoolSource", 
0019      fileNames = cms.untracked.vstring(
0020         'root://pcmssd12.cern.ch//data/gpetrucc/7TeV/jpsi/CS_Onia-Jun14thSkim_v1_RAW-RECO_run136082_443584C2-B27E-DF11-9E13-0017A477001C.root'
0021     )
0022 )
0023 
0024 process.load("MuonAnalysis.MuonAssociators.muonL1MatchExtended_cfi")
0025 import PhysicsTools.PatAlgos.producersLayer1.muonProducer_cfi
0026 process.patMuons = PhysicsTools.PatAlgos.producersLayer1.muonProducer_cfi.patMuons.clone(
0027     muonSource = 'muons',
0028     embedTrack          = True,
0029     embedCombinedMuon   = True,
0030     embedStandAloneMuon = True,
0031     embedPickyMuon = False,
0032     embedTpfmsMuon = False, 
0033     userIsolation = cms.PSet(), # no extra isolation
0034     isoDeposits = cms.PSet(),   # no isodeposits
0035     addGenMatch = False,        # no mc
0036 )
0037 
0038 from MuonAnalysis.MuonAssociators.muonL1MatchExtended_cfi import addUserData as addMuonL1MatchExtended
0039 addMuonL1MatchExtended(process.patMuons)
0040 
0041 ## Good Muons (very simplified selection)
0042 process.mu4j = cms.EDFilter("PATMuonRefSelector", 
0043     src = cms.InputTag("patMuons"),
0044     cut = cms.string("muonID('TMLastStationAngTight')")
0045 )
0046 ## Trigger matched
0047 process.mu4jt  = process.mu4j.clone(cut = process.mu4j.cut.value() + " && userInt('muonL1MatchExtended') > 0");
0048 ## Trigger matched, geometrically
0049 process.mu4jtg = process.mu4j.clone(cut = process.mu4j.cut.value() + " && userInt('muonL1MatchExtended') >= 10");
0050 
0051 ## Di-muons, all
0052 process.dimu = cms.EDProducer("CandViewShallowCloneCombiner",
0053     decay = cms.string("mu4j@+ mu4j@-"),
0054     cut   = cms.string("mass > 2"),
0055 )
0056 ## Di-muons, both trigger matched
0057 process.dimutt  = process.dimu.clone(decay = "mu4jt@+ mu4jt@-")
0058 ## Di-muons, both trigger matched geometrically
0059 process.dimuttg = process.dimu.clone(decay = "mu4jtg@+ mu4jtg@-")
0060 process.any = cms.EDFilter("CandViewCountFilter", src = cms.InputTag("dimu"),    minNumber = cms.uint32(1))
0061 process.tt  = cms.EDFilter("CandViewCountFilter", src = cms.InputTag("dimutt"),  minNumber = cms.uint32(1))
0062 process.ttg = cms.EDFilter("CandViewCountFilter", src = cms.InputTag("dimuttg"), minNumber = cms.uint32(1))
0063 
0064 ## Test trigger bit
0065 from HLTrigger.HLTfilters.hltHighLevelDev_cfi import hltHighLevelDev
0066 process.trigBit = hltHighLevelDev.clone(HLTPaths = ['HLT_L1DoubleMuOpen'], HLTPathsPrescales = [1])
0067 
0068 process.s = cms.Sequence(
0069     process.csctfDigis *
0070     process.muonL1MatchExtended *
0071     process.patMuons *
0072     ( process.mu4j + process.mu4jt + process.mu4jtg   ) *
0073     ( process.dimu + process.dimutt + process.dimuttg )
0074 )
0075 
0076 process.pAny = cms.Path(
0077     process.trigBit +
0078     process.s +
0079     process.any
0080 )
0081 
0082 process.pMatch = cms.Path(
0083     process.trigBit +
0084     process.s +
0085     process.tt
0086 )
0087 
0088 process.pMatchGeom = cms.Path(
0089     process.trigBit +
0090     process.s +
0091     process.ttg
0092 )
0093 
0094 #process.o = cms.OutputModule("PoolOutputModule",
0095 #    fileName = cms.untracked.string("patMuons_L1MatcherExtended.root"),
0096 #    outputCommands = cms.untracked.vstring("drop *", "keep *_patMuons__*", "keep l1extraL1MuonParticles_l1extraParticles__*")
0097 #)
0098 #process.e = cms.EndPath(process.o)
0099