- AliRICHTransientDigit* pdigit;
- // build the list of fired pads and update the info
- if (!pHitMap[nch]->TestHit(ipx, ipy)) {
- fList->AddAtAndExpand(new AliRICHTransientDigit(nch,digits),counter);
- pHitMap[nch]->SetHit(ipx, ipy, counter);
- counter++;
- pdigit=(AliRICHTransientDigit*)fList->At(fList->GetLast());
- // list of tracks
- TObjArray *trlist=(TObjArray*)pdigit->TrackList();
- trlist->Add(&trinfo);
- } else {
- pdigit=(AliRICHTransientDigit*) pHitMap[nch]->GetHit(ipx, ipy);
- // update charge
- // (*pdigit).fSignal+=iqpad;
- pdigit->AddSignal(iqpad);
- // update list of tracks
- TObjArray* trlist=(TObjArray*)pdigit->TrackList();
- Int_t lastEntry=trlist->GetLast();
- TVector *ptrkP=(TVector*)trlist->At(lastEntry);
- TVector &ptrk=*ptrkP;
- Int_t lastTrack=Int_t(ptrk(0));
- Int_t lastCharge=Int_t(ptrk(1));
- if (lastTrack==track) {
- lastCharge+=iqpad;
- trlist->RemoveAt(lastEntry);
- trinfo(0)=lastTrack;
- trinfo(1)=lastCharge;
- trlist->AddAt(&trinfo,lastEntry);
- } else {
- trlist->Add(&trinfo);
- }
- // check the track list
- Int_t nptracks=trlist->GetEntriesFast();
- if (nptracks > 2) {
- printf("Attention - tracks: %d (>2)\n",nptracks);
- //printf("cat,nch,ix,iy %d %d %d %d \n",icat+1,nch,ipx,ipy);
- for (Int_t tr=0;tr<nptracks;tr++) {
- TVector *pptrkP=(TVector*)trlist->At(tr);
- TVector &pptrk=*pptrkP;
- trk[tr]=Int_t(pptrk(0));
- chtrk[tr]=Int_t(pptrk(1));
- }
- } // end if nptracks
- } // end if pdigit
- } //end loop over clusters
- }// track type condition
- } // hit loop
- } // track loop