CMS 3D CMS Logo

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