Skip to content
Snippets Groups Projects
Commit d99b8d0b authored by Sergey Gorbunov's avatar Sergey Gorbunov Committed by Sergey Gorbunov
Browse files

CA: ignore misalignment corrections during the final refit

parent 9a7d6c30
No related branches found
No related tags found
1 merge request!2008CA: ignore misalignment corrections during the final refit
Pipeline #32921 passed
......@@ -137,6 +137,7 @@ namespace cbm::algo::ca
const ca::Hit& hit = input.GetHit(wData.RecoHitIndex(start_hit++));
const int ista = hit.Station();
auto [detSystemId, iStLocal] = fParameters.GetActiveSetup().GetIndexMap().GlobalToLocal<EDetectorID>(ista);
//if (sta[ista].fieldStatus) { isFieldPresent[iVec] = true; }
......@@ -145,11 +146,23 @@ namespace cbm::algo::ca
if (sta[ista].timeInfo) {
w_time[ista][iVec] = true;
}
// subtract misalignment tolerances to get the original hit errors
float dX2Orig = hit.dX2() - fParameters.GetMisalignmentXsq(detSystemId);
float dY2Orig = hit.dY2() - fParameters.GetMisalignmentYsq(detSystemId);
float dXYOrig = hit.dXY();
if (dX2Orig < 0. || dY2Orig < 0. || fabs(dXYOrig / sqrt(dX2Orig * dY2Orig)) > 1.) {
dX2Orig = hit.dX2();
dY2Orig = hit.dY2();
}
float dT2Orig = hit.dT2() - fParameters.GetMisalignmentTsq(detSystemId);
if (dT2Orig < 0.) {
dT2Orig = hit.dT2();
}
x[ista][iVec] = hit.X(); //x_temp[iVec];
y[ista][iVec] = hit.Y(); //y_temp[iVec];
time[ista][iVec] = hit.T();
dt2[ista][iVec] = hit.dT2();
dt2[ista][iVec] = dT2Orig;
if (!sta[ista].timeInfo) {
dt2[ista][iVec] = 1.e4;
}
......@@ -157,9 +170,9 @@ namespace cbm::algo::ca
fB_temp = sta[ista].fieldSlice.GetFieldValue(x[ista], y[ista]);
mxy[ista].X()[iVec] = hit.X();
mxy[ista].Y()[iVec] = hit.Y();
mxy[ista].Dx2()[iVec] = hit.dX2();
mxy[ista].Dy2()[iVec] = hit.dY2();
mxy[ista].Dxy()[iVec] = hit.dXY();
mxy[ista].Dx2()[iVec] = dX2Orig;
mxy[ista].Dy2()[iVec] = dY2Orig;
mxy[ista].Dxy()[iVec] = dXYOrig;
mxy[ista].NdfX()[iVec] = 1.;
mxy[ista].NdfY()[iVec] = 1.;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment