Skip to content

Commit 7f699d2

Browse files
miranov25claude
andcommitted
TPC TimeSeries: store the TRD-TPC residuals as one TrackPar
- deltaTRDTPC (o2::track::TrackPar) replaces deltaP0TRDTPC..deltaP4TRDTPC. mX and mAlpha are the common plane and frame in full precision (copied from the propagated TPC state); mP[0..4] are the TRD - TPC residuals of Y, Z, sin(phi), tan(lambda) and q/pT with 10 mantissa bits. Only getX(), getAlpha() and getParam(i) are meaningful on this object. - Default object (X = 0) if the TRD propagation was not done (trdInOK != 0). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YYeB7SW1TM7vU8qhVHiG61
1 parent 22f943e commit 7f699d2

1 file changed

Lines changed: 9 additions & 16 deletions

File tree

‎Detectors/TPC/workflow/src/TPCTimeSeriesSpec.cxx‎

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1497,12 +1497,10 @@ class TPCTimeSeries : public Task
14971497
uint8_t trdInOK = 1; // 0 propagated, 1 not attempted (no TRD match or tpcOutOK != 0), 2 propagation failed; count TRD matches with trdPattern > 0
14981498
float chi2PhiTPCTRD = -1.f; // -1: not computed (trdInOK != 0) or singular covariance
14991499
float chi2ZTPCTRD = -1.f;
1500-
// TRD - TPC residuals at the common plane (same alpha, same X), parameters 0..4 = Y, Z, Snp, Tgl, Q2Pt; -999 if trdInOK != 0
1501-
float deltaP0TRDTPC = -999.f;
1502-
float deltaP1TRDTPC = -999.f;
1503-
float deltaP2TRDTPC = -999.f;
1504-
float deltaP3TRDTPC = -999.f;
1505-
float deltaP4TRDTPC = -999.f;
1500+
// deltaTRDTPC: TrackPar used as a residual container. mX and mAlpha = the common plane and frame (full precision,
1501+
// copied from the propagated TPC state); mP[0..4] = TRD - TPC of Y, Z, Snp, Tgl, Q2Pt, truncated to 10 mantissa bits.
1502+
// Only getX(), getAlpha() and getParam(i) are meaningful (getPt(), getPhi(), ... are not). Default (X = 0) if trdInOK != 0.
1503+
o2::track::TrackPar deltaTRDTPC;
15061504
// D1: TPC outer → kTPCTRDMiddle
15071505
tpcOutCov = o2::track::TrackParCov(tracksTPC[iTrk].getParamOut());
15081506
{
@@ -1526,11 +1524,10 @@ class TPCTimeSeries : public Task
15261524
trdInOK = 0;
15271525
chi2PhiTPCTRD = chi2Match_Phi(tpcOutCov, trdInCov);
15281526
chi2ZTPCTRD = chi2Match_Z(tpcOutCov, trdInCov);
1529-
deltaP0TRDTPC = o2::math_utils::truncateFloatFraction(trdInCov.getParam(0) - tpcOutCov.getParam(0), kDeltaTRDTPCMask);
1530-
deltaP1TRDTPC = o2::math_utils::truncateFloatFraction(trdInCov.getParam(1) - tpcOutCov.getParam(1), kDeltaTRDTPCMask);
1531-
deltaP2TRDTPC = o2::math_utils::truncateFloatFraction(trdInCov.getParam(2) - tpcOutCov.getParam(2), kDeltaTRDTPCMask);
1532-
deltaP3TRDTPC = o2::math_utils::truncateFloatFraction(trdInCov.getParam(3) - tpcOutCov.getParam(3), kDeltaTRDTPCMask);
1533-
deltaP4TRDTPC = o2::math_utils::truncateFloatFraction(trdInCov.getParam(4) - tpcOutCov.getParam(4), kDeltaTRDTPCMask);
1527+
deltaTRDTPC = tpcOutCov; // mX, mAlpha (and charge, PID) of the common plane
1528+
for (int iPar = 0; iPar < 5; ++iPar) {
1529+
deltaTRDTPC.setParam(o2::math_utils::truncateFloatFraction(trdInCov.getParam(iPar) - tpcOutCov.getParam(iPar), kDeltaTRDTPCMask), iPar);
1530+
}
15341531
} else {
15351532
trdInOK = 2; // propagation failed
15361533
}
@@ -1707,11 +1704,7 @@ class TPCTimeSeries : public Task
17071704
<< "trdInOK=" << trdInOK
17081705
<< "chi2PhiTPCTRD=" << chi2PhiTPCTRD
17091706
<< "chi2ZTPCTRD=" << chi2ZTPCTRD
1710-
<< "deltaP0TRDTPC=" << deltaP0TRDTPC
1711-
<< "deltaP1TRDTPC=" << deltaP1TRDTPC
1712-
<< "deltaP2TRDTPC=" << deltaP2TRDTPC
1713-
<< "deltaP3TRDTPC=" << deltaP3TRDTPC
1714-
<< "deltaP4TRDTPC=" << deltaP4TRDTPC
1707+
<< "deltaTRDTPC=" << deltaTRDTPC
17151708
// TRD in detector readout for this run (GRPECS): 1 yes, 0 no, 255 unknown
17161709
<< "trdInReadout=" << mTRDInReadout
17171710
<< "chi2match_ITSTPC=" << chi2match_ITSTPC

0 commit comments

Comments
 (0)