]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PHOS/AliPHOSRecPoint.cxx
Enlarged arrays
[u/mrichter/AliRoot.git] / PHOS / AliPHOSRecPoint.cxx
index fa8ac8436e8a61c38335d004cc6f13f292719054..9e9163ffc48c8ded140c711c43e9f56d8f4b2bd4 100644 (file)
 // --- Standard library ---
 
 // --- AliRoot header files ---
-
+#include "AliLog.h"
+#include "AliPHOSLoader.h"
 #include "AliPHOSGeometry.h"
 #include "AliPHOSDigit.h"
 #include "AliPHOSRecPoint.h"
-#include "AliPHOSGetter.h"
 #include "AliGeomManager.h"
 
 ClassImp(AliPHOSRecPoint)
@@ -227,7 +227,6 @@ void AliPHOSRecPoint::EvalAll(TClonesArray * digits)
 {
   //evaluates (if necessary) all RecPoint data members 
 
-  EvalPrimaries(digits) ;
 }
 
 //____________________________________________________________________________
@@ -245,75 +244,17 @@ void AliPHOSRecPoint::EvalPHOSMod(AliPHOSDigit * digit)
   }
 }
 
-//______________________________________________________________________________
-void  AliPHOSRecPoint::EvalPrimaries(TClonesArray * digits)
-{
-  // Constructs the list of primary particles (tracks) which have contributed to this RecPoint
-  
-  AliPHOSDigit * digit ;
-  Int_t * tempo    = new Int_t[fMaxTrack] ;
-
-  Int_t index ;  
-  for ( index = 0 ; index < GetDigitsMultiplicity() ; index++ ) { // all digits
-    digit = dynamic_cast<AliPHOSDigit *>(digits->At( fDigitsList[index] )) ; 
-    Int_t nprimaries = digit->GetNprimary() ;
-    if(nprimaries){
-      Int_t * newprimaryarray = new Int_t[nprimaries] ;
-      Int_t ii ; 
-      for ( ii = 0 ; ii < nprimaries ; ii++)
-       newprimaryarray[ii] = digit->GetPrimary(ii+1) ; 
-
-      Int_t jndex ;
-      for ( jndex = 0 ; jndex < nprimaries ; jndex++ ) { // all primaries in digit
-       if ( fMulTrack > fMaxTrack ) {
-         fMulTrack = - 1 ;
-         Error("EvalPrimaries", "GetNprimaries ERROR > increase fMaxTrack" ) ;
-         break ;
-       }
-       Int_t newprimary = newprimaryarray[jndex] ;
-       Int_t kndex ;
-       Bool_t already = kFALSE ;
-       for ( kndex = 0 ; kndex < fMulTrack ; kndex++ ) { //check if not already stored
-         if ( newprimary == tempo[kndex] ){
-           already = kTRUE ;
-           break ;
-         }
-       } // end of check
-       if ( !already) { // store it
-         tempo[fMulTrack] = newprimary ; 
-         fMulTrack++ ;
-       } // store it
-      } // all primaries in digit
-      delete [] newprimaryarray ; 
-    }
-  } // all digits
-
-  if(fMulTrack > 0){
-    if(fTracksList)delete [] fTracksList;
-    fTracksList = new Int_t[fMulTrack] ;
-  }
-  for(index = 0; index < fMulTrack; index++)
-    fTracksList[index] = tempo[index] ;
-  
-  delete [] tempo ;
-  
-}
 //____________________________________________________________________________
 void AliPHOSRecPoint::GetGlobalPosition(TVector3 & gpos, TMatrixF & gmat) const
 {
   // returns the position of the cluster in the global reference system of ALICE
   // and the uncertainty on this position
 
-  (AliPHOSGetter::Instance())->PHOSGeometry()->GetGlobalPHOS(this, gpos, gmat);
-
-//   Float_t xyz[3];
-//   GetGlobalXYZ(xyz);
-//   gpos.SetXYZ(xyz[0],xyz[1],xyz[2]);
-
+   AliPHOSGeometry * phosgeom = (AliPHOSGeometry::GetInstance());
+   phosgeom->GetGlobalPHOS(this, gpos, gmat);
   
 }
 
-
 //______________________________________________________________________________
 void AliPHOSRecPoint::Paint(Option_t *)
 {