1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
18 Revision 1.5 2001/01/26 19:57:22 hristov
19 Major upgrade of AliRoot code
21 Revision 1.4 2000/10/05 16:08:15 kowal2
22 Changes due to a new class AliComplexCluster. Forward declarations.
24 Revision 1.3 2000/07/10 20:57:39 hristov
25 Update of TPC code and macros by M.Kowalski
27 Revision 1.2 2000/06/30 12:07:49 kowal2
28 Updated from the TPC-PreRelease branch
30 Revision 1.1.2.1 2000/06/25 08:52:51 kowal2
31 replacing AliClusterFinder
35 //-----------------------------------------------------------------------------
37 // Implementation of class ALITPCCLUSTERFINDER
39 //Class for cluster finding in two dimension.
40 //In the present there are implemented two algorithm
41 //primitive recursion algorithm. (FindPeaks)
42 //Algorithm is not working in case of overlaping clusters
43 //Maximum - minimum in direction algoritm (Find clusters)
44 //In this algoritm we suppose that each cluster has local
45 //maximum. From this local maximum I mus see each point
47 //From maximum i can accept every point in radial
48 //direction which is before border in direction
49 //Border in direction occur if we have next in
50 //direction nder threshold or response begin
51 //to increase in given radial direction
52 //-----------------------------------------------------------------------------
55 #include "AliArrayI.h"
56 #include "TClonesArray.h"
61 #include "AliComplexCluster.h"
62 #include "AliTPCClusterFinder.h"
65 //direction constants possible direction in 8 different sectors
69 const Int_t kClStackSize =1000;
74 static AliTPCClusterFinder * gClusterFinder; //for fitting routine
76 void gauss(Int_t &npar, Double_t *gin, Double_t &f, Double_t *par, Int_t iflag)
78 AliArrayI * points = gClusterFinder->GetStack();
79 const Int_t nbins = gClusterFinder->GetStackIndex();
84 for (i=0;i<nbins; i++) {
85 Float_t x = points->At(i*3);
86 Float_t y = points->At(i*3+1);
87 Float_t z = points->At(i*3+2);
88 Float_t deltax2 = (x-par[1]);
91 Float_t deltay2 = (y-par[2]);
95 delta = z-par[0]*TMath::Exp(-deltax2-deltay2);
102 ClassImp(AliTPCClusterFinder)
105 AliTPCClusterFinder::AliTPCClusterFinder()
112 fMulSigma2 = 16; //4 sigma
117 fStack = new AliArrayI;
118 fStack->Set(kClStackSize);
128 fMinuit= new TMinuit(5);
129 fMinuit->SetFCN(gauss);
130 gClusterFinder = this;
135 AliTPCClusterFinder::~AliTPCClusterFinder()
137 if (fDigits != 0) delete fDigits;
140 void AliTPCClusterFinder::SetSigmaX(Float_t s0, Float_t s1x, Float_t s1y)
147 void AliTPCClusterFinder::SetSigmaY(Float_t s0, Float_t s1x, Float_t s1y)
156 Bool_t AliTPCClusterFinder::SetSigma2(Int_t i, Int_t j, Float_t & sigmax2, Float_t &sigmay2)
159 //set sigmax2 and sigma y2 accordig i and j position of cell
162 // Float_t x[3] = {ItoX(i),JtoY(j),0};
166 sigmax2= fSigmaX[0]+fSigmaX[1]*x+fSigmaX[2]*y;
167 sigmay2= fSigmaY[0]+fSigmaY[1]*x+fSigmaY[2]*y;
172 Bool_t AliTPCClusterFinder::SetSigma2(Int_t i, Int_t j, Float_t & sigmax2, Float_t &sigmay2)
175 //set sigmax2 and sigma y2 accordig i and j position of cell
177 if (fDetectorParam==0) {
182 Float_t x[3] = {ItoX(i),JtoY(j),0};
184 fDetectorParam->GetClusterSize(x,fDetectorIndex,0,0,sigma);
185 sigmax2=sigma[0]*(fX2-fX1)*(fX2-fX1)/(fDimX*fDimX);
186 sigmay2=sigma[1]*(fY2-fY1)*(fY2-fY1)/(fDimY*fDimY);
192 void AliTPCClusterFinder::GetHisto(TH2F * his2)
195 UInt_t idim =his2->GetNbinsX();
196 UInt_t jdim =his2->GetNbinsY();
197 fX1 = his2->GetXaxis()->GetXmin();
198 fX2 = his2->GetXaxis()->GetXmax();
199 fY1 = his2->GetYaxis()->GetXmin();
200 fY2 = his2->GetYaxis()->GetXmax();
202 if ( (idim>0) && (jdim>0))
207 Int_t size =idim*jdim;
208 if (fDigits !=0) delete fDigits;
209 fDigits = (Int_t*) new Int_t[size];
210 fCells = (AliCell*) new AliCell[size];
214 for (Int_t i = 0; i<(Int_t)idim;i++)
215 for (Int_t j = 0; j<(Int_t)jdim;j++)
217 Int_t index = his2->GetBin(i+1,j+1);
218 //AliCell * cell = GetCell(i,j);
219 //if (cell!=0) cell->SetSignal(his2->GetBinContent(index));
220 SetSignal(his2->GetBinContent(index),i,j);
228 void AliTPCClusterFinder::FindMaxima()
230 for (Int_t i=0; i<fDimX; i++)
231 for (Int_t j=0;j<fDimY; j++)
232 if (IsMaximum(i,j)) cout<<i<<" "<<j<<"\n";
236 void AliTPCClusterFinder::Transform(AliDigitCluster * c)
238 //transform coordinata from bin coordinata to "normal coordinata"
239 //for example if we initialize finder with histogram
240 //it transform values from bin coordinata to the histogram coordinata
243 c->fMaxX=ItoX(c->fMaxX);
244 c->fMaxY=JtoY(c->fMaxY);
246 c->fSigmaX2=c->fSigmaX2*(fX2-fX1)*(fX2-fX1)/(fDimX*fDimX);
247 c->fSigmaY2=c->fSigmaY2*(fY2-fY1)*(fY2-fY1)/(fDimY*fDimY);
248 c->fArea =c->fArea*(fX2-fX1)*(fY2-fY1)/(fDimX*fDimY);
250 void AliTPCClusterFinder::AddToStack(Int_t i, Int_t j, Int_t signal)
255 if ( ((fStackIndex+2)>=kClStackSize) || (fStackIndex<0) ) return;
256 fStack->AddAt(i,fStackIndex);
257 fStack->AddAt(j,fStackIndex+1);
258 fStack->AddAt(signal,fStackIndex+2);
262 void AliTPCClusterFinder::GetClusterStatistic(AliDigitCluster & cluster)
265 //calculate statistic of cluster
267 Double_t sumxw,sumyw,sumx2w,sumy2w,sumxyw,sumw;
268 Int_t minx,maxx,miny,maxy;
269 sumxw=sumyw=sumx2w=sumy2w=sumxyw=sumw=0;
274 Int_t x0=fStack->At(0);
275 Int_t y0=fStack->At(1);
278 Int_t maxQ=fStack->At(2);
281 for (Int_t i = 0; i<fStackIndex;i+=3){
282 Int_t x = fStack->At(i);
283 Int_t y = fStack->At(i+1);
286 Int_t w = fStack->At(i+2);
305 cluster.fX = sumxw/sumw;
306 cluster.fY = sumyw/sumw;
308 cluster.fSigmaX2 = sumx2w/sumw-cluster.fX*cluster.fX;
309 cluster.fSigmaY2 = sumy2w/sumw-cluster.fY*cluster.fY;
310 cluster.fSigmaXY = sumxyw/sumw-cluster.fX*cluster.fY;
311 cluster.fMaxX = maxQx;
312 cluster.fMaxY = maxQy;
314 cluster.fArea = fStackIndex/3;
315 cluster.fNx = maxx-minx+1;
316 cluster.fNy = maxy-miny+1;
321 void AliTPCClusterFinder::GetClusterFit(AliDigitCluster & cluster)
324 //calculate statistic of cluster
326 Double_t arglist[10];
330 fMinuit->mnexcm("SET ERR", arglist ,1,ierflg);
332 //fistly find starting parameters
333 Int_t minx,maxx,miny,maxy,maxQ,maxQx,maxQy;
335 Float_t sumxw,sumyw,sumw;
345 for (Int_t i = 0; i<fStackIndex;i+=3){
346 Int_t x = fStack->At(i);
347 Int_t y = fStack->At(i+1);
348 Int_t w = fStack->At(i+2);
365 Int_t nx = maxx-minx+1;
366 Int_t ny = maxy-miny+1;
368 SetSigma2(maxQx,maxQy,fCurrentSigmaX2,fCurrentSigmaY2);
369 Double_t vstart[5]={maxQ,sumxw/sumw,sumyw/sumw,1/(2*fCurrentSigmaX2),1/(2*fCurrentSigmaY2)};
370 Double_t step[5]={1.,0.01,0.01,0.01,0.01};
371 fMinuit->mnparm(0, "amp", vstart[0], step[0], 0,0,ierflg);
372 fMinuit->mnparm(1, "x0", vstart[1], step[1], 0,0,ierflg);
373 fMinuit->mnparm(2, "y0", vstart[2], step[2], 0,0,ierflg);
374 fMinuit->mnparm(3, "sx2", vstart[3], step[3], 0,0,ierflg);
375 fMinuit->mnparm(4, "sy2", vstart[4], step[4], 0,0,ierflg);
379 fMinuit->mnfree(0); //set unfixed all parameters
380 //if we have area less then
381 if (over<=21) { //if we dont't have more then 7 points
382 fMinuit->FixParameter(3);
383 fMinuit->FixParameter(4);
386 if (nx<3) fMinuit->FixParameter(3); //fix sigma x if no data in x direction
387 if (ny<3) fMinuit->FixParameter(4); //fix sigma y if no data in y direction
389 fMinuit->mnexcm("MIGRAD", arglist ,2,ierflg);
394 fMinuit->GetParameter(0,x[0],error[0]);
395 fMinuit->GetParameter(1,x[1],error[1]);
396 fMinuit->GetParameter(2,x[2],error[2]);
397 fMinuit->GetParameter(3,x[3],error[3]);
398 fMinuit->GetParameter(4,x[4],error[4]);
402 cluster.fMaxX = maxQx;
403 cluster.fMaxY = maxQy;
406 cluster.fSigmaX2 = 1/TMath::Sqrt(2*x[3]);
407 cluster.fSigmaY2 = 1/TMath::Sqrt(2*x[4]);
408 cluster.fSigmaXY = 0;
410 cluster.fArea = over;
416 Bool_t AliTPCClusterFinder::CheckIfDirBorder(Float_t x, Float_t y,
420 //function which control if given cell with index i, j is the
421 //minimum in direction
422 // x and y are estimate of local maximum
423 //direction is given by the
425 AliCell * cellor= GetCell(i,j);
426 Int_t sigor = GetSignal(i,j);
428 //control derivation in direction
429 //if function grows up in direction then there is border
432 Float_t dd = TMath::Sqrt(dx*dx+dy*dy);
433 Float_t ddx = TMath::Abs(dx);
434 ddx = (ddx>0.5) ? ddx-0.5: 0;
436 Float_t ddy = TMath::Abs(dy);
437 ddy = (ddy>0.5) ? ddy-0.5: 0;
439 Float_t d2 = ddx/(2*fDirSigmaFac*fCurrentSigmaX2)+ddy/(2*fDirSigmaFac*fCurrentSigmaY2); //safety factor
440 //I accept sigmax and sigma y bigge by factor sqrt(fDirsigmaFac)
441 Float_t amp = TMath::Exp(-d2)*fCurrentMaxAmp*fDirAmpFac; //safety factor fDirFac>1
443 if (sigor>amp) return kTRUE;
444 if (dd==0) return kFALSE;
448 virtualcell = GetVirtualSignal(i+dx,j+dy);
449 if (virtualcell <=fThreshold) return kFALSE;
450 if (virtualcell>sigor)
451 if (virtualcell>(sigor+fNoiseTh))
452 {cellor->SetDirBorder(fIndex); return kTRUE;}
455 virtualcell = GetVirtualSignal(i+2*dx,j+2*dy);
456 if (virtualcell>sigor)
457 { cellor->SetDirBorder(fIndex); return kTRUE;}
466 Bool_t AliTPCClusterFinder::IsMaximum(Int_t i, Int_t j)
468 //there is maximum if given digits is 1 sigma over all adjacent
470 //or ther exist virual maximum
471 //is maximum on 24 points neighboring
472 // Bool_t res = kFALSE;
476 AliCell * cell = GetCell(i,j);
477 Int_t signal = GetSignal(i,j);
478 if (cell == 0) return kFALSE;
479 for ( Int_t di=-1;di<=1;di++)
480 for ( Int_t dj=-1;dj<=1;dj++){
481 if ( (di!=0) || (dj!=0))
483 AliCell * cell2=GetCell(i+di,j+dj);
484 Int_t signal2 = GetSignal(i+di,j+dj);
491 if (signal2>signal) return kFALSE;
492 if (signal2>fThreshold) overth++;
493 if (signal2==signal) {
494 if (di<0) return kFALSE;
495 if ( (di+dj)<0) return kFALSE;
497 // if (signal>=signal2){
499 if (signal>fNoiseTh+signal2)
505 //if I have only one neighborough over threshold
506 if (overth<2) return kFALSE;
507 if (over<8) return kFALSE;
511 fCurrentMaxAmp =signal;
512 SetMaximum(fIndex,i,j);
515 //check if there exist virtual maximum
516 for (Float_t ddi=0.;(ddi<1.);ddi+=0.5)
517 for (Float_t ddj=0.;(ddj<1.);ddj+=0.5)
518 if (IsVirtualMaximum(Float_t(i)+ddi,Float_t(j)+ddj)){
519 fCurrentMaxX = i+ddi;
520 fCurrentMaxY = j+ddj;
521 fCurrentMaxAmp =signal;
522 SetMaximum(fIndex,i,j);
528 Bool_t AliTPCClusterFinder::IsVirtualMaximum(Float_t x, Float_t y)
530 //there is maximum if given digits is 1 sigma over all adjacent
532 //is maximum on 24 points neighboring
537 Float_t virtualcell = GetVirtualSignal(x,y);
538 if (virtualcell < 0) return kFALSE;
539 for ( Int_t di=-1;di<=1;di++)
540 for ( Int_t dj=-1;dj<=1;dj++)
541 if ( (di!=0) || (dj!=0))
543 Float_t virtualcell2=GetVirtualSignal(x+di,y+dj);
544 if (virtualcell2 < 0) {
550 if (virtualcell2>fThreshold) overth++;
551 if (virtualcell>=virtualcell2){
553 if (virtualcell>fNoiseTh+virtualcell2)
558 if (overth<2) return kFALSE;
559 //if there exist only one or less neighboring above threshold
560 if (oversigma==8) res = kTRUE;
561 else if ((over==8)&&(GetNType()==8)) res=kTRUE;
563 for ( Int_t di=-2;di<=2;di++)
564 for ( Int_t dj=-2;dj<=2;dj++)
565 if ( (di==2)||(di==-2) || (dj==2)|| (dj==-2) )
567 Float_t virtualcell2=GetVirtualSignal(x+di,y+dj);
568 if (virtualcell2 < 0) {
574 if (virtualcell>=virtualcell2) over+=1;
577 if (over == 24) res=kTRUE;
583 void AliTPCClusterFinder::ResetSignal()
586 Int_t size = fDimX*fDimY;
588 if (rOK==kTRUE) for (Int_t i=0 ; i<size;i++) dig[i] = 0;
593 void AliTPCClusterFinder::ResetStatus()
595 //reset status of signals to not used
596 Int_t size = fDimX*fDimY;
598 if (rOK==kTRUE) for (Int_t i=0 ; i<size;i++)
603 AliCell * AliTPCClusterFinder::GetCell(Int_t i, Int_t j)
605 //return reference to the cell with index i,j
607 if ( (i>=0) && (i<fDimX) && (j>=0) && (j<fDimY) )
608 return &fCells[i+j*fDimX];
612 Float_t AliTPCClusterFinder::GetVirtualSignal(Float_t ri, Float_t rj)
614 //it generate virtual cell as mean value from different cels
615 //after using it must be destructed !!!
618 Int_t ddi = (ri>i)? 1:0;
619 Int_t ddj = (rj>j)? 1:0;
622 for (Int_t di=0;di<=ddi;di++)
623 for (Int_t dj=0;dj<=ddj;dj++)
625 Float_t w = (ri-i-di)*(ri-i-di)+(rj-j-dj)*(rj-j-dj);
626 if (w>0) w=1/TMath::Sqrt(w);
628 AliCell * cel2 =GetCell(i+di,j+dj);
629 Int_t signal2 = GetSignal(i+di,j+dj);
635 if (sumw>0) return (sum/sumw);
642 void AliTPCClusterFinder::SetBlockIndex(Int_t * index)
645 //calculate which indexes we must check for border
647 if (TMath::Abs(index[0])<2) index[2] = 0;
649 index[2] = TMath::Abs(index[0])-1;
650 if (index[0]<0) index[2]*=-1; //first x block
652 if (TMath::Abs(index[1])<2) index[3] = 0;
654 index[3] = TMath::Abs(index[1])-1;
655 if (index[1]<0) index[3]*=-1; //first y block
657 if (TMath::Abs(index[0])<TMath::Abs(index[1])){
662 if (index[0]==index[1]) {
673 //***********************************************************************
674 //***********************************************************************
676 TClonesArray * AliTPCClusterFinder::FindPeaks1(TClonesArray *arr)
678 //find peaks and write it in form of AliTPCcluster to array
680 fClustersArray=new TClonesArray("AliDigitCluster",300);
684 fClustersArray = arr;
685 fIndex = fClustersArray->GetEntriesFast();
690 for (Int_t i=0; i<fDimX; i++)
691 for (Int_t j=0;j<fDimY; j++)
695 AliCell * cell = GetCell(i,j);
696 if (!(cell->IsChecked())) Adjacent(i,j);
697 //if there exists more then 2 digits cluster
698 if (fStackIndex >2 ){
699 if (fBFit==kFALSE) GetClusterStatistic(c);
700 else GetClusterFit(c);
701 //write some important chracteristic area of cluster
704 //write cluster information to array
705 TClonesArray &lclusters = *fClustersArray;
706 new (lclusters[fIndex++]) AliDigitCluster(c);
707 // cout<<"fx="<<c.fX<<" fy"<<c.fY<<"\n";
710 return fClustersArray;
714 TClonesArray * AliTPCClusterFinder::FindPeaks2(TClonesArray *arr)
716 //find peaks and write it in form of AliTPCcluster to array
718 fClustersArray=new TClonesArray("AliDigitCluster",300);
722 fClustersArray = arr;
723 fIndex = fClustersArray->GetEntriesFast();
729 for (Int_t i=0; i<fDimX; i++)
730 for (Int_t j=0;j<fDimY; j++)
733 if (IsMaximum(i,j) == kTRUE){
734 SetSigma2(i,j,fCurrentSigmaX2,fCurrentSigmaY2);
737 //if there exists more then 2 digits cluster
738 if (fStackIndex >2 ){
739 if (fBFit==kFALSE) GetClusterStatistic(c);
740 else GetClusterFit(c);
741 //write some important chracteristic area of cluster
744 //write cluster information to array
745 TClonesArray &lclusters = *fClustersArray;
746 new(lclusters[fIndex++]) AliDigitCluster(c);
747 // cout<<"fx="<<c.fX<<" fy"<<c.fY<<"\n";
751 return fClustersArray;
755 TClonesArray * AliTPCClusterFinder::FindPeaks3(TClonesArray *arr)
757 //find peaks and write it in form of AliTPCcluster to array
759 fClustersArray=new TClonesArray("AliDigitCluster",300);
763 fClustersArray = arr;
764 fIndex = fClustersArray->GetEntriesFast();
772 for (Int_t i=0; i<fDimX; i++)
773 for (Int_t j=0;j<fDimY; j++)
776 if (IsMaximum(i,j) == kTRUE){
777 SetSigma2(i,j,fCurrentSigmaX2,fCurrentSigmaY2);
778 AddToStack(i,j,GetSignal(i,j));
780 //loop over different distance
782 for ( Int_t dd =1;((dd<=dmax) && (naccepted>0));dd++){
784 for (Int_t di = -dd;di<=dd;di++){
785 Int_t ddj = dd-TMath::Abs(di);
786 Int_t sigstart = (ddj>0) ? -1 : 0;
787 for (Int_t sig = sigstart;sig<=1;sig+=2){
789 AliCell *cell= GetCell(i+di,j+dj);
790 Int_t signal = GetSignal(i+di,j+dj);
791 if (cell==0) continue;
796 SetBlockIndex(index); //adjust index to control
797 if ( IsBorder(fIndex,i+index[2],j+index[3]) ||
798 IsBorder(fIndex,i+index[4],j+index[5])) {
799 cell->SetBorder(fIndex);
803 if ( signal<=fThreshold ){
805 cell->SetThBorder(fIndex);
806 if (fBFit==kTRUE) AddToStack(i+di,j+dj,signal);
810 if (CheckIfDirBorder(fCurrentMaxX,fCurrentMaxY,i+di,j+dj) == kTRUE) {
811 if (fBFit==kFALSE) AddToStack(i+di,j+dj,signal/2);
814 AddToStack(i+di,j+dj,signal);
820 } //if there is maximum
821 //if there exists more then 2 digits cluster
822 if (fStackIndex >2 ){
823 if (fBFit==kFALSE) GetClusterStatistic(c);
824 else GetClusterFit(c);
825 //write some important chracteristic area of cluster
828 //write cluster information to array
829 TClonesArray &lclusters = *fClustersArray;
830 new(lclusters[fIndex++]) AliDigitCluster(c);
831 // cout<<"fx="<<c.fX<<" fy"<<c.fY<<"\n";
833 } //lopp over all digits
835 return fClustersArray;
843 void AliTPCClusterFinder::Adjacent(Int_t i,Int_t j)
846 //recursive agorithm program
848 if (fBDistType==kTRUE) {
849 Float_t delta = (i-fCurrentMaxX)*(i-fCurrentMaxX)/fCurrentSigmaX2;
850 delta+=(j-fCurrentMaxY)*(j-fCurrentMaxY)/fCurrentSigmaY2;
851 if (delta > fMulSigma2) {
852 SetDirBorder(fIndex,i,j);
856 AliCell *cell = GetCell(i,j);
857 Int_t signal = GetSignal(i,j);
859 cell->SetChecked(fIndex);
860 if ( (q>fThreshold) || (fBFit==kTRUE)) AddToStack(i,j,q);
865 newcel = GetCell(i-1,j);
866 if (newcel !=0) if (!newcel->IsChecked(fIndex) ) Adjacent(i-1,j);
867 newcel = GetCell(i,j-1);
868 if (newcel !=0) if (!newcel->IsChecked(fIndex) ) Adjacent(i,j-1);
869 newcel = GetCell(i+1,j);
870 if (newcel !=0) if (!newcel->IsChecked(fIndex) ) Adjacent(i+1,j);
871 newcel = GetCell(i,j+1);
872 if (newcel !=0) if (!newcel->IsChecked(fIndex) ) Adjacent(i,j+1);
874 else cell->SetThBorder(fIndex);
879 AliH2F * AliTPCClusterFinder::DrawHisto( const char *option=0,
880 Float_t x1, Float_t x2, Float_t y1, Float_t y2)
883 //draw digits in given array
887 sprintf(ch,"Cluster finder digits ");
888 if ( (fDimX<1)|| (fDimY<1)) {
891 AliH2F * his = new AliH2F(ch,ch,fDimX,fX1,fX2,fDimY,fY1,fY2);
892 //set histogram values
893 for (Int_t i = 0; i<fDimX;i++)
894 for (Int_t j = 0; j<fDimY;j++){
897 his->Fill(x,y,GetSignal(i,j));
900 AliH2F *h2fsub = his->GetSubrange2d(x1,x2,y1,y2);
904 if (his==0) return 0;
905 if (option!=0) his->Draw(option);
911 void AliTPCClusterFinder::DrawCluster(
912 Int_t color, Int_t size, Int_t style)
915 if (fClustersArray==0) return;
916 //draw marker for each of cluster
917 Int_t ncl=fClustersArray->GetEntriesFast();
918 for (Int_t i=0;i<ncl;i++){
919 AliComplexCluster *cl = (AliComplexCluster*)fClustersArray->UncheckedAt(i);
920 TMarker * marker = new TMarker;
921 marker->SetX(cl->fX);
922 marker->SetY(cl->fY);
923 marker->SetMarkerSize(size);
924 marker->SetMarkerStyle(style);
925 marker->SetMarkerColor(color);
932 AliH2F * AliTPCClusterFinder::DrawBorders( const char *option, AliH2F *h, Int_t type ,
933 Float_t x1, Float_t x2, Float_t y1, Float_t y2)
936 //draw digits in given array
940 sprintf(ch,"Cluster finder digits borders");
941 if ( (fDimX<1)|| (fDimY<1)) {
946 else his = new AliH2F(ch,ch,fDimX,fX1,fX2,fDimY,fY1,fY2);
947 //set histogram values
948 for (Int_t i = 0; i<fDimX;i++)
949 for (Int_t j = 0; j<fDimY;j++){
952 if (((type==1)||(type==0))&&IsMaximum(0,i,j)) his->Fill(x,y,16);
953 if (((type==3)||(type==0))&&(IsDirBorder(0,i,j))) his->Fill(x,y,8);
954 if (((type==4)||(type==0))&&(IsThBorder(0,i,j))) his->Fill(x,y,4);
955 if (((type==2)||(type==0))&&IsBorder(0,i,j)) his->Fill(x,y,1);
960 AliH2F *h2fsub = his->GetSubrange2d(x1,x2,y1,y2);
964 if (his==0) return 0;
965 if (option!=0) his->Draw(option);