20 #include "TClonesArray.h"
21 #include "TMatrixFSym.h"
29 fRefPlanePoints(NULL),
44 if (NULL == ioman) { Fatal(
"CbmRichTrackExtrapolationIdeal::Init",
"RootManager not instantised!");}
47 if ( NULL ==
fMcTracks) { Fatal(
"CbmRichTrackExtrapolationIdeal::Init",
"No MCTrack array!");}
50 if ( NULL ==
fRefPlanePoints) { Fatal(
"CbmRichTrackExtrapolationIdeal::Init",
"No RefPlanePoint array!");}
54 fStsTracks = (TClonesArray*) ioman->
GetObject(
"StsTrack");
55 if ( NULL == fStsTracks) { Fatal(
"CbmRichTrackExtrapolationIdeal::Init",
"No StsTrack array!");}
57 fStsTrackMatches = (TClonesArray*) ioman->
GetObject(
"StsTrackMatch");
58 if ( NULL == fStsTrackMatches) { Fatal(
"CbmRichTrackExtrapolationIdeal::Init",
"No StsTrackMatch array!");}
63 TClonesArray* globalTracks,
64 TClonesArray* extrapolatedTrackParams,
68 if ( NULL == extrapolatedTrackParams ) {
69 cout <<
"-E- CbmRichTrackExtrapolationIdeal::DoExtrapolate: TrackParam Array missing!" << endl;
73 if ( NULL == globalTracks ) {
74 cout <<
"-E- CbmRichTrackExtrapolationIdeal::DoExtrapolate: Global Track Array missing! " << endl;
81 TMatrixFSym covMat(5);
82 for(Int_t i=0;i<5;i++)
for(Int_t j=0; j<=i; j++) covMat(i,j) = 0;
83 covMat(0,0) = covMat(1,1) = covMat(2,2) = covMat(3,3) = covMat(4,4) = 1.e-4;
86 Int_t nTracks = globalTracks->GetEntriesFast();
87 for (Int_t iTrack=0; iTrack < nTracks; iTrack++){
89 new((*extrapolatedTrackParams)[iTrack])
FairTrackParam(0.,0.,0.,0.,0.,0.,covMat);
91 if (idSTS < 0 )
continue;
95 CbmStsTrack* pSTStr = (CbmStsTrack*) fStsTracks->At(idSTS);
96 if ( NULL == pSTStr )
continue;
98 Int_t Nsts = pSTStr->GetNStsHits() + pSTStr->GetNMvdHits();
99 if ( Nsts >= minNofStsHits) {
101 if ( NULL == pTrackMatch)
continue;
108 tx = mom.Px()/mom.Pz();
109 ty = mom.Py()/mom.Pz();
110 qp = charge/mom.Mag();
111 FairTrackParam richtrack(pos.X(),pos.Y(),pos.Z(),tx,ty,qp,covMat);
112 *(
FairTrackParam*)(extrapolatedTrackParams->At(iTrack)) = richtrack;