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.PurityCut_muon = 0.75
36 MABH.includeZeroHitMuons = False
37 #
38 MABHhlt = MABH.clone()
39 MABHhlt.EfficiencyCut_track = 0. # backup solution as UseGrouped/UseSplitting are always assumed to be true
40 MABHhlt.DTrechitTag = 'hltDt1DRecHits'
41 MABHhlt.ignoreMissingTrackCollection = True
42 ################################################
43 
44 NEWtpToTkMuonAssociation = MABH.clone()
45 #tpToTkMuonAssociation.tracksTag = 'generalTracks'
46 NEWtpToTkMuonAssociation.tracksTag ='NEWprobeTracks'
47 NEWtpToTkMuonAssociation.UseTracker = True
48 NEWtpToTkMuonAssociation.UseMuon = False
49 
50 NEWtpToStaSeedAssociation = MABH.clone()
51 NEWtpToStaSeedAssociation.tracksTag = 'NEWseedsOfSTAmuons'
52 NEWtpToStaSeedAssociation.UseTracker = False
53 NEWtpToStaSeedAssociation.UseMuon = True
54 NEWtpToStaSeedAssociation.EfficiencyCut_muon = 0.
55 
56 NEWtpToStaMuonAssociation = MABH.clone()
57 NEWtpToStaMuonAssociation.tracksTag = 'standAloneMuons'
58 NEWtpToStaMuonAssociation.UseTracker = False
59 NEWtpToStaMuonAssociation.UseMuon = True
60 
61 NEWtpToStaUpdMuonAssociation = MABH.clone()
62 NEWtpToStaUpdMuonAssociation.tracksTag = 'standAloneMuons:UpdatedAtVtx'
63 NEWtpToStaUpdMuonAssociation.UseTracker = False
64 NEWtpToStaUpdMuonAssociation.UseMuon = True
65 
66 NEWtpToGlbMuonAssociation = MABH.clone()
67 NEWtpToGlbMuonAssociation.tracksTag = 'globalMuons'
68 NEWtpToGlbMuonAssociation.UseTracker = True
69 NEWtpToGlbMuonAssociation.UseMuon = True
70 
71 NEWtpToStaRefitMuonAssociation = MABH.clone()
72 NEWtpToStaRefitMuonAssociation.tracksTag = 'refittedStandAloneMuons'
73 NEWtpToStaRefitMuonAssociation.UseTracker = False
74 NEWtpToStaRefitMuonAssociation.UseMuon = True
75 
76 NEWtpToStaRefitUpdMuonAssociation = MABH.clone()
77 NEWtpToStaRefitUpdMuonAssociation.tracksTag = 'refittedStandAloneMuons:UpdatedAtVtx'
78 NEWtpToStaRefitUpdMuonAssociation.UseTracker = False
79 NEWtpToStaRefitUpdMuonAssociation.UseMuon = True
80 
81 NEWtpToDisplacedTrkMuonAssociation = MABH.clone()
82 NEWtpToDisplacedTrkMuonAssociation.tracksTag = 'displacedTracks'
83 NEWtpToDisplacedTrkMuonAssociation.UseTracker = True
84 NEWtpToDisplacedTrkMuonAssociation.UseMuon = False
85 
86 NEWtpToDisplacedStaSeedAssociation = MABH.clone()
87 NEWtpToDisplacedStaSeedAssociation.tracksTag = 'NEWseedsOfDisplacedSTAmuons'
88 NEWtpToDisplacedStaSeedAssociation.UseTracker = False
89 NEWtpToDisplacedStaSeedAssociation.UseMuon = True
90 NEWtpToDisplacedStaSeedAssociation.EfficiencyCut_muon = 0.
91 
92 NEWtpToDisplacedStaMuonAssociation = MABH.clone()
93 NEWtpToDisplacedStaMuonAssociation.tracksTag = 'displacedStandAloneMuons'
94 NEWtpToDisplacedStaMuonAssociation.UseTracker = False
95 NEWtpToDisplacedStaMuonAssociation.UseMuon = True
96 
97 NEWtpToDisplacedGlbMuonAssociation = MABH.clone()
98 NEWtpToDisplacedGlbMuonAssociation.tracksTag = 'displacedGlobalMuons'
99 NEWtpToDisplacedGlbMuonAssociation.UseTracker = True
100 NEWtpToDisplacedGlbMuonAssociation.UseMuon = True
101 
102 NEWtpToTevFirstMuonAssociation = MABH.clone()
103 NEWtpToTevFirstMuonAssociation.tracksTag = 'tevMuons:firstHit'
104 NEWtpToTevFirstMuonAssociation.UseTracker = True
105 NEWtpToTevFirstMuonAssociation.UseMuon = True
106 NEWtpToTevFirstMuonAssociation.EfficiencyCut_muon = 0.
107 
108 NEWtpToTevPickyMuonAssociation = MABH.clone()
109 NEWtpToTevPickyMuonAssociation.tracksTag = 'tevMuons:picky'
110 NEWtpToTevPickyMuonAssociation.UseTracker = True
111 NEWtpToTevPickyMuonAssociation.UseMuon = True
112 NEWtpToTevPickyMuonAssociation.EfficiencyCut_muon = 0.
113 
114 NEWtpToTevDytMuonAssociation = MABH.clone()
115 NEWtpToTevDytMuonAssociation.tracksTag = 'tevMuons:dyt'
116 NEWtpToTevDytMuonAssociation.UseTracker = True
117 NEWtpToTevDytMuonAssociation.UseMuon = True
118 NEWtpToTevDytMuonAssociation.EfficiencyCut_muon = 0.
119 
120 NEWtpToME0MuonMuonAssociation = MABH.clone()
121 NEWtpToME0MuonMuonAssociation.tracksTag = 'NEWextractMe0Muons'
122 NEWtpToME0MuonMuonAssociation.UseTracker = True
123 NEWtpToME0MuonMuonAssociation.UseMuon = False
124 
125 NEWtpToGEMMuonMuonAssociation = MABH.clone()
126 NEWtpToGEMMuonMuonAssociation.tracksTag = 'NEWextractGemMuons'
127 NEWtpToGEMMuonMuonAssociation.UseTracker = True
128 NEWtpToGEMMuonMuonAssociation.UseMuon = False
129 
130 NEWtpToL3TkMuonAssociation = MABHhlt.clone()
131 NEWtpToL3TkMuonAssociation.tracksTag = 'hltL3TkTracksFromL2'
132 NEWtpToL3TkMuonAssociation.UseTracker = True
133 NEWtpToL3TkMuonAssociation.UseMuon = False
134 
135 NEWtpToL2MuonAssociation = MABHhlt.clone()
136 NEWtpToL2MuonAssociation.tracksTag = 'hltL2Muons'
137 NEWtpToL2MuonAssociation.UseTracker = False
138 NEWtpToL2MuonAssociation.UseMuon = True
139 
140 NEWtpToL2UpdMuonAssociation = MABHhlt.clone()
141 NEWtpToL2UpdMuonAssociation.tracksTag = 'hltL2Muons:UpdatedAtVtx'
142 NEWtpToL2UpdMuonAssociation.UseTracker = False
143 NEWtpToL2UpdMuonAssociation.UseMuon = True
144 
145 NEWtpToL3MuonAssociation = MABHhlt.clone()
146 NEWtpToL3MuonAssociation.tracksTag = 'hltL3Muons'
147 NEWtpToL3MuonAssociation.UseTracker = True
148 NEWtpToL3MuonAssociation.UseMuon = True
149 
150 #
151 # COSMICS reco
152 #
153 # 2-legs cosmics reco: simhits can be twice the reconstructed ones in any single leg
154 # (Quality cut have to be set at 0.25, purity cuts can stay at default value 0.75)
155 # T.B.D. upper and lower leg should be analyzed separately
156 #
157 NEWtpToTkCosmicSelMuonAssociation = MABH.clone()
158 NEWtpToTkCosmicSelMuonAssociation.tracksTag = 'ctfWithMaterialTracksP5LHCNavigation'
159 NEWtpToTkCosmicSelMuonAssociation.UseTracker = True
160 NEWtpToTkCosmicSelMuonAssociation.UseMuon = False
161 NEWtpToTkCosmicSelMuonAssociation.EfficiencyCut_track = 0.25
162 
163 NEWtpToStaCosmicSelMuonAssociation = MABH.clone()
164 NEWtpToStaCosmicSelMuonAssociation.tracksTag = 'cosmicMuons'
165 NEWtpToStaCosmicSelMuonAssociation.UseTracker = False
166 NEWtpToStaCosmicSelMuonAssociation.UseMuon = True
167 NEWtpToStaCosmicSelMuonAssociation.EfficiencyCut_muon = 0.25
168 
169 NEWtpToGlbCosmicSelMuonAssociation = MABH.clone()
170 NEWtpToGlbCosmicSelMuonAssociation.tracksTag = 'globalCosmicMuons'
171 NEWtpToGlbCosmicSelMuonAssociation.UseTracker = True
172 NEWtpToGlbCosmicSelMuonAssociation.UseMuon = True
173 NEWtpToGlbCosmicSelMuonAssociation.EfficiencyCut_track = 0.25
174 NEWtpToGlbCosmicSelMuonAssociation.EfficiencyCut_muon = 0.25
175 
176 # 1-leg cosmics reco
177 NEWtpToTkCosmic1LegSelMuonAssociation = MABH.clone()
178 NEWtpToTkCosmic1LegSelMuonAssociation.tracksTag = 'ctfWithMaterialTracksP5'
179 NEWtpToTkCosmic1LegSelMuonAssociation.UseTracker = True
180 NEWtpToTkCosmic1LegSelMuonAssociation.UseMuon = False
181 
182 NEWtpToStaCosmic1LegSelMuonAssociation = MABH.clone()
183 NEWtpToStaCosmic1LegSelMuonAssociation.tracksTag = 'cosmicMuons1Leg'
184 NEWtpToStaCosmic1LegSelMuonAssociation.UseTracker = False
185 NEWtpToStaCosmic1LegSelMuonAssociation.UseMuon = True
186 
187 NEWtpToGlbCosmic1LegSelMuonAssociation = MABH.clone()
188 NEWtpToGlbCosmic1LegSelMuonAssociation.tracksTag = 'globalCosmicMuons1Leg'
189 NEWtpToGlbCosmic1LegSelMuonAssociation.UseTracker = True
190 NEWtpToGlbCosmic1LegSelMuonAssociation.UseMuon = True
191 
192 #
193 # The full-sim association sequences
194 #
195 
196 NewMuonAssociation_seq = cms.Sequence(
197  NEWprobeTracks_seq+NEWtpToTkMuonAssociation
198  +NEWtrackAssociatorByHits+NEWtpToTkmuTrackAssociation
199  +NEWseedsOfSTAmuons_seq+NEWtpToStaSeedAssociation+NEWtpToStaMuonAssociation+NEWtpToStaUpdMuonAssociation
200  +NEWtpToGlbMuonAssociation
201  )
202 
203 NewMuonAssociationTEV_seq = cms.Sequence(
204  NEWtpToTevFirstMuonAssociation+NEWtpToTevPickyMuonAssociation+NEWtpToTevDytMuonAssociation
205  )
206 
207 NewMuonAssociationDisplaced_seq = cms.Sequence(
208  NEWseedsOfDisplacedSTAmuons_seq+NEWtpToDisplacedStaSeedAssociation+NEWtpToDisplacedStaMuonAssociation
209  +NEWtpToDisplacedTrkMuonAssociation+NEWtpToDisplacedGlbMuonAssociation
210  )
211 
212 NewMuonAssociationRefit_seq = cms.Sequence(
213  NEWtpToStaRefitMuonAssociation+NEWtpToStaRefitUpdMuonAssociation
214  )
215 
216 NewMuonAssociationCosmic_seq = cms.Sequence(
217  NEWtpToTkCosmicSelMuonAssociation+ NEWtpToTkCosmic1LegSelMuonAssociation
218  +NEWtpToStaCosmicSelMuonAssociation+NEWtpToStaCosmic1LegSelMuonAssociation
219  +NEWtpToGlbCosmicSelMuonAssociation+NEWtpToGlbCosmic1LegSelMuonAssociation
220  )
221 
222 NewMuonAssociationHLT_seq = cms.Sequence(
223  NEWtpToL2MuonAssociation+NEWtpToL2UpdMuonAssociation+NEWtpToL3TkMuonAssociation+NEWtpToL3MuonAssociation
224  )
225 
226 
227 # fastsim has no hlt specific dt hit collection
228 from Configuration.Eras.Modifier_fastSim_cff import fastSim
229 _DTrechitTag = SimMuon.MCTruth.NewMuonAssociatorByHits_cfi.NewMuonAssociatorByHits.DTrechitTag
230 fastSim.toModify(NEWtpToL3TkMuonAssociation, DTrechitTag = _DTrechitTag)
231 fastSim.toModify(NEWtpToL2MuonAssociation, DTrechitTag = _DTrechitTag)
232 fastSim.toModify(NEWtpToL2UpdMuonAssociation, DTrechitTag = _DTrechitTag)
233 fastSim.toModify(NEWtpToL3MuonAssociation, DTrechitTag = _DTrechitTag)