]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Added the position in global coordinate system of the particle in PHOS
authorschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 6 Feb 2004 17:57:16 +0000 (17:57 +0000)
committerschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 6 Feb 2004 17:57:16 +0000 (17:57 +0000)
EMCAL/AliEMCALPIDv1.cxx
EMCAL/AliEMCALRecParticle.h
PHOS/AliPHOSPIDv1.cxx
PHOS/AliPHOSRecParticle.h

index dbff41fed10c1a746cf8a3140ed3cee1640ff294..3d48dc5e895138ed1babedda5f2957f0c3d6c854 100644 (file)
@@ -246,6 +246,14 @@ void  AliEMCALPIDv1::MakeRecParticles(){
     rp->SetFirstDaughter(-1);
     rp->SetLastDaughter(-1);
     rp->SetPolarisation(0,0,0);
+    //Set the position in global coordinate system from the RecPoint
+    //AliEMCALGeometry * geom = gime->EMCALGeometry() ; 
+    //AliEMCALTowerRecPoint  * erp = gime->ECARecPoint(rp->GetEMCALRPIndex()) ; 
+    TVector3 pos ; 
+    //geom->GetGlobal(erp, pos) ; !!!!!!!!!! to check 
+    rp->SetPos(pos);
+
+
     index++ ; 
   }
   
index 5bfee563ea537692e780ab8b5e5ce9cce9d0940b..bc44dd866bcecc452ff41cd36e7ec418e85f3340 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "AliEMCALFastRecParticle.h"
 class TParticle ;
+#include  "TVector3.h"  
 
 class AliEMCALRecParticle : public AliEMCALFastRecParticle {
 
@@ -31,8 +32,10 @@ class AliEMCALRecParticle : public AliEMCALFastRecParticle {
   Int_t   GetEMCALRPIndex()const {    return fEMCALRecPoint ;  }
   virtual const Int_t GetNPrimariesToRecParticles() const ;
   virtual const Int_t GetNPrimaries() const ;
+  TVector3 GetPos() const { return fPos ; } 
   virtual const TParticle * GetPrimary(Int_t index) const ;
   void    SetDebug() { fDebug = kTRUE ; } 
+  void    SetPos(TVector3 pos) { fPos.SetXYZ( pos.X(), pos.Y(), pos.Z() ); } 
   void    UnsetDebug() { fDebug = kFALSE ; }
   void    SetRecPoint(Int_t index){fEMCALRecPoint = index; }
 
@@ -42,6 +45,7 @@ class AliEMCALRecParticle : public AliEMCALFastRecParticle {
 
   Int_t fEMCALRecPoint ; // pointer to the associated track segment in EMCAL  
   Bool_t fDebug ; // to steer debug output 
+  TVector3 fPos ; // position in the global alice coordinate system 
 
   ClassDef(AliEMCALRecParticle,2)  // Reconstructed Particle
 };
index 901512e64605943f1bfb313da4182cf8b74ab843..3cda941fa7074e5e2061c2fe3d6b430977ee889b 100644 (file)
 #include "AliPHOS.h"
 #include "AliPHOSPIDv1.h"
 #include "AliPHOSClusterizerv1.h"
+#include "AliPHOSEmcRecPoint.h"
 #include "AliPHOSTrackSegment.h"
 #include "AliPHOSTrackSegmentMakerv1.h"
 #include "AliPHOSRecParticle.h"
@@ -651,6 +652,14 @@ void  AliPHOSPIDv1::MakeRecParticles()
     rp->SetFirstDaughter(-1);
     rp->SetLastDaughter(-1);
     rp->SetPolarisation(0,0,0);
+    //Set the position in global coordinate system from the RecPoint
+    AliPHOSGeometry * geom = gime->PHOSGeometry() ; 
+    AliPHOSTrackSegment * ts  = gime->TrackSegment(rp->GetPHOSTSIndex()) ; 
+    AliPHOSEmcRecPoint  * erp = gime->EmcRecPoint(ts->GetEmcIndex()) ; 
+    TVector3 pos ; 
+    geom->GetGlobal(erp, pos) ; 
+    rp->SetPos(pos);
+
     index++ ; 
   }
 }
index b66974a7d56f03862ec3cfcc8b69fd6b1792d8ea..ca1a5b3e1e9787323b802d72e8ec21de568f57da 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "AliPHOSFastRecParticle.h"
 class TParticle ;
+#include  "TVector3.h"  
 
 class AliPHOSRecParticle : public AliPHOSFastRecParticle {
 
@@ -31,8 +32,10 @@ class AliPHOSRecParticle : public AliPHOSFastRecParticle {
   Int_t   GetPHOSTSIndex()const {    return fPHOSTrackSegment ;  }
   virtual const Int_t GetNPrimariesToRecParticles() const ;
   virtual const Int_t GetNPrimaries() const ;
+  TVector3 GetPos() const { return fPos ; } 
   virtual const TParticle * GetPrimary(Int_t index) const ;
   void    SetDebug() { fDebug = kTRUE ; } 
+  void    SetPos(TVector3 pos) { fPos.SetXYZ( pos.X(), pos.Y(), pos.Z() ); } 
   void    UnsetDebug() { fDebug = kFALSE ; }
   void    SetTrackSegment(Int_t index){fPHOSTrackSegment = index; }
 
@@ -41,7 +44,8 @@ class AliPHOSRecParticle : public AliPHOSFastRecParticle {
  private:
 
   Int_t fPHOSTrackSegment ; // pointer to the associated track segment in PHOS  
-  Bool_t fDebug ; // to steer debug output 
+  Bool_t fDebug ; // to steer debug output
+  TVector3 fPos ; // position in the global alice coordinate system 
 
   ClassDef(AliPHOSRecParticle,2)  // Reconstructed Particle
 };