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 
63 
64 # Reco Jets and MET
67 metreco.remove(BeamHaloId)
68 
69 
70 caloJets = cms.Sequence(
71  recoJets+
72  recoJetIds+
73  recoTrackJets
74 )
75 
76 jetTrackAssoc = cms.Sequence (
77  recoJetAssociations
78  )
79 
80 jetPlusTracks = cms.Sequence(
81  recoJPTJets
82  )
83 
84 metReco = cms.Sequence(
85  metreco
86  )
87 
88 
89 
90 # Gen Jets
96 caloJetMetGen = cms.Sequence(
97  genParticles+
98  genJetParticles+
99  recoGenJets+
100  genMETParticles+
101  recoGenMET
102 )
103 
104 
105 # Muon simHit sequence
107 
108 # Muon Digi sequence
110 simMuonCSCDigis.strips.doCorrelatedNoise = False ## Saves a little bit of time
111 
112 
113 simMuonCSCDigis.InputCollection = 'MuonSimHitsMuonCSCHits'
114 simMuonDTDigis.InputCollection = 'MuonSimHitsMuonDTHits'
115 simMuonRPCDigis.InputCollection = 'MuonSimHitsMuonRPCHits'
116 
117 # Muon RecHit sequence
119 csc2DRecHits.stripDigiTag = cms.InputTag("simMuonCSCDigis","MuonCSCStripDigi")
120 csc2DRecHits.wireDigiTag = cms.InputTag("simMuonCSCDigis","MuonCSCWireDigi")
121 rpcRecHits.rpcDigiLabel = 'simMuonRPCDigis'
122 dt1DRecHits.dtDigiLabel = 'simMuonDTDigis'
123 dt1DCosmicRecHits.dtDigiLabel = 'simMuonDTDigis'
124 
125 # Muon reconstruction sequence
128 KFSmootherForMuonTrackLoader.Propagator = 'SmartPropagatorAny'
131 from RecoMuon.Configuration.RecoMuonPPonly_cff import refittedStandAloneMuons
133 globalMuons.GLBTrajBuilderParameters.TrackTransformer.TrackerRecHitBuilder = 'WithoutRefit'
134 globalMuons.GLBTrajBuilderParameters.TrackerRecHitBuilder = 'WithoutRefit'
135 globalMuons.GLBTrajBuilderParameters.TransformerOutPropagator = cms.string('SmartPropagatorAny')
136 globalMuons.GLBTrajBuilderParameters.MatcherOutPropagator = cms.string('SmartPropagator')
137 
139 GlobalMuonRefitter.TrackerRecHitBuilder = 'WithoutRefit'
140 GlobalMuonRefitter.Propagator = 'SmartPropagatorAny'
141 GlobalTrajectoryBuilderCommon.TrackerRecHitBuilder = 'WithoutRefit'
142 tevMuons.RefitterParameters.TrackerRecHitBuilder = 'WithoutRefit'
143 tevMuons.RefitterParameters.Propagator = 'SmartPropagatorAny'
144 KFSmootherForRefitInsideOut.Propagator = 'SmartPropagatorAny'
145 KFSmootherForRefitOutsideIn.Propagator = 'SmartPropagator'
146 KFFitterForRefitInsideOut.Propagator = 'SmartPropagatorAny'
147 KFFitterForRefitOutsideIn.Propagator = 'SmartPropagatorAny'
148 
149 famosMuonSequence = cms.Sequence(
150  muonlocalreco+
151  ancientMuonSeed+
152  standAloneMuons+
153  refittedStandAloneMuons+
154  globalMuons+
155  tevMuons
156  )
157 
158 #Muon identification sequence
160 
161 # Muon isolation
163 
164 famosMuonIdAndIsolationSequence = cms.Sequence(
165  ak4CaloJets+
166  muonIdProducerSequence+
167  muIsolation
168 )
169 
171 muons.FillSelectorMaps = False
172 muons.FillCosmicsIdMap = False
174 
175 muonshighlevelreco = cms.Sequence(muonPFIsolationSequence*muons)
176 
177 
178 # Electron reconstruction
190 from RecoEgamma.Configuration.RecoEgamma_cff import egammaHighLevelRecoPostPF
191 allConversions.src = 'gsfGeneralConversionTrackMerger'
192 famosConversionSequence = cms.Sequence(conversionTrackSequenceNoEcalSeeded*allConversionSequence)
193 
194 generalConversionTrackProducer.TrackProducer = 'generalTracksBeforeMixing'
195 
199 
200 egammaEcalDrivenReco = cms.Sequence(gsfEcalDrivenElectronSequence)
201 electronGsfTracks = TrackingTools.GsfTracking.GsfElectronFit_cfi.GsfGlobalElectronTest.clone()
202 electronGsfTracks.src = 'electronGSGsfTrackCandidates'
203 electronGsfTracks.TTRHBuilder = 'WithoutRefit'
204 electronGsfTracks.TrajectoryInEvent = True
205 
208 
209 trackerDrivenElectronSeedsTmp = trackerDrivenElectronSeeds.clone()
210 trackerDrivenElectronSeedsTmp.TkColList = cms.VInputTag(cms.InputTag("generalTracksBeforeMixing"))
211 trackerDrivenElectronSeeds = cms.EDProducer(
212  "ElectronSeedTrackRefFix",
213  PreGsfLabel = trackerDrivenElectronSeedsTmp.PreGsfLabel,
214  PreIdLabel = trackerDrivenElectronSeedsTmp.PreIdLabel,
215  oldTrackCollection = trackerDrivenElectronSeedsTmp.TkColList[0],
216  newTrackCollection = cms.InputTag("generalTracks"),
217  seedCollection = cms.InputTag("trackerDrivenElectronSeedsTmp",trackerDrivenElectronSeedsTmp.PreGsfLabel.value()),
218  idCollection = cms.InputTag("trackerDrivenElectronSeedsTmp",trackerDrivenElectronSeedsTmp.PreIdLabel.value())
219  )
220 
221 # PF related electron sequences defined in FastSimulation.ParticleFlow.ParticleFlowFastSim_cff
223 
224 iterativeTrackingBeginning = cms.Sequence(
225  iterativeInitialSeeds+
226  iterativePixelPairSeeds+
227  iterativeMixedTripletStepSeeds+
228  iterativePixelLessSeeds
229  )
230 
231 famosGsfTrackSequence = cms.Sequence(
232  iterativeTrackingBeginning+
233  newCombinedSeeds+
234  particleFlowCluster+
235  ecalDrivenElectronSeeds+
236  trackerDrivenElectronSeedsTmp+
237  trackerDrivenElectronSeeds+
238  electronMergedSeeds+
239  electronGSGsfTrackCandidates+
240  electronGsfTracks
241 )
242 
243 # Photon reconstruction
245 photons.hbheInstance = ''
247 
248 famosPhotonSequence = cms.Sequence(
249  photonSequence+
250  photonIDSequence
251 )
252 
253 # Add pre-calculated isolation sums for electrons (NB for photons they are stored in the Photon. All is done in the
254 # sequence above
256 
257 #Add egamma ecal interesting rec hits
260 
262 
263 
264 
265 # B tagging
267 ak4JetTracksAssociatorAtVertex.tracks = 'generalTracks'
271 
273 
274 famosBTaggingSequence = cms.Sequence(
275  btagging
276 )
277 
278 ## rechist from calo are needed by caloTowerForTrk
279 # in fact localreco modules should run before globalreco ones...
280 vertexreco.insert(0,caloRecHitsPreTrk)
281 
282 ############### FastSim sequences
283 
284 #dump = cms.EDAnalyzer("EventContentAnalyzer") #TEMP
285 simulationSequence = cms.Sequence(
286  offlineBeamSpot+
287  famosSimHits+
288  MuonSimHits
289  )
290 trackReco = cms.Sequence(
291  siTrackerGaussianSmearingRecHits+
292  iterTracking
293  )
294 
295 doAllDigi = cms.Sequence(caloDigis+muonDigi)
296 digitizationSequence = cms.Sequence(
297  cms.SequencePlaceholder("mix")
298  *doAllDigi
299  *addPileupInfo
300  )
301 trackDigiVertexSequence = cms.Sequence(
302  trackReco+
303  #dump+ #TEMP
304  digitizationSequence+
305  vertexreco
306  )
307 trackVertexReco = cms.Sequence( # for backward compatibility
308  trackDigiVertexSequence
309  )
310 caloTowersSequence = cms.Sequence(
311  caloRecHits+
312  caloTowersRec
313  )
314 famosSimulationSequence = cms.Sequence(
315  simulationSequence+
316  trackDigiVertexSequence
317  )
318 
319 famosEcalDrivenElectronSequence = cms.Sequence(
320  famosGsfTrackSequence+
321  egammaEcalDrivenReco
322 )
323 
324 simulationSequence.insert(0,genParticles)
325 
326 reconstructionWithFamos = cms.Sequence(
327  trackExtrapolator+
328  caloTowersSequence+
329  particleFlowCluster+
330  ecalClusters+
331  famosGsfTrackSequence+
332  famosMuonSequence+
333  famosMuonIdAndIsolationSequence+
334  famosConversionSequence+
335  particleFlowTrackWithDisplacedVertex+
336  famosEcalDrivenElectronSequence+
337  famosPhotonSequence+
338  famosParticleFlowSequence+
339  egammaHighLevelRecoPostPF+
340  muonshighlevelreco+
341  particleFlowLinks+
342  caloJetMetGen+
343  caloJets+
344  PFJetMet+
345  jetTrackAssoc+
346  recoJPTJets+
347  metreco+
348  reducedRecHits+
349  famosBTaggingSequence+
350  PFTau
351  )
352 
353 # Special sequences for two-step operation
354 simulationWithSomeReconstruction = cms.Sequence(
355  famosSimulationSequence+
356  siTrackerGaussianSmearingRecHits+
357  iterTracking+
358  vertexreco+
359  caloTowersSequence+
360  particleFlowCluster+
361  ecalClusters+
362  famosGsfTrackSequence+
363  famosMuonSequence+
364  famosMuonIdAndIsolationSequence+
365  famosConversionSequence+
366  particleFlowTrackWithDisplacedVertex+
367  famosEcalDrivenElectronSequence+
368  famosPhotonSequence+
369  famosParticleFlowSequence+
370  egammaHighLevelRecoPostPF
371  )
372 
373 reconstructionHighLevel = cms.Sequence(
374  cms.SequencePlaceholder("mix")+
375  muonshighlevelreco+
376  particleFlowLinks+
377  caloJetMetGen+
378  caloJets+
379  PFJetMet+
380  jetTrackAssoc+
381  recoJPTJets+
382  metreco+
383  reducedRecHits+
384  famosBTaggingSequence+
385  PFTau
386 )
387 
388 # Famos pre-defined sequences (and self-explanatory names)
389 
390 famosWithTrackerHits = cms.Sequence(
391  famosSimulationSequence+
392  siTrackerGaussianSmearingRecHits
393 )
394 
395 famosWithTracks = cms.Sequence(
396  famosWithTrackerHits+
397  iterTracking
398  )
399 
400 famosWithTracksAndMuonHits = cms.Sequence(
401  famosSimulationSequence+
402  siTrackerGaussianSmearingRecHits+
403  iterTracking+
404  vertexreco+
405  famosMuonSequence
406 )
407 
408 famosWithTracksAndMuons = cms.Sequence(
409  famosSimulationSequence+
410  siTrackerGaussianSmearingRecHits+
411  iterTracking+
412  vertexreco+
413  famosMuonSequence+
414  caloTowersSequence+
415  famosMuonIdAndIsolationSequence
416 )
417 
418 famosWithCaloHits = cms.Sequence(
419  famosSimulationSequence+
420  caloTowersSequence
421 )
422 
423 famosWithEcalClusters = cms.Sequence(
424  famosWithCaloHits+
425  particleFlowCluster+
426  ecalClusters
427 )
428 
429 famosWithTracksAndCaloHits = cms.Sequence(
430  famosWithTracks+
431  caloTowersSequence
432 )
433 
434 famosWithTracksAndEcalClusters = cms.Sequence(
435  famosWithTracksAndCaloHits+
436  particleFlowCluster+
437  ecalClusters
438 )
439 
440 
441 famosWithParticleFlow = cms.Sequence(
442  famosWithTracksAndEcalClusters+
443  vertexreco+
444  famosGsfTrackSequence+
445  famosConversionSequence+
446  caloTowersSequence+
447  famosParticleFlowSequence+
448  PFJetMet
449 )
450 
451 famosWithCaloTowers = cms.Sequence(
452  famosWithCaloHits+
453  caloTowersSequence
454 )
455 
456 famosElectronSequence = cms.Sequence(
457  famosGsfTrackSequence+
458  famosEcalDrivenElectronSequence+
459  famosWithParticleFlow+
460  egammaHighLevelRecoPostPF+
461  gsfElectronSequence+
462  eIdSequence
463 )
464 
465 famosWithTracksAndCaloTowers = cms.Sequence(
466  famosWithTracksAndCaloHits+
467  caloTowersSequence
468 )
469 
470 famosWithTracksAndJets = cms.Sequence(
471  famosWithTracksAndCaloTowers+
472  vertexreco+
473  caloJetMetGen+
474  caloJets+
475  PFJetMet+
476  jetTrackAssoc+
477  recoJPTJets+
478  metreco
479 )
480 
481 ### Standard Jets _cannot_ be done without many other things...
482 #######################################################################
483 famosWithJets = cms.Sequence(
484  famosWithTracksAndCaloTowers+
485  vertexreco+
486  particleFlowCluster+
487  ecalClusters+
488  famosGsfTrackSequence+
489  famosMuonSequence+
490  famosMuonIdAndIsolationSequence+
491  famosParticleFlowSequence+
492  gsfElectronSequence+
493  caloJetMetGen+
494  caloJets+
495  PFJetMet+
496  jetTrackAssoc+
497  recoJPTJets+
498  metreco
499 )
500 
501 famosWithCaloTowersAndParticleFlow = cms.Sequence(
502  famosWithParticleFlow+
503  caloTowersSequence
504 )
505 
506 
507 famosWithElectrons = cms.Sequence(
508  famosWithTracksAndEcalClusters+
509  caloTowersSequence+
510  famosGsfTrackSequence+
511  famosParticleFlowSequence+
512  famosElectronSequence+
513  interestingGedEleIsoDetIdEB+
514  interestingGedEleIsoDetIdEE+
515  egammaIsolationSequence
516 )
517 
518 famosWithPhotons = cms.Sequence(
519  famosWithTracks+
520  vertexreco+
521  caloRecHits+
522  ecalClustersNoPFBox+
523  famosPhotonSequence+
524  interestingGedGamIsoDetIdEB+
525  interestingGedGamIsoDetIdEE+
526  interestingGamIsoDetIdEB+
527  interestingGamIsoDetIdEE
528 )
529 
530 famosWithElectronsAndPhotons = cms.Sequence(
531  famosWithTracks+
532  vertexreco+
533  caloTowersSequence+
534  ecalClustersNoPFBox+
535  famosElectronSequence+
536  famosPhotonSequence+
537  interestingEgammaIsoDetIds+
538  egammaIsolationSequence
539 )
540 
541 famosWithBTagging = cms.Sequence(
542  famosWithTracksAndCaloTowers+
543  vertexreco+
544  ak4PFJetsCHS+
545  ak4JetTracksAssociatorAtVertexPF+
546  ecalClustersNoPFBox+
547  famosMuonSequence+
548  reducedRecHits+
549  famosBTaggingSequence
550  )
551 
552 
553 famosWithPFTauTagging = cms.Sequence(
554  famosWithCaloTowersAndParticleFlow+
555  PFTau
556 )
557 
558 # The simulation sequence without muon digitization
559 simulationNoMuonDigiWithFamos = cms.Sequence(
560  famosSimulationSequence+
561  siTrackerGaussianSmearingRecHits
562 )
563 
564 # The simulation and digitization sequence
565 simulationWithFamos = cms.Sequence(
566  famosSimulationSequence#+
567 # muonDigi+
568 # siTrackerGaussianSmearingRecHits
569 )
570 
571 
572 
573 reconstructionWithFamosNoTk = cms.Sequence(
574  vertexreco+
575  caloTowersSequence+
576  particleFlowCluster+
577  ecalClusters+
578  famosGsfTrackSequence+
579  famosMuonSequence+
580  famosMuonIdAndIsolationSequence+
581  famosConversionSequence+
582  particleFlowTrackWithDisplacedVertex+
583  famosEcalDrivenElectronSequence+
584  famosPhotonSequence+
585  famosParticleFlowSequence+
586  egammaHighLevelRecoPostPF+
587  muonshighlevelreco+
588  caloJetMetGen+
589  caloJets+
590  PFJetMet+
591  jetTrackAssoc+
592  recoJPTJets+
593  metreco+
594  reducedRecHits+
595  famosBTaggingSequence+
596  PFTau
597 )
598 
599 # Simulation plus reconstruction
600 famosWithEverything = cms.Sequence(
601  simulationWithFamos+
602  reconstructionWithFamos
603 )