Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-01-17 23:32:01

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 # TrackingParticle skims used in muon validation
0004 
0005 import SimMuon.MCTruth.trackingParticleMuon_cfi
0006 TPrefs = SimMuon.MCTruth.trackingParticleMuon_cfi.trackingParticleMuon.clone()
0007 
0008 TPmu = TPrefs.clone()
0009 TPmu_seq = cms.Sequence( TPmu )
0010 
0011 TPpfmu = TPrefs.clone(
0012     skim = 'pf'
0013 )
0014 TPpfmu_seq = cms.Sequence( TPpfmu )
0015 
0016 TPtrack = TPrefs.clone(
0017     skim = 'track',
0018     ptmin = 2.
0019 )
0020 TPtrack_seq = cms.Sequence( TPtrack )
0021 
0022 # TrackingParticle selectors for signal efficiencies
0023 
0024 muonTPSet = cms.PSet(
0025     src = cms.InputTag("mix", "MergedTrackTruth"),
0026     pdgId = cms.vint32(13, -13),
0027     tip = cms.double(3.5),
0028     lip = cms.double(30.0),
0029     minHit = cms.int32(0),
0030     ptMin = cms.double(0.9),
0031     ptMax = cms.double(1e100),
0032     minRapidity = cms.double(-2.4),
0033     maxRapidity = cms.double(2.4),
0034     signalOnly = cms.bool(True),
0035     intimeOnly = cms.bool(True),  # discard OOT PU
0036     stableOnly = cms.bool(True),  # discard decays in flight from the signal event
0037     chargedOnly = cms.bool(True)
0038 )
0039 
0040 me0MuonTPSet = cms.PSet(
0041     src = cms.InputTag("mix", "MergedTrackTruth"),
0042     pdgId = cms.vint32(13, -13),
0043     tip = cms.double(3.5),
0044     lip = cms.double(30.0),
0045     minHit = cms.int32(0),
0046     ptMin = cms.double(0.9),
0047     ptMax = cms.double(1e100),
0048     minRapidity = cms.double(-2.8),
0049     maxRapidity = cms.double(2.8),
0050     signalOnly = cms.bool(True),
0051     intimeOnly = cms.bool(True),  # discard OOT PU
0052     stableOnly = cms.bool(True),  # discard decays in flight from the signal event
0053     chargedOnly = cms.bool(True)
0054 )
0055 
0056 displacedMuonTPSet = cms.PSet(
0057     src = cms.InputTag("mix", "MergedTrackTruth"),
0058     pdgId = cms.vint32(13, -13),
0059     tip = cms.double(85.),  # radius to have at least the 3 outermost TOB layers
0060     lip = cms.double(210.), # z to have at least the 3 outermost TEC layers
0061     minHit = cms.int32(0),
0062     ptMin = cms.double(0.9),
0063     ptMax = cms.double(1e100),
0064     minRapidity = cms.double(-2.4),
0065     maxRapidity = cms.double(2.4),
0066     signalOnly = cms.bool(True),
0067     intimeOnly = cms.bool(True),  # discard OOT PU
0068     stableOnly = cms.bool(True), # accept only TP from the Generator (linked to GenParticles)
0069     chargedOnly = cms.bool(True)
0070 )
0071 
0072 cosmicMuonTPSet = cms.PSet(
0073     src = cms.InputTag("mix", "MergedTrackTruth"),
0074     pdgId = cms.vint32(13, -13),
0075     tip = cms.double(85.),  # radius to have at least the 3 outermost TOB layers
0076     lip = cms.double(210.), # z to have at least the 3 outermost TEC layers
0077     minHit = cms.int32(0),
0078     ptMin = cms.double(0.9),
0079     ptMax = cms.double(1e100),
0080     minRapidity = cms.double(-2.4),
0081     maxRapidity = cms.double(2.4),
0082     signalOnly = cms.bool(True),
0083     stableOnly = cms.bool(True), # accept only TP from the Generator (linked to GenParticles)
0084     chargedOnly = cms.bool(True)
0085 )
0086 
0087 from Configuration.ProcessModifiers.premix_stage2_cff import premix_stage2
0088 premix_stage2.toModify(muonTPSet, src = "mixData:MergedTrackTruth")
0089 premix_stage2.toModify(cosmicMuonTPSet, src = "mixData:MergedTrackTruth")
0090 premix_stage2.toModify(displacedMuonTPSet, src = "mixData:MergedTrackTruth")
0091 premix_stage2.toModify(me0MuonTPSet, src = "mixData:MergedTrackTruth")
0092 
0093 #muonTP = cms.EDFilter("TrackingParticleSelector",
0094 #    muonTPSet
0095 #)
0096 
0097 # RecoTrack selectors
0098 #muonGlb = cms.EDFilter("RecoTrackSelector",
0099 #    src = cms.InputTag("globalMuons"),
0100 #    tip = cms.double(3.5),
0101 #    lip = cms.double(30.0),
0102 #    minHit = cms.int32(8),
0103 #    maxChi2 = cms.double(999),
0104 #    ptMin = cms.double(0.8),
0105 #    quality = cms.string("Chi2"),
0106 #    minRapidity = cms.double(-2.5),
0107 #    maxRapidity = cms.double(2.5)
0108 #)
0109 #
0110 #muonSta = cms.EDFilter("RecoTrackSelector",
0111 #    src = cms.InputTag("standAloneMuons","UpdatedAtVtx"),
0112 #    tip = cms.double(999.0),
0113 #    lip = cms.double(999.0),
0114 #    minHit = cms.int32(1),
0115 #    maxChi2 = cms.double(999),
0116 #    ptMin = cms.double(0.8),
0117 #    quality = cms.string("Chi2"),
0118 #    minRapidity = cms.double(-2.5),
0119 #    maxRapidity = cms.double(2.5)
0120 #)
0121 
0122 #muonSelector_step = cms.Sequence(muonTP+muonGlb+muonSta)
0123 
0124 #muonSelector_seq = cms.Sequence(muonTP)