File indexing completed on 2025-05-09 22:40:13
0001 import FWCore.ParameterSet.Config as cms
0002 from PhysicsTools.NanoAOD.common_cff import *
0003
0004
0005
0006 MuMu = cms.EDProducer(
0007 'DiMuonBuilder',
0008 src = cms.InputTag('muonBPH', 'SelectedMuons'),
0009 transientTracksSrc = cms.InputTag('muonBPH', 'SelectedTransientMuons'),
0010 lep1Selection = cms.string('pt > 4.0 && abs(eta) < 2.4 && isLooseMuon && isGlobalMuon'),
0011 lep2Selection = cms.string('pt > 3.0 && abs(eta) < 2.4 && isLooseMuon && isGlobalMuon'),
0012 beamSpot = cms.InputTag("offlineBeamSpot"),
0013 preVtxSelection = cms.string('abs(userCand("l1").vz - userCand("l2").vz) <= 1.'
0014 '&& 0 < mass() && mass() < 15.0 '
0015 '&& charge() == 0'
0016 '&& userFloat("lep_deltaR") > 0.03'),
0017 postVtxSelection = cms.string('0 < userFloat("fitted_mass") && userFloat("fitted_mass") < 15.0'
0018 '&& userFloat("sv_prob") > 0.001')
0019 )
0020
0021 CountDiMuonBPH = cms.EDFilter("PATCandViewCountFilter",
0022 minNumber = cms.uint32(1),
0023 maxNumber = cms.uint32(999999),
0024 src = cms.InputTag("MuMu:SelectedDiLeptons")
0025 )
0026
0027
0028
0029 MuMuTable = cms.EDProducer("SimpleCompositeCandidateFlatTableProducer",
0030 src = cms.InputTag("MuMu:SelectedDiLeptons"),
0031 cut = cms.string(""),
0032 name = cms.string("MuMu"),
0033 doc = cms.string("Dilepton collections"),
0034 singleton = cms.bool(False),
0035 extension = cms.bool(False),
0036 variables = cms.PSet(CandVars,
0037 l1_idx = Var("userInt('l1_idx')", int, doc = "leading muon index to the BPH muon collection"),
0038 l2_idx = Var("userInt('l2_idx')", int, doc = "subleading muon index to the BPH muon collection"),
0039 fit_mass = Var("userFloat('fitted_mass')", float, doc="Fitted dilepton mass", precision=10),
0040 fit_massErr = Var("userFloat('fitted_massErr')", float, doc = "post-fit uncertainty of the mass of the B candidate", precision=10),
0041 svprob = Var("userFloat('sv_prob')", float, doc="Vtx fit probability", precision=10),
0042 l_xy = Var("userFloat('l_xy')", float, doc = "post-fit vertex displacement on transverse plane wrt beamspot", precision=10),
0043 l_xy_unc = Var("userFloat('l_xy_unc')", float, doc = "post-fit vertex uncertainty of displacement on transverse plane wrt beamspot", precision=10),
0044 vtx_x =Var("userFloat('vtx_x')", float, doc="Vtx position in x", precision=10),
0045 vtx_y = Var("userFloat('vtx_y')", float, doc="Vtx position in y", precision=10),
0046 vtx_z = Var("userFloat('vtx_z')", float, doc="Vtx position in y", precision=10),
0047 cos2D = Var("userFloat('cos_theta_2D')", float, doc = "cos 2D of pre-fit candidate wrt beamspot", precision=10),
0048 fit_cos2D = Var("userFloat('fitted_cos_theta_2D')", float, doc = "cos 2D of fitted vertex wrt beamspot", precision=10),
0049
0050 )
0051 )
0052
0053 MuMuSequence = cms.Sequence(MuMu)
0054 MuMuTables = cms.Sequence(MuMuTable)