20 #include "TClonesArray.h"
45 if (NULL == ioman) {Fatal(
"CbmRichRingFinderIdeal::Init",
"RootManager is NULL!");}
48 if (NULL ==
fMcTracks) {Fatal(
"CbmRichRingFinderIdeal::Init",
"No MCTrack array!");}
51 if (NULL ==
fRichPoints) {Fatal(
"CbmRichRingFinderIdeal::Init",
"No RichPoint array!");}
56 TClonesArray* projArray,
57 TClonesArray* ringArray)
59 if ( NULL == hitArray) {
60 cout <<
"-E- CbmRichRingFinderIdeal::DoFind, RichHit array missing!" << endl;
64 if ( NULL == ringArray ) {
65 cout <<
"-E- CbmRichRingFinderIdeal::DoFind, Ring array missing!" << endl;
70 map<Int_t, Int_t> hitMap;
71 Int_t nRichHits = hitArray->GetEntriesFast();
72 for (Int_t iHit = 0; iHit < nRichHits; iHit++) {
74 if ( NULL == pRhit )
continue;
76 if (ptIndex < 0)
continue;
78 if ( NULL == pMCpt )
continue;
80 if ( mcTrackIndex < 0 )
continue;
82 if ( NULL == pMCtr )
continue;
83 if ( pMCtr->
GetPdgCode() != 50000050)
continue;
89 map<Int_t, Int_t> ringMap;
93 Int_t nMCTracks =
fMcTracks->GetEntriesFast();
94 for (Int_t iMCTrack = 0; iMCTrack < nMCTracks; iMCTrack++) {
96 if ( NULL == pMCtr )
continue;
99 ringMap[iMCTrack] = nRings++;
103 for (Int_t iHit = 0; iHit < nRichHits; iHit++) {
105 if ( NULL == pRhit )
continue;
109 if (ptIndex < 0)
continue;
111 if ( NULL == pMCpt )
continue;
114 if ( mcTrackIndex < 0)
continue;
116 if ( NULL == pMCtr )
continue;
117 if ( pMCtr->
GetPdgCode() != 50000050)
continue;
120 if (motherId < 0 || motherId > nMCTracks)
continue;
122 if (ringMap.find(motherId) == ringMap.end())
continue;
124 Int_t ringIndex = ringMap[motherId];
127 if ( NULL == pRing )
continue;
132 cout <<
"-I- CbmRichRingFinderIdeal: all " << nMCTracks <<
", rec. " << nRings << endl;