]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EMCAL/AliEMCALRecPoint.cxx
Record charged and neutral energy component separately.
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALRecPoint.cxx
index 613116b06bc29a412fc5bff294384611d2338128..0ef89886e39fd95f3783808edd1491ecc348a6b8 100644 (file)
@@ -25,7 +25,6 @@
 #include "TClonesArray.h"
 
 // --- Standard library ---
-#include <iostream.h>
 #include <stdio.h>
 
 // --- AliRoot header files ---
@@ -47,7 +46,7 @@ AliEMCALRecPoint::AliEMCALRecPoint()
   fMaxTrack = 0 ;
   fTheta = fPhi = 0. ; 
   fEMCALArm = 0;
-
+  fPRESection = fECALSection = fHCALSection = kFALSE ; 
 }
 
 //____________________________________________________________________________
@@ -214,7 +213,7 @@ void  AliEMCALRecPoint::EvalPrimaries(TClonesArray * digits)
     for ( jndex = 0 ; jndex < nprimaries ; jndex++ ) { // all primaries in digit
       if ( fMulTrack > fMaxTrack ) {
        fMulTrack = - 1 ;
-       cout << "AliEMCALRecPoint::GetNprimaries ERROR > increase fMaxTrack " << endl ;
+       Error("GetNprimaries", "increase fMaxTrack ")  ;
        break ;
       }
       Int_t newprimary = newprimaryarray[jndex] ;
@@ -242,19 +241,34 @@ void  AliEMCALRecPoint::EvalPrimaries(TClonesArray * digits)
   delete tempo ;
 
 }
+
 //____________________________________________________________________________
 void AliEMCALRecPoint::GetGlobalPosition(TVector3 & gpos) const
 {
   // returns the position of the cluster in the global reference system of ALICE
-  // and the uncertainty on this position
   
   AliEMCALGeometry * emcalgeom = AliEMCALGetter::GetInstance()->EMCALGeometry();  
   gpos.SetX(fPhi) ;
-  gpos.SetY(emcalgeom->GetIPDistance() + emcalgeom->GetAirGap()) ;
+  if ( IsInECAL() ) 
+    gpos.SetY(emcalgeom->GetIP2ECALSection()) ;
+  else if ( IsInPRE() )
+    gpos.SetY(emcalgeom->GetIP2PRESection()) ;
+  else if ( IsInHCAL() )
+    gpos.SetY(emcalgeom->GetIP2HCALSection()) ;
+  else 
+    Fatal("GetGlobalPosition", "Unexpected tower section") ; 
   gpos.SetZ(fTheta) ; 
 }
 
+//____________________________________________________________________________
+void AliEMCALRecPoint::GetLocalPosition(TVector3 & lpos) const
+{
+  // returns the position of the cluster in the global reference system of ALICE
+  
+  lpos.SetX(fLocPos.X()) ;
+  lpos.SetY(fLocPos.Y()) ;
+  lpos.SetZ(fLocPos.Z()) ;
+}
 
 //______________________________________________________________________________
 void AliEMCALRecPoint::Paint(Option_t *)