test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
genericTrackCandidates_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
5 
6 patAODTrackCandsUnfiltered = cms.EDProducer("ConcreteChargedCandidateProducer",
7  src = cms.InputTag("generalTracks"),
8  particleType = cms.string('mu+') # to fix mass hypothesis
9 )
10 
11 patAODTrackCands = cms.EDFilter("CandViewSelector",
12  src = cms.InputTag("patAODTrackCandsUnfiltered"),
13  cut = cms.string('pt > 15')
14 )
15 
16 ## Configure tracker isolation
17 from RecoMuon.MuonIsolationProducers.trackExtractorBlocks_cff import MIsoTrackExtractorCtfBlock
18 patAODTrackIsoDepositCtfTk = cms.EDProducer("CandIsoDepositProducer",
19  src = cms.InputTag("patAODTrackCands"),
20  trackType = cms.string('best'),
21  MultipleDepositsFlag = cms.bool(False),
22  ExtractorPSet = cms.PSet( MIsoTrackExtractorCtfBlock )
23 )
24 
25 ## Configure calorimetric isolation
26 from RecoMuon.MuonIsolationProducers.caloExtractorByAssociatorBlocks_cff import MIsoCaloExtractorByAssociatorTowersBlock
27 patAODTrackIsoDepositCalByAssociatorTowers = cms.EDProducer("CandIsoDepositProducer",
28  src = cms.InputTag("patAODTrackCands"),
29  trackType = cms.string('best'),
30  MultipleDepositsFlag = cms.bool(True),
31  ExtractorPSet = cms.PSet( MIsoCaloExtractorByAssociatorTowersBlock )
32 )
33 
34 ## Select isolation labels to use
35 patAODTrackIsolationLabels = cms.VInputTag(
36  #cms.InputTag("patAODTrackIsoDepositCalByAssociatorTowers","ecal"),
37  #cms.InputTag("patAODTrackIsoDepositCalByAssociatorTowers","hcal"),
38  #cms.InputTag("patAODTrackIsoDepositCalByAssociatorTowers","ho"),
39  cms.InputTag("patAODTrackIsoDepositCtfTk")
40 )
41 
42 # Isolation converter module
43 patAODTrackIsolations = cms.EDFilter("MultipleIsoDepositsToValueMaps",
44  collection = cms.InputTag("patAODTrackCands"),
45  associations = patAODTrackIsolationLabels
46 )
47 
48 # Isolation re-keying to clean layer 0 output collection
49 layer0TrackIsolations = cms.EDFilter("CandManyValueMapsSkimmerIsoDeposits",
50  collection = cms.InputTag("allLayer0TrackCands"),
51  backrefs = cms.InputTag("allLayer0TrackCands"),
52  commonLabel = cms.InputTag("patAODTrackIsolations"),
53  associations = patAODTrackIsolationLabels
54 )
55 
56 # sequence to run on AOD before PAT cleaners
57 patAODTrackCandSequence = cms.Sequence(
58  patAODTrackCandsUnfiltered *
59  patAODTrackCands *
60  patAODTrackIsoDepositCalByAssociatorTowers *
61  patAODTrackIsoDepositCtfTk *
62  patAODTrackIsolations
63 )
64 
65 # sequence to run at end of layer 0
66 patLayer0TrackCandSequence = cms.Sequence( layer0TrackIsolations )
67