Index: trunk/MagicSoft/Cosy/caos/Leds.h
===================================================================
--- trunk/MagicSoft/Cosy/caos/Leds.h	(revision 1802)
+++ trunk/MagicSoft/Cosy/caos/Leds.h	(revision 1815)
@@ -23,6 +23,6 @@
     //nst Led &GetLed(int i) const { return *(Led*)( (*this)[i] ); }
 
-    const Led &operator()(int i) const { return *(Led*)((*(Leds*)this)[i]); }
-    Led &operator()(int i) { return *(Led*)((*(Leds*)this)[i]); }
+    const Led &operator()(int i) const { return *(Led*)At(i); }
+    Led &operator()(int i) { return *(Led*)At(i); }
 
     void Print(Option_t *o=NULL) const;
Index: trunk/MagicSoft/Cosy/caos/Ring.cc
===================================================================
--- trunk/MagicSoft/Cosy/caos/Ring.cc	(revision 1802)
+++ trunk/MagicSoft/Cosy/caos/Ring.cc	(revision 1815)
@@ -12,5 +12,5 @@
 bool Ring::CalcCenter(const Leds &leds, Int_t i, Int_t j, Int_t k)
 {
-    Float_t h1 = leds(i).GetY()- leds(j).GetY();
+    Double_t h1 = leds(i).GetY()- leds(j).GetY();
 
     if (h1==0)
@@ -25,5 +25,5 @@
     }
 
-    Float_t h2 = leds(j).GetY() - leds(k).GetY();
+    Double_t h2 = leds(j).GetY() - leds(k).GetY();
 
     if (h2==0)
@@ -38,9 +38,9 @@
     }
 
-    const Float_t w1 = leds(i).GetX() - leds(j).GetX();
-    const Float_t w2 = leds(j).GetX() - leds(k).GetX();
+    const Double_t w1 = leds(i).GetX() - leds(j).GetX();
+    const Double_t w2 = leds(j).GetX() - leds(k).GetX();
 
-    const Float_t m1 = -w1/h1;
-    const Float_t m2 = -w2/h2;
+    const Double_t m1 = -w1/h1;
+    const Double_t m2 = -w2/h2;
 
     if (m2-m1==0)
Index: trunk/MagicSoft/Cosy/caos/Rings.cc
===================================================================
--- trunk/MagicSoft/Cosy/caos/Rings.cc	(revision 1802)
+++ trunk/MagicSoft/Cosy/caos/Rings.cc	(revision 1815)
@@ -10,4 +10,6 @@
 void Rings::CalcCenters(const Leds &leds)
 {
+    Clear();
+
     int nPoints = leds.GetEntries();
 
@@ -28,5 +30,5 @@
             }
 
-    Expand(n);
+    //    Expand(n);
 }
 
Index: trunk/MagicSoft/Cosy/caos/Rings.h
===================================================================
--- trunk/MagicSoft/Cosy/caos/Rings.h	(revision 1802)
+++ trunk/MagicSoft/Cosy/caos/Rings.h	(revision 1815)
@@ -26,6 +26,6 @@
     void Print(Option_t *o=NULL) const;
 
-    const Ring &operator()(int i) const { return *(Ring*)((*(Rings*)this)[i]); }
-    Ring &operator()(int i) { return *(Ring*)((*(Rings*)this)[i]); }
+    const Ring &operator()(int i) const { return *(Ring*)At(i); }
+    Ring &operator()(int i) { return *(Ring*)At(i); }
 
     const Ring &GetCenter() const { return fCenter; }
