//_____________________________________________________________________________
void AliTRDchamberTimeBin::Clear(const Option_t *)
{
- for(AliTRDcluster **cit = &fClusters[0]; (*cit); cit++){
- if(IsOwner()) delete (*cit);
- (*cit) = NULL;
- }
+ if(IsOwner())
+ for(Int_t it = 0; it<kMaxClustersLayer; it++)
+ delete fClusters[it];
+ memset(fClusters,0,kMaxClustersLayer*sizeof(fClusters[0]));
fN = 0;
}
// Select clusters that belong to the Stack
Int_t nClStack = 0; // Internal counter
for(Int_t i = 0; i < fN; i++){
- if(fClusters[i]->IsUsed()){
+ if(fClusters[i]->IsUsed() || fClusters[i]->IsShared()){
fClusters[i] = 0x0;
fIndex[i] = 0xffff;
} else nClStack++;
// Debug Streaming
if(fReconstructor->GetStreamLevel(AliTRDReconstructor::kTracker) >= 3){
+ AliTRDcluster dcl(*cl);
TTreeSRedirector &cstream = *fReconstructor->GetDebugStream(AliTRDReconstructor::kTracker);
cstream << "BuildIndices"
<< "Plane=" << fPlane
<< "Stack=" << fStack
<< "Sector=" << fSector
<< "Iter=" << iter
- << "C.=" << cl
+ << "C.=" << &dcl
<< "rowIndex=" << rowIndex
<< "\n";
}
PrintClusters();
AliInfo(Form("zlo[%f] zhi[%f]", zvals[0], zvals[1]));
AliInfo(Form("zlo[%d] zhi[%d]", zlo, zhi));*/
-
+
+ Double_t ylo = cond[0] - cond[2],
+ yhi = cond[0] + cond[2];
+ //printf("CTB : ylo[%f] yhi[%f]\n", ylo, yhi);
//Preordering in Direction z saves a lot of loops (boundary checked)
for(UChar_t z = zlo; z <= zhi; z++){
UInt_t upper = (z < fNRows-1) ? fPositions[z+1] : fN;
return; //Buffer filled
}
- if(fClusters[y]->GetY() > (cond[0] + cond[2])) break; // Abbortion conditions!!!
- if(fClusters[y]->GetY() < (cond[0] - cond[2])) continue; // Too small
+ if(fClusters[y]->GetY() > yhi) break; // Abbortion conditions!!!
+ if(fClusters[y]->GetY() < ylo) continue; // Too small
if(((Int_t)((fClusters[y]->GetZ())*1000) < (Int_t)(zvals[0]*1000)) || ((Int_t)((fClusters[y]->GetZ())*1000) > (Int_t)(zvals[1]*1000))){/*printf("exit z\n"); TODO*/ continue;}
index[ncl] = y;
ncl++;