13 #include "FairRootManager.h"
14 #include "FairTrackParam.h"
16 #include "TClonesArray.h"
17 #include "TMatrixFSym.h"
29 FairRootManager* ioman = FairRootManager::Instance();
31 Fatal(
"CbmRichTrackExtrapolationKF::Init",
"RootManager not instantised!");
34 fStsTracks = (TClonesArray*) ioman->GetObject(
"StsTrack");
36 Fatal(
"CbmRichTrackExtrapolationKF::Init",
"No StsTrack array!");
41 TClonesArray* globalTracks,
42 TClonesArray* extrapolatedTrackParams,
44 if (NULL == extrapolatedTrackParams) {
45 cout <<
"-E- CbmRichTrackExtrapolationKF::DoExtrapolate: TrackParamArray "
51 if (NULL == globalTracks) {
53 <<
"-E- CbmRichTrackExtrapolationKF::DoExtrapolate: Track Array missing!"
58 TMatrixFSym covMat(5);
59 for (Int_t
i = 0;
i < 5;
i++)
60 for (Int_t j = 0; j <=
i; j++)
62 covMat(0, 0) = covMat(1, 1) = covMat(2, 2) = covMat(3, 3) = covMat(4, 4) =
67 Int_t nTracks = globalTracks->GetEntriesFast();
68 cout <<
"bmRichTrackExtrapolationKF nofGlobalTracks:" << nTracks << endl;
69 for (Int_t iTrack = 0; iTrack < nTracks; iTrack++) {
71 new ((*extrapolatedTrackParams)[iTrack])
72 FairTrackParam(0., 0., 0., 0., 0., 0., covMat);
74 if (idSTS < 0)
continue;
76 if (NULL == pSTStr)
continue;
78 FairTrackParam ExTrack;
82 *(FairTrackParam*) (extrapolatedTrackParams->At(iTrack)) = ExTrack;