Skip to content

Commit 9d8d276

Browse files
committed
test t0 in tracklet transformer
1 parent 451f837 commit 9d8d276

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

‎Detectors/TRD/base/src/TrackletTransformer.cxx‎

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,9 @@ float TrackletTransformer::calculateDy(int detector, int slope, const PadPlane*
6262
float TrackletTransformer::calibrateX(double x) const
6363
{
6464
// Hard-coded value will be replaced once t0 calibration is available from CCDB
65-
float t0Correction = -0.279;
66-
return x += t0Correction;
65+
//float t0Correction = -0.279;
66+
//return x += t0Correction;
67+
return x;
6768
}
6869

6970
std::array<float, 3> TrackletTransformer::transformL2T(int detector, std::array<double, 3> point) const
@@ -109,8 +110,14 @@ CalibratedTracklet TrackletTransformer::transformTracklet(Tracklet64 tracklet, b
109110
float dy = calculateDy(detector, slope, padPlane);
110111

111112
float calibratedX = calibrateX(x);
113+
114+
// calibrate y using t0 and raw slope in pad per timebin
115+
//float t0 = -1.8; // in time bins
116+
float t0 = -2.79/mCalVdriftExB->getVdrift(detector); // in time bins
117+
y -= t0 * tracklet.getSlopeFloat() * mGeo->getPadPlane(tracklet.getDetector())->getWidthIPad();
118+
119+
LOGF(info, "vdrift: %f old: %f %f new1: %f %f new2: %f %f diff: %f slope wo corr: %f %f slope with corr: %f", mCalVdriftExB->getVdrift(detector), x - 0.279, tracklet.getUncalibratedY(mApplyShift), x, y, x - 0.279, y-dy*0.279/3, y-dy*0.279/3-tracklet.getUncalibratedY(mApplyShift), tracklet.getSlopeFloat(), slope * ((mGeo->cdrHght() / mCalVdriftExB->getVdrift(detector)) * 10.) * mGeo->getPadPlane(tracklet.getDetector())->getWidthIPad() * GRANULARITYTRKLSLOPE / ADDBITSHIFTSLOPE, dy);
112120

113-
// NOTE: Correction to y position based on x calibration NOT YET implemented. Need t0.
114121
if (trackingFrame) {
115122
std::array<float, 3> sectorSpacePoint = transformL2T(detector, std::array<double, 3>{calibratedX, y, z});
116123
LOG(debug) << "x: " << sectorSpacePoint[0] << " | "

0 commit comments

Comments
 (0)