20#include "GPUParam.inc"
31 float gx = getGlobalX(cosAlpha, sinAlpha, X, Y);
32 float gy = getGlobalY(cosAlpha, sinAlpha, X, Y);
35 switch (mFieldRegion) {
37 mField->GetFieldIts(gx, gy, Z,
bb);
40 mField->GetFieldTrd(gx, gy, Z,
bb);
44 mField->GetField(gx, gy, Z,
bb);
49 B[0] =
bb[0] * cosAlpha +
bb[1] * sinAlpha;
50 B[1] = -
bb[0] * sinAlpha +
bb[1] * cosAlpha;
56 float gx = getGlobalX(cosAlpha, sinAlpha, X, Y);
57 float gy = getGlobalY(cosAlpha, sinAlpha, X, Y);
59 switch (mFieldRegion) {
61 return mField->GetFieldItsBz(gx, gy, Z);
63 return mField->GetFieldTrdBz(gx, gy, Z);
66 return mField->GetFieldBz(gx, gy, Z);
77 float newCosAlpha, newSinAlpha;
78 CAMath::SinCos(newAlpha, newSinAlpha, newCosAlpha);
80 float cc = newCosAlpha * mCosAlpha + newSinAlpha * mSinAlpha;
81 float ss = newSinAlpha * mCosAlpha - newCosAlpha * mSinAlpha;
91 if (CAMath::Abs(mT->GetSinPhi()) >= mMaxSinPhi || CAMath::Abs(px0) < (1 - mMaxSinPhi)) {
96 float px1 = px0 *
cc + py0 * ss;
97 float py1 = -px0 * ss + py0 *
cc;
107 if (CAMath::Abs(py1) > mMaxSinPhi * mT0.GetPt() || CAMath::Abs(px1) < (1 - mMaxSinPhi)) {
112 float trackX =
x0 *
cc + ss * mT->Y();
117 if (mPropagateBzOnly) {
118 Bz = GetBzBase(newCosAlpha, newSinAlpha,
t0.X(),
t0.Y(),
t0.Z());
119 if (
t0.PropagateToXBzLight(trackX, Bz, dLp)) {
124 GetBxByBz(newAlpha,
t0.X(),
t0.Y(),
t0.Z(),
B);
126 if (
t0.PropagateToXBxByBz(trackX,
B[0],
B[1],
B[2], dLp)) {
131 if (CAMath::Abs(
t0.SinPhi()) >= mMaxSinPhi) {
148 float j1 = px1 / px0;
154 mT->Y() = -
x0 * ss +
cc * mT->Y();
156 mT->SinPhi() = -CAMath::Sqrt(1.f - mT->SinPhi() * mT->SinPhi()) * ss + mT->SinPhi() *
cc;
159 float*
c = mT->Cov();
161 float c15 =
c[0] * j0 * j2;
162 float c16 =
c[1] * j2;
163 float c17 =
c[3] * j1 * j2;
164 float c18 =
c[6] * j2;
165 float c19 =
c[10] * j2;
166 float c20 =
c[0] * j2 * j2;
176 if (!mFitInProjections && mT->NDF() > 0) {
183 if (
t0.SetDirectionAlongX()) {
184 mT->SinPhi() = -mT->SinPhi();
185 mT->DzDs() = -mT->DzDs();
186 mT->QPt() = -mT->QPt();
200 float j3 = -
t0.Py() /
t0.Px();
201 float j4 = -
t0.Pz() /
t0.Px();
202 float j5 =
t0.QPt() * Bz;
211 float h15 = c15 + c20 * j3;
212 float h16 = c16 + c20 * j4;
213 float h17 = c17 + c20 * j5;
215 c[0] += j3 * (c15 + h15);
217 c[2] += j4 * (c16 + h16);
219 c[3] += c17 * j3 + h15 * j5;
220 c[5] += j5 * (c17 + h17);
229 if (!mFitInProjections && mT->NDF() > 0) {
230 c[1] += c16 * j3 + h15 * j4;
231 c[4] += c17 * j4 + h16 * j5;
239 mCosAlpha = newCosAlpha;
240 mSinAlpha = newSinAlpha;
248 if (mPropagateBzOnly) {
249 return PropagateToXAlphaBz(posX, posAlpha, inFlyDirection);
251 if (CAMath::Abs(posAlpha - mAlpha) > 1.e-4f) {
252 if (RotateToAlpha(posAlpha) != 0) {
256 if (CAMath::Abs(posX - mT->X()) < 1.e-7f) {
262 GetBxByBz(mT0.X(), mT0.Y(), mT0.Z(),
B);
268 if (t0e.PropagateToXBxByBz(posX,
B[0],
B[1],
B[2], dLp) && t0e.PropagateToXBzLight(posX,
B[2], dLp)) {
272 if (CAMath::Abs(t0e.SinPhi()) >= mMaxSinPhi) {
276 return FollowLinearization(t0e,
B[2], dLp, inFlyDirection);
281 if (CAMath::Abs(posAlpha - mAlpha) > 1.e-4f) {
282 if (RotateToAlpha(posAlpha) != 0) {
286 if (CAMath::Abs(posX - mT->X()) < 1.e-7f) {
291 float Bz = GetBz(mT0.X(), mT0.Y(), mT0.Z());
297 if (t0e.PropagateToXBzLight(posX, Bz, dLp)) {
301 if (CAMath::Abs(t0e.SinPhi()) >= mMaxSinPhi) {
305 return FollowLinearization(t0e, Bz, dLp, inFlyDirection);
314 float dS = dLp * t0e.GetPt();
315 float dL = CAMath::Abs(dLp * t0e.GetP());
317 if (inFlyDirection) {
321 float ey = mT0.SinPhi();
322 float ex = mT0.CosPhi();
323 float exi = mT0.SecPhi();
324 float ey1 = t0e.GetSinPhi();
325 float ex1 = t0e.GetCosPhi();
326 float ex1i = t0e.GetSecPhi();
328 float k = -mT0.QPt() * Bz;
329 float dx = t0e.GetX() - mT0.X();
332 float cci = 1.f /
cc;
334 float dxcci = dx * cci;
335 float hh = dxcci * ex1i * (1.f + ex * ex1 + ey * ey1);
337 float j02 = exi * hh;
338 float j04 = -Bz * dxcci * hh;
340 float j24 = -dx * Bz;
342 float*
p = mT->Par();
344 float d0 =
p[0] - mT0.Y();
345 float d1 =
p[1] - mT0.Z();
346 float d2 =
p[2] - mT0.SinPhi();
347 float d3 =
p[3] - mT0.DzDs();
348 float d4 =
p[4] - mT0.QPt();
350 float newSinPhi = ey1 +
d2 + j24 * d4;
351 if (mT->NDF() >= 15 && CAMath::Abs(newSinPhi) > constants::MAX_SIN_PHI) {
360 mT->X() = t0e.GetX();
361 p[0] = t0e.GetY() + d0 + j02 *
d2 + j04 * d4;
362 p[1] = t0e.GetZ() +
d1 + j13 *
d3;
364 p[3] = t0e.GetDzDs() +
d3;
365 p[4] = t0e.GetQPt() + d4;
367 float*
c = mT->Cov();
384 if (mFitInProjections || mT->NDF() <= 0) {
385 float c20ph04c42 = c20 + j04 * c42;
386 float j02c22 = j02 * c22;
387 float j04c44 = j04 * c44;
389 float n6 = c30 + j02 * c32 + j04 * c43;
390 float n7 = c31 + j13 * c33;
391 float n10 = c40 + j02 * c42 + j04c44;
392 float n11 = c41 + j13 * c43;
393 float n12 = c42 + j24 * c44;
395 c[0] += j02 * j02c22 + j04 * j04c44 + 2.f * (j02 * c20ph04c42 + j04 * c40);
396 c[1] += j02 * c21 + j04 * c41 + j13 * n6;
397 c[2] += j13 * (c31 + n7);
398 c[3] = c20ph04c42 + j02c22 + j24 * n10;
399 c[4] = c21 + j13 * c32 + j24 * n11;
400 c[5] = c22 + j24 * (c42 + n12);
403 c[8] = c32 + c43 * j24;
414 float xx = 1.f - 0.25f * kdx * kdx * (1.f + tg * tg);
418 xx = CAMath::Sqrt(xx);
419 float yy = CAMath::Sqrt(ss * ss +
cc *
cc);
421 float j12 = dx * mT0.DzDs() * tg * (2.f + tg * (ey * exi + ey1 * ex1i)) / (xx * yy);
423 if (CAMath::Abs(mT0.QPt()) > 1.e-6f) {
424 j14 = (2.f * xx * ex1i * dx / yy - dS) * mT0.DzDs() / mT0.QPt();
426 j14 = -mT0.DzDs() * Bz * dx * dx * exi * exi * exi * (0.5f * ey + (1.f / 3.f) * kdx * (1 + 2.f * ey * ey) * exi * exi);
429 p[1] += j12 *
d2 + j14 * d4;
431 float h00 = c00 + c20 * j02 + c40 * j04;
433 float h02 = c20 + c22 * j02 + c42 * j04;
435 float h04 = c40 + c42 * j02 + c44 * j04;
437 float h10 = c10 + c20 * j12 + c30 * j13 + c40 * j14;
438 float h11 = c11 + c21 * j12 + c31 * j13 + c41 * j14;
439 float h12 = c21 + c22 * j12 + c32 * j13 + c42 * j14;
440 float h13 = c31 + c32 * j12 + c33 * j13 + c43 * j14;
441 float h14 = c41 + c42 * j12 + c43 * j13 + c44 * j14;
443 float h20 = c20 + c40 * j24;
444 float h21 = c21 + c41 * j24;
445 float h22 = c22 + c42 * j24;
446 float h23 = c32 + c43 * j24;
447 float h24 = c42 + c44 * j24;
449 c[0] = h00 + h02 * j02 + h04 * j04;
451 c[1] = h10 + h12 * j02 + h14 * j04;
452 c[2] = h11 + h12 * j12 + h13 * j13 + h14 * j14;
454 c[3] = h20 + h22 * j02 + h24 * j04;
455 c[4] = h21 + h22 * j12 + h23 * j13 + h24 * j14;
456 c[5] = h22 + h24 * j24;
458 c[6] = c30 + c32 * j02 + c43 * j04;
459 c[7] = c31 + c32 * j12 + c33 * j13 + c43 * j14;
460 c[8] = c32 + c43 * j24;
463 c[10] = c40 + c42 * j02 + c44 * j04;
464 c[11] = c41 + c42 * j12 + c43 * j13 + c44 * j14;
465 c[12] = c42 + c44 * j24;
479 bool maskMS = (CAMath::Abs(dL) < mMaterial.DLMax);
483 float dLabs = CAMath::Abs(dLmask);
488 float corr = 1.f - mMaterial.EP2 * dLmask;
489 float corrInv = 1.f / corr;
503 mC44 = mC44 * corr * corr + dLabs * mMaterial.sigmadE2;
510 mC22 += dLabs * mMaterial.k22 * mT0.CosPhi() * mT0.CosPhi();
511 mC33 += dLabs * mMaterial.k33;
512 mC43 += dLabs * mMaterial.k43;
513 mC44 += dLabs * mMaterial.k44;
520 float bz = GetBz(mT->X(), mT->Y(), mT->Z());
521 float k = mT0.QPt() *
bz;
522 float dx =
x - mT->X();
523 float ex = mT0.CosPhi();
524 float ey = mT0.SinPhi();
525 float ey1 = ey - k * dx;
526 if (CAMath::Abs(ey1) > constants::MAX_SIN_PHI) {
530 float ex1 = CAMath::Sqrt(1.f - ey1 * ey1);
535 float dxcci = dx /
cc;
536 float dy = dxcci * ss;
537 float norm2 = 1.f + ey * ey1 + ex * ex1;
538 float dl = dxcci * CAMath::Sqrt(norm2 + norm2);
541 float dSin = 0.5f * k * dl;
542 float a = dSin * dSin;
543 const float k2 = 1.f / 6.f;
544 const float k4 = 3.f / 40.f;
545 dS = dl + dl *
a * (
k2 +
a * (k4));
547 float dz = dS * mT0.DzDs();
548 projY = mT->Y() + dy;
549 projZ = mT->Z() + dz;
555 GetErr2(err2Y, err2Z,
param, mT0.GetSinPhi(), mT0.DzDs(), posZ, mT->GetX(), mT->GetY(), iRow, clusterState,
sector,
time, avgCharge,
charge, mSeedingErrors);
558GPUd()
void GPUTPCGMPropagator::GetErr2(
float&
GPUrestrict() err2Y,
float&
GPUrestrict() err2Z, const
GPUParam&
GPUrestrict()
param,
float snp,
float tgl,
float posZ,
float trackX,
float trackY, int32_t iRow, int16_t clusterState,
uint8_t sector,
float time,
float avgCharge,
float charge,
bool seedingErrors)
562 param.GetClusterErrorsSeeding2(
sector, iRow, posZ, snp, tgl,
time, err2Y, err2Z);
568 param.UpdateClusterError2ByState(clusterState, err2Y, err2Z);
569 float statErr2 =
param.GetSystematicClusterErrorIFC2(trackX, trackY, posZ,
sector >= (GPUTPCGeometry::NSECTORS / 2));
570 if (
sector >= GPUTPCGeometry::NSECTORS / 2 + 1 &&
sector <= GPUTPCGeometry::NSECTORS / 2 + 2) {
571 statErr2 +=
param.GetSystematicClusterErrorC122(trackX, trackY,
sector);
581 return PredictChi2(posY, posZ, err2Y, err2Z);
586 const float* mC = mT->Cov();
587 const float* mP = mT->Par();
588 const float z0 = posY - mP[0];
589 const float z1 = posZ - mP[1];
591 if (!mFitInProjections || mT->NDF() <= 0) {
592 const float w0 = 1.f / (err2Y + mC[0]);
593 const float w2 = 1.f / (err2Z + mC[2]);
594 return w0 * z0 * z0 + w2 *
z1 *
z1;
596 float w0 = mC[2] + err2Z, w1 = mC[1], w2 = mC[0] + err2Y;
598 float det = w0 * w2 - w1 * w1;
599 if (CAMath::Abs(det) < 1.e-10f) {
607 return CAMath::Abs((w0 * z0 + w1 * z1) * z0) + CAMath::Abs((w1 * z0 + w2 * z1) * z1);
611GPUd() int32_t
GPUTPCGMPropagator::Update(
float posY,
float posZ, int32_t iRow, const
GPUParam&
GPUrestrict()
param, int16_t clusterState, int8_t rejectChi2,
bool refit, int8_t
sector,
float time,
float avgInvCharge,
float invCharge)
614 GetErr2(err2Y, err2Z,
param, posZ, iRow, clusterState,
sector,
time, avgInvCharge, invCharge);
616 return Update(posY, posZ, iRow,
param, clusterState, rejectChi2, refit, err2Y, err2Z);
621 if (mT->NDF() == -5) {
622 mT->ResetCovariance();
623 float* mC = mT->Cov();
624 float* mP = mT->Par();
626 mC[14] = CAMath::Max(0.5f, CAMath::Abs(mP[4]));
627 mC[5] = CAMath::Max(0.2f, CAMath::Abs(mP[2]) / 2);
628 mC[9] = CAMath::Max(0.5f, CAMath::Abs(mP[3]) / 2);
638 return Update(posY, posZ, clusterState, rejectChi2 == rejectDirect, err2Y, err2Z, &
param);
641GPUd() int32_t
GPUTPCGMPropagator::InterpolateReject(const
GPUParam&
GPUrestrict()
param,
float posY,
float posZ, int16_t clusterState, int8_t rejectChi2, gputpcgmmergertypes::InterpolationErrorHit* inter,
float err2Y,
float err2Z,
float deltaZ)
645 if (rejectChi2 == rejectInterFill) {
648 if (mT->NDF() <= 0) {
649 inter->errorY = inter->errorZ = 100.f;
651 inter->errorY = mC[0];
652 inter->errorZ = mC[2];
654 }
else if (rejectChi2 == rejectInterReject) {
656 if (mT->NDF() <= 0) {
657 chi2Y = CAMath::Square((
float)inter->posY - posY) / ((
float)inter->errorY + err2Y);
658 chi2Z = CAMath::Square((
float)inter->posZ + deltaZ - posZ) / ((
float)inter->errorZ + err2Z);
659 }
else if (mFitInProjections) {
660 const float Iz0 = inter->posY - mP[0];
661 const float Iz1 = inter->posZ + deltaZ - mP[1];
662 const float Iw0 = 1.f / (mC[0] + (
float)inter->errorY);
663 const float Iw2 = 1.f / (mC[2] + (
float)inter->errorZ);
664 const float Ik00 = mC[0] * Iw0;
665 const float Ik11 = mC[2] * Iw2;
666 const float ImP0 = mP[0] + Ik00 * Iz0;
667 const float ImP1 = mP[1] + Ik11 * Iz1;
668 const float ImC0 = mC[0] - Ik00 * mC[0];
669 const float ImC2 = mC[2] - Ik11 * mC[2];
671 const float Jz0 = posY - ImP0;
672 const float Jz1 = posZ - ImP1;
673 const float Jw0 = 1.f / (ImC0 + err2Y);
674 const float Jw2 = 1.f / (ImC2 + err2Z);
675 chi2Y = Jw0 * Jz0 * Jz0;
676 chi2Z = Jw2 * Jz1 * Jz1;
678 const float Iz0 = inter->posY - mP[0];
679 const float Iz1 = inter->posZ + deltaZ - mP[1];
680 float Iw0 = mC[2] + (
float)inter->errorZ;
681 float Iw2 = mC[0] + (
float)inter->errorY;
682 float Idet = CAMath::Max(1e-10f, Iw0 * Iw2 - mC[1] * mC[1]);
685 const float Iw1 = mC[1] * Idet;
687 const float Ik00 = mC[0] * Iw0 + mC[1] * Iw1;
688 const float Ik01 = mC[0] * Iw1 + mC[1] * Iw2;
689 const float Ik10 = mC[1] * Iw0 + mC[2] * Iw1;
690 const float Ik11 = mC[1] * Iw1 + mC[2] * Iw2;
691 const float ImP0 = mP[0] + Ik00 * Iz0 + Ik01 * Iz1;
692 const float ImP1 = mP[1] + Ik10 * Iz0 + Ik11 * Iz1;
693 const float ImC0 = mC[0] - Ik00 * mC[0] + Ik01 * mC[1];
694 const float ImC1 = mC[1] - Ik10 * mC[0] + Ik11 * mC[1];
695 const float ImC2 = mC[2] - Ik10 * mC[1] + Ik11 * mC[2];
696 const float Jz0 = posY - ImP0;
697 const float Jz1 = posZ - ImP1;
698 float Jw0 = ImC2 + err2Z;
699 float Jw2 = ImC0 + err2Y;
700 float Jdet = CAMath::Max(1e-10f, Jw0 * Jw2 - ImC1 * ImC1);
703 const float Jw1 = ImC1 * Jdet;
705 chi2Y = CAMath::Abs((Jw0 * Jz0 + Jw1 * Jz1) * Jz0);
706 chi2Z = CAMath::Abs((Jw1 * Jz0 + Jw2 * Jz1) * Jz1);
708 if (RejectCluster(chi2Y *
param.rec.tpc.clusterRejectChi2TolleranceY, chi2Z *
param.rec.tpc.clusterRejectChi2TolleranceZ, clusterState)) {
710 return updateErrorClusterRejectedInInterpolation;
721 const
float d00 = mC[0], d01 = mC[1], d02 = mC[3], d03 = mC[6], d04 = mC[10];
722 const
float d10 = mC[1], d11 = mC[2], d12 = mC[4], d13 = mC[7], d14 = mC[11];
724 const
float z0 = posY - mP[0];
725 const
float z1 = posZ - mP[1];
726 float w0, w1, w2, chi2Y, chi2Z;
727 if (mFitInProjections || mT->NDF() <= 0) {
728 w0 = 1.f / (err2Y + d00);
730 w2 = 1.f / (err2Z + d11);
731 chi2Y = w0 * z0 * z0;
732 chi2Z = w2 *
z1 *
z1;
734 w0 = d11 + err2Z, w1 = d10, w2 = d00 + err2Y;
736 float det = w0 * w2 - w1 * w1;
737 if (CAMath::Abs(det) < 1.e-10f) {
738 return updateErrorFitFailed;
745 chi2Y = CAMath::Abs((w0 * z0 + w1 * z1) * z0);
746 chi2Z = CAMath::Abs((w1 * z0 + w2 * z1) * z1);
748 float dChi2 = chi2Y + chi2Z;
750 if (rejectChi2 && RejectCluster(chi2Y *
param->rec.tpc.clusterRejectChi2TolleranceY, chi2Z *
param->rec.tpc.clusterRejectChi2TolleranceZ, clusterState)) {
751 return updateErrorClusterRejectedInUpdate;
756 if (mFitInProjections || mT->NDF() <= 0) {
757 const float k00 = d00 * w0;
758 const float k20 = d02 * w0;
759 const float k40 = d04 * w0;
760 const float k11 = d11 * w2;
761 const float k31 = d13 * w2;
778 const float k00 = d00 * w0 + d01 * w1;
779 const float k01 = d00 * w1 + d10 * w2;
780 const float k10 = d01 * w0 + d11 * w1;
781 const float k11 = d01 * w1 + d11 * w2;
782 const float k20 = d02 * w0 + d12 * w1;
783 const float k21 = d02 * w1 + d12 * w2;
784 const float k30 = d03 * w0 + d13 * w1;
785 const float k31 = d03 * w1 + d13 * w2;
786 const float k40 = d04 * w0 + d14 * w1;
787 const float k41 = d04 * w1 + d14 * w2;
789 mP[0] += k00 * z0 + k01 *
z1;
790 mP[1] += k10 * z0 + k11 *
z1;
791 mP[2] += k20 * z0 + k21 *
z1;
792 mP[3] += k30 * z0 + k31 *
z1;
793 mP[4] += k40 * z0 + k41 *
z1;
795 mC[0] -= k00 * d00 + k01 * d10;
797 mC[2] -= k10 * d01 + k11 * d11;
799 mC[3] -= k20 * d00 + k21 * d10;
800 mC[5] -= k20 * d02 + k21 * d12;
802 mC[7] -= k30 * d01 + k31 * d11;
803 mC[9] -= k30 * d03 + k31 * d13;
805 mC[10] -= k40 * d00 + k41 * d10;
806 mC[12] -= k40 * d02 + k41 * d12;
807 mC[14] -= k40 * d04 + k41 * d14;
809 mC[1] -= k10 * d00 + k11 * d10;
810 mC[4] -= k20 * d01 + k21 * d11;
811 mC[6] -= k30 * d00 + k31 * d10;
812 mC[8] -= k30 * d02 + k31 * d12;
813 mC[11] -= k40 * d01 + k41 * d11;
814 mC[13] -= k40 * d03 + k41 * d13;
831 const float log0 = CAMath::Log(5940.f);
832 const float log1 = CAMath::Log(3.5f * 5940.f);
834 bool bad = (
beta2 >= .999f) || (beta2 < 1.e-8f);
841 float b = 0.5f * CAMath::Log(
a);
842 float d = 0.153e-3f /
beta2;
845 float ret =
d * (log0 +
b +
c);
846 float case1 =
d * (log1 +
c);
848 if (
a > 3.5f * 3.5f) {
862 const float mass = 0.13957f;
864 float qpt = mT0.GetQPt();
865 if (CAMath::Abs(qpt) > 20) {
869 float w2 = (1.f + mT0.GetDzDs() * mT0.GetDzDs());
870 float pti2 = qpt * qpt;
875 float mass2 = mass * mass;
876 float beta2 = w2 / (w2 + mass2 * pti2);
878 float p2 = w2 / pti2;
879 float betheRho = ApproximateBetheBloch(
p2 / mass2) * mMaterial.rho;
880 float E = CAMath::Sqrt(
p2 + mass2);
881 float theta2 = (14.1f * 14.1f / 1.e6f) / (beta2 *
p2) * mMaterial.radLenInv;
883 mMaterial.EP2 = E /
p2;
887 const float knst = 0.0007f;
888 mMaterial.sigmadE2 = knst * mMaterial.EP2 * qpt;
889 mMaterial.sigmadE2 = mMaterial.sigmadE2 * mMaterial.sigmadE2;
891 mMaterial.k22 = theta2 * w2;
892 mMaterial.k33 = mMaterial.k22 * w2;
894 mMaterial.k44 = theta2 * mT0.GetDzDs() * mT0.GetDzDs() * pti2;
896 float br = (betheRho > 1.e-8f) ? betheRho : 1.e-8f;
897 mMaterial.DLMax = 0.3f * E / br;
898 mMaterial.EP2 *= betheRho;
899 mMaterial.sigmadE2 = mMaterial.sigmadE2 * betheRho;
907 mT0.Pz() = -mT0.Pz();
912 mT->QPt() = -mT->QPt();
913 mT->DzDs() = -mT->DzDs();
915 mAlpha = mAlpha + CAMath::Pi();
916 while (mAlpha >= CAMath::Pi()) {
917 mAlpha -= CAMath::TwoPi();
919 while (mAlpha < -CAMath::Pi()) {
920 mAlpha += CAMath::TwoPi();
922 mCosAlpha = -mCosAlpha;
923 mSinAlpha = -mSinAlpha;
925 float*
c = mT->Cov();
936 mT0.Py() = -mT0.Py();
937 mT0.Pz() = -mT0.Pz();
939 mT->SinPhi() = -mT->SinPhi();
940 mT->DzDs() = -mT->DzDs();
941 mT->QPt() = -mT->QPt();
944 float*
c = mT->Cov();
957 GetBxByBz(mT0.X(), mT0.Y(), mT0.Z(),
B);
959 if (CAMath::Abs(Bz) < 1.e-8f) {
963 float dy = -2.f * mT0.Q() * mT0.Px() / Bz;
967 float sa = -mT0.CosPhi();
974 const float k2 = 1.f / 6.f;
975 const float k4 = 3.f / 40.f;
977 dS = chord + chord * sa2 * (
k2 + k4 * sa2);
981 if (mT0.SinPhi() < 0.f) {
985 mT0.Y() = mT0.Y() + dy;
986 mT0.Z() = mT0.Z() + mT0.DzDs() * dS;
988 mT->Y() = mT->Y() + dy;
989 mT->Z() = mT->Z() + mT0.DzDs() * dS;
996 float dL = CAMath::Abs(dS * mT0.GetDlDs());
998 if (inFlyDirection) {
1002 float*
c = mT->Cov();
1003 float& mC40 =
c[10];
1004 float& mC41 =
c[11];
1005 float& mC42 =
c[12];
1006 float& mC43 =
c[13];
1007 float& mC44 =
c[14];
1010 bool maskMS = (CAMath::Abs(dL) < mMaterial.DLMax);
1014 float dLabs = CAMath::Abs(dLmask);
1015 float corr = 1.f - mMaterial.EP2 * dLmask;
1017 float corrInv = 1.f / corr;
1018 mT0.Px() *= corrInv;
1019 mT0.Py() *= corrInv;
1020 mT0.Pz() *= corrInv;
1021 mT0.Pt() *= corrInv;
1031 mC44 = mC44 * corr * corr + dLabs * mMaterial.sigmadE2;
1039 return mMatLUT->getMatBudget(
p1[0],
p1[1],
p1[2],
p2[0],
p2[1],
p2[2]);
1044 float xyz1[3] = {getGlobalX(mT0.GetX(), mT0.GetY()), getGlobalY(mT0.GetX(), mT0.GetY()), mT0.GetZ()};
1045 float xyz2[3] = {getGlobalX(t0e.GetX(), t0e.GetY()), getGlobalY(t0e.GetX(), t0e.GetY()), t0e.GetZ()};
configStandalone Light OpenGL display display_light Apply smoothing to points Enable Z buffer Highlight links Highlight seeds Highlight sector tracks Highlight final tracks Show individual sector
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char Directory with events to Events directory is and not inside events d
configStandalone Reconstruction rec_tpc float
GPUd() void GPUTPCGMPropagator
constexpr int p1()
constexpr to accelerate the coordinates changing
GLboolean GLboolean GLboolean b
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat t0
GLboolean GLboolean GLboolean GLboolean a
GLuint GLfloat GLfloat y0
float float float float z1
const float const float const float bz
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
float length
length in material
float meanRho
mean density, g/cm^3
float meanX2X0
fraction of radiaton lenght
std::vector< o2::mch::ChannelCode > cc