Skip to content

Commit

Permalink
Merge pull request #46287 from rbhattacharya04/VXBS_High_Pt
Browse files Browse the repository at this point in the history
VXBS For High Pt
  • Loading branch information
cmsbuild authored Oct 29, 2024
2 parents 52219c0 + bb867d1 commit 5754132
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
3 changes: 2 additions & 1 deletion PhysicsTools/NanoAOD/python/custom_muon_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,8 @@ def AddVariablesForMuon(proc):
# tuneP_ptErr is now moved to standard NanoAODs
proc.muonTable.variables.tuneP_eta = Var("? tunePMuonBestTrack().isNonnull() && tunePMuonBestTrack().isAvailable() ? tunePMuonBestTrack().eta(): -99", float, doc="tunePMuonBestTrack Eta")
proc.muonTable.variables.tuneP_phi = Var("? tunePMuonBestTrack().isNonnull() && tunePMuonBestTrack().isAvailable() ? tunePMuonBestTrack().phi(): -99", float, doc="tunePMuonBestTrack Phi")
proc.muonTable.variables.tuneP_charge = Var("? tunePMuonBestTrack().isNonnull() && tunePMuonBestTrack().isAvailable() ? tunePMuonBestTrack().charge(): -99", float, doc="tunePMuonBestTrack() charge")
#proc.muonTable.variables.tuneP_charge = Var("? tunePMuonBestTrack().isNonnull() && tunePMuonBestTrack().isAvailable() ? tunePMuonBestTrack().charge(): -99", float, doc="tunePMuonBestTrack() charge")
#tuneP_charge is moved to standard NanoAODs
proc.muonTable.variables.tuneP_muonHits = Var("? tunePMuonBestTrack().isNonnull() && tunePMuonBestTrack().isAvailable() ? tunePMuonBestTrack().hitPattern().numberOfValidMuonHits() : -99", int, doc="No of valid muon hists from tunePMuonBestTrack")

# tpfms Track
Expand Down
5 changes: 5 additions & 0 deletions PhysicsTools/NanoAOD/python/muons_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,11 @@
ptErr = Var("bestTrack().ptError()", float, doc = "ptError of the muon track", precision=6),
tunepRelPt = Var("tunePMuonBestTrack().pt/pt",float,doc="TuneP relative pt, tunePpt/pt",precision=6),
tuneP_pterr = Var("tunePMuonBestTrack().ptError()", float, doc = "pTerr from tunePMuonBestTrack", precision=6),
tuneP_charge = Var("? tunePMuonBestTrack().isNonnull() && tunePMuonBestTrack().isAvailable() ? tunePMuonBestTrack().charge(): -99", float, doc="tunePMuonBestTrack() charge",precision=6),
dz = Var("dB('PVDZ')",float,doc="dz (with sign) wrt first PV, in cm",precision=10),
dzErr = Var("abs(edB('PVDZ'))",float,doc="dz uncertainty, in cm",precision=6),
dxybs = Var("dB('BS2D')",float,doc="dxy (with sign) wrt the beam spot, in cm",precision=10),
dxybsErr = Var("edB('BS2D')",float,doc="dxy uncertainty wrt the beam spot, in cm", precision=6),
dxy = Var("dB('PV2D')",float,doc="dxy (with sign) wrt first PV, in cm",precision=10),
dxyErr = Var("edB('PV2D')",float,doc="dxy uncertainty, in cm",precision=6),
ip3d = Var("abs(dB('PV3D'))",float,doc="3D impact parameter wrt first PV, in cm",precision=10),
Expand Down Expand Up @@ -204,6 +206,9 @@
triggerIdLoose = Var("passed('TriggerIdLoose')",bool,doc="TriggerIdLoose ID"),
inTimeMuon = Var("passed('InTimeMuon')",bool,doc="inTimeMuon ID"),
jetNDauCharged = Var("?userCand('jetForLepJetVar').isNonnull()?userFloat('jetNDauChargedMVASel'):0", "uint8", doc="number of charged daughters of the closest jet"),
VXBS_Cov00 = Var("? tunePMuonBestTrack().isNonnull() && tunePMuonBestTrack().isAvailable() ? tunePMuonBestTrack().covariance(0,0) : -999",float,doc="0, 0 element of the VXBS Covariance matrix", precision=16),
VXBS_Cov03 = Var("? tunePMuonBestTrack().isNonnull() && tunePMuonBestTrack().isAvailable() ? tunePMuonBestTrack().covariance(0,3) : -999",float,doc="0, 3 element of the VXBS Covariance matrix", precision=16),
VXBS_Cov33 = Var("? tunePMuonBestTrack().isNonnull() && tunePMuonBestTrack().isAvailable() ? tunePMuonBestTrack().covariance(3,3) : -999",float,doc="3, 3 element of the VXBS Covariance matrix", precision=16),
),
externalVariables = cms.PSet(
promptMVA = ExtVar(cms.InputTag("muonPROMPTMVA"),float, doc="Prompt MVA lepton ID score. Corresponds to the previous mvaTTH",precision=14),
Expand Down
5 changes: 5 additions & 0 deletions PhysicsTools/NanoAOD/python/nanoDQM_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -549,9 +549,11 @@
Plot1D('bsConstrainedPtErr', '', 20, 0., 20., 'pt error w. beamspot constraint'),
Plot1D('bsConstrainedChi2', '', 20, 0., 40., 'chi2 of beamspot constraint'),
Plot1D('charge', 'charge', 3, -1.5, 1.5, 'electric charge'),
Plot1D('tuneP_charge', 'tuneP_charge', 3, -1.5, 1.5, 'charge from the tuneP algorithm'),
Plot1D('dxy', 'dxy', 20, -0.1, 0.1, 'dxy (with sign) wrt first PV, in cm'),
Plot1D('dxyErr', 'dxyErr', 20, 0, 0.1, 'dxy uncertainty, in cm'),
Plot1D('dxybs', 'dxybs', 20, -0.1, 0.1, 'dxy (with sign) wrt the beam spot, in cm'),
Plot1D('dxybsErr', 'dxybsErr', 20, 0, 0.1, 'uncertainty on dxy (with sign) wrt the beam spot, in cm'),
Plot1D('dz', 'dz', 20, -0.3, 0.3, 'dz (with sign) wrt first PV, in cm'),
Plot1D('dzErr', 'dzErr', 20, 0, 0.2, 'dz uncertainty, in cm'),
Plot1D('eta', 'eta', 20, -2.5, 2.5, 'eta'),
Expand Down Expand Up @@ -605,6 +607,9 @@
Plot1D('tkRelIso', 'tkRelIso', 100, 0, 1, 'Tracker-based relative isolation dR=0.3 for highPt, trkIso/tunePpt'),
Plot1D('triggerIdLoose', 'triggerIdLoose', 2, -0.5, 1.5, 'TriggerIdLoose ID'),
Plot1D('tunepRelPt', 'tunepRelPt', 200, 0, 200, 'TuneP relative pt, tunePpt/pt'),
Plot1D('VXBS_Cov00', 'VXBS_Cov00', 200, -10, 10, '0, 0 element of the VXBS Covariance matrix'),
Plot1D('VXBS_Cov03', 'VXBS_Cov03', 200, -10, 10, '0, 3 element of the VXBS Covariance matrix'),
Plot1D('VXBS_Cov33', 'VXBS_Cov33', 200, -10, 10, '3, 3 element of the VXBS Covariance matrix'),
)
),
OtherPV = cms.PSet(
Expand Down

0 comments on commit 5754132

Please sign in to comment.