@@ -635,14 +635,13 @@ GPUd() bool GPUTRDTracker_t<TRDTRK, PROP>::FollowProlongation(PROP* prop, TRDTRK
635635 if (probBC > maxProb) {
636636 maxProb = probBC;
637637 yCorrPileUp = -slopeFactor * deltaBC;
638- zShiftTrkPileUp = - deltaBC * o2::constants::lhc::LHCBunchSpacingMUS * mTPCVdrift * mTrackAttribs [iTrk].mSide ;
638+ zShiftTrkPileUp = -deltaBC * o2::constants::lhc::LHCBunchSpacingMUS * mTPCVdrift * mTrackAttribs [iTrk].mSide ;
639639 }
640640 }
641641 if (sumProb > 1e-6f ) {
642642 yAddErrPileUp2 = sumCorr2 / sumProb - 2 * yCorrPileUp * sumCorr / sumProb + yCorrPileUp * yCorrPileUp;
643643 }
644644 }
645-
646645
647646 // number of tracklets within the chamber is the current TRD occupancy estimator
648647 int nTrackletsChamber = mTrackletIndexArray [trkltIdxOffset + currDet + 1 ] - mTrackletIndexArray [trkltIdxOffset + currDet];
@@ -652,13 +651,13 @@ GPUd() bool GPUTRDTracker_t<TRDTRK, PROP>::FollowProlongation(PROP* prop, TRDTRK
652651 float zPosCorr = spacePoints[trkltIdx].getZ () + mRecoParam ->getZCorrCoeffNRC () * trkWork->getTgl ();
653652 float yPosCorr = spacePoints[trkltIdx].getY () - tiltCorr + yCorrPileUp;
654653 zPosCorr -= zShiftTrk + zShiftTrkPileUp; // shift tracklet instead of track in order to avoid having to do a re-fit for each collision
655-
654+
656655 // Correction of y position based on angular pull
657656 if (Param ().rec .trd .useAngularPull == 3 || Param ().rec .trd .useAngularPull == 4 ) {
658657 float corrPull = -angularPull * mRecoParam ->getCorrYDy (trkWork->getSnp ());
659658 yPosCorr += corrPull;
660659 }
661-
660+
662661 float deltaY = yPosCorr - projY;
663662 float deltaZ = zPosCorr - projZ;
664663
@@ -677,18 +676,18 @@ GPUd() bool GPUTRDTracker_t<TRDTRK, PROP>::FollowProlongation(PROP* prop, TRDTRK
677676 trkltCovTmpWithDy[0 ] += trkWork->getSigmaY2 ();
678677 trkltCovTmpWithDy[1 ] += trkWork->getSigmaZY ();
679678 trkltCovTmpWithDy[2 ] += trkWork->getSigmaZ2 ();
680-
679+
681680 if (Param ().rec .trd .useAngularPull == 3 || Param ().rec .trd .useAngularPull == 4 ) {
682681 // In this case the correlation between tracklet y and tracklet dy is already corrected for so we can cancel it
683682 trkltCovTmpWithDy[3 ] = 0 .;
684683 trkltCovTmpWithDy[4 ] = 0 .;
685684 }
686-
685+
687686 // We add the correlation between track y and track dy
688687 trkltCovTmpWithDy[3 ] += trkWork->getSigmaSnpY () * mGeo ->GetCdrHght ();
689688 trkltCovTmpWithDy[4 ] += trkWork->getSigmaSnpZ () * mGeo ->GetCdrHght ();
690-
691- // keep these parameters before matrix inversion
689+
690+ // keep these parameters before matrix inversion
692691 float sigmaZ2 = trkltCovTmpWithDy[2 ];
693692 float sigmaDy2 = trkltCovTmpWithDy[5 ];
694693
@@ -698,13 +697,15 @@ GPUd() bool GPUTRDTracker_t<TRDTRK, PROP>::FollowProlongation(PROP* prop, TRDTRK
698697 if (Param ().rec .trd .addDeflectionInChi2 == 2 || Param ().rec .trd .addDeflectionInChi2 == 3 ) {
699698 // In this case we take into account the full likelihood, so we replace (deltaDy/sigmaDy)^2 by -2*ln(likelihood), which is the same in the default Gaussian case
700699 double likelihood = mRecoParam ->getDyLikelihood (trkWork->getSnp (), spacePoints[trkltIdx].getDy () + dyTiltCorr, nTrackletsChamber);
701- if (likelihood < 1e-6f ) continue ; // likelihood of 1e-6 is equivalent to 5 sigma deviation, so we can safely cut it to avoid numerical instability in log calculation
700+ if (likelihood < 1e-6f )
701+ continue ; // likelihood of 1e-6 is equivalent to 5 sigma deviation, so we can safely cut it to avoid numerical instability in log calculation
702702 deltaDy = CAMath::Sqrt (-2 .f * CAMath::Log (likelihood) * sigmaDy2) * (deltaDy > 0 .f ? 1 .f : -1 .f );
703703 }
704704 if (Param ().rec .trd .addDeflectionInChi2 == 3 ) {
705705 // We do the same for deltaZ
706706 double likelihood = mRecoParam ->getZLikelihood (deltaZ, pad->GetRowSize (tracklets[trkltIdx].GetZbin ()), CAMath::Sqrt (trkWork->getSigmaZ2 ()));
707- if (likelihood < 1e-6f ) continue ;
707+ if (likelihood < 1e-6f )
708+ continue ;
708709 deltaZ = CAMath::Sqrt (-2 .f * CAMath::Log (likelihood) * sigmaZ2) * (deltaZ > 0 .f ? 1 .f : -1 .f );
709710 }
710711 chi2 = deltaY * trkltCovTmpWithDy[0 ] * deltaY + 2 * deltaY * trkltCovTmpWithDy[1 ] * deltaZ + 2 * deltaY * trkltCovTmpWithDy[3 ] * deltaDy + deltaZ * trkltCovTmpWithDy[2 ] * deltaZ + 2 * deltaZ * trkltCovTmpWithDy[4 ] * deltaDy + deltaDy * trkltCovTmpWithDy[5 ] * deltaDy;
@@ -724,8 +725,7 @@ GPUd() bool GPUTRDTracker_t<TRDTRK, PROP>::FollowProlongation(PROP* prop, TRDTRK
724725 Hypothesis hypoNoUpdate (trkWork->getNlayersFindable (), iCandidate, -1 , trkWork->getChi2 () + Param ().rec .trd .penaltyChi2 );
725726 InsertHypothesis (hypoNoUpdate, nCurrHypothesis, hypothesisIdxOffset);
726727 isOK = true ;
727- } // end candidate loop
728-
728+ } // end candidate loop
729729
730730 mDebug ->SetChi2Update (mHypothesis [0 + hypothesisIdxOffset].mChi2 - t->getChi2 (), iLayer); // only meaningful for ONE candidate!!!
731731 mDebug ->SetRoad (roadY, roadZ, iLayer); // only meaningful for ONE candidate
@@ -791,9 +791,9 @@ GPUd() bool GPUTRDTracker_t<TRDTRK, PROP>::FollowProlongation(PROP* prop, TRDTRK
791791 pad = mGeo ->GetPadPlane (tracklets[mHypothesis [iUpdate + hypothesisIdxOffset].mTrackletId ].GetDetector ());
792792 float tiltCorrUp = tilt * (spacePoints[mHypothesis [iUpdate + hypothesisIdxOffset].mTrackletId ].getZ () - trkWork->getZ ());
793793 float dyTiltCorr = tilt * trkWork->getTgl () * mGeo ->GetCdrHght ();
794-
794+
795795 float yPosCorrUp = spacePoints[mHypothesis [iUpdate + hypothesisIdxOffset].mTrackletId ].getY () - tiltCorrUp;
796-
796+
797797 float zPosCorrUp = spacePoints[mHypothesis [iUpdate + hypothesisIdxOffset].mTrackletId ].getZ () + mRecoParam ->getZCorrCoeffNRC () * trkWork->getTgl ();
798798 zPosCorrUp -= zShiftTrk;
799799 float padLength = pad->GetRowSize (tracklets[mHypothesis [iUpdate + hypothesisIdxOffset].mTrackletId ].GetZbin ());
@@ -825,21 +825,21 @@ GPUd() bool GPUTRDTracker_t<TRDTRK, PROP>::FollowProlongation(PROP* prop, TRDTRK
825825 if (probBC > maxProb) {
826826 maxProb = probBC;
827827 yCorrPileUp = -slopeFactor * deltaBC;
828- zShiftTrkPileUp = - deltaBC * o2::constants::lhc::LHCBunchSpacingMUS * mTPCVdrift * mTrackAttribs [iTrk].mSide ;
828+ zShiftTrkPileUp = -deltaBC * o2::constants::lhc::LHCBunchSpacingMUS * mTPCVdrift * mTrackAttribs [iTrk].mSide ;
829829 }
830830 }
831831 if (sumProb > 1e-6f ) {
832832 yAddErrPileUp2 = sumCorr2 / sumProb - 2 * yCorrPileUp * sumCorr / sumProb + yCorrPileUp * yCorrPileUp;
833833 }
834834 }
835-
835+
836836 zPosCorrUp -= zShiftTrkPileUp;
837837 yPosCorrUp += yCorrPileUp;
838838
839839 const auto currDet = tracklets[mHypothesis [iUpdate + hypothesisIdxOffset].mTrackletId ].GetDetector ();
840840 int nTrackletsChamber = mTrackletIndexArray [trkltIdxOffset + currDet + 1 ] - mTrackletIndexArray [trkltIdxOffset + currDet];
841841 float angularPull = GetAngularPull (spacePoints[mHypothesis [iUpdate + hypothesisIdxOffset].mTrackletId ].getDy () + dyTiltCorr, trkWork->getSnp (), nTrackletsChamber);
842-
842+
843843 // Correction of y position based on angular pull
844844 if (Param ().rec .trd .useAngularPull == 3 || Param ().rec .trd .useAngularPull == 4 ) {
845845 float corrPull = -angularPull * mRecoParam ->getCorrYDy (trkWork->getSnp ());
@@ -938,8 +938,6 @@ GPUd() bool GPUTRDTracker_t<TRDTRK, PROP>::FollowProlongation(PROP* prop, TRDTRK
938938 return false ;
939939 }
940940 } // end layer loop
941-
942-
943941
944942 // --------------------------------------------------------------------------------
945943 // add some debug information (compare labels of attached tracklets to track label)
@@ -1288,7 +1286,7 @@ GPUd() bool GPUTRDTracker_t<TRDTRK, PROP>::IsGeoFindable(const TRDTRK* t, const
12881286 if (!mGeo ->ChamberInGeometry (det)) {
12891287 return false ;
12901288 }
1291-
1289+
12921290 // reject tracks in bad chambers
12931291 if (mChamberStatus [det]) {
12941292 return false ;
@@ -1310,12 +1308,12 @@ GPUd() bool GPUTRDTracker_t<TRDTRK, PROP>::IsGeoFindable(const TRDTRK* t, const
13101308 if (!((zTrk > zMin + epsZ) && (zTrk < zMax - epsZ))) {
13111309 return false ;
13121310 }
1313-
1311+
13141312 // reject tracks if the corresponding pad and neighboring pads (to take into account track uncertainty and charge sharing with neighbours) are masked
13151313 int32_t padrow = pp->GetPadRowNumber (zTrk);
13161314 int32_t padcol = pp->GetPadColNumber (t->getY ());
13171315 int32_t idxPad = det * kNPadColumns * kNPadRows + padcol * kNPadRows + padrow;
1318- if (padrow != -1 && padcol != -1 && mPadStatus [idxPad] && (padrow == 0 || mPadStatus [idxPad - kNPadRows ]) && (padrow == kNPadRows - 1 || mPadStatus [idxPad + kNPadRows ])) {
1316+ if (padrow != -1 && padcol != -1 && mPadStatus [idxPad] && (padrow == 0 || mPadStatus [idxPad - kNPadRows ]) && (padrow == kNPadRows - 1 || mPadStatus [idxPad + kNPadRows ])) {
13191317 return false ;
13201318 }
13211319
0 commit comments