52 TClonesArray* extrapolatedTrackParams,
double )
55 if (event !=
nullptr) {
56 LOG(fatal) <<
"CbmRichTrackExtrapolationIdeal::DoExtrapolation(): CbmEvent is not nullptr. "
57 "This class does not support time-based mode. Please switch to event-by-event mode.";
60 if (extrapolatedTrackParams ==
nullptr) {
61 LOG(error) <<
"CbmRichTrackExtrapolationIdeal::DoExtrapolation(): extrapolatedTrackParams missing!";
65 if (globalTracks ==
nullptr) {
66 LOG(error) <<
"CbmRichTrackExtrapolationIdeal::DoExtrapolation(): globalTracks missing!";
71 TMatrixFSym covMat(5);
72 for (Int_t i = 0; i < 5; i++)
73 for (Int_t j = 0; j <= i; j++)
75 covMat(0, 0) = covMat(1, 1) = covMat(2, 2) = covMat(3, 3) = covMat(4, 4) = 1.e-4;
78 Int_t nofGlobalTracks = globalTracks->GetEntriesFast();
79 for (Int_t iT = 0; iT < nofGlobalTracks; iT++) {
81 new ((*extrapolatedTrackParams)[iT]) FairTrackParam(0., 0., 0., 0., 0., 0., covMat);
84 if (stsInd < 0)
continue;
86 if (stsTrack ==
nullptr)
continue;
88 if (stsTrackMatch ==
nullptr)
continue;
93 if (refPlanePoint->GetTrackID() == stsMcInd) {
94 refPlanePoint->Momentum(mom);
95 refPlanePoint->Position(
pos);
96 Double_t tx = mom.Px() / mom.Pz();
97 Double_t ty = mom.Py() / mom.Pz();
98 Double_t qp = charge / mom.Mag();
99 FairTrackParam richtrack(
pos.X(),
pos.Y(),
pos.Z(), tx, ty, qp, covMat);
100 *(FairTrackParam*) (extrapolatedTrackParams->At(iT)) = richtrack;