CMS 3D CMS Logo

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 )
22 
23 oniaSelectedMuons = cms.EDFilter('PATMuonSelector',
24  src = cms.InputTag('oniaPATMuonsWithoutTrigger'),
25  cut = cms.string('muonID(\"TMOneStationTight\")'
26  ' && abs(innerTrack.dxy) < 0.3'
27  ' && abs(innerTrack.dz) < 20.'
28  ' && innerTrack.hitPattern.trackerLayersWithMeasurement > 5'
29  ' && innerTrack.hitPattern.pixelLayersWithMeasurement > 0'
30  ' && innerTrack.quality(\"highPurity\")'
31  ' && ((abs(eta) <= 0.9 && pt > 2.5) || (0.9 < abs(eta) <= 2.4 && pt > 1.5))'
32  ),
33  filter = cms.bool(True)
34 )
35 
36 # tracks
37 oniaSelectedTracks=cms.EDFilter("TrackSelector",
38  src = cms.InputTag("generalTracks"),
39  cut = cms.string('pt > 0.7 && abs(eta) <= 3.0'
40  '&& charge !=0'
41  '&& quality(\"highPurity\")')
42 )
43 
44 # dimuon = Onia2MUMU
46 onia2MuMuPAT.muons=cms.InputTag('oniaSelectedMuons')
47 onia2MuMuPAT.primaryVertexTag=cms.InputTag('offlinePrimaryVertices')
48 onia2MuMuPAT.beamSpotTag=cms.InputTag('offlineBeamSpot')
49 onia2MuMuPAT.dimuonSelection=cms.string("0.2 < mass && abs(daughter('muon1').innerTrack.dz - daughter('muon2').innerTrack.dz) < 25")
50 onia2MuMuPAT.addMCTruth = cms.bool(False)
51 
52 onia2MuMuPATCounter = cms.EDFilter('CandViewCountFilter',
53  src = cms.InputTag('onia2MuMuPAT'),
54  minNumber = cms.uint32(1),
55  filter = cms.bool(True)
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
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 )