57 TClonesArray* extrapolatedTrackParams,
double )
60 if (event !=
nullptr) {
61 LOG(fatal) <<
"CbmRichTrackExtrapolationMirrorIdeal::DoExtrapolation(): CbmEvent is not nullptr. "
62 "This class does not support time-based mode. Please switch to event-by-event mode.";
65 if (extrapolatedTrackParams ==
nullptr) {
66 LOG(error) <<
"CbmRichTrackExtrapolationMirrorIdeal::DoExtrapolation(): extrapolatedTrackParams missing!";
70 if (globalTracks ==
nullptr) {
71 LOG(error) <<
"CbmRichTrackExtrapolationMirrorIdeal::DoExtrapolation(): globalTracks missing!";
76 TMatrixFSym covMat(5);
77 for (Int_t i = 0; i < 5; i++)
78 for (Int_t j = 0; j <= i; j++)
80 covMat(0, 0) = covMat(1, 1) = covMat(2, 2) = covMat(3, 3) = covMat(4, 4) = 1.e-4;
83 Int_t nofGlobalTracks = globalTracks->GetEntriesFast();
84 for (Int_t iT = 0; iT < nofGlobalTracks; iT++) {
86 new ((*extrapolatedTrackParams)[iT]) FairTrackParam(0., 0., 0., 0., 0., 0., covMat);
89 if (stsInd < 0)
continue;
91 if (stsTrack ==
nullptr)
continue;
93 if (stsTrackMatch ==
nullptr)
continue;
97 if (pMirror->GetTrackID() == stsMcInd) {
98 pMirror->Momentum(mom);
99 pMirror->Position(
pos);
100 Double_t tx = mom.Px() / mom.Pz();
101 Double_t ty = mom.Py() / mom.Pz();
102 Double_t qp = charge / mom.Mag();
103 FairTrackParam richtrack(
pos.X(),
pos.Y(),
pos.Z(), tx, ty, qp, covMat);
104 *(FairTrackParam*) (extrapolatedTrackParams->At(iT)) = richtrack;