CMS 3D CMS Logo

NewAssociators_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 # TrackingParticle selectors
5 # reco::Track selectors
7 
8 # quickTrackAssociatorByHits on probeTracks used as monitor wrt MuonAssociatorByHits
10 NEWtrackAssociatorByHits = SimTracker.TrackAssociatorProducers.quickTrackAssociatorByHits_cfi.quickTrackAssociatorByHits.clone()
11 
12 NEWtpToTkmuTrackAssociation = cms.EDProducer('TrackAssociatorEDProducer',
13  associator = cms.InputTag('NEWtrackAssociatorByHits'),
14  label_tp = cms.InputTag('mix', 'MergedTrackTruth'),
15 # label_tr = cms.InputTag('generalTracks')
16  label_tr = cms.InputTag('NEWprobeTracks')
17 )
18 
19 #
20 # MuonAssociatorByHits used for all track collections
21 #
22 import SimMuon.MCTruth.NewMuonAssociatorByHits_cfi
23 MABH = SimMuon.MCTruth.NewMuonAssociatorByHits_cfi.NewMuonAssociatorByHits.clone()
24 # DEFAULTS ###################################
25 # EfficiencyCut_track = cms.double(0.),
26 # PurityCut_track = cms.double(0.),
27 # EfficiencyCut_muon = cms.double(0.),
28 # PurityCut_muon = cms.double(0.),
29 # includeZeroHitMuons = cms.bool(True),
30 # acceptOneStubMatchings = cms.bool(False),
31 ##############################################
32 MABH.EfficiencyCut_track = 0.5
33 MABH.PurityCut_track = 0.75
34 #MABH.EfficiencyCut_muon = 0.5
35 MABH.EfficiencyCut_muon = 0. # for high pt muons this is a better choice
36 MABH.PurityCut_muon = 0.75
37 MABH.includeZeroHitMuons = False
38 #
39 # temporary fix for Phase2
40 from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
41 phase2_tracker.toModify( MABH, EfficiencyCut_track = 0. )
42 phase2_tracker.toModify( MABH, PurityCut_track = 0. )
43 #
44 MABHhlt = MABH.clone()
45 MABHhlt.EfficiencyCut_track = 0. # backup solution as UseGrouped/UseSplitting are always assumed to be true
46 MABHhlt.DTrechitTag = 'hltDt1DRecHits'
47 MABHhlt.ignoreMissingTrackCollection = True
48 ################################################
49 
50 NEWtpToTkMuonAssociation = MABH.clone()
51 #tpToTkMuonAssociation.tracksTag = 'generalTracks'
52 NEWtpToTkMuonAssociation.tracksTag ='NEWprobeTracks'
53 NEWtpToTkMuonAssociation.UseTracker = True
54 NEWtpToTkMuonAssociation.UseMuon = False
55 
56 NEWtpToStaSeedAssociation = MABH.clone()
57 NEWtpToStaSeedAssociation.tracksTag = 'NEWseedsOfSTAmuons'
58 NEWtpToStaSeedAssociation.UseTracker = False
59 NEWtpToStaSeedAssociation.UseMuon = True
60 
61 NEWtpToStaMuonAssociation = MABH.clone()
62 NEWtpToStaMuonAssociation.tracksTag = 'standAloneMuons'
63 NEWtpToStaMuonAssociation.UseTracker = False
64 NEWtpToStaMuonAssociation.UseMuon = True
65 
66 NEWtpToStaUpdMuonAssociation = MABH.clone()
67 NEWtpToStaUpdMuonAssociation.tracksTag = 'standAloneMuons:UpdatedAtVtx'
68 NEWtpToStaUpdMuonAssociation.UseTracker = False
69 NEWtpToStaUpdMuonAssociation.UseMuon = True
70 
71 NEWtpToGlbMuonAssociation = MABH.clone()
72 NEWtpToGlbMuonAssociation.tracksTag = 'globalMuons'
73 NEWtpToGlbMuonAssociation.UseTracker = True
74 NEWtpToGlbMuonAssociation.UseMuon = True
75 
76 NEWtpToStaRefitMuonAssociation = MABH.clone()
77 NEWtpToStaRefitMuonAssociation.tracksTag = 'refittedStandAloneMuons'
78 NEWtpToStaRefitMuonAssociation.UseTracker = False
79 NEWtpToStaRefitMuonAssociation.UseMuon = True
80 
81 NEWtpToStaRefitUpdMuonAssociation = MABH.clone()
82 NEWtpToStaRefitUpdMuonAssociation.tracksTag = 'refittedStandAloneMuons:UpdatedAtVtx'
83 NEWtpToStaRefitUpdMuonAssociation.UseTracker = False
84 NEWtpToStaRefitUpdMuonAssociation.UseMuon = True
85 
86 NEWtpToDisplacedTrkMuonAssociation = MABH.clone()
87 NEWtpToDisplacedTrkMuonAssociation.tracksTag = 'displacedTracks'
88 NEWtpToDisplacedTrkMuonAssociation.UseTracker = True
89 NEWtpToDisplacedTrkMuonAssociation.UseMuon = False
90 
91 NEWtpToDisplacedStaSeedAssociation = MABH.clone()
92 NEWtpToDisplacedStaSeedAssociation.tracksTag = 'NEWseedsOfDisplacedSTAmuons'
93 NEWtpToDisplacedStaSeedAssociation.UseTracker = False
94 NEWtpToDisplacedStaSeedAssociation.UseMuon = True
95 
96 NEWtpToDisplacedStaMuonAssociation = MABH.clone()
97 NEWtpToDisplacedStaMuonAssociation.tracksTag = 'displacedStandAloneMuons'
98 NEWtpToDisplacedStaMuonAssociation.UseTracker = False
99 NEWtpToDisplacedStaMuonAssociation.UseMuon = True
100 
101 NEWtpToDisplacedGlbMuonAssociation = MABH.clone()
102 NEWtpToDisplacedGlbMuonAssociation.tracksTag = 'displacedGlobalMuons'
103 NEWtpToDisplacedGlbMuonAssociation.UseTracker = True
104 NEWtpToDisplacedGlbMuonAssociation.UseMuon = True
105 
106 NEWtpToTevFirstMuonAssociation = MABH.clone()
107 NEWtpToTevFirstMuonAssociation.tracksTag = 'tevMuons:firstHit'
108 NEWtpToTevFirstMuonAssociation.UseTracker = True
109 NEWtpToTevFirstMuonAssociation.UseMuon = True
110 
111 NEWtpToTevPickyMuonAssociation = MABH.clone()
112 NEWtpToTevPickyMuonAssociation.tracksTag = 'tevMuons:picky'
113 NEWtpToTevPickyMuonAssociation.UseTracker = True
114 NEWtpToTevPickyMuonAssociation.UseMuon = True
115 
116 NEWtpToTevDytMuonAssociation = MABH.clone()
117 NEWtpToTevDytMuonAssociation.tracksTag = 'tevMuons:dyt'
118 NEWtpToTevDytMuonAssociation.UseTracker = True
119 NEWtpToTevDytMuonAssociation.UseMuon = True
120 
121 NEWtpToME0MuonMuonAssociation = MABH.clone()
122 NEWtpToME0MuonMuonAssociation.tracksTag = 'NEWextractMe0Muons'
123 NEWtpToME0MuonMuonAssociation.UseTracker = True
124 NEWtpToME0MuonMuonAssociation.UseMuon = False
125 
126 NEWtpToGEMMuonMuonAssociation = MABH.clone()
127 NEWtpToGEMMuonMuonAssociation.tracksTag = 'NEWextractGemMuons'
128 NEWtpToGEMMuonMuonAssociation.UseTracker = True
129 NEWtpToGEMMuonMuonAssociation.UseMuon = False
130 
131 NEWtpToL3TkMuonAssociation = MABHhlt.clone()
132 NEWtpToL3TkMuonAssociation.tracksTag = 'hltL3TkTracksFromL2'
133 NEWtpToL3TkMuonAssociation.UseTracker = True
134 NEWtpToL3TkMuonAssociation.UseMuon = False
135 
136 NEWtpToL2MuonAssociation = MABHhlt.clone()
137 NEWtpToL2MuonAssociation.tracksTag = 'hltL2Muons'
138 NEWtpToL2MuonAssociation.UseTracker = False
139 NEWtpToL2MuonAssociation.UseMuon = True
140 
141 NEWtpToL2UpdMuonAssociation = MABHhlt.clone()
142 NEWtpToL2UpdMuonAssociation.tracksTag = 'hltL2Muons:UpdatedAtVtx'
143 NEWtpToL2UpdMuonAssociation.UseTracker = False
144 NEWtpToL2UpdMuonAssociation.UseMuon = True
145 
146 NEWtpToL3MuonAssociation = MABHhlt.clone()
147 NEWtpToL3MuonAssociation.tracksTag = 'hltL3Muons'
148 NEWtpToL3MuonAssociation.UseTracker = True
149 NEWtpToL3MuonAssociation.UseMuon = True
150 
151 #
152 # COSMICS reco
153 #
154 # 2-legs cosmics reco: simhits can be twice the reconstructed ones in any single leg
155 # (Quality cut have to be set at 0.25, purity cuts can stay at default value 0.75)
156 # T.B.D. upper and lower leg should be analyzed separately
157 #
158 NEWtpToTkCosmicSelMuonAssociation = MABH.clone()
159 NEWtpToTkCosmicSelMuonAssociation.tracksTag = 'ctfWithMaterialTracksP5LHCNavigation'
160 NEWtpToTkCosmicSelMuonAssociation.UseTracker = True
161 NEWtpToTkCosmicSelMuonAssociation.UseMuon = False
162 NEWtpToTkCosmicSelMuonAssociation.EfficiencyCut_track = 0.25
163 
164 NEWtpToStaCosmicSelMuonAssociation = MABH.clone()
165 NEWtpToStaCosmicSelMuonAssociation.tracksTag = 'cosmicMuons'
166 NEWtpToStaCosmicSelMuonAssociation.UseTracker = False
167 NEWtpToStaCosmicSelMuonAssociation.UseMuon = True
168 NEWtpToStaCosmicSelMuonAssociation.EfficiencyCut_muon = 0.25
169 
170 NEWtpToGlbCosmicSelMuonAssociation = MABH.clone()
171 NEWtpToGlbCosmicSelMuonAssociation.tracksTag = 'globalCosmicMuons'
172 NEWtpToGlbCosmicSelMuonAssociation.UseTracker = True
173 NEWtpToGlbCosmicSelMuonAssociation.UseMuon = True
174 NEWtpToGlbCosmicSelMuonAssociation.EfficiencyCut_track = 0.25
175 NEWtpToGlbCosmicSelMuonAssociation.EfficiencyCut_muon = 0.25
176 
177 # 1-leg cosmics reco
178 NEWtpToTkCosmic1LegSelMuonAssociation = MABH.clone()
179 NEWtpToTkCosmic1LegSelMuonAssociation.tracksTag = 'ctfWithMaterialTracksP5'
180 NEWtpToTkCosmic1LegSelMuonAssociation.UseTracker = True
181 NEWtpToTkCosmic1LegSelMuonAssociation.UseMuon = False
182 
183 NEWtpToStaCosmic1LegSelMuonAssociation = MABH.clone()
184 NEWtpToStaCosmic1LegSelMuonAssociation.tracksTag = 'cosmicMuons1Leg'
185 NEWtpToStaCosmic1LegSelMuonAssociation.UseTracker = False
186 NEWtpToStaCosmic1LegSelMuonAssociation.UseMuon = True
187 
188 NEWtpToGlbCosmic1LegSelMuonAssociation = MABH.clone()
189 NEWtpToGlbCosmic1LegSelMuonAssociation.tracksTag = 'globalCosmicMuons1Leg'
190 NEWtpToGlbCosmic1LegSelMuonAssociation.UseTracker = True
191 NEWtpToGlbCosmic1LegSelMuonAssociation.UseMuon = True
192 
193 #
194 # The full-sim association sequences
195 #
196 
197 NewMuonAssociation_seq = cms.Sequence(
198  NEWprobeTracks_seq+NEWtpToTkMuonAssociation
199  +NEWtrackAssociatorByHits+NEWtpToTkmuTrackAssociation
200  +NEWseedsOfSTAmuons_seq+NEWtpToStaSeedAssociation+NEWtpToStaMuonAssociation+NEWtpToStaUpdMuonAssociation
201  +NEWtpToGlbMuonAssociation
202  )
203 
204 NewMuonAssociationTEV_seq = cms.Sequence(
205  NEWtpToTevFirstMuonAssociation+NEWtpToTevPickyMuonAssociation+NEWtpToTevDytMuonAssociation
206  )
207 
208 NewMuonAssociationDisplaced_seq = cms.Sequence(
209  NEWseedsOfDisplacedSTAmuons_seq+NEWtpToDisplacedStaSeedAssociation+NEWtpToDisplacedStaMuonAssociation
210  +NEWtpToDisplacedTrkMuonAssociation+NEWtpToDisplacedGlbMuonAssociation
211  )
212 
213 NewMuonAssociationRefit_seq = cms.Sequence(
214  NEWtpToStaRefitMuonAssociation+NEWtpToStaRefitUpdMuonAssociation
215  )
216 
217 NewMuonAssociationCosmic_seq = cms.Sequence(
218  NEWtpToTkCosmicSelMuonAssociation+ NEWtpToTkCosmic1LegSelMuonAssociation
219  +NEWtpToStaCosmicSelMuonAssociation+NEWtpToStaCosmic1LegSelMuonAssociation
220  +NEWtpToGlbCosmicSelMuonAssociation+NEWtpToGlbCosmic1LegSelMuonAssociation
221  )
222 
223 NewMuonAssociationHLT_seq = cms.Sequence(
224  NEWtpToL2MuonAssociation+NEWtpToL2UpdMuonAssociation+NEWtpToL3TkMuonAssociation+NEWtpToL3MuonAssociation
225  )
226 
227 
228 # fastsim has no hlt specific dt hit collection
229 from Configuration.Eras.Modifier_fastSim_cff import fastSim
230 if fastSim.isChosen():
231  _DTrechitTag = SimMuon.MCTruth.NewMuonAssociatorByHits_cfi.NewMuonAssociatorByHits.DTrechitTag
232  NEWtpToL3TkMuonAssociation.DTrechitTag = _DTrechitTag
233  NEWtpToL2MuonAssociation.DTrechitTag = _DTrechitTag
234  NEWtpToL2UpdMuonAssociation.DTrechitTag = _DTrechitTag
235  NEWtpToL3MuonAssociation.DTrechitTag = _DTrechitTag