CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
PDWG_BPHSkim_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
4 
5 # muons with trigger info
7 oniaPATMuonsWithoutTrigger = PhysicsTools.PatAlgos.producersLayer1.muonProducer_cfi.patMuons.clone(
8  muonSource = 'muons',
9  embedTrack = True,
10  embedCombinedMuon = True,
11  embedStandAloneMuon = True,
12  embedPFCandidate = False,
13  embedCaloMETMuonCorrs = cms.bool(False),
14  embedTcMETMuonCorrs = cms.bool(False),
15  embedPfEcalEnergy = cms.bool(False),
16  embedPickyMuon = False,
17  embedTpfmsMuon = False,
18  userIsolation = cms.PSet(), # no extra isolation beyond what's in reco::Muon itself
19  isoDeposits = cms.PSet(), # no heavy isodeposits
20  addGenMatch = False, # no mc
21  addTriggerMatching = cms.bool(False)
22 )
23 
24 oniaSelectedMuons = cms.EDFilter('PATMuonSelector',
25  src = cms.InputTag('oniaPATMuonsWithoutTrigger'),
26  cut = cms.string('muonID(\"TMOneStationTight\")'
27  ' && abs(innerTrack.dxy) < 0.3'
28  ' && abs(innerTrack.dz) < 20.'
29  ' && innerTrack.hitPattern.trackerLayersWithMeasurement > 5'
30  ' && innerTrack.hitPattern.pixelLayersWithMeasurement > 0'
31  ' && innerTrack.quality(\"highPurity\")'
32  ' && ((abs(eta) <= 0.9 && pt > 2.5) || (0.9 < abs(eta) <= 2.4 && pt > 1.5))'
33  ),
34  filter = cms.bool(True)
35 )
36 
37 # tracks
38 oniaSelectedTracks=cms.EDFilter("TrackSelector",
39  src = cms.InputTag("generalTracks"),
40  cut = cms.string('pt > 0.7 && abs(eta) <= 3.0'
41  '&& charge !=0'
42  '&& quality(\"highPurity\")')
43 )
44 
45 # dimuon = Onia2MUMU
46 from HeavyFlavorAnalysis.Onia2MuMu.onia2MuMuPAT_cfi import *
47 onia2MuMuPAT.muons=cms.InputTag('oniaSelectedMuons')
48 onia2MuMuPAT.primaryVertexTag=cms.InputTag('offlinePrimaryVertices')
49 onia2MuMuPAT.beamSpotTag=cms.InputTag('offlineBeamSpot')
50 onia2MuMuPAT.dimuonSelection=cms.string("0.2 < mass && abs(daughter('muon1').innerTrack.dz - daughter('muon2').innerTrack.dz) < 25")
51 onia2MuMuPAT.addMCTruth = cms.bool(False)
52 
53 onia2MuMuPATCounter = cms.EDFilter('CandViewCountFilter',
54  src = cms.InputTag('onia2MuMuPAT'),
55  minNumber = cms.uint32(1),
56  )
57 
58 # make photon candidate conversions for P-wave studies
59 from HeavyFlavorAnalysis.Onia2MuMu.OniaPhotonConversionProducer_cfi import PhotonCandidates as oniaPhotonCandidates
60 
61 # add v0 with tracks embed
62 from HeavyFlavorAnalysis.Onia2MuMu.OniaAddV0TracksProducer_cfi import *
63 
64 # Pick branches you want to keep
65 BPHSkim_EventContent = cms.PSet(
66  outputCommands = cms.untracked.vstring(
67  'drop *',
68  'keep recoVertexs_offlinePrimaryVertices_*_*',
69  'keep *_offlineBeamSpot_*_*',
70  'keep *_TriggerResults_*_HLT',
71  'keep *_hltGtStage2ObjectMap_*_HLT',
72  'keep *_hltTriggerSummaryAOD_*_HLT',
73  'keep *_gmtStage2Digis_Muon_RECO',
74  'keep *_gtDigis_*_RECO',
75  'keep *_oniaSelectedTracks_*_*',
76  'keep *_oniaPhotonCandidates_*_*',
77  'keep *_onia2MuMuPAT_*_*',
78  'keep *_oniaV0Tracks_*_*',
79  'keep PileupSummaryInfos_*_*_*'
80  )
81 )
82 
83 BPHSkimSequence = cms.Sequence(
84  oniaPATMuonsWithoutTrigger *
85  oniaSelectedMuons *
86  onia2MuMuPAT *
87  onia2MuMuPATCounter *
88  oniaPhotonCandidates *
89  oniaV0Tracks *
90  oniaSelectedTracks
91 )