]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HMPID/AliHMPIDCluster.cxx
Moved a methof from private to public
[u/mrichter/AliRoot.git] / HMPID / AliHMPIDCluster.cxx
index e689df9b89e7c115b9f62b9b61eb40fc43a16e8b..c5f36522cd5471b331bb39bb7b2016b392abc973 100644 (file)
 //  * provided "as is" without express or implied warranty.                  *
 //  **************************************************************************
 
+#include "AliHMPIDCluster.h"  //class header
 #include <TVirtualFitter.h>  //Solve()
 #include <TMinuit.h>         //Solve()
 #include <TClonesArray.h>    //Solve()
 #include <TMarker.h>         //Draw()
 
-#include "AliLog.h"          //FitFunc()
-#include "AliHMPIDCluster.h"  //class header
+#include "AliLog.h"          //FindCusterSize()
 
 Bool_t AliHMPIDCluster::fgDoCorrSin=kTRUE;
 
@@ -39,7 +39,7 @@ void AliHMPIDCluster::SetClusterParams(Double_t xL,Double_t yL,Int_t iCh  )
   //get L->T cs matrix for a given chamber
   const TGeoHMatrix *t2l= AliGeomManager::GetTracking2LocalMatrix(volId);
 
-  if(fParam->GetInstType())               //if there is no geometry we cannot retrieve the volId (only for monitoring)
+  if(!fParam->GetInstType())               //if there is no geometry we cannot retrieve the volId (only for monitoring)
   {
     new(this) AliCluster3D(); return;
   }
@@ -233,6 +233,7 @@ void AliHMPIDCluster::Print(Option_t* opt)const
     case       kSi1  : status="size 1   (cog)"   ;break;
     case       kNoLoc: status="no LocMax(fit)"   ;break;
     case       kAbn  : status="Abnormal fit  "   ;break;
+    case       kBig  : status="Big Clu(>100) "   ;break;
     
     default:            status="??????"          ;break;   
   }
@@ -256,12 +257,25 @@ Int_t AliHMPIDCluster::Solve(TClonesArray *pCluLst,Int_t *pSigmaCut, Bool_t isTr
   const Int_t kMaxLocMax=6;                                                              //max allowed number of loc max for fitting
 //  
   CoG();                                                                                 //First calculate CoG for the given cluster
+  
   Int_t iCluCnt=pCluLst->GetEntriesFast();                                               //get current number of clusters already stored in the list by previous operations
-  if(isTryUnfold==kFALSE || Size()==1) {                                                 //if cluster contains single pad there is no way to improve the knowledge 
-    fSt = (isTryUnfold)? kSi1: kNot;
-    if(fParam->GetInstType()) SetClusterParams(fXX,fYY,fCh);  
+  
+  Int_t rawSize = Size();                                                                //get current raw cluster size
+  
+  if(rawSize>100) {
+    fSt = kBig;
+  } else if(isTryUnfold==kFALSE) {
+    fSt = kNot;
+  } else if(rawSize==1) {
+    fSt = kSi1;
+  }
+  
+  if(rawSize>100 || isTryUnfold==kFALSE || rawSize==1) {                                 //No deconv if: 1 - big cluster (also avoid no zero suppression!)
+                                                                                         //              2 - flag is set to FALSE
+    if(fParam->GetInstType()) SetClusterParams(fXX,fYY,fCh);                             //              3 - size = 1
     new ((*pCluLst)[iCluCnt++]) AliHMPIDCluster(*this);  //add this raw cluster 
     return 1;
+    
   } 
   
 //Phase 0. Initialise Fitter  
@@ -285,7 +299,6 @@ Int_t AliHMPIDCluster::Solve(TClonesArray *pCluLst,Int_t *pSigmaCut, Bool_t isTr
 //Phase 1. Find number of local maxima. Strategy is to check if the current pad has QDC more then all neigbours. Also find the box contaning the cluster   
   fNlocMax=0;
 
-  Int_t rawSize = Size();
   for(Int_t iDig1=0;iDig1<rawSize;iDig1++) {                                               //first digits loop
     
     AliHMPIDDigit *pDig1 = Dig(iDig1);                                                   //take next digit    
@@ -394,5 +407,5 @@ void AliHMPIDCluster::FindClusterSize(Int_t i,Int_t *pSigmaCut)
     if(qPad>pSigmaCut[iCh]) size++;
    }
   AliDebug(1,Form(" Calculated size %i",size));
-  SetSize(size);
+  if(size>0) SetSize(size);                                                            //in case of size == 0, original raw clustersize used 
 }