From: pavlinov Date: Sun, 4 Jun 2006 01:24:52 +0000 (+0000) Subject: new function EtaPhiFromIndex X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=664bfd66f65e4d42f611ddf154f65cbb9c9bcc31;hp=f3cc90f904fdee0f158dac78cfb9789122d1bc2b new function EtaPhiFromIndex --- diff --git a/EMCAL/AliEMCALGeometry.cxx b/EMCAL/AliEMCALGeometry.cxx index 3e6b34b1804..cf57242de95 100644 --- a/EMCAL/AliEMCALGeometry.cxx +++ b/EMCAL/AliEMCALGeometry.cxx @@ -810,9 +810,9 @@ void AliEMCALGeometry::GetGlobal(const TVector3 &vloc, TVector3 &vglob, int nsm) void AliEMCALGeometry::GetGlobal(const AliRecPoint *rp, TVector3 &vglob) const { - //Figure out the global numbering - //of a given supermodule from the - //local numbering for RecPoints + // Figure out the global numbering + // of a given supermodule from the + // local numbering for RecPoints static TVector3 vloc; static Int_t nSupMod, nTower, nIphi, nIeta; @@ -826,6 +826,15 @@ void AliEMCALGeometry::GetGlobal(const AliRecPoint *rp, TVector3 &vglob) const GetGlobal(vloc, vglob, nSupMod); } +void AliEMCALGeometry::EtaPhiFromIndex(Int_t absId,Float_t &eta,Float_t &phi) const +{ + // Jun 03, 2006 - version for TRD1 + static TVector3 vglob; + GetGlobal(absId, vglob); + eta = vglob.Eta(); + phi = vglob.Phi(); +} + AliEMCALShishKebabTrd1Module* AliEMCALGeometry::GetShishKebabModule(Int_t neta=0) { //This method was too long to be diff --git a/EMCAL/AliEMCALGeometry.h b/EMCAL/AliEMCALGeometry.h index ba9e8810ed9..a3329f1bd89 100644 --- a/EMCAL/AliEMCALGeometry.h +++ b/EMCAL/AliEMCALGeometry.h @@ -54,7 +54,7 @@ public: void GetGlobal(const TVector3 &vloc, TVector3 &vglob, int nsm) const; void GetGlobal(Int_t absId, TVector3 &vglob) const; // for a given tower index it returns eta and phi of center of that tower. - void EtaPhiFromIndex(Int_t index,Float_t &eta,Float_t &phi) const; + void EtaPhiFromIndex(Int_t absId,Float_t &eta,Float_t &phi) const; // virtual void GetGlobal(const AliEMCALRecPoint *rp, TVector3 &vglob) const;