CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
FamosSequences_cff.py
Go to the documentation of this file.
2 
4 
5 # Conversion to GenParticleCandidates
7 
8 # Pile-up options: FAMOS-style or with the Mixing Module
9 #the sequence is defined as a p[lace holder, to be defined separatedly
10 #from FastSimulation.Configuration.MixingFamos_cff import *
11 #from FastSimulation.Configuration.MixingFull_cff import *
12 
13 # Famos SimHits producer
15 
16 # Gaussian Smearing RecHit producer
18 
19 # Rec Hit Tranlator to the Full map with DeTId'
21 
22 # CTF and Iterative tracking (contains pixelTracks and pixelVertices)
23 
24 # 1) Common algorithms and configuration taken from full reconstruction
25 # Note: The runge-kutta propagator is not used here
26 # (because no magnetic field inhomogeneities are simulated between layers)
28 
29 # 2) Specific cuts - not needed anymore, as a specific KFFittingSmoother deals with that.
30 # Add a chi**2 cut to retain/reject hits
31 # KFFittingSmoother.EstimateCut = 15.0
32 # Request three hits to make a track
33 # KFFittingSmoother.MinNumberOfHits = 3
34 
35 # 3) Fast Simulation tracking sequences
36 # this one is added before 340pre3 to cope with adding SiPixelTemplateDBObjectESProducer and corresponding objects to the ConfDB (MC_3XY_V11, STARTUP3X_V10)
40 
41 # Calo RecHits producer (with no HCAL miscalibration by default)
44 
45 # ECAL clusters
47 reducedEcalRecHitsSequence.remove(seldigis)
48 # HCAL clusters
50 reducedHcalRecHitsSequence = cms.Sequence( reducedHcalRecHits )
51 
52 reducedRecHits = cms.Sequence ( reducedEcalRecHitsSequence * reducedHcalRecHitsSequence )
53 
54 
55 # Calo Towers
57 
58 # Particle Flow (all interactions with ParticleFlow are dealt with in the following configuration)
59 #from FastSimulation.ParticleFlow.ParticleFlowFastSim_cff import *
60 from FastSimulation.ParticleFlow.ParticleFlowFastSimNeutralHadron_cff import * # this is the famous "PF patch", see https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideFastSimFAQ#I_observe_a_discrepancy_in_energ
61 
62 
63 # Reco Jets and MET
66 metreco.remove(BeamHaloId)
67 
68 caloJetMet = cms.Sequence(
69  recoJets+
70  recoJetIds+
71  recoTrackJets+
72  recoJetAssociations+recoJPTJets+
73  metreco
74 )
75 
76 
77 
78 # Gen Jets
84 caloJetMetGen = cms.Sequence(
85  genParticles+
86  genJetParticles+
87  recoGenJets+
88  genMETParticles+
89  recoGenMET
90 )
91 
92 
93 # Muon simHit sequence
95 
96 # Muon Digi sequence
98 simMuonCSCDigis.strips.doCorrelatedNoise = False ## Saves a little bit of time
99 
100 simMuonCSCDigis.InputCollection = 'MuonSimHitsMuonCSCHits'
101 simMuonDTDigis.InputCollection = 'MuonSimHitsMuonDTHits'
102 simMuonRPCDigis.InputCollection = 'MuonSimHitsMuonRPCHits'
103 
104 # Muon RecHit sequence
106 csc2DRecHits.stripDigiTag = cms.InputTag("simMuonCSCDigis","MuonCSCStripDigi")
107 csc2DRecHits.wireDigiTag = cms.InputTag("simMuonCSCDigis","MuonCSCWireDigi")
108 rpcRecHits.rpcDigiLabel = 'simMuonRPCDigis'
109 dt1DRecHits.dtDigiLabel = 'simMuonDTDigis'
110 dt1DCosmicRecHits.dtDigiLabel = 'simMuonDTDigis'
111 
112 # Muon reconstruction sequence
115 KFSmootherForMuonTrackLoader.Propagator = 'SmartPropagatorAny'
118 from RecoMuon.Configuration.RecoMuonPPonly_cff import refittedStandAloneMuons
120 globalMuons.GLBTrajBuilderParameters.TrackTransformer.TrackerRecHitBuilder = 'WithoutRefit'
121 globalMuons.GLBTrajBuilderParameters.TrackerRecHitBuilder = 'WithoutRefit'
122 globalMuons.GLBTrajBuilderParameters.TransformerOutPropagator = cms.string('SmartPropagatorAny')
123 globalMuons.GLBTrajBuilderParameters.MatcherOutPropagator = cms.string('SmartPropagator')
124 
126 GlobalMuonRefitter.TrackerRecHitBuilder = 'WithoutRefit'
127 GlobalMuonRefitter.Propagator = 'SmartPropagatorAny'
128 GlobalTrajectoryBuilderCommon.TrackerRecHitBuilder = 'WithoutRefit'
129 tevMuons.RefitterParameters.TrackerRecHitBuilder = 'WithoutRefit'
130 tevMuons.RefitterParameters.Propagator = 'SmartPropagatorAny'
131 KFSmootherForRefitInsideOut.Propagator = 'SmartPropagatorAny'
132 KFSmootherForRefitOutsideIn.Propagator = 'SmartPropagator'
133 KFFitterForRefitInsideOut.Propagator = 'SmartPropagatorAny'
134 KFFitterForRefitOutsideIn.Propagator = 'SmartPropagatorAny'
135 
136 famosMuonSequence = cms.Sequence(
137  muonDigi+
138  muonlocalreco+
139  ancientMuonSeed+
140  standAloneMuons+
141  refittedStandAloneMuons+
142  globalMuons+
143  tevMuons
144 )
145 
146 #Muon identification sequence
148 
149 # Muon isolation
151 
152 famosMuonIdAndIsolationSequence = cms.Sequence(
153  ak5CaloJets+
154  muonIdProducerSequence+
155  muIsolation
156 )
157 
159 muons.FillSelectorMaps = False
160 muons.FillCosmicsIdMap = False
162 
163 muonshighlevelreco = cms.Sequence(muonPFIsolationSequence*muons)
164 
165 
166 # Electron reconstruction
175 from RecoEgamma.Configuration.RecoEgamma_cff import egammaHighLevelRecoPostPF
176 allConversions.src = 'gsfGeneralConversionTrackMerger'
177 famosConversionSequence = cms.Sequence(conversionTrackSequenceNoEcalSeeded*allConversionSequence)
178 
182 
183 egammaEcalDrivenReco = cms.Sequence(gsfEcalDrivenElectronSequence)
184 electronGsfTracks = TrackingTools.GsfTracking.GsfElectronFit_cfi.GsfGlobalElectronTest.clone()
185 electronGsfTracks.src = 'electronGSGsfTrackCandidates'
186 electronGsfTracks.TTRHBuilder = 'WithoutRefit'
187 electronGsfTracks.TrajectoryInEvent = True
188 
189 
190 # PF related electron sequences defined in FastSimulation.ParticleFlow.ParticleFlowFastSim_cff
192 
193 iterativeTrackingBeginning = cms.Sequence(
194  iterativeInitialSeeds+
195  iterativePixelPairSeeds+
196  iterativeMixedTripletStepSeeds+
197  iterativePixelLessSeeds
198  )
199 
200 famosGsfTrackSequence = cms.Sequence(
201  iterativeTrackingBeginning+
202  newCombinedSeeds+
203  particleFlowCluster+
204  ecalDrivenElectronSeeds+
205  trackerDrivenElectronSeeds+
206  electronMergedSeeds+
207  electronGSGsfTrackCandidates+
208  electronGsfTracks
209 )
210 
211 # Photon reconstruction
213 photons.hbheInstance = ''
215 
216 famosPhotonSequence = cms.Sequence(
217  photonSequence+
218  photonIDSequence
219 )
220 
221 # Add pre-calculated isolation sums for electrons (NB for photons they are stored in the Photon. All is done in the
222 # sequence above
224 
225 #Add egamma ecal interesting rec hits
228 
230 
231 
232 
233 # B tagging
235 ak5JetTracksAssociatorAtVertex.tracks = 'generalTracks'
239 
240 famosBTaggingSequence = cms.Sequence(
241  btagging
242 )
243 
244 
245 
246 # The sole simulation sequence
247 famosSimulationSequence = cms.Sequence(
248  offlineBeamSpot+
249  cms.SequencePlaceholder("famosMixing")+
250  famosSimHits+
251  MuonSimHits+
252  cms.SequencePlaceholder("mix")
253  )
254 
255 # Famos pre-defined sequences (and self-explanatory names)
256 famosWithTrackerHits = cms.Sequence(
257  famosSimulationSequence+
258  siTrackerGaussianSmearingRecHits
259 )
260 
261 famosWithTrackerAndCaloHits = cms.Sequence(
262  famosWithTrackerHits+
263  caloRecHits
264 )
265 
266 famosWithTracks = cms.Sequence(
267  famosWithTrackerHits+
268  iterativeTracking
269 )
270 
271 famosWithTracksAndMuonHits = cms.Sequence(
272  famosSimulationSequence+
273  siTrackerGaussianSmearingRecHits+
274  iterativeTracking+
275  vertexreco+
276  famosMuonSequence
277 )
278 
279 famosWithTracksAndMuons = cms.Sequence(
280  famosSimulationSequence+
281  siTrackerGaussianSmearingRecHits+
282  iterativeTracking+
283  vertexreco+
284  famosMuonSequence+
285  caloRecHits+
286  caloTowersRec+
287  famosMuonIdAndIsolationSequence
288 )
289 
290 famosWithCaloHits = cms.Sequence(
291  famosSimulationSequence+
292  caloRecHits
293 )
294 
295 famosWithEcalClusters = cms.Sequence(
296  famosWithCaloHits+
297  ecalClusters+
298  particleFlowCluster
299 )
300 
301 famosWithTracksAndCaloHits = cms.Sequence(
302  famosWithTracks+
303  caloRecHits
304 )
305 
306 famosWithTracksAndEcalClusters = cms.Sequence(
307  famosWithTracksAndCaloHits+
308  ecalClusters+
309  particleFlowCluster
310 )
311 
312 
313 famosWithParticleFlow = cms.Sequence(
314  famosWithTracksAndEcalClusters+
315  vertexreco+
316  famosGsfTrackSequence+
317  famosConversionSequence+
318  caloTowersRec+
319  famosParticleFlowSequence+
320  PFJetMet
321 )
322 
323 famosWithCaloTowers = cms.Sequence(
324  famosWithCaloHits+
325  caloTowersRec
326 )
327 
328 famosEcalDrivenElectronSequence = cms.Sequence(
329  famosGsfTrackSequence+
330  egammaEcalDrivenReco
331 )
332 
333 famosElectronSequence = cms.Sequence(
334  famosGsfTrackSequence+
335  famosEcalDrivenElectronSequence+
336  famosWithParticleFlow+
337  egammaHighLevelRecoPostPF+
338  gsfElectronSequence+
339  eIdSequence
340 )
341 
342 famosWithTracksAndCaloTowers = cms.Sequence(
343  famosWithTracksAndCaloHits+
344  caloTowersRec
345 )
346 
347 famosWithTracksAndJets = cms.Sequence(
348  famosWithTracksAndCaloTowers+
349  vertexreco+
350  caloJetMetGen+
351  caloJetMet
352 )
353 
354 ### Standard Jets _cannot_ be done without many other things...
355 #######################################################################
356 famosWithJets = cms.Sequence(
357  famosWithTracksAndCaloTowers+
358  vertexreco+
359  ecalClusters+
360  particleFlowCluster+
361  famosGsfTrackSequence+
362  famosMuonSequence+
363  famosMuonIdAndIsolationSequence+
364  famosParticleFlowSequence+
365  gsfElectronSequence+
366  caloJetMetGen+
367  caloJetMet
368 )
369 
370 ##--- simplified IC05 jets only
371 famosWithSimpleJets = cms.Sequence(
372  famosWithTracksAndCaloTowers+
373  vertexreco+
374  caloJetMetGen+
375  iterativeCone5CaloJets+
376  ic5JetTracksAssociatorAtVertex
377 )
378 
379 famosWithCaloTowersAndParticleFlow = cms.Sequence(
380  famosWithParticleFlow+
381  caloTowersRec
382 )
383 
384 
385 famosWithElectrons = cms.Sequence(
386  famosWithTracksAndEcalClusters+
387  caloTowersRec+
388  famosGsfTrackSequence+
389  famosParticleFlowSequence+
390  famosElectronSequence+
391  interestingEleIsoDetIdEB+
392  interestingEleIsoDetIdEE+
393  egammaIsolationSequence
394 )
395 
396 famosWithPhotons = cms.Sequence(
397  famosWithTracks+
398  vertexreco+
399  caloRecHits+
400  ecalClusters+
401  famosPhotonSequence+
402  interestingGamIsoDetIdEB+
403  interestingGamIsoDetIdEE
404 )
405 
406 famosWithElectronsAndPhotons = cms.Sequence(
407  famosWithTracks+
408  vertexreco+
409  caloRecHits+
410  ecalClusters+
411  caloTowersRec+
412  famosElectronSequence+
413  famosPhotonSequence+
414  interestingEgammaIsoDetIds+
415  egammaIsolationSequence
416 )
417 
418 famosWithBTagging = cms.Sequence(
419  famosWithTracksAndCaloTowers+
420  vertexreco+
421  ak5CaloJets+
422  ak5JetTracksAssociatorAtVertex+
423  ecalClusters+
424  famosMuonSequence+
425  reducedRecHits+
426  famosBTaggingSequence
427  )
428 
429 famosWithTauTagging = cms.Sequence(
430  famosWithTracksAndCaloTowers+
431  vertexreco+
432  iterativeCone5CaloJets+
433  ic5JetTracksAssociatorAtVertex+
434  ecalClusters+
435  famosTauTaggingSequence
436 )
437 
438 famosWithPFTauTagging = cms.Sequence(
439  famosWithCaloTowersAndParticleFlow+
440  famosPFTauTaggingSequence
441 )
442 
443 # The simulation sequence without muon digitization
444 simulationNoMuonDigiWithFamos = cms.Sequence(
445  famosSimulationSequence+
446  siTrackerGaussianSmearingRecHits+
447  caloRecHits
448 )
449 
450 # The simulation and digitization sequence
451 simulationWithFamos = cms.Sequence(
452  famosSimulationSequence+
453  muonDigi+
454  siTrackerGaussianSmearingRecHits+
455  caloRecHits
456 )
457 
458 
459 # The reconstruction sequence
460 reconstructionWithFamos = cms.Sequence(
461  iterativeTracking+
462  vertexreco+
463  caloTowersRec+
464  ecalClusters+
465  particleFlowCluster+
466  famosGsfTrackSequence+
467  famosMuonSequence+
468  famosMuonIdAndIsolationSequence+
469  famosConversionSequence+
470  particleFlowTrackWithDisplacedVertex+
471  famosEcalDrivenElectronSequence+
472  famosPhotonSequence+
473  famosParticleFlowSequence+
474  egammaHighLevelRecoPostPF+
475  muonshighlevelreco+
476  particleFlowLinks+
477  caloJetMetGen+
478  caloJetMet+
479  PFJetMet+
480  ic5JetTracksAssociatorAtVertex+
481  ak5JetTracksAssociatorAtVertex+
482  famosTauTaggingSequence+
483  reducedRecHits+
484  famosBTaggingSequence+
485  famosPFTauTaggingSequence
486 )
487 
488 reconstructionWithFamosNoTk = cms.Sequence(
489  vertexreco+
490  caloRecHits+
491  caloTowersRec+
492  ecalClusters+
493  particleFlowCluster+
494  famosGsfTrackSequence+
495  famosMuonSequence+
496  famosMuonIdAndIsolationSequence+
497  famosConversionSequence+
498  particleFlowTrackWithDisplacedVertex+
499  famosEcalDrivenElectronSequence+
500  famosPhotonSequence+
501  famosParticleFlowSequence+
502  egammaHighLevelRecoPostPF+
503  muonshighlevelreco+
504  caloJetMetGen+
505  caloJetMet+
506  PFJetMet+
507  ic5JetTracksAssociatorAtVertex+
508  ak5JetTracksAssociatorAtVertex+
509  famosTauTaggingSequence+
510  reducedRecHits+
511  famosBTaggingSequence+
512  famosPFTauTaggingSequence
513 )
514 
515 # Simulation plus reconstruction
516 famosWithEverything = cms.Sequence(
517  simulationWithFamos+
518  reconstructionWithFamos
519 )
520