CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_9/src/PhysicsTools/PatAlgos/python/recoLayer0/genericTrackCandidates_cff.py

Go to the documentation of this file.
00001 import FWCore.ParameterSet.Config as cms
00002 
00003 from SimGeneral.HepPDTESSource.pythiapdt_cfi           import *
00004 from Configuration.StandardSequences.MagneticField_cff import *
00005 
00006 patAODTrackCandsUnfiltered = cms.EDProducer("ConcreteChargedCandidateProducer",
00007     src          = cms.InputTag("generalTracks"),
00008     particleType = cms.string('mu+')   # to fix mass hypothesis
00009 )
00010 
00011 patAODTrackCands = cms.EDFilter("CandViewSelector",
00012     src = cms.InputTag("patAODTrackCandsUnfiltered"),
00013     cut = cms.string('pt > 15')
00014 )
00015 
00016 ## Configure tracker isolation
00017 from RecoMuon.MuonIsolationProducers.trackExtractorBlocks_cff import MIsoTrackExtractorCtfBlock
00018 patAODTrackIsoDepositCtfTk = cms.EDProducer("CandIsoDepositProducer",
00019     src                  = cms.InputTag("patAODTrackCands"),
00020     trackType            = cms.string('best'),
00021     MultipleDepositsFlag = cms.bool(False),
00022     ExtractorPSet        = cms.PSet( MIsoTrackExtractorCtfBlock )
00023 )
00024 
00025 ## Configure calorimetric isolation
00026 from RecoMuon.MuonIsolationProducers.caloExtractorByAssociatorBlocks_cff import MIsoCaloExtractorByAssociatorTowersBlock
00027 patAODTrackIsoDepositCalByAssociatorTowers = cms.EDProducer("CandIsoDepositProducer",
00028     src                  = cms.InputTag("patAODTrackCands"),
00029     trackType            = cms.string('best'),
00030     MultipleDepositsFlag = cms.bool(True),
00031     ExtractorPSet        = cms.PSet( MIsoCaloExtractorByAssociatorTowersBlock )
00032 )
00033 
00034 ## Select isolation labels to use
00035 patAODTrackIsolationLabels = cms.VInputTag(
00036     cms.InputTag("patAODTrackIsoDepositCalByAssociatorTowers","ecal"), 
00037     cms.InputTag("patAODTrackIsoDepositCalByAssociatorTowers","hcal"), 
00038     cms.InputTag("patAODTrackIsoDepositCalByAssociatorTowers","ho"), 
00039     cms.InputTag("patAODTrackIsoDepositCtfTk")
00040 )
00041 
00042 # Isolation converter module
00043 patAODTrackIsolations = cms.EDFilter("MultipleIsoDepositsToValueMaps",
00044     collection   = cms.InputTag("patAODTrackCands"),
00045     associations = patAODTrackIsolationLabels
00046 )
00047 
00048 # Isolation re-keying to clean layer 0 output collection
00049 layer0TrackIsolations = cms.EDFilter("CandManyValueMapsSkimmerIsoDeposits",
00050     collection   = cms.InputTag("allLayer0TrackCands"),
00051     backrefs     = cms.InputTag("allLayer0TrackCands"),
00052     commonLabel  = cms.InputTag("patAODTrackIsolations"),
00053     associations = patAODTrackIsolationLabels
00054 )
00055 
00056 # sequence to run on AOD before PAT cleaners
00057 patAODTrackCandSequence = cms.Sequence(
00058         patAODTrackCandsUnfiltered *
00059         patAODTrackCands *
00060         patAODTrackIsoDepositCalByAssociatorTowers *
00061         patAODTrackIsoDepositCtfTk *
00062         patAODTrackIsolations
00063 )
00064 
00065 # sequence to run at end of layer 0 
00066 patLayer0TrackCandSequence = cms.Sequence( layer0TrackIsolations )
00067