-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed sign in pat::Muon::dB() to match one obtained from the best track definition #28753
Changes from all commits
d46fd4f
3952377
cd9419c
f154ed1
b7c4dd9
2360263
8dd5d67
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -1097,27 +1097,24 @@ void PATMuonProducer::embedHighLevel(pat::Muon& aMuon, | |||
// Correct to PV | ||||
|
||||
// PV2D | ||||
aMuon.setDB(track->dxy(primaryVertex.position()), | ||||
track->dxyError(primaryVertex.position(), primaryVertex.covariance()), | ||||
pat::Muon::PV2D); | ||||
|
||||
// PV3D | ||||
std::pair<bool, Measurement1D> result = | ||||
IPTools::signedTransverseImpactParameter(tt, GlobalVector(track->px(), track->py(), track->pz()), primaryVertex); | ||||
IPTools::signedImpactParameter3D(tt, GlobalVector(track->px(), track->py(), track->pz()), primaryVertex); | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. doesn't the 3D also have the same problem as the 2D case? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, the difference in the sign between that of the best track and the one obtained by IPTools remains. Nonetheless, the sign itself is not used elsewhere as that of the 2D version is. I understand that using track information would be preferred from the usage of computational resources point of view? From a quick set of tests I see, surprisingly, that in most cases (~90%) both computations of the 3D IP agree, but there is a significant set of deviations between the tracks' dsz and iptools' value for ~10% of the events. This seems to be correlated with the linear approximation but not completely caused by it (i.e. it happens for several cases in which vertex ~ (0,0,0) and with relatively high pT/low bending). The sip3D = abs(d3d)/error(d3d) variable is used down the line in terms of ID criteria. I.e. for the prompt MVA discriminant (
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
OK. |
||||
double d0_corr = result.second.value(); | ||||
double d0_err = primaryVertexIsValid ? result.second.error() : -1.0; | ||||
aMuon.setDB(d0_corr, d0_err, pat::Muon::PV2D); | ||||
|
||||
// PV3D | ||||
result = IPTools::signedImpactParameter3D(tt, GlobalVector(track->px(), track->py(), track->pz()), primaryVertex); | ||||
d0_corr = result.second.value(); | ||||
d0_err = primaryVertexIsValid ? result.second.error() : -1.0; | ||||
aMuon.setDB(d0_corr, d0_err, pat::Muon::PV3D); | ||||
|
||||
// Correct to beam spot | ||||
// make a fake vertex out of beam spot | ||||
reco::Vertex vBeamspot(beamspot.position(), beamspot.rotatedCovariance3D()); | ||||
|
||||
// BS2D | ||||
result = IPTools::signedTransverseImpactParameter(tt, GlobalVector(track->px(), track->py(), track->pz()), vBeamspot); | ||||
d0_corr = result.second.value(); | ||||
d0_err = beamspotIsValid ? result.second.error() : -1.0; | ||||
aMuon.setDB(d0_corr, d0_err, pat::Muon::BS2D); | ||||
aMuon.setDB(track->dxy(beamspot), track->dxyError(beamspot), pat::Muon::BS2D); | ||||
|
||||
// make a fake vertex out of beam spot | ||||
reco::Vertex vBeamspot(beamspot.position(), beamspot.rotatedCovariance3D()); | ||||
|
||||
// BS3D | ||||
result = IPTools::signedImpactParameter3D(tt, GlobalVector(track->px(), track->py(), track->pz()), vBeamspot); | ||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the proposed way to propagate uncertainties properly for the dxy measurement with respect to a given PV.
Going from the original frame (dxy) to the new frame (dxy') translated from PV coordinates (xv, yv) it uses the transformation:
dxy' = dxy + x_vsin(phi) - y_vcos(phi)
And propagates accordingly using the track and vertex covariance matrices plus gradients
(0,0,xvcos(phi) + yvsin(phi), 1, 0) (gradient with respect to the track parameters in the curvilinear basis)
(sin(phi), -cos(phi), 0) (gradient with respect to the vertex parameters)