CMS 3D CMS Logo

PbPb_ZMuSkimMuonDPG_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 import copy
5 from PhysicsTools.PatAlgos.producersLayer1.genericParticleProducer_cfi import patGenericParticles
6 
7 
8 PbPbZMuHLTFilter = copy.deepcopy(hltHighLevel)
9 PbPbZMuHLTFilter.throw = cms.bool(False)
10 PbPbZMuHLTFilter.HLTPaths = ["HLT_HIL2SingleMu*","HLT_HIL3SingleMu*"]
11 
12 # selection of valid vertex
13 primaryVertexFilterForPbPbZMuSkim = cms.EDFilter("VertexSelector",
14  src = cms.InputTag("offlinePrimaryVertices"),
15  cut = cms.string("!isFake && abs(z) <= 25 && position.Rho <= 2"),
16  filter = cms.bool(True),
17  )
18 
19 
21 
22 
23 looseMuonsForPbPbZMuSkim = cms.EDFilter("TrackSelector",
24  src = cms.InputTag("generalTracks"),
25  cut = cms.string('pt > 10 && abs(eta)<2.4 && (charge!=0)'),
26  filter = cms.bool(True)
27  )
28 
29 
30 
31 
32 concreteLooseMuonsForPbPbZMuSkim = cms.EDProducer("ConcreteChargedCandidateProducer",
33  src = cms.InputTag("looseMuonsForPbPbZMuSkim"),
34  particleType = cms.string("mu+") # the sign is dummy
35  )
36 
37 
38 
39 
40 tkIsoDepositTkForPbPbZMuSkim = cms.EDProducer("CandIsoDepositProducer",
41  src = cms.InputTag("ConcretelooseMuonsForPbPbZMuSkim"),
42  MultipleDepositsFlag = cms.bool(False),
43  trackType = cms.string('track'),
44  ExtractorPSet = cms.PSet(
45  #MIsoTrackExtractorBlock
46  Diff_z = cms.double(0.2),
47  inputTrackCollection = cms.InputTag("generalTracks"),
48  BeamSpotLabel = cms.InputTag("offlineBeamSpot"),
49  ComponentName = cms.string('TrackExtractor'),
50  DR_Max = cms.double(0.5),
51  Diff_r = cms.double(0.1),
52  Chi2Prob_Min = cms.double(-1.0),
53  DR_Veto = cms.double(0.01),
54  NHits_Min = cms.uint32(0),
55  Chi2Ndof_Max = cms.double(1e+64),
56  Pt_Min = cms.double(-1.0),
57  DepositLabel = cms.untracked.string('tracker'),
58  BeamlineOption = cms.string('BeamSpotFromEvent')
59  )
60  )
61 
62 
63 allPatTracksForPbPbZMuSkim = patGenericParticles.clone(
64  src = cms.InputTag("ConcretelooseMuonsForPbPbZMuSkim"),
65  # isolation configurables
66  userIsolation = cms.PSet(
67  tracker = cms.PSet(
68  veto = cms.double(0.015),
69  src = cms.InputTag("tkIsoDepositTkForPbPbZMuSkim"),
70  deltaR = cms.double(0.3),
71  #threshold = cms.double(1.5)
72  ),
73  ),
74  isoDeposits = cms.PSet(
75  tracker = cms.InputTag("tkIsoDepositTkForPbPbZMuSkim"),
76  ),
77  )
78 
79 
80 
81 
82 
83 looseIsoMuonsForPbPbZMuSkim = cms.EDFilter("PATGenericParticleSelector",
84  src = cms.InputTag("allPatTracksForPbPbZMuSkim"),
85  cut = cms.string("(userIsolation('pat::TrackIso')/pt)<0.4"),
86  filter = cms.bool(True)
87  )
88 
89 
90 
91 
92 
93 
94 tightMuonsForPbPbZMuSkim = cms.EDFilter("MuonSelector",
95  src = cms.InputTag("muons"),
96  cut = cms.string("(isGlobalMuon) && pt > 15. && (abs(eta)<2.4) && (isPFMuon>0) && (globalTrack().normalizedChi2() < 10) && (globalTrack().hitPattern().numberOfValidMuonHits()>0) && (numberOfMatchedStations() > 1) && (innerTrack().hitPattern().numberOfValidPixelHits() > 0) && (innerTrack().hitPattern().trackerLayersWithMeasurement() > 5)"),
97  filter = cms.bool(True)
98  )
99 
100 
101 
102 
103 # build Z-> MuMu candidates
104 dimuonsForPbPbZMuSkim = cms.EDProducer("CandViewShallowCloneCombiner",
105  checkCharge = cms.bool(False),
106  cut = cms.string('(mass > 60)'),
107  decay = cms.string("tightMuonsForPbPbZMuSkim concreteLooseMuonsForPbPbZMuSkim")
108  )
109 
110 
111 # Z filter
112 dimuonsFilterForPbPbZMuSkim = cms.EDFilter("CandViewCountFilter",
113  src = cms.InputTag("dimuonsForPbPbZMuSkim"),
114  minNumber = cms.uint32(1)
115  )
116 
117 
118 
119 diMuonSelSeqForPbPbZMuSkim = cms.Sequence(
120  PbPbZMuHLTFilter *
121  primaryVertexFilterForPbPbZMuSkim *
122  looseMuonsForPbPbZMuSkim *
123  concreteLooseMuonsForPbPbZMuSkim *
124  #tkIsoDepositTkForPbPbZMuSkim *
125  #allPatTracksForPbPbZMuSkim *
126  #looseIsoMuonsForPbPbZMuSkim *
127  tightMuonsForPbPbZMuSkim *
128  dimuonsForPbPbZMuSkim *
129  dimuonsFilterForPbPbZMuSkim
130 )
131 
132 
133 
134 
135 
136