- while ( (digit = dynamic_cast<AliEMCALDigit *>(nextdigit())) ) { // scan over the list of digitsC
- AliEMCALRecPoint * clu = 0 ;
-
- TArrayI clusterECAdigitslist(50);
-
- Bool_t inECA = kFALSE;
- if( geom->IsInECA(digit->GetId()) ) {
- inECA = kTRUE ;
- }
- if (gDebug == 2) {
- if (inECA)
- printf("MakeClusters: id = %d, ene = %f , thre = %f",
- digit->GetId(),Calibrate(digit->GetAmp()), fECAClusteringThreshold) ;
- }
- if (inECA && (Calibrate(digit->GetAmp()) > fECAClusteringThreshold ) ){
-
- Int_t iDigitInECACluster = 0;
- // Find the seed
- if( geom->IsInECA(digit->GetId()) ) {
- // start a new Tower RecPoint
- if(fNumberOfECAClusters >= aECARecPoints->GetSize())
- aECARecPoints->Expand(2*fNumberOfECAClusters+1) ;
- AliEMCALTowerRecPoint * rp = new AliEMCALTowerRecPoint("") ;
- rp->SetECA() ;
- aECARecPoints->AddAt(rp, fNumberOfECAClusters) ;
- clu = dynamic_cast<AliEMCALTowerRecPoint *>(aECARecPoints->At(fNumberOfECAClusters)) ;
- fNumberOfECAClusters++ ;
- clu->AddDigit(*digit, Calibrate(digit->GetAmp())) ;
- clusterECAdigitslist[iDigitInECACluster] = digit->GetIndexInList() ;
- iDigitInECACluster++ ;
- digitsC->Remove(digit) ;
- if (gDebug == 2 )
- printf("MakeClusters: OK id = %d, ene = %f , thre = %f ", digit->GetId(),Calibrate(digit->GetAmp()), fECAClusteringThreshold) ;
-
- }
- nextdigit.Reset() ;
-
- AliEMCALDigit * digitN ;
- Int_t index = 0 ;
-
- // Do the Clustering
-
- while (index < iDigitInECACluster){ // scan over digits already in cluster
- digit = (AliEMCALDigit*)digits->At(clusterECAdigitslist[index]) ;
- index++ ;
- while ( (digitN = (AliEMCALDigit *)nextdigit()) ) { // scan over the reduced list of digits
- Int_t ineb = AreNeighbours(digit, digitN); // call (digit,digitN) in THAT oder !!!!!
- switch (ineb ) {
- case 0 : // not a neighbour
- break ;
- case 1 : // are neighbours
- clu->AddDigit(*digitN, Calibrate( digitN->GetAmp()) ) ;
- clusterECAdigitslist[iDigitInECACluster] = digitN->GetIndexInList() ;
- iDigitInECACluster++ ;
- digitsC->Remove(digitN) ;
- break ;
- case 2 : // too far from each other
- goto endofloop1;
- } // switch
-
- } // while digitN
-
- endofloop1: ;
- nextdigit.Reset() ;
- } // loop over ECA cluster
- } // energy theshold
- } // while digit
- delete digitsC ;
-}
-
-//____________________________________________________________________________
-void AliEMCALClusterizerv1::MakeUnfolding() const
-{
- Fatal("AliEMCALClusterizerv1::MakeUnfolding", "--> Unfolding not implemented") ;
-
-}
-
-//____________________________________________________________________________
-Double_t AliEMCALClusterizerv1::ShowerShape(Double_t r)
-{
- // Shape of the shower (see EMCAL TDR)
- // If you change this function, change also the gradient evaluation in ChiSquare()
-
- Double_t r4 = r*r*r*r ;
- Double_t r295 = TMath::Power(r, 2.95) ;
- Double_t shape = TMath::Exp( -r4 * (1. / (2.32 + 0.26 * r4) + 0.0316 / (1 + 0.0652 * r295) ) ) ;
- return shape ;
-}
-
-//____________________________________________________________________________
-void AliEMCALClusterizerv1::UnfoldCluster(AliEMCALTowerRecPoint * /*iniTower*/,
- Int_t /*nMax*/,
- AliEMCALDigit ** /*maxAt*/,
- Float_t * /*maxAtEnergy*/) const
-{
- // Performs the unfolding of a cluster with nMax overlapping showers