From d956e9b7341fd2b713ccad594da85d8ea8d2964d Mon Sep 17 00:00:00 2001 From: schutz Date: Fri, 6 Feb 2004 17:57:16 +0000 Subject: [PATCH 1/1] Added the position in global coordinate system of the particle in PHOS --- EMCAL/AliEMCALPIDv1.cxx | 8 ++++++++ EMCAL/AliEMCALRecParticle.h | 4 ++++ PHOS/AliPHOSPIDv1.cxx | 9 +++++++++ PHOS/AliPHOSRecParticle.h | 6 +++++- 4 files changed, 26 insertions(+), 1 deletion(-) diff --git a/EMCAL/AliEMCALPIDv1.cxx b/EMCAL/AliEMCALPIDv1.cxx index dbff41fed10..3d48dc5e895 100644 --- a/EMCAL/AliEMCALPIDv1.cxx +++ b/EMCAL/AliEMCALPIDv1.cxx @@ -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++ ; } diff --git a/EMCAL/AliEMCALRecParticle.h b/EMCAL/AliEMCALRecParticle.h index 5bfee563ea5..bc44dd866bc 100644 --- a/EMCAL/AliEMCALRecParticle.h +++ b/EMCAL/AliEMCALRecParticle.h @@ -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 }; diff --git a/PHOS/AliPHOSPIDv1.cxx b/PHOS/AliPHOSPIDv1.cxx index 901512e6460..3cda941fa70 100644 --- a/PHOS/AliPHOSPIDv1.cxx +++ b/PHOS/AliPHOSPIDv1.cxx @@ -101,6 +101,7 @@ #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++ ; } } diff --git a/PHOS/AliPHOSRecParticle.h b/PHOS/AliPHOSRecParticle.h index b66974a7d56..ca1a5b3e1e9 100644 --- a/PHOS/AliPHOSRecParticle.h +++ b/PHOS/AliPHOSRecParticle.h @@ -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 }; -- 2.39.3