+ AliDebug(2, Form(" %d %d", parTOF[0], parTOF[2]));
+
+ fTOFdigitMap->ResetDigit(vol, digIndex);
+
+ }
+
+ }
+ }
+
+}
+//_____________________________________________________________________________
+
+void AliTOFClusterFinderV1::FindClustersWithoutTOT(Int_t nSector,
+ Int_t nPlate,
+ Int_t nStrip)
+{
+ //
+ // This function searches the isolated digits without TOT
+ // measurement (stored in the fDigits object), to perform clusters
+ // (stored in the fTofClusters array). This research has been made
+ // by checking the fTOFdigitMap object, filled at digits/raw-data
+ // reading time.
+ //
+
+ const Int_t kMaxNumberOfTracksPerDigit = 3;
+ const Int_t kMaxNumberOfDigitsPerVolume = 10;
+
+ Int_t jj = 0;
+
+ Int_t det[5] = {nSector,nPlate,nStrip,-1,-1};//sector,plate,strip,padZ,padX
+ Int_t vol[5] = {nSector,nPlate,nStrip,-1,-1};//sector,plate,strip,padX,padZ
+ UShort_t volIdClus = 0;
+
+ Float_t pos[3];
+ for (jj=0; jj<3; jj++) pos[jj] = 0.;
+ Double_t posClus[3];
+ for (jj=0; jj<3; jj++) posClus[jj] = 0.;
+
+ Double_t covClus[6];
+ for (jj=0; jj<6; jj++) covClus[jj] = 0.;
+
+ Int_t parTOF[7];
+ for (jj=0; jj<7; jj++) parTOF[jj] = 0;
+
+ Bool_t status = kTRUE; //assume all sim channels ok in the beginning...
+ Int_t tracks[kMaxNumberOfTracksPerDigit];
+ for (jj=0; jj<kMaxNumberOfTracksPerDigit; jj++) tracks[jj] = -1;
+
+ Int_t dummyCounter=-1;
+
+ AliTOFdigit *digitInteresting;
+
+ Int_t iPadX = -1;
+ Int_t iPadZ = -1;
+ for (iPadX=0; iPadX<AliTOFGeometry::NpadX(); iPadX++) {
+ for (iPadZ=0; iPadZ<AliTOFGeometry::NpadZ(); iPadZ++) {
+ vol[4] = iPadZ , vol[3] = iPadX;
+
+ AliDebug(3, Form(" %1d %2d\n", iPadZ, iPadX));
+
+ if (fTOFdigitMap->GetNumberOfDigits(vol)==0) continue;
+
+ for(Int_t digIndex=0; digIndex<kMaxNumberOfDigitsPerVolume; digIndex++) {
+ if (fTOFdigitMap->GetDigitIndex(vol,digIndex)<0) continue;
+ digitInteresting = (AliTOFdigit*)fDigits->UncheckedAt(fTOFdigitMap->GetDigitIndex(vol,digIndex));
+ if (digitInteresting->GetToT()>0) continue; // AdC
+
+ AliDebug(2, Form(" %3d %5d %2d %1d %2d %1d %2d %d %d %d %5d %5d %5d %5d",
+ fTOFdigitMap->GetNumberOfDigits(vol), digIndex,
+ vol[0], vol[1], vol[2] ,vol[4], vol[3],
+ digitInteresting->GetTdc(), digitInteresting->GetAdc(),
+ digitInteresting->GetToT(),
+ fTOFdigitMap->GetDigitIndex(vol,digIndex),
+ digitInteresting->GetTrack(0), digitInteresting->GetTrack(1), digitInteresting->GetTrack(2)));
+
+ det[3] = vol[4]; // padz
+ det[4] = vol[3]; // padx
+ fTOFGeometry->GetPosPar(det,pos);
+ AliDebug(1,Form(" %f %f %f", pos[0], pos[1], pos[2]));
+
+ //insert cluster
+ for (jj=0; jj<3; jj++) posClus[jj] = pos[jj];
+
+ parTOF[0] = Int_t(digitInteresting->GetTdc());
+ parTOF[1] = Int_t(digitInteresting->GetToT());
+ parTOF[2] = Int_t(digitInteresting->GetAdc());
+ parTOF[3] = Int_t(digitInteresting->GetTdcND());
+ parTOF[4] = Int_t(digitInteresting->GetTdc());
+ parTOF[5] = 0;
+ parTOF[6] = 0;
+
+ volIdClus = fTOFGeometry->GetAliSensVolIndex(det[0],det[1],det[2]);
+ //volIdClus = GetClusterVolIndex(det);
+
+ for (jj=0; jj<6; jj++) covClus[jj] = 0.;
+ GetClusterPars(det, posClus, covClus);
+
+ // To fill the track index array
+ dummyCounter=-1;
+ for (jj=0; jj<kMaxNumberOfTracksPerDigit; jj++) tracks[jj] = -1;
+ for (jj=0; jj<kMaxNumberOfTracksPerDigit; jj++) { // three is the max number of tracks associated to one digit
+ if (digitInteresting->GetTrack(jj)==-1) continue;
+ else {
+ dummyCounter++;
+ tracks[dummyCounter] = digitInteresting->GetTrack(jj);
+ }
+ }
+
+ AliTOFcluster *tofCluster =
+ new AliTOFcluster(volIdClus, posClus[0], posClus[1], posClus[2],
+ covClus[0], covClus[1], covClus[2], covClus[3], covClus[4], covClus[5],
+ tracks, det, parTOF, status, fTOFdigitMap->GetDigitIndex(vol,digIndex));
+ InsertCluster(tofCluster);
+
+ AliDebug(2, Form(" %4d %f %f %f %f %f %f %f %f %f %3d %3d %3d %2d %1d %2d %1d %2d %4d %3d %3d %4d %4d %1d %4d",
+ volIdClus, posClus[0], posClus[1], posClus[2],
+ covClus[0], covClus[1], covClus[2], covClus[3], covClus[4], covClus[5],
+ tracks[0], tracks[1], tracks[2],
+ det[0], det[1], det[2], det[3], det[4],
+ parTOF[0], parTOF[1], parTOF[2], parTOF[3], parTOF[4],
+ status, fTOFdigitMap->GetDigitIndex(vol,digIndex)));
+
+ AliDebug(2, Form(" %f %f %f", pos[0], pos[1], pos[2]));
+ AliDebug(2, Form(" %d %d", parTOF[0], parTOF[2]));