]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
new function EtaPhiFromIndex
authorpavlinov <pavlinov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 4 Jun 2006 01:24:52 +0000 (01:24 +0000)
committerpavlinov <pavlinov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 4 Jun 2006 01:24:52 +0000 (01:24 +0000)
EMCAL/AliEMCALGeometry.cxx
EMCAL/AliEMCALGeometry.h

index 3e6b34b180441839dff928cd63acad3dfb3b5e50..cf57242de950cc7ec653636405312cc4e82d981b 100644 (file)
@@ -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
index ba9e8810ed97b8b6187e224ff7b4eee8fa317d49..a3329f1bd898780337121dbd09d66b8712b1f1fb 100644 (file)
@@ -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;