CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_14/src/FastSimulation/Configuration/python/FamosSequences_cff.py

Go to the documentation of this file.
00001 import FWCore.ParameterSet.Config as cms
00002 
00003 from FastSimulation.Configuration.CommonInputs_cff import *
00004 
00005 # Conversion to GenParticleCandidates 
00006 from PhysicsTools.HepMCCandAlgos.genParticleCandidatesFast_cfi import *
00007 
00008 # Pile-up options: FAMOS-style or with the Mixing Module
00009 #the sequence is defined as a p[lace holder, to be defined separatedly
00010 #from FastSimulation.Configuration.MixingFamos_cff import *
00011 #from FastSimulation.Configuration.MixingFull_cff import *
00012 
00013 # Famos SimHits producer
00014 from FastSimulation.EventProducer.FamosSimHits_cff import *
00015 
00016 # Gaussian Smearing RecHit producer
00017 from FastSimulation.TrackingRecHitProducer.SiTrackerGaussianSmearingRecHitConverter_cfi import *
00018 
00019 # Rec Hit Tranlator to the Full map with DeTId'
00020 from FastSimulation.TrackingRecHitProducer.TrackingRecHitTranslator_cfi import *
00021 
00022 # CTF and Iterative tracking (contains pixelTracks and pixelVertices)
00023 
00024 # 1) Common algorithms and Configuration taken from full reconstruction
00025 # Note: The runge-kutta propagator is not used here 
00026 # (because no magnetic field inhomogeneities are simulated between layers)
00027 from FastSimulation.Tracking.GSTrackFinalFitCommon_cff import *
00028 
00029 # 2) Specific cuts - not needed anymore, as a specific KFFittingSmoother deals with that.
00030 # Add a chi**2 cut to retain/reject hits
00031 # KFFittingSmoother.EstimateCut = 15.0
00032 # Request three hits to make a track
00033 # KFFittingSmoother.MinNumberOfHits = 3
00034 
00035 # 3) Fast Simulation tracking sequences
00036 # this one is added before 340pre3 to cope with adding SiPixelTemplateDBObjectESProducer and corresponding objects to the ConfDB (MC_3XY_V11, STARTUP3X_V10)
00037 from CalibTracker.SiPixelESProducers.SiPixelTemplateDBObjectESProducer_cfi import *
00038 from FastSimulation.Tracking.GlobalPixelTracking_cff import *
00039 from FastSimulation.Tracking.IterativeTracking_cff import *
00040 
00041 # Calo RecHits producer (with no HCAL miscalibration by default)
00042 from FastSimulation.CaloRecHitsProducer.CaloRecHits_cff import *
00043 from RecoLocalCalo.HcalRecAlgos.hcalRecAlgoESProd_cfi import *
00044 
00045 # ECAL clusters
00046 from RecoEcal.Configuration.RecoEcal_cff import *
00047 reducedEcalRecHitsSequence.remove(seldigis)
00048 # HCAL clusters
00049 from RecoLocalCalo.HcalRecProducers.HcalHitSelection_cfi import *
00050 reducedHcalRecHitsSequence = cms.Sequence( reducedHcalRecHits )
00051 
00052 reducedRecHits = cms.Sequence ( reducedEcalRecHitsSequence * reducedHcalRecHitsSequence )
00053 
00054 
00055 # Calo Towers
00056 from RecoJets.Configuration.CaloTowersRec_cff import *
00057 
00058 # Particle Flow (all interactions with ParticleFlow are dealt with in the following Configuration)
00059 #from FastSimulation.ParticleFlow.ParticleFlowFastSim_cff import *
00060 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
00061 
00062 
00063 # Reco Jets and MET
00064 from RecoJets.Configuration.RecoJetsGlobal_cff import *
00065 from RecoMET.Configuration.RecoMET_cff import *
00066 metreco.remove(BeamHaloId)
00067 
00068 caloJetMet = cms.Sequence(
00069     RecoJets+
00070     recoJetIds+
00071     recoTrackJets+
00072     recoJetAssociations+recoJPTJets+
00073     metreco
00074 )
00075 
00076 
00077 
00078 # Gen Jets
00079 from PhysicsTools.HepMCCandAlgos.genParticles_cfi import *
00080 from RecoJets.Configuration.GenJetParticles_cff import *
00081 from RecoJets.Configuration.RecoGenJets_cff import *
00082 from RecoMET.Configuration.GenMETParticles_cff import *
00083 from RecoMET.Configuration.RecoGenMET_cff import *
00084 caloJetMetGen = cms.Sequence(
00085     genParticles+
00086     genJetParticles+
00087     recoGenJets+
00088     genMETParticles+
00089     recoGenMET
00090 )
00091 
00092 
00093 # Muon simHit sequence 
00094 from FastSimulation.MuonSimHitProducer.MuonSimHitProducer_cfi import *
00095 
00096 # Muon Digi sequence
00097 from SimMuon.Configuration.SimMuon_cff import *
00098 simMuonCSCDigis.strips.doCorrelatedNoise = False ## Saves a little bit of time
00099 
00100 simMuonCSCDigis.InputCollection = 'MuonSimHitsMuonCSCHits'
00101 simMuonDTDigis.InputCollection = 'MuonSimHitsMuonDTHits'
00102 simMuonRPCDigis.InputCollection = 'MuonSimHitsMuonRPCHits'
00103 
00104 # Muon RecHit sequence
00105 from RecoLocalMuon.Configuration.RecoLocalMuon_cff import *
00106 csc2DRecHits.stripDigiTag = cms.InputTag("simMuonCSCDigis","MuonCSCStripDigi")
00107 csc2DRecHits.wireDigiTag = cms.InputTag("simMuonCSCDigis","MuonCSCWireDigi")
00108 rpcRecHits.rpcDigiLabel = 'simMuonRPCDigis'
00109 dt1DRecHits.dtDigiLabel = 'simMuonDTDigis'
00110 dt1DCosmicRecHits.dtDigiLabel = 'simMuonDTDigis'
00111 
00112 # Muon reconstruction sequence
00113 from RecoMuon.TrackingTools.MuonServiceProxy_cff import *
00114 from RecoMuon.TrackingTools.MuonTrackLoader_cff import *
00115 KFSmootherForMuonTrackLoader.Propagator = 'SmartPropagatorAny'
00116 from RecoMuon.MuonSeedGenerator.standAloneMuonSeeds_cff import *
00117 from RecoMuon.StandAloneMuonProducer.standAloneMuons_cff import *
00118 from RecoMuon.Configuration.RecoMuonPPonly_cff import refittedStandAloneMuons
00119 from FastSimulation.Configuration.globalMuons_cff import *
00120 globalMuons.GLBTrajBuilderParameters.TrackTransformer.TrackerRecHitBuilder = 'WithoutRefit'
00121 globalMuons.GLBTrajBuilderParameters.TrackerRecHitBuilder = 'WithoutRefit'
00122 globalMuons.GLBTrajBuilderParameters.TransformerOutPropagator = cms.string('SmartPropagatorAny')
00123 globalMuons.GLBTrajBuilderParameters.MatcherOutPropagator = cms.string('SmartPropagator')
00124 
00125 from RecoMuon.GlobalMuonProducer.tevMuons_cfi import *
00126 GlobalMuonRefitter.TrackerRecHitBuilder = 'WithoutRefit'
00127 GlobalMuonRefitter.Propagator = 'SmartPropagatorAny'
00128 GlobalTrajectoryBuilderCommon.TrackerRecHitBuilder = 'WithoutRefit'
00129 tevMuons.RefitterParameters.TrackerRecHitBuilder = 'WithoutRefit'
00130 tevMuons.RefitterParameters.Propagator =  'SmartPropagatorAny'
00131 KFSmootherForRefitInsideOut.Propagator = 'SmartPropagatorAny'
00132 KFSmootherForRefitOutsideIn.Propagator = 'SmartPropagator'
00133 KFFitterForRefitInsideOut.Propagator = 'SmartPropagatorAny'
00134 KFFitterForRefitOutsideIn.Propagator = 'SmartPropagatorAny'
00135 
00136 famosMuonSequence = cms.Sequence(
00137     muonDigi+
00138     muonlocalreco+
00139     ancientMuonSeed+
00140     standAloneMuons+
00141     refittedStandAloneMuons+    
00142     globalMuons+
00143     tevMuons
00144 )
00145 
00146 #Muon identification sequence
00147 from RecoMuon.MuonIdentification.muonIdProducerSequence_cff import *
00148 
00149 # Muon isolation
00150 from RecoMuon.MuonIsolationProducers.muIsolation_cff import *
00151 
00152 famosMuonIdAndIsolationSequence = cms.Sequence(
00153     ak5CaloJets+
00154     muonIdProducerSequence+
00155     muIsolation
00156 )
00157 
00158 from RecoMuon.MuonIdentification.muons_cfi import *
00159 muons.FillSelectorMaps = False
00160 muons.FillCosmicsIdMap = False
00161 from RecoMuon.MuonIsolation.muonPFIsolation_cff import *
00162 
00163 muonshighlevelreco = cms.Sequence(muonPFIsolationSequence*muons)
00164 
00165 
00166 # Electron reconstruction
00167 from FastSimulation.Tracking.globalCombinedSeeds_cfi import *
00168 from RecoEgamma.EgammaHFProducers.hfEMClusteringSequence_cff import *
00169 from RecoEgamma.EgammaElectronProducers.ecalDrivenElectronSeeds_cfi import *
00170 from FastSimulation.EgammaElectronAlgos.electronGSGsfTrackCandidates_cff import *
00171 from RecoEgamma.EgammaElectronProducers.gsfElectronSequence_cff import *
00172 from TrackingTools.GsfTracking.GsfElectronFit_cff import *
00173 from RecoEgamma.EgammaPhotonProducers.conversionTrackSequence_cff import *
00174 from RecoEgamma.EgammaPhotonProducers.allConversionSequence_cff import *
00175 from RecoEgamma.Configuration.RecoEgamma_cff import egammaHighLevelRecoPostPF
00176 allConversions.src = 'gsfGeneralConversionTrackMerger'
00177 famosConversionSequence = cms.Sequence(conversionTrackSequenceNoEcalSeeded*allConversionSequence)
00178 
00179 from TrackingTools.GsfTracking.CkfElectronCandidateMaker_cff import *
00180 from TrackingTools.GsfTracking.FwdElectronPropagator_cfi import *
00181 import TrackingTools.GsfTracking.GsfElectronFit_cfi
00182 
00183 egammaEcalDrivenReco = cms.Sequence(gsfEcalDrivenElectronSequence)
00184 electronGsfTracks = TrackingTools.GsfTracking.GsfElectronFit_cfi.GsfGlobalElectronTest.clone()
00185 electronGsfTracks.src = 'electronGSGsfTrackCandidates'
00186 electronGsfTracks.TTRHBuilder = 'WithoutRefit'
00187 electronGsfTracks.TrajectoryInEvent = True
00188 
00189 
00190 # PF related electron sequences defined in FastSimulation.ParticleFlow.ParticleFlowFastSim_cff
00191 from RecoEgamma.ElectronIdentification.electronIdSequence_cff import *
00192 
00193 iterativeTrackingBeginning = cms.Sequence(
00194     iterativeInitialSeeds+
00195     iterativePixelPairSeeds+
00196     iterativeMixedTripletStepSeeds+
00197     iterativePixelLessSeeds
00198     )
00199 
00200 famosGsfTrackSequence = cms.Sequence(
00201     iterativeTrackingBeginning+ 
00202     newCombinedSeeds+
00203     particleFlowCluster+ 
00204     ecalDrivenElectronSeeds+
00205     trackerDrivenElectronSeeds+
00206     electronMergedSeeds+
00207     electronGSGsfTrackCandidates+
00208     electronGsfTracks
00209 )
00210 
00211 # Photon reconstruction
00212 from RecoEgamma.EgammaPhotonProducers.photonSequence_cff import *
00213 photons.hbheInstance = ''
00214 from RecoEgamma.PhotonIdentification.photonId_cff import *
00215 
00216 famosPhotonSequence = cms.Sequence(
00217     photonSequence+
00218     photonIDSequence
00219 )
00220 
00221 # Add pre-calculated isolation sums for electrons (NB for photons they are stored in the Photon. All is done in the
00222 # sequence above
00223 from RecoEgamma.EgammaIsolationAlgos.egammaIsolationSequence_cff import *
00224 
00225 #Add egamma ecal interesting rec hits
00226 from RecoEgamma.EgammaIsolationAlgos.interestingEleIsoDetIdModule_cff import *
00227 from RecoEgamma.EgammaIsolationAlgos.interestingGamIsoDetIdModule_cff import *
00228 
00229 from RecoEgamma.EgammaIsolationAlgos.interestingEgammaIsoDetIdsSequence_cff import *
00230 
00231 
00232 
00233 # B tagging
00234 from RecoJets.JetAssociationProducers.ak5JTA_cff import *
00235 ak5JetTracksAssociatorAtVertex.tracks = 'generalTracks'
00236 from RecoVertex.Configuration.RecoVertex_cff import *
00237 from RecoVertex.BeamSpotProducer.BeamSpot_cff import *
00238 from RecoBTag.Configuration.RecoBTag_cff import *
00239 
00240 famosBTaggingSequence = cms.Sequence(
00241     btagging
00242 )
00243 
00244 
00245 
00246 # The sole simulation sequence
00247 famosSimulationSequence = cms.Sequence(
00248     offlineBeamSpot+
00249     cms.SequencePlaceholder("famosMixing")+
00250     famosSimHits+
00251     MuonSimHits+
00252     cms.SequencePlaceholder("mix")
00253     )
00254 
00255 # Famos pre-defined sequences (and self-explanatory names)
00256 famosWithTrackerHits = cms.Sequence(
00257     famosSimulationSequence+
00258     siTrackerGaussianSmearingRecHits
00259 )
00260 
00261 famosWithTrackerAndCaloHits = cms.Sequence(
00262     famosWithTrackerHits+
00263     caloRecHits
00264 )
00265 
00266 famosWithTracks = cms.Sequence(
00267     famosWithTrackerHits+
00268     iterativeTracking
00269 )
00270 
00271 famosWithTracksAndMuonHits = cms.Sequence(
00272     famosSimulationSequence+
00273     siTrackerGaussianSmearingRecHits+
00274     iterativeTracking+
00275     vertexreco+
00276     famosMuonSequence
00277 )
00278 
00279 famosWithTracksAndMuons = cms.Sequence(
00280     famosSimulationSequence+
00281     siTrackerGaussianSmearingRecHits+
00282     iterativeTracking+
00283     vertexreco+
00284     famosMuonSequence+
00285     caloRecHits+
00286     caloTowersRec+
00287     famosMuonIdAndIsolationSequence
00288 )
00289 
00290 famosWithCaloHits = cms.Sequence(
00291     famosSimulationSequence+
00292     caloRecHits
00293 )
00294 
00295 famosWithEcalClusters = cms.Sequence(
00296     famosWithCaloHits+
00297     ecalClusters+
00298     particleFlowCluster
00299 )
00300 
00301 famosWithTracksAndCaloHits = cms.Sequence(
00302     famosWithTracks+
00303     caloRecHits
00304 )
00305 
00306 famosWithTracksAndEcalClusters = cms.Sequence(
00307     famosWithTracksAndCaloHits+
00308     ecalClusters+
00309     particleFlowCluster
00310 )
00311 
00312     
00313 famosWithParticleFlow = cms.Sequence(
00314     famosWithTracksAndEcalClusters+
00315     vertexreco+
00316     famosGsfTrackSequence+
00317     famosConversionSequence+
00318     caloTowersRec+ 
00319     famosParticleFlowSequence+
00320     PFJetMet
00321 )
00322 
00323 famosWithCaloTowers = cms.Sequence(
00324     famosWithCaloHits+
00325     caloTowersRec
00326 )
00327 
00328 famosEcalDrivenElectronSequence = cms.Sequence(
00329     famosGsfTrackSequence+
00330     egammaEcalDrivenReco
00331 )
00332 
00333 famosElectronSequence = cms.Sequence(
00334     famosGsfTrackSequence+
00335     famosEcalDrivenElectronSequence+
00336     famosWithParticleFlow+
00337     egammaHighLevelRecoPostPF+
00338     gsfElectronSequence+
00339     eIdSequence
00340 )
00341 
00342 famosWithTracksAndCaloTowers = cms.Sequence(
00343     famosWithTracksAndCaloHits+
00344     caloTowersRec
00345 )
00346 
00347 famosWithTracksAndJets = cms.Sequence(
00348     famosWithTracksAndCaloTowers+
00349     vertexreco+
00350     caloJetMetGen+
00351     caloJetMet
00352 )
00353 
00354 ### Standard Jets _cannot_ be done without many other things...
00355 #######################################################################
00356 famosWithJets = cms.Sequence(
00357     famosWithTracksAndCaloTowers+
00358     vertexreco+
00359     ecalClusters+
00360     particleFlowCluster+
00361     famosGsfTrackSequence+
00362     famosMuonSequence+
00363     famosMuonIdAndIsolationSequence+
00364     famosParticleFlowSequence+
00365     gsfElectronSequence+        
00366     caloJetMetGen+
00367     caloJetMet
00368 )
00369 
00370 ##--- simplified IC05 jets only
00371 famosWithSimpleJets = cms.Sequence(
00372     famosWithTracksAndCaloTowers+
00373     vertexreco+
00374     caloJetMetGen+
00375     iterativeCone5CaloJets+
00376     ic5JetTracksAssociatorAtVertex
00377 )
00378 
00379 famosWithCaloTowersAndParticleFlow = cms.Sequence(
00380     famosWithParticleFlow+
00381     caloTowersRec
00382 )
00383 
00384 
00385 famosWithElectrons = cms.Sequence(
00386     famosWithTracksAndEcalClusters+
00387     caloTowersRec+
00388     famosGsfTrackSequence+
00389     famosParticleFlowSequence+
00390     famosElectronSequence+
00391     interestingEleIsoDetIdEB+
00392     interestingEleIsoDetIdEE+
00393     egammaIsolationSequence
00394 )
00395 
00396 famosWithPhotons = cms.Sequence(
00397     famosWithTracks+
00398     vertexreco+
00399     caloRecHits+
00400     ecalClusters+
00401     famosPhotonSequence+
00402     interestingGamIsoDetIdEB+
00403     interestingGamIsoDetIdEE
00404 )
00405 
00406 famosWithElectronsAndPhotons = cms.Sequence(
00407     famosWithTracks+
00408     vertexreco+
00409     caloRecHits+
00410     ecalClusters+
00411     caloTowersRec+
00412     famosElectronSequence+
00413     famosPhotonSequence+
00414     interestingEgammaIsoDetIds+
00415     egammaIsolationSequence
00416 )
00417 
00418 famosWithBTagging = cms.Sequence(
00419     famosWithTracksAndCaloTowers+
00420     vertexreco+
00421     ak5CaloJets+
00422     ak5JetTracksAssociatorAtVertex+
00423     ecalClusters+
00424     famosMuonSequence+
00425     reducedRecHits+ 
00426     famosBTaggingSequence
00427     )
00428 
00429 famosWithTauTagging = cms.Sequence(
00430     famosWithTracksAndCaloTowers+
00431     vertexreco+
00432     iterativeCone5CaloJets+
00433     ic5JetTracksAssociatorAtVertex+
00434     ecalClusters+
00435     famosTauTaggingSequence
00436 )
00437 
00438 famosWithPFTauTagging = cms.Sequence(
00439     famosWithCaloTowersAndParticleFlow+
00440     famosPFTauTaggingSequence
00441 )
00442 
00443 # The simulation sequence without muon digitization
00444 simulationNoMuonDigiWithFamos = cms.Sequence(
00445     famosSimulationSequence+
00446     siTrackerGaussianSmearingRecHits+
00447     caloRecHits
00448 )
00449 
00450 # The simulation and digitization sequence
00451 simulationWithFamos = cms.Sequence(
00452     famosSimulationSequence+
00453     muonDigi+
00454     siTrackerGaussianSmearingRecHits+
00455     caloRecHits
00456 )
00457 
00458 
00459 # The reconstruction sequence
00460 reconstructionWithFamos = cms.Sequence(
00461     iterativeTracking+
00462     vertexreco+
00463     caloTowersRec+
00464     ecalClusters+
00465     particleFlowCluster+
00466     famosGsfTrackSequence+
00467     famosMuonSequence+
00468     famosMuonIdAndIsolationSequence+
00469     famosConversionSequence+
00470     particleFlowTrackWithDisplacedVertex+
00471     famosEcalDrivenElectronSequence+
00472     famosPhotonSequence+
00473     famosParticleFlowSequence+
00474     egammaHighLevelRecoPostPF+
00475     muonshighlevelreco+
00476     particleFlowLinks+
00477     caloJetMetGen+
00478     caloJetMet+
00479     PFJetMet+
00480     ic5JetTracksAssociatorAtVertex+
00481     ak5JetTracksAssociatorAtVertex+
00482     famosTauTaggingSequence+
00483     reducedRecHits+
00484     famosBTaggingSequence+
00485     famosPFTauTaggingSequence
00486 )
00487 
00488 reconstructionWithFamosNoTk = cms.Sequence(
00489     vertexreco+
00490     caloRecHits+
00491     caloTowersRec+
00492     ecalClusters+
00493     particleFlowCluster+
00494     famosGsfTrackSequence+
00495     famosMuonSequence+
00496     famosMuonIdAndIsolationSequence+
00497     famosConversionSequence+
00498     particleFlowTrackWithDisplacedVertex+
00499     famosEcalDrivenElectronSequence+
00500     famosPhotonSequence+
00501     famosParticleFlowSequence+
00502     egammaHighLevelRecoPostPF+
00503     muonshighlevelreco+
00504     caloJetMetGen+
00505     caloJetMet+
00506     PFJetMet+
00507     ic5JetTracksAssociatorAtVertex+
00508     ak5JetTracksAssociatorAtVertex+
00509     famosTauTaggingSequence+
00510     reducedRecHits+
00511     famosBTaggingSequence+
00512     famosPFTauTaggingSequence
00513 )
00514 
00515 # Simulation plus reconstruction
00516 famosWithEverything = cms.Sequence(
00517     simulationWithFamos+
00518     reconstructionWithFamos
00519 )
00520