10 #include "TClonesArray.h"
17 #include "FairRootManager.h"
18 #include "FairTrackParam.h"
29 , fStsTrackMatches(NULL) {}
34 FairRootManager* ioman = FairRootManager::Instance();
36 Fatal(
"CbmRichRingTrackAssignIdeal::Init",
"RootManager not instantised!");
39 fMcTracks = (TClonesArray*) ioman->GetObject(
"MCTrack");
41 Fatal(
"CbmRichRingTrackAssignIdeal::Init",
"No MCTrack array!");
44 fGlobalTracks = (TClonesArray*) ioman->GetObject(
"GlobalTrack");
46 Fatal(
"CbmRichRingTrackAssignIdeal::Init",
"No GlobalTrack array!");
49 fRingMatches = (TClonesArray*) ioman->GetObject(
"RichRingMatch");
51 Fatal(
"CbmRichRingTrackAssignIdeal::Init",
"No RichRingMatch array!");
56 Fatal(
"CbmRichRingTrackAssignIdeal::Init",
"No StsTrackMatch array!");
62 Int_t nofTracks =
richProj->GetEntriesFast();
63 Int_t nofRings =
rings->GetEntriesFast();
65 for (Int_t iRing = 0; iRing < nofRings; iRing++) {
67 if (NULL == pRing)
continue;
71 if (NULL == pRingMatch)
continue;
76 for (Int_t iTrack = 0; iTrack < nofTracks; iTrack++) {
77 FairTrackParam* pTrack = (FairTrackParam*)
richProj->At(iTrack);
78 if (NULL == pTrack)
continue;
79 Double_t xTrack = pTrack->GetX();
80 Double_t yTrack = pTrack->GetY();
83 if (xTrack == 0 && yTrack == 0)
continue;
86 if (NULL == gTrack)
continue;
90 if (NULL == pTrackMatch)
continue;