File indexing completed on 2025-05-09 22:40:13
0001 import FWCore.ParameterSet.Config as cms
0002 from PhysicsTools.BPHNano.common_cff import *
0003
0004
0005
0006 KshortToPiPi = cms.EDProducer(
0007 'V0ReBuilder',
0008 V0s = cms.InputTag('slimmedKshortVertices'),
0009 trkSelection = cms.string('pt > 0.35 && abs(eta) < 3.0 && trackHighPurity()'),
0010 V0Selection = cms.string('0.3 < mass && mass < 0.7'),
0011 postVtxSelection = cms.string('0.3 < mass && mass < 0.7'
0012 '&& userFloat("sv_prob") > 0.0001'),
0013 beamSpot = cms.InputTag("offlineBeamSpot"),
0014 track_match = cms.InputTag('tracksBPH', 'SelectedTracks'),
0015 isLambda = cms.bool(False)
0016 )
0017
0018 LambdaToProtonPi = cms.EDProducer(
0019 'V0ReBuilder',
0020 V0s = cms.InputTag('slimmedLambdaVertices'),
0021 trkSelection = cms.string('pt > 0.35 && abs(eta) < 3.0 && trackHighPurity()'),
0022 V0Selection = cms.string('1 < mass && mass < 1.2'),
0023 postVtxSelection = cms.string('1 < mass && mass < 1.17'
0024 '&& userFloat("sv_prob") > 0.0001'),
0025 beamSpot = cms.InputTag("offlineBeamSpot"),
0026 track_match = cms.InputTag('tracksBPH', 'SelectedTracks'),
0027 isLambda = cms.bool(True)
0028 )
0029
0030
0031
0032
0033 KshortToPiPiTable = cms.EDProducer(
0034 'SimpleCompositeCandidateFlatTableProducer',
0035 src = cms.InputTag('KshortToPiPi','SelectedV0Collection'),
0036 cut = cms.string(""),
0037 name = cms.string("Kshort"),
0038 doc = cms.string("Kshort Variables"),
0039 singleton=cms.bool(False),
0040 extension=cms.bool(False),
0041 variables = cms.PSet(
0042
0043 CandVars,
0044
0045 chi2 = Var("userFloat('sv_chi2')", float, doc = "chi2 of fitted vertex", precision=10),
0046 svprob = Var("userFloat('sv_prob')", float, doc = "vertex probability of fitted vertex", precision=10),
0047 l_xy = Var("userFloat('l_xy')", float, doc = "post-fit vertex displacement on transverse plane", precision=10),
0048 l_xy_unc = Var("userFloat('l_xy_unc')", float, doc = "post-fit vertex uncertainty of the diplacement on the transverse plane", precision=10),
0049 prefit_mass = Var("userFloat('prefit_mass')", float, doc = "pre-fit mass of the vertex", precision=10),
0050 vtx_x = Var("userFloat('vtx_x')", float, doc = "x position of fitted vertex", precision=10),
0051 vtx_y = Var("userFloat('vtx_y')", float, doc = "y position of fitted vertex", precision=10),
0052 vtx_z = Var("userFloat('vtx_z')", float, doc = "z position of fitted vertex", precision=10),
0053 vtx_cxx = Var("userFloat('vtx_cxx')", float, doc = "error x of fitted vertex", precision=10),
0054 vtx_cyy = Var("userFloat('vtx_cyy')", float, doc = "error y of fitted vertex", precision=10),
0055 vtx_czz = Var("userFloat('vtx_czz')", float, doc = "error z of fitted vertex", precision=10),
0056 vtx_cyx = Var("userFloat('vtx_cyx')", float, doc = "error yx of fitted vertex", precision=10),
0057 vtx_czx = Var("userFloat('vtx_czx')", float, doc = "error zx of fitted vertex", precision=10),
0058 vtx_czy = Var("userFloat('vtx_czy')", float, doc = "error zy of fitted vertex", precision=10),
0059 fit_cos_theta_2D = Var("userFloat('fitted_cos_theta_2D')", float, doc = "cos 2D of fitted vertex wrt beamspot", precision=10),
0060
0061 fit_mass = Var("userFloat('fitted_mass')", float, doc = "post-fit mass of the vertex", precision=10),
0062 fit_massErr = Var("userFloat('massErr')", float, doc = "post-fit mass error", precision=10),
0063 fit_trk1_pt = Var("userFloat('trk1_pt')", float, doc = "post-fit pt of the leading track", precision=10),
0064 fit_trk1_eta = Var("userFloat('trk1_eta')", float, doc = "post-fit eta of the leading track", precision=10),
0065 fit_trk1_phi = Var("userFloat('trk1_phi')", float, doc = "post-fit phi of the leading track", precision=10),
0066 fit_trk2_pt = Var("userFloat('trk2_pt')", float, doc = "post-fit pt of the subleading track", precision=10),
0067 fit_trk2_eta = Var("userFloat('trk2_eta')", float, doc = "post-fit eta of the subleading track", precision=10),
0068 fit_trk2_phi = Var("userFloat('trk2_phi')", float, doc = "post-fit phi of the subleading track", precision=10),
0069
0070 trk1_idx = Var("userInt('trk1_idx')", int, doc = "leading track index to the BPH track collection"),
0071 trk2_idx = Var("userInt('trk2_idx')", int, doc = "subleading track index to the BPH track collection"),
0072 )
0073 )
0074
0075 CountKshortToPiPi = cms.EDFilter("PATCandViewCountFilter",
0076 minNumber = cms.uint32(1),
0077 maxNumber = cms.uint32(999999),
0078 src = cms.InputTag('KshortToPiPi','SelectedV0Collection')
0079 )
0080
0081 LambdaToProtonPiTable = KshortToPiPiTable.clone(
0082 src = cms.InputTag('LambdaToProtonPi','SelectedV0Collection'),
0083 name = cms.string("Lambda"),
0084 doc = cms.string("Lambda Variable")
0085 )
0086
0087 CountLambdaToProtonPi = cms.EDFilter("PATCandViewCountFilter",
0088 minNumber = cms.uint32(1),
0089 maxNumber = cms.uint32(999999),
0090 src = cms.InputTag('LambdaToProtonPi','SelectedV0Collection')
0091 )
0092
0093
0094 KshortPiPiBPHMCMatch = cms.EDProducer("MCMatcher",
0095 src = KshortToPiPiTable.src,
0096 matched = cms.InputTag("finalGenParticlesBPH"),
0097 mcPdgId = cms.vint32(310),
0098 checkCharge = cms.bool(False),
0099 mcStatus = cms.vint32(2),
0100 maxDeltaR = cms.double(0.3),
0101 maxDPtRel = cms.double(1.0),
0102 resolveAmbiguities = cms.bool(True),
0103 resolveByMatchQuality = cms.bool(True),
0104 )
0105
0106 LambdaProtonPiBPHMCMatch = cms.EDProducer("MCMatcher",
0107 src = LambdaToProtonPiTable.src,
0108 matched = cms.InputTag("finalGenParticlesBPH"),
0109 mcPdgId = cms.vint32(3122),
0110 checkCharge = cms.bool(False),
0111 mcStatus = cms.vint32(2),
0112 maxDeltaR = cms.double(0.3),
0113 maxDPtRel = cms.double(1.0),
0114 resolveAmbiguities = cms.bool(True),
0115 resolveByMatchQuality = cms.bool(True),
0116 )
0117
0118
0119 KshortPiPiBPHMCTable = cms.EDProducer("CandMCMatchTableProducer",
0120 src = KshortToPiPiTable.src,
0121 mcMap = cms.InputTag("KshortPiPiBPHMCMatch"),
0122 objName = KshortToPiPiTable.name,
0123 objType = cms.string("Other"),
0124 branchName = cms.string("genPart"),
0125 docString = cms.string("MC matching to status==1 muons"),
0126 )
0127
0128
0129 LambdaProtonPiBPHMCTable = cms.EDProducer("CandMCMatchTableProducer",
0130 src = LambdaToProtonPiTable.src,
0131 mcMap = cms.InputTag("LambdaProtonPiBPHMCMatch"),
0132 objName = LambdaToProtonPiTable.name,
0133 objType = cms.string("Other"),
0134 branchName = cms.string("genPart"),
0135 docString = cms.string("MC matching to status==1 muons"),
0136 )
0137
0138 KshortToPiPiSequence = cms.Sequence( KshortToPiPi )
0139 KshortToPiPiSequenceMC = cms.Sequence( KshortToPiPi +KshortPiPiBPHMCMatch)
0140 KshortToPiPiTables = cms.Sequence( KshortToPiPiTable)
0141 KshortToPiPiTablesMC = cms.Sequence( KshortToPiPiTable+KshortPiPiBPHMCTable)
0142
0143
0144 LambdaToProtonPiSequence = cms.Sequence( LambdaToProtonPi )
0145 LambdaToProtonPiSequenceMC = cms.Sequence( LambdaToProtonPi + LambdaProtonPiBPHMCMatch)
0146 LambdaToProtonPiTables = cms.Sequence( LambdaToProtonPiTable)
0147 LambdaToProtonPiTablesMC = cms.Sequence( LambdaToProtonPiTable+LambdaProtonPiBPHMCTable)
0148
0149