10 #include "TClonesArray.h"
30 fStsTrackMatches(NULL)
42 if (NULL == ioman) { Fatal(
"CbmRichRingTrackAssignIdeal::Init",
"RootManager not instantised!");}
45 if ( NULL ==
fMcTracks) {Fatal(
"CbmRichRingTrackAssignIdeal::Init",
"No MCTrack array!");}
48 if ( NULL ==
fGlobalTracks) {Fatal(
"CbmRichRingTrackAssignIdeal::Init",
"No GlobalTrack array!");}
51 if ( NULL ==
fRingMatches) {Fatal(
"CbmRichRingTrackAssignIdeal::Init",
"No RichRingMatch array!");}
54 if ( NULL ==
fStsTrackMatches) {Fatal(
"CbmRichRingTrackAssignIdeal::Init",
"No StsTrackMatch array!");}
59 TClonesArray* richProj)
61 Int_t nofTracks = richProj->GetEntriesFast();
62 Int_t nofRings = rings->GetEntriesFast();
64 for (Int_t iRing=0; iRing < nofRings; iRing++){
66 if (NULL == pRing)
continue;
70 if (NULL == pRingMatch)
continue;
75 for (Int_t iTrack=0; iTrack < nofTracks; iTrack++){
77 if (NULL == pTrack)
continue;
78 Double_t xTrack = pTrack->
GetX();
79 Double_t yTrack = pTrack->
GetY();
82 if (xTrack == 0 && yTrack == 0)
continue;
85 if (NULL == gTrack)
continue;
88 if (NULL == pTrackMatch)
continue;
91 gTrack -> SetRichRingIndex(iRing);
92 pRing -> SetTrackID(iTrack);
93 Double_t dist = TMath::Sqrt( (xRing-xTrack)*(xRing-xTrack)+(yRing-yTrack)*(yRing-yTrack) );