Skip to content

Commit 4ce373e

Browse files
committed
[Common] update fwdTrackUtilities.h for 3D shift
1 parent 8f530a6 commit 4ce373e

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

Common/Core/fwdtrackUtilities.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -108,16 +108,16 @@ o2::track::TrackParCovFwd getTrackParCovFwdShift(TFwdTrack const& track, float z
108108
return getTrackParCovFwd3DShift(track, 0.f, 0.f, zshift, covOpt...);
109109
}
110110

111-
inline o2::track::TrackParCovFwd getTrackParCovFwdShiftManual(
111+
inline o2::track::TrackParCovFwd getTrackParCovFwd3DShiftManual(
112112
const double x, const double y, const double phi, const double tgl, const double signed1Pt,
113113
const double cXX,
114114
const double cXY, const double cYY,
115115
const double cPhiX, const double cPhiY, const double cPhiPhi,
116116
const double cTglX, const double cTglY, const double cTglPhi, const double cTglTgl,
117117
const double c1PtX, const double c1PtY, const double c1PtPhi, const double c1PtTgl, const double c1Pt21Pt2,
118-
const float z, const float zshift, const float chi2)
118+
const float z, const float xshift, const float yshift, const float zshift, const float chi2)
119119
{
120-
SMatrix5 tpars(x, y, phi, tgl, signed1Pt);
120+
SMatrix5 tpars(x + xshift, y + yshift, phi, tgl, signed1Pt);
121121

122122
SMatrix55 tcovs;
123123
std::vector<double> v1{
@@ -164,15 +164,15 @@ o2::track::TrackParCovFwd getTrackParCovFwd(TFwdTrack const& track, TFwdTrackCov
164164

165165
/// propagate fwdtrack to a certain point.
166166
template <typename TFwdTrack, typename TFwdTrackCov, typename TCollision>
167-
o2::dataformats::GlobalFwdTrack propagateMuon(TFwdTrack const& muon, TFwdTrackCov const& cov, TCollision const& collision, const propagationPoint endPoint, const float matchingZ, const float bzkG, const float zshift = 0.f)
167+
o2::dataformats::GlobalFwdTrack propagateMuon(TFwdTrack const& muon, TFwdTrackCov const& cov, TCollision const& collision, const propagationPoint endPoint, const float matchingZ, const float bzkG, const float xshift = 0.f, const float yshift = 0.f, const float zshift = 0.f)
168168
{
169169
o2::track::TrackParCovFwd trackParCovFwd;
170170
if (muon.trackType() == o2::aod::fwdtrack::ForwardTrackTypeEnum::GlobalMuonTrack) {
171-
trackParCovFwd = getTrackParCovFwdShift(muon, zshift, cov);
171+
trackParCovFwd = getTrackParCovFwd3DShift(muon, xshift, yshift, zshift, cov);
172172
} else if (muon.trackType() == o2::aod::fwdtrack::ForwardTrackTypeEnum::MuonStandaloneTrack) {
173-
trackParCovFwd = getTrackParCovFwdShift(muon, zshift, muon);
173+
trackParCovFwd = getTrackParCovFwd3DShift(muon, xshift, yshift, zshift, muon);
174174
} else {
175-
trackParCovFwd = getTrackParCovFwdShift(muon, zshift, muon);
175+
trackParCovFwd = getTrackParCovFwd3DShift(muon, xshift, yshift, zshift, muon);
176176
}
177177

178178
o2::dataformats::GlobalFwdTrack propmuon = propagateTrackParCovFwd(trackParCovFwd, muon.trackType(), collision, endPoint, matchingZ, bzkG);
@@ -340,15 +340,15 @@ float getFwdChi2IP(TTrackParCovFwd const& inputTrk, TCollision const& collision,
340340
}
341341

342342
template <typename TFullFwdTrack, typename TCollision>
343-
float getFwdChi2IP(const TFullFwdTrack& fwdtrack, const TCollision& collision, const float bz, const float zShift)
343+
float getFwdChi2IP(const TFullFwdTrack& fwdtrack, const TCollision& collision, const float bz, const float xShift, const float yShift, const float zShift)
344344
{
345345
// this function returns imcompatibility of fwdtrack respect to a given PV.
346346
// fwdtracks are never PV contributors in ALICE.
347347
// chi2IP is defined as chi2^{PV}_{with fwdtrack} - chi2^{PV}_{without fwdtrack}. https://arxiv.org/abs/2604.11574
348348
// chi2IP cannot be used to decide the best fwdtrack-to-collision match or MFT-MCH match, because it gives biases toward small muon impact parameter.
349349
// chi2IP should be used only after the best fwdtrack-to-collision association and the best MFT-MCH match are defined.
350350

351-
o2::track::TrackParCovFwd trk = getTrackParCovFwdShift(fwdtrack, zShift, fwdtrack);
351+
o2::track::TrackParCovFwd trk = getTrackParCovFwd3DShift(fwdtrack, xShift, yShift, zShift, fwdtrack);
352352

353353
if (std::abs(bz) < 1e-12) {
354354
trk.propagateToZlinear(collision.posZ());

0 commit comments

Comments
 (0)