CMS 3D CMS Logo

selectors_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 # TrackingParticle skims used in muon validation
4 
5 import SimMuon.MCTruth.trackingParticleMuon_cfi
6 TPrefs = SimMuon.MCTruth.trackingParticleMuon_cfi.trackingParticleMuon.clone()
7 
8 TPmu = TPrefs.clone()
9 TPmu_seq = cms.Sequence( TPmu )
10 
11 TPpfmu = TPrefs.clone(
12  skim = 'pf'
13 )
14 TPpfmu_seq = cms.Sequence( TPpfmu )
15 
16 TPtrack = TPrefs.clone(
17  skim = 'track',
18  ptmin = 2.
19 )
20 TPtrack_seq = cms.Sequence( TPtrack )
21 
22 # TrackingParticle selectors for signal efficiencies
23 
24 muonTPSet = cms.PSet(
25  src = cms.InputTag("mix", "MergedTrackTruth"),
26  pdgId = cms.vint32(13, -13),
27  tip = cms.double(3.5),
28  lip = cms.double(30.0),
29  minHit = cms.int32(0),
30  ptMin = cms.double(0.9),
31  ptMax = cms.double(1e100),
32  minRapidity = cms.double(-2.4),
33  maxRapidity = cms.double(2.4),
34  signalOnly = cms.bool(True),
35  intimeOnly = cms.bool(True), # discard OOT PU
36  stableOnly = cms.bool(True), # discard decays in flight from the signal event
37  chargedOnly = cms.bool(True)
38 )
39 
40 me0MuonTPSet = cms.PSet(
41  src = cms.InputTag("mix", "MergedTrackTruth"),
42  pdgId = cms.vint32(13, -13),
43  tip = cms.double(3.5),
44  lip = cms.double(30.0),
45  minHit = cms.int32(0),
46  ptMin = cms.double(0.9),
47  ptMax = cms.double(1e100),
48  minRapidity = cms.double(-2.8),
49  maxRapidity = cms.double(2.8),
50  signalOnly = cms.bool(True),
51  intimeOnly = cms.bool(True), # discard OOT PU
52  stableOnly = cms.bool(True), # discard decays in flight from the signal event
53  chargedOnly = cms.bool(True)
54 )
55 
56 displacedMuonTPSet = cms.PSet(
57  src = cms.InputTag("mix", "MergedTrackTruth"),
58  pdgId = cms.vint32(13, -13),
59  tip = cms.double(85.), # radius to have at least the 3 outermost TOB layers
60  lip = cms.double(210.), # z to have at least the 3 outermost TEC layers
61  minHit = cms.int32(0),
62  ptMin = cms.double(0.9),
63  ptMax = cms.double(1e100),
64  minRapidity = cms.double(-2.4),
65  maxRapidity = cms.double(2.4),
66  signalOnly = cms.bool(True),
67  intimeOnly = cms.bool(True), # discard OOT PU
68  stableOnly = cms.bool(True), # accept only TP from the Generator (linked to GenParticles)
69  chargedOnly = cms.bool(True)
70 )
71 
72 cosmicMuonTPSet = cms.PSet(
73  src = cms.InputTag("mix", "MergedTrackTruth"),
74  pdgId = cms.vint32(13, -13),
75  tip = cms.double(85.), # radius to have at least the 3 outermost TOB layers
76  lip = cms.double(210.), # z to have at least the 3 outermost TEC layers
77  minHit = cms.int32(0),
78  ptMin = cms.double(0.9),
79  ptMax = cms.double(1e100),
80  minRapidity = cms.double(-2.4),
81  maxRapidity = cms.double(2.4),
82  signalOnly = cms.bool(True),
83  stableOnly = cms.bool(True), # accept only TP from the Generator (linked to GenParticles)
84  chargedOnly = cms.bool(True)
85 )
86 
87 from Configuration.ProcessModifiers.premix_stage2_cff import premix_stage2
88 premix_stage2.toModify(muonTPSet, src = "mixData:MergedTrackTruth")
89 premix_stage2.toModify(cosmicMuonTPSet, src = "mixData:MergedTrackTruth")
90 premix_stage2.toModify(displacedMuonTPSet, src = "mixData:MergedTrackTruth")
91 premix_stage2.toModify(me0MuonTPSet, src = "mixData:MergedTrackTruth")
92 
93 #muonTP = cms.EDFilter("TrackingParticleSelector",
94 # muonTPSet
95 #)
96 
97 # RecoTrack selectors
98 #muonGlb = cms.EDFilter("RecoTrackSelector",
99 # src = cms.InputTag("globalMuons"),
100 # tip = cms.double(3.5),
101 # lip = cms.double(30.0),
102 # minHit = cms.int32(8),
103 # maxChi2 = cms.double(999),
104 # ptMin = cms.double(0.8),
105 # quality = cms.string("Chi2"),
106 # minRapidity = cms.double(-2.5),
107 # maxRapidity = cms.double(2.5)
108 #)
109 #
110 #muonSta = cms.EDFilter("RecoTrackSelector",
111 # src = cms.InputTag("standAloneMuons","UpdatedAtVtx"),
112 # tip = cms.double(999.0),
113 # lip = cms.double(999.0),
114 # minHit = cms.int32(1),
115 # maxChi2 = cms.double(999),
116 # ptMin = cms.double(0.8),
117 # quality = cms.string("Chi2"),
118 # minRapidity = cms.double(-2.5),
119 # maxRapidity = cms.double(2.5)
120 #)
121 
122 #muonSelector_step = cms.Sequence(muonTP+muonGlb+muonSta)
123 
124 #muonSelector_seq = cms.Sequence(muonTP)