]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PHOS/AliPHOSClusterizerv1.cxx
Some other problem with the HP compiler fixed.
[u/mrichter/AliRoot.git] / PHOS / AliPHOSClusterizerv1.cxx
index c2293c855de6b068ce02815e27f96fb58d1ad574..9936bbdd519850fafb0b5788593dafc4c673b9f9 100644 (file)
@@ -169,7 +169,9 @@ Bool_t AliPHOSClusterizerv1::IsInEmc(AliPHOSDigit * digit)
 }
 
 //____________________________________________________________________________
-void AliPHOSClusterizerv1::MakeClusters(const DigitsList * dl, RecPointsList * emcl, RecPointsList * ppsdl)
+void AliPHOSClusterizerv1::MakeClusters(const DigitsList * dl, 
+                                       AliPHOSRecPoint::RecPointsList * emcl, 
+                                       AliPHOSRecPoint::RecPointsList * ppsdl)
 {
   // Steering method to construct the clusters stored in a list of Reconstructed Points
   // A cluster is defined as a list of neighbour digits
@@ -183,11 +185,10 @@ void AliPHOSClusterizerv1::MakeClusters(const DigitsList * dl, RecPointsList * e
   AliPHOSDigit * digit ; 
   Bool_t notremoved = kTRUE ;
 
-
   while ( (digit = (AliPHOSDigit *)nextdigit()) ) { // scan over the list of digits
     AliPHOSRecPoint * clu ; 
    
-    int ** clusterdigitslist = new int * [dl->GetEntries()] ;   
+    AliPHOSDigit ** clusterdigitslist = new AliPHOSDigit*[dl->GetEntries()] ;   
     Int_t index ;
     if (( ( IsInEmc(digit) ) && ( Calibrate(digit->GetAmp() ) > fEmcClusteringThreshold ) ) || 
         ( ( !IsInEmc(digit) ) && ( Calibrate(digit->GetAmp() ) > fPpsdClusteringThreshold ) ) ) {
@@ -195,12 +196,15 @@ void AliPHOSClusterizerv1::MakeClusters(const DigitsList * dl, RecPointsList * e
       Int_t iDigitInCluster = 0 ; 
 
       if  ( IsInEmc(digit) ) {   
-        new ((*emcl)[fNumberOfEmcClusters]) AliPHOSEmcRecPoint(fW0, fLocMaxCut) ; // start a new EMC RecPoint
+       // start a new EMC RecPoint
+       //        new ((*emcl)[fNumberOfEmcClusters]) AliPHOSEmcRecPoint(fW0, fLocMaxCut) ; if TClonesArray
+       (*emcl)[fNumberOfEmcClusters] = new  AliPHOSEmcRecPoint(fW0, fLocMaxCut) ;
+
        clu = (AliPHOSEmcRecPoint *) (*emcl)[fNumberOfEmcClusters] ; 
        fNumberOfEmcClusters++ ; 
        clu->AddDigit(*digit, Calibrate(digit->GetAmp())) ; 
 
-       clusterdigitslist[iDigitInCluster] = (int* ) digit ;    
+       clusterdigitslist[iDigitInCluster] = digit ;    
        iDigitInCluster++ ; 
        tempodigitslist.Remove(digit) ; 
 
@@ -208,11 +212,15 @@ void AliPHOSClusterizerv1::MakeClusters(const DigitsList * dl, RecPointsList * e
       }
 
       else { 
-       new ((*ppsdl)[fNumberOfPpsdClusters]) AliPHOSPpsdRecPoint() ; // start a new PPSD cluster
+       
+       // start a new PPSD cluster
+       // new ((*ppsdl)[fNumberOfPpsdClusters]) AliPHOSPpsdRecPoint() ;  if TClonesArray
+       (*ppsdl)[fNumberOfPpsdClusters] = new AliPHOSPpsdRecPoint() ;
+       
        clu =  (AliPHOSPpsdRecPoint *) ppsdl->At(fNumberOfPpsdClusters)  ;  
        fNumberOfPpsdClusters++ ; 
        clu->AddDigit(*digit, Calibrate(digit->GetAmp()) ) ;    
-       clusterdigitslist[iDigitInCluster] = (int* ) digit ;    
+       clusterdigitslist[iDigitInCluster] = digit  ;   
        iDigitInCluster++ ; 
        tempodigitslist.Remove(digit) ; 
         nextdigit.Reset() ;
@@ -239,7 +247,7 @@ void AliPHOSClusterizerv1::MakeClusters(const DigitsList * dl, RecPointsList * e
       AliPHOSDigit * digitN ; 
       index = 0 ;
       while (index < iDigitInCluster){ // scan over digits already in cluster 
-       digit = (AliPHOSDigit *) clusterdigitslist[index]  ;      
+       digit =  clusterdigitslist[index]  ;      
        index++ ; 
         while ( (digitN = (AliPHOSDigit *)nextdigit()) ) { // scan over the reduced list of digits 
          Int_t ineb = AreNeighbours(digit, digitN);   //  call (digit,digitN) in THAT oder !!!!!
@@ -247,8 +255,8 @@ void AliPHOSClusterizerv1::MakeClusters(const DigitsList * dl, RecPointsList * e
           case 0 :   // not a neighbour
            break ;      
          case 1 :   // are neighbours 
-           clu->AddDigit( *digitN, Calibrate( digitN->GetAmp() ) ) ;
-           clusterdigitslist[iDigitInCluster] =(int*) digitN ; 
+           clu->AddDigit(*digitN, Calibrate( digitN->GetAmp() ) ) ;
+           clusterdigitslist[iDigitInCluster] = digitN ; 
            iDigitInCluster++ ; 
            tempodigitslist.Remove(digitN) ;
            break ;
@@ -270,6 +278,7 @@ void AliPHOSClusterizerv1::MakeClusters(const DigitsList * dl, RecPointsList * e
   } // while digit
 
   tempodigitslist.Clear() ; 
+
 }
 
 //____________________________________________________________________________