-//
-// Generates pad hits (simulated cluster)
-// using the segmentation and the response model
-
- Int_t twentyNano;
- if (tof<75*TMath::Power(10,-9)) {
- twentyNano=1;
- } else {
- twentyNano=100;
- }
-
- // cout << " time = " << tof << " , " << twentyNano << "\n";
-
- Float_t qp;
- nnew=0;
- for (Int_t i=1; i<=fnsec; i++) {
- AliMUONSegmentation * segmentation=
- (AliMUONSegmentation*) (*fSegmentation)[i-1];
-
-// Find the module & strip Id. which has fired
- Int_t ix,iy;
-
- segmentation->GetPadIxy(xhit,yhit,0,ix,iy);
- segmentation->SetPad(ix,iy);
-
-// treatment of GEANT hits w/o corresponding strip (due to the fact that
-// the 2 geometries are computed in a very slightly different way)
- if (ix==0&&iy==0) {
- cout << " AliMUONChamberTrigger hit w/o strip " << xhit << " , " << yhit << "\n";
- } else {
- // --- store signal information for this strip
- newclust[0][nnew]=1.; // total charge
- newclust[1][nnew]=ix; // ix-position of pad
- newclust[2][nnew]=iy; // iy-position of pad
- newclust[3][nnew]=twentyNano; // time of flight
- newclust[4][nnew]=segmentation->ISector(); // sector id
- newclust[5][nnew]=(Float_t) i; // counter
- nnew++;
- // set hits
- segmentation->SetHit(xhit,yhit,zhit);
- // get the list of nearest neighbours
- Int_t nList, xList[2], yList[2];
- segmentation->Neighbours(ix,iy,&nList,xList,yList);
-
- for (Int_t j=0; j<nList; j++){
-
- // neighbour real coordinates (just for checks here)
- Float_t x,y,z;
- segmentation->GetPadCxy(xList[j],yList[j],x,y,z);
- // set pad (fx fy & fix fiy are the current pad coord. & Id.)
- segmentation->SetPad(xList[j],yList[j]);
- // get the chamber (i.e. current strip) response
- qp=fResponse->IntXY(segmentation);
-
- if (qp > 0.5) {
- // --- store signal information for neighbours
- newclust[0][nnew]=qp; // total charge
- newclust[1][nnew]=segmentation->Ix(); // ix-position of pad
- newclust[2][nnew]=segmentation->Iy(); // iy-position of pad
- newclust[3][nnew]=twentyNano; // time of flight
- newclust[4][nnew]=segmentation->ISector(); // sector id
- newclust[5][nnew]=(Float_t) i; // counter
- nnew++;
- } // qp > 0.5
- } // loop on neighbour
- } // endif hit w/o strip
- } // loop over planes