15 #include "FairRootManager.h"
16 #include "FairTrackParam.h"
18 #include "TClonesArray.h"
31 FairRootManager* ioman = FairRootManager::Instance();
33 Fatal(
"CbmRichTrackExtrapolationLittrack::Init",
34 "RootManager not instantised!");
37 fStsTracks = (TClonesArray*) ioman->GetObject(
"StsTrack");
39 Fatal(
"CbmRichTrackExtrapolationLittrack::Init",
"No StsTrack array!");
46 TClonesArray* globalTracks,
47 TClonesArray* extrapolatedTrackParams,
49 cout <<
"CbmRichTrackExtrapolationLittrack::DoExtrapolation" << endl;
50 if (NULL == extrapolatedTrackParams) {
51 cout <<
"-E- CbmRichTrackExtrapolationLittrack::DoExtrapolate: "
52 "TrackParamArray missing!"
57 if (NULL == globalTracks) {
58 cout <<
"-E- CbmRichTrackExtrapolationLittrack::DoExtrapolate: Track Array "
64 Int_t nTracks = globalTracks->GetEntriesFast();
65 for (Int_t iTrack = 0; iTrack < nTracks; iTrack++) {
67 new ((*extrapolatedTrackParams)[iTrack]) FairTrackParam();
69 if (idSTS < 0)
continue;
71 if (NULL == pSTStr)
continue;
76 std::vector<litfloat> F(25);
79 fLitPropagator->Propagate(&litInParam, &litOutParam, z, 11, &F, &length);
81 FairTrackParam outParam;
83 &litOutParam, &outParam);
85 *(FairTrackParam*) (extrapolatedTrackParams->At(iTrack)) = outParam;