-/*
-//______________________________________________________________________
-void AliITSsimulationSDD::ListOfFiredCells(Int_t *arg,Double_t timeAmplitude,
- TObjArray *alist,TClonesArray *padr){
- // Returns the list of "fired" cells.
-
- Int_t index = arg[0];
- Int_t ik = arg[1];
- Int_t idtrack = arg[2];
- Int_t idhit = arg[3];
- Int_t counter = arg[4];
- Int_t countadr = arg[5];
- Double_t charge = timeAmplitude;
- charge += fHitMap2->GetSignal(index,ik-1);
- fHitMap2->SetHit(index, ik-1, charge);
-
- Int_t digits[3];
- Int_t it = (Int_t)((ik-1)/fScaleSize);
- digits[0] = index;
- digits[1] = it;
- digits[2] = (Int_t)timeAmplitude;
- Float_t phys;
- if (idtrack >= 0) phys = (Float_t)timeAmplitude;
- else phys = 0;
-
- Double_t cellcharge = 0.;
- AliITSTransientDigit* pdigit;
- // build the list of fired cells and update the info
- if (!fHitMap1->TestHit(index, it)) {
- new((*padr)[countadr++]) TVector(3);
- TVector &trinfo=*((TVector*) (*padr)[countadr-1]);
- trinfo(0) = (Float_t)idtrack;
- trinfo(1) = (Float_t)idhit;
- trinfo(2) = (Float_t)timeAmplitude;
-
- alist->AddAtAndExpand(new AliITSTransientDigit(phys,digits),counter);
- fHitMap1->SetHit(index, it, counter);
- counter++;
- pdigit=(AliITSTransientDigit*)alist->At(alist->GetLast());
- // list of tracks
- TObjArray *trlist=(TObjArray*)pdigit->TrackList();
- trlist->Add(&trinfo);
- } else {
- pdigit = (AliITSTransientDigit*) fHitMap1->GetHit(index, it);
- for(Int_t kk=0;kk<fScaleSize;kk++) {
- cellcharge += fHitMap2->GetSignal(index,fScaleSize*it+kk);
- } // end for kk
- // update charge
- (*pdigit).fSignal = (Int_t)cellcharge;
- (*pdigit).fPhysics += phys;
- // update list of tracks
- TObjArray* trlist = (TObjArray*)pdigit->TrackList();
- Int_t lastentry = trlist->GetLast();
- TVector *ptrkp = (TVector*)trlist->At(lastentry);
- TVector &trinfo = *ptrkp;
- Int_t lasttrack = Int_t(trinfo(0));
- Float_t lastcharge=(trinfo(2));
- if (lasttrack==idtrack ) {
- lastcharge += (Float_t)timeAmplitude;
- trlist->RemoveAt(lastentry);
- trinfo(0) = lasttrack;
- trinfo(1) = idhit;
- trinfo(2) = lastcharge;
- trlist->AddAt(&trinfo,lastentry);
- } else {
- new((*padr)[countadr++]) TVector(3);
- TVector &trinfo=*((TVector*) (*padr)[countadr-1]);
- trinfo(0) = (Float_t)idtrack;
- trinfo(1) = (Float_t)idhit;
- trinfo(2) = (Float_t)timeAmplitude;
- trlist->Add(&trinfo);
- } // end if lasttrack==idtrack
-
-#ifdef print
- // check the track list - debugging
- Int_t trk[20], htrk[20];
- Float_t chtrk[20];
- Int_t nptracks = trlist->GetEntriesFast();
- if (nptracks > 2) {
- Int_t tr;
- for (tr=0;tr<nptracks;tr++) {
- TVector *pptrkp = (TVector*)trlist->At(tr);
- TVector &pptrk = *pptrkp;
- trk[tr] = Int_t(pptrk(0));
- htrk[tr] = Int_t(pptrk(1));
- chtrk[tr] = (pptrk(2));
- cout << "nptracks "<<nptracks << endl;
- } // end for tr
- } // end if nptracks
-#endif
- } // end if pdigit
-
- // update counter and countadr for next call.
- arg[4] = counter;
- arg[5] = countadr;
-}
-*/
-