From aad8e277c9baee18efe18519fcb701c1ad07e882 Mon Sep 17 00:00:00 2001 From: schutz Date: Wed, 8 Jan 2003 17:23:17 +0000 Subject: [PATCH] added the HCAL section and a method to get the local position --- EMCAL/AliEMCALRecPoint.cxx | 21 +++++++++++++++++---- EMCAL/AliEMCALRecPoint.h | 13 ++++++++++--- 2 files changed, 27 insertions(+), 7 deletions(-) diff --git a/EMCAL/AliEMCALRecPoint.cxx b/EMCAL/AliEMCALRecPoint.cxx index 9f235a65388..0ef89886e39 100644 --- a/EMCAL/AliEMCALRecPoint.cxx +++ b/EMCAL/AliEMCALRecPoint.cxx @@ -46,7 +46,7 @@ AliEMCALRecPoint::AliEMCALRecPoint() fMaxTrack = 0 ; fTheta = fPhi = 0. ; fEMCALArm = 0; - fTower = kFALSE ; + fPRESection = fECALSection = fHCALSection = kFALSE ; } //____________________________________________________________________________ @@ -249,13 +249,26 @@ void AliEMCALRecPoint::GetGlobalPosition(TVector3 & gpos) const AliEMCALGeometry * emcalgeom = AliEMCALGetter::GetInstance()->EMCALGeometry(); gpos.SetX(fPhi) ; - if (IsTower() ) - gpos.SetY(emcalgeom->GetIP2Tower()) ; + if ( IsInECAL() ) + gpos.SetY(emcalgeom->GetIP2ECALSection()) ; + else if ( IsInPRE() ) + gpos.SetY(emcalgeom->GetIP2PRESection()) ; + else if ( IsInHCAL() ) + gpos.SetY(emcalgeom->GetIP2HCALSection()) ; else - gpos.SetY(emcalgeom->GetIP2PreShower()) ; + 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 *) diff --git a/EMCAL/AliEMCALRecPoint.h b/EMCAL/AliEMCALRecPoint.h index 8921babd02b..b8fb75150b1 100644 --- a/EMCAL/AliEMCALRecPoint.h +++ b/EMCAL/AliEMCALRecPoint.h @@ -54,11 +54,14 @@ class AliEMCALRecPoint : public AliRecPoint { virtual Int_t GetEMCALArm(void) const {return fEMCALArm ; } virtual void GetGlobalPosition(TVector3 & gpos, TMatrix & gmat) const {;} // return global position in ALICE virtual void GetGlobalPosition(TVector3 & gpos) const ; // return global position (r, theta, phi) in ALICE + virtual void GetLocalPosition(TVector3 & lpos) const ; // return loca position (x, y, z) in EMCAL // virtual Int_t GetEMCALMod(void) const {return fEMCALMod ; } virtual Int_t * GetPrimaries(Int_t & number) const {number = fMulTrack ; return fTracksList ; } virtual Bool_t IsEmc(void)const { return kTRUE ; } - const Bool_t IsTower(void) const { return fTower ; } + const Bool_t IsInECAL(void) const { return fECALSection ; } + const Bool_t IsInHCAL(void) const { return fHCALSection ; } + const Bool_t IsInPRE(void) const { return fPRESection ; } virtual Bool_t IsSortable() const { // tells that this is a sortable object return kTRUE ; @@ -68,7 +71,9 @@ class AliEMCALRecPoint : public AliRecPoint { // Print prototype } - void SetTower() { fTower = kTRUE ; } + void SetECAL() { fECALSection = kTRUE ; } + void SetHCAL() { fHCALSection = kTRUE ; } + void SetPRE() { fPRESection = kTRUE ; } AliEMCALRecPoint & operator = (const AliEMCALRecPoint & ) { // assignement operator requested by coding convention but not needed assert(0==1) ; @@ -80,7 +85,9 @@ protected: Int_t fEMCALArm ; // EMCAM Arm number Float_t fTheta ; // theta angle in Alice Float_t fPhi ; // phi angle in Alice - Bool_t fTower ; // tells if the recpoint is a tower or not + Bool_t fECALSection ; // tells if the recpoint is in ECAL section + Bool_t fHCALSection ; // tells if the recpoint is in HCAL section + Bool_t fPRESection ; // tells if the recpoint is in PRE section ClassDef(AliEMCALRecPoint,2) // RecPoint for EMCAL (Base Class) -- 2.39.3