CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
AlcaRecoSelection_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 
4 
5 ##
6 ## ALCARECOTkAlMuonIsolated selection
7 ##
8 
9 ## First select goodId + isolated muons
10 TkAlGoodIdMuonSelector = cms.EDFilter("MuonSelector",
11  src = cms.InputTag('muons'),
12  cut = cms.string('isGlobalMuon &'
13  'isTrackerMuon &'
14  'numberOfMatches > 1 &'
15  'globalTrack.hitPattern.numberOfValidMuonHits > 0 &'
16  'abs(eta) < 2.5 &'
17  'globalTrack.normalizedChi2 < 20.'),
18  filter = cms.bool(True)
19 )
20 TkAlRelCombIsoMuonSelector = cms.EDFilter("MuonSelector",
21  src = cms.InputTag(''),
22  cut = cms.string('(isolationR03().sumPt + isolationR03().emEt + isolationR03().hadEt)/pt < 0.15'),
23  filter = cms.bool(True)
24 )
25 ALCARECOTkAlMuonIsolatedGoodMuons = TkAlGoodIdMuonSelector.clone()
26 ALCARECOTkAlMuonIsolatedRelCombIsoMuons = TkAlRelCombIsoMuonSelector.clone(src = 'ALCARECOTkAlMuonIsolatedGoodMuons')
27 
28 ## Then select their tracks with additional cuts
30 ALCARECOTkAlMuonIsolated = Alignment.CommonAlignmentProducer.AlignmentTrackSelector_cfi.AlignmentTrackSelector.clone(
31  filter = True, ##do not store empty events
32  applyBasicCuts = True,
33  ptMin = 2.0, ##GeV
34  etaMin = -3.5,
35  etaMax = 3.5,
36  nHitMin = 0
37 )
38 ALCARECOTkAlMuonIsolated.GlobalSelector.muonSource = 'ALCARECOTkAlMuonIsolatedRelCombIsoMuons'
39 # Isolation is shifted to the muon preselection, and then applied intrinsically if applyGlobalMuonFilter = True
40 ALCARECOTkAlMuonIsolated.GlobalSelector.applyIsolationtest = False
41 ALCARECOTkAlMuonIsolated.GlobalSelector.applyGlobalMuonFilter = True
42 ALCARECOTkAlMuonIsolated.TwoBodyDecaySelector.applyMassrangeFilter = False
43 ALCARECOTkAlMuonIsolated.TwoBodyDecaySelector.applyChargeFilter = False
44 ALCARECOTkAlMuonIsolated.TwoBodyDecaySelector.applyAcoplanarityFilter = False
45 
46 ## Define ALCARECO sequence
47 mySeqALCARECOTkAlMuonIsolated = cms.Sequence(ALCARECOTkAlMuonIsolatedGoodMuons*ALCARECOTkAlMuonIsolatedRelCombIsoMuons*ALCARECOTkAlMuonIsolated)
48 
49 
50 
51 ##
52 ## Good Primary Vertex Selection
53 ##
54 goodPVs = cms.EDFilter("VertexSelector",
55  src = cms.InputTag('offlinePrimaryVertices'),
56  cut = cms.string('ndof>4 &'
57  'abs(z)<24 &'
58  '!isFake &'
59  'position.Rho<2'
60  ),
61 )
62 oneGoodPVSelection = cms.EDFilter("VertexCountFilter",
63  src = cms.InputTag('goodPVs'),
64  minNumber = cms.uint32(1),
65  maxNumber = cms.uint32(99999),
66 
67 )
68 seqVertexSelection = cms.Sequence(goodPVs*oneGoodPVSelection)
69 
70 
71 
72 
73 
74 
75 
dont throw on unknown path names