// @(#):$Id$
// Author: M.Gheata 

/*************************************************************************
 * Copyright (C) 1995-2002, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

//////////////////////////////////////////////////////////////////////////
//                                                                      //
//  TGeoSphereEditor                                                      //
//                                                                      //
//////////////////////////////////////////////////////////////////////////
//Begin_Html
/*
<img src="gif/sphe_pic.gif">
*/
//End_Html
//Begin_Html
/*
<img src="gif/sphe_ed.jpg">
*/
//End_Html

#include "TGeoSphereEditor.h"
#include "TGeoTabManager.h"
#include "TGeoSphere.h"
#include "TGeoManager.h"
#include "TVirtualGeoPainter.h"
#include "TPad.h"
#include "TView.h"
#include "TGTab.h"
#include "TGComboBox.h"
#include "TGButton.h"
#include "TGTextEntry.h"
#include "TGNumberEntry.h"
#include "TGLabel.h"
#include "TGDoubleSlider.h"

ClassImp(TGeoSphereEditor)

enum ETGeoSphereWid {
   kSPHERE_NAME, kSPHERE_RMIN, kSPHERE_RMAX, kSPHERE_THETA1,
   kSPHERE_THETA2, kSPHERE_PHI1, kSPHERE_PHI2, kSPHERE_PHI, kSPHERE_THETA, 
   kSPHERE_APPLY, kSPHERE_UNDO
};

//______________________________________________________________________________
TGeoSphereEditor::TGeoSphereEditor(const TGWindow *p, Int_t width,
                                   Int_t height, UInt_t options, Pixel_t back)
   : TGeoGedFrame(p, width, height, options | kVerticalFrame, back)
{
   // Constructor for sphere editor
   fShape   = 0;
   fRmini = fRmaxi = fTheta1i = fTheta2i = fPhi1i = fPhi2i = 0.0;
   fNamei = "";
   fIsModified = kFALSE;
   fIsShapeEditable = kTRUE;
   fLock = kFALSE;

   // TextEntry for shape name
   MakeTitle("Name");
   fShapeName = new TGTextEntry(this, new TGTextBuffer(50), kSPHERE_NAME);
   fShapeName->Resize(135, fShapeName->GetDefaultHeight());
   fShapeName->SetToolTipText("Enter the sphere name");
   fShapeName->Associate(this);
   AddFrame(fShapeName, new TGLayoutHints(kLHintsLeft, 3, 1, 2, 5));

   TGTextEntry *nef;
   MakeTitle("Sphere dimensions");
   TGCompositeFrame *compxyz = new TGCompositeFrame(this, 118, 30, kVerticalFrame | kRaisedFrame);
   // Number entry for rmin
   TGCompositeFrame *f1 = new TGCompositeFrame(compxyz, 118, 10, kHorizontalFrame |
                                 kLHintsExpandX | kOwnBackground);
   f1->AddFrame(new TGLabel(f1, "Rmin"), new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
   fERmin = new TGNumberEntry(f1, 0., 5, kSPHERE_RMIN);
   fERmin->SetNumAttr(TGNumberFormat::kNEANonNegative);
   nef = (TGTextEntry*)fERmin->GetNumberEntry();
   nef->SetToolTipText("Enter the inner radius");
   fERmin->Associate(this);
   fERmin->Resize(100, fERmin->GetDefaultHeight());
   f1->AddFrame(fERmin, new TGLayoutHints(kLHintsRight , 2, 2, 4, 4));
   compxyz->AddFrame(f1, new TGLayoutHints(kLHintsLeft | kLHintsExpandX , 2, 2, 4, 4));
   
   // Number entry for Rmax
   f1 = new TGCompositeFrame(compxyz, 118, 10, kHorizontalFrame |
                                 kLHintsExpandX | kOwnBackground);
   f1->AddFrame(new TGLabel(f1, "Rmax"), new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
   fERmax = new TGNumberEntry(f1, 0., 5, kSPHERE_RMAX);
   fERmax->SetNumAttr(TGNumberFormat::kNEANonNegative);
   nef = (TGTextEntry*)fERmax->GetNumberEntry();
   nef->SetToolTipText("Enter the outer radius");
   fERmax->Associate(this);
   fERmax->Resize(100, fERmax->GetDefaultHeight());
   f1->AddFrame(fERmax, new TGLayoutHints(kLHintsRight, 2, 2, 4, 4));
   compxyz->AddFrame(f1, new TGLayoutHints(kLHintsLeft | kLHintsExpandX , 2, 2, 4, 4));
   AddFrame(compxyz, new TGLayoutHints(kLHintsLeft, 2, 2, 2, 2));
   
   MakeTitle("Phi/theta range");
   TGCompositeFrame *f11 = new TGCompositeFrame(this, 150,200, kHorizontalFrame);
   compxyz = new TGCompositeFrame(f11, 75, 200, kHorizontalFrame | kRaisedFrame);
   // Vertical slider
   fSPhi = new TGDoubleVSlider(compxyz,140);
   fSPhi->SetRange(0.,720.);
   compxyz->AddFrame(fSPhi, new TGLayoutHints(kLHintsLeft | kLHintsExpandY, 2, 2, 4, 4)); 
   f1 = new TGCompositeFrame(compxyz, 50, 200, kVerticalFrame);
   f1->AddFrame(new TGLabel(f1, "Phi min."), new TGLayoutHints(kLHintsTop | kLHintsLeft, 2, 2, 2, 2));
   fEPhi1 = new TGNumberEntry(f1, 0., 5, kSPHERE_PHI1);
   fEPhi1->Resize(30, fEPhi1->GetDefaultHeight());
   fEPhi1->SetNumAttr(TGNumberFormat::kNEANonNegative);
   nef = (TGTextEntry*)fEPhi1->GetNumberEntry();
   nef->SetToolTipText("Enter the phi1 value");
   fEPhi1->Associate(this);
   f1->AddFrame(fEPhi1, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX, 2, 2, 2, 2));

   fEPhi2 = new TGNumberEntry(f1, 0., 5, kSPHERE_PHI2);
   fEPhi2->Resize(30, fEPhi2->GetDefaultHeight());
   fEPhi2->SetNumAttr(TGNumberFormat::kNEANonNegative);
   nef = (TGTextEntry*)fEPhi2->GetNumberEntry();
   nef->SetToolTipText("Enter the phi2 value");
   fEPhi2->Associate(this);
   fEPhi2->Resize(30, fEPhi2->GetDefaultHeight());
   f1->AddFrame(fEPhi2, new TGLayoutHints(kLHintsBottom | kLHintsLeft | kLHintsExpandX, 2, 2, 2, 2));
   f1->AddFrame(new TGLabel(f1, "Phi max."), new TGLayoutHints(kLHintsBottom | kLHintsLeft, 2, 2, 2, 2));
   compxyz->AddFrame(f1, new TGLayoutHints(kLHintsLeft | kLHintsExpandX | kLHintsExpandY, 2, 2, 2, 2));
   
   compxyz->Resize(75,150);
   f11->AddFrame(compxyz, new TGLayoutHints(kLHintsLeft, 0,0,0,0));
      
   compxyz = new TGCompositeFrame(f11, 75, 200, kHorizontalFrame | kRaisedFrame);
   // Vertical slider
   fSTheta = new TGDoubleVSlider(compxyz,140);
   fSTheta->SetRange(0.,180.);
   compxyz->AddFrame(fSTheta, new TGLayoutHints(kLHintsLeft | kLHintsExpandY, 2, 2, 4, 4)); 
   f1 = new TGCompositeFrame(compxyz, 50, 200, kVerticalFrame);
   f1->AddFrame(new TGLabel(f1, "Theta min."), new TGLayoutHints(kLHintsTop | kLHintsLeft, 2, 2, 2, 2));
   fETheta1 = new TGNumberEntry(f1, 0., 5, kSPHERE_THETA1);
   fETheta1->Resize(30, fETheta1->GetDefaultHeight());
   fETheta1->SetNumAttr(TGNumberFormat::kNEANonNegative);
   nef = (TGTextEntry*)fETheta1->GetNumberEntry();
   nef->SetToolTipText("Enter the theta1 value");
   fETheta1->Associate(this);
   f1->AddFrame(fETheta1, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX, 2, 2, 2, 2));

   fETheta2 = new TGNumberEntry(f1, 0., 5, kSPHERE_THETA2);
   fETheta2->Resize(30, fETheta2->GetDefaultHeight());
   fETheta2->SetNumAttr(TGNumberFormat::kNEANonNegative);
   nef = (TGTextEntry*)fETheta2->GetNumberEntry();
   nef->SetToolTipText("Enter the theta2 value");
   fETheta2->Associate(this);
   f1->AddFrame(fETheta2, new TGLayoutHints(kLHintsBottom | kLHintsLeft | kLHintsExpandX, 2, 2, 2, 2));
   f1->AddFrame(new TGLabel(f1, "Theta max."), new TGLayoutHints(kLHintsBottom | kLHintsLeft, 2, 2, 2, 2));
   compxyz->AddFrame(f1, new TGLayoutHints(kLHintsLeft | kLHintsExpandX | kLHintsExpandY, 2, 2, 2, 2));
   
   compxyz->Resize(75,150);
   f11->AddFrame(compxyz, new TGLayoutHints(kLHintsRight, 0, 0, 0, 0));  

   AddFrame(f11, new TGLayoutHints(kLHintsLeft, 0, 0, 0, 0));
   
   // Delayed draw
   f1 = new TGCompositeFrame(this, 155, 10, kHorizontalFrame | kFixedWidth | kSunkenFrame);
   fDelayed = new TGCheckButton(f1, "Delayed draw");
   f1->AddFrame(fDelayed, new TGLayoutHints(kLHintsLeft , 2, 2, 4, 4));
   AddFrame(f1,  new TGLayoutHints(kLHintsLeft, 6, 6, 4, 4));  

   // Buttons
   f1 = new TGCompositeFrame(this, 155, 10, kHorizontalFrame | kFixedWidth);
   fApply = new TGTextButton(f1, "Apply");
   f1->AddFrame(fApply, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
   fApply->Associate(this);
   fUndo = new TGTextButton(f1, "Undo");
   f1->AddFrame(fUndo, new TGLayoutHints(kLHintsRight , 2, 2, 4, 4));
   fUndo->Associate(this);
   AddFrame(f1,  new TGLayoutHints(kLHintsLeft, 6, 6, 4, 4));  
   fUndo->SetSize(fApply->GetSize());
}

//______________________________________________________________________________
TGeoSphereEditor::~TGeoSphereEditor()
{
// Destructor.
   TGFrameElement *el;
   TIter next(GetList());
   while ((el = (TGFrameElement *)next())) {
      if (el->fFrame->IsComposite()) 
         TGeoTabManager::Cleanup((TGCompositeFrame*)el->fFrame);
   }
   Cleanup();   
}

//______________________________________________________________________________
void TGeoSphereEditor::ConnectSignals2Slots()
{
   // Connect signals to slots.
   fApply->Connect("Clicked()", "TGeoSphereEditor", this, "DoApply()");
   fUndo->Connect("Clicked()", "TGeoSphereEditor", this, "DoUndo()");
   fShapeName->Connect("TextChanged(const char *)", "TGeoSphereEditor", this, "DoModified()");
   fERmin->Connect("ValueSet(Long_t)", "TGeoSphereEditor", this, "DoRmin()");
   fERmax->Connect("ValueSet(Long_t)", "TGeoSphereEditor", this, "DoRmax()");
   fEPhi1->Connect("ValueSet(Long_t)", "TGeoSphereEditor", this, "DoPhi1()");
   fEPhi2->Connect("ValueSet(Long_t)", "TGeoSphereEditor", this, "DoPhi2()");
   fETheta1->Connect("ValueSet(Long_t)", "TGeoSphereEditor", this, "DoTheta1()");
   fETheta2->Connect("ValueSet(Long_t)", "TGeoSphereEditor", this, "DoTheta2()");
   fSPhi->Connect("PositionChanged()", "TGeoSphereEditor", this, "DoPhi()");
   fSTheta->Connect("PositionChanged()", "TGeoSphereEditor", this, "DoTheta()");
   fInit = kFALSE;
}


//______________________________________________________________________________
void TGeoSphereEditor::SetModel(TObject* obj)
{
   // Connect to a given sphere.
   if (obj == 0 || (obj->IsA()!=TGeoSphere::Class())) {
      SetActive(kFALSE);
      return;                 
   } 
   fShape = (TGeoSphere*)obj;
   fRmini = fShape->GetRmin();
   fRmaxi = fShape->GetRmax();
   fPhi1i = fShape->GetPhi1();
   fPhi2i = fShape->GetPhi2();
   fTheta1i = fShape->GetTheta1();
   fTheta2i = fShape->GetTheta2();
   fNamei = fShape->GetName();
   fShapeName->SetText(fShape->GetName());
   fERmin->SetNumber(fRmini);
   fERmax->SetNumber(fRmaxi);
   fEPhi1->SetNumber(fPhi1i);
   fEPhi2->SetNumber(fPhi2i);
   fETheta1->SetNumber(fTheta1i);
   fETheta2->SetNumber(fTheta2i);
   fSPhi->SetPosition(fPhi1i, fPhi2i);
   fSTheta->SetPosition(fTheta1i, fTheta2i);
   
   fApply->SetEnabled(kFALSE);
   fUndo->SetEnabled(kFALSE);
   
   if (fInit) ConnectSignals2Slots();
   SetActive();
}

//______________________________________________________________________________
Bool_t TGeoSphereEditor::IsDelayed() const
{
// Check if shape drawing is delayed.
   return (fDelayed->GetState() == kButtonDown);
}

//______________________________________________________________________________
void TGeoSphereEditor::DoName()
{
// Slot for name.
   DoModified();
}

//______________________________________________________________________________
void TGeoSphereEditor::DoApply()
{
// Slot for applying modifications.
   const char *name = fShapeName->GetText();
   if (strcmp(name,fShape->GetName())) fShape->SetName(name);
   Double_t rmin = fERmin->GetNumber();
   Double_t rmax = fERmax->GetNumber();
   Double_t phi1 = fEPhi1->GetNumber();
   Double_t phi2 = fEPhi2->GetNumber();
   if ((phi2-phi1) > 360.001) {
      phi1 = 0.;
      phi2 = 360.;
      fEPhi1->SetNumber(phi1);
      fEPhi2->SetNumber(phi2);
      fLock = kTRUE;
      fSPhi->SetPosition(phi1,phi2);
      fLock = kFALSE;
   }   
   Double_t theta1 = fETheta1->GetNumber();
   Double_t theta2 = fETheta2->GetNumber();
   fShape->SetSphDimensions(rmin, rmax, theta1,theta2,phi1,phi2);
   fShape->ComputeBBox();
   fUndo->SetEnabled();
   fApply->SetEnabled(kFALSE);
   if (fPad) {
      if (gGeoManager && gGeoManager->GetPainter() && gGeoManager->GetPainter()->IsPaintingShape()) {
         fShape->Draw();
         fPad->GetView()->ShowAxis();
      } else Update();
   }   
}

//______________________________________________________________________________
void TGeoSphereEditor::DoModified()
{
// Slot for signaling modifications.
   fApply->SetEnabled();
}

//______________________________________________________________________________
void TGeoSphereEditor::DoUndo()
{
// Slot for undoing last operation.
   fERmin->SetNumber(fRmini);
   fERmax->SetNumber(fRmaxi);
   fEPhi1->SetNumber(fPhi1i);
   fEPhi2->SetNumber(fPhi2i);
   fSPhi->SetPosition(fPhi1i,fPhi2i);
   fETheta1->SetNumber(fTheta1i);
   fETheta2->SetNumber(fTheta2i);
   fSTheta->SetPosition(fTheta1i,fTheta2i);
   DoApply();
   fUndo->SetEnabled(kFALSE);
   fApply->SetEnabled(kFALSE);
}
   
//______________________________________________________________________________
void TGeoSphereEditor::DoRmin()
{
// Slot for Rmin.
   Double_t rmin = fERmin->GetNumber();
   Double_t rmax = fERmax->GetNumber();
   if (rmin <= 0.) {
      rmin = 0.;
      fERmin->SetNumber(rmin);
   }   
   if (rmin >= rmax) {
      rmin = rmax - 0.1;
      fERmin->SetNumber(rmin);
   }   
   DoModified();
   if (!IsDelayed()) DoApply();
}

//______________________________________________________________________________
void TGeoSphereEditor::DoRmax()
{
// Slot for Rmax.
   Double_t rmin = fERmin->GetNumber();
   Double_t rmax = fERmax->GetNumber();
   if (rmax <= 0.) {
      rmax = 0.1;
      fERmax->SetNumber(rmax);
   }   
   if (rmax < rmin+1.e-10) {
      rmax = rmin + 0.1;
      if (rmin < 0.) rmin = 0.;
      fERmax->SetNumber(rmax);
   }   
   DoModified();
   if (!IsDelayed()) DoApply();
}

//______________________________________________________________________________
void TGeoSphereEditor::DoPhi1()
{
// Slot for phi1.
   Double_t phi1 = fEPhi1->GetNumber();
   Double_t phi2 = fEPhi2->GetNumber();
   if (phi1 > 360-1.e-10) {
      phi1 = 0.;
      fEPhi1->SetNumber(phi1);
   }   
   if (phi2<phi1+1.e-10) {
      phi1 = phi2 - 0.1;
      fEPhi1->SetNumber(phi1);
   }   
   if (!fLock) {
      DoModified();
      fLock = kTRUE;
      fSPhi->SetPosition(phi1,phi2);
   } else fLock = kFALSE;
   if (!IsDelayed()) DoApply();
}

//______________________________________________________________________________
void TGeoSphereEditor::DoPhi2()
{
// Slot for phi2.
   Double_t phi1 = fEPhi1->GetNumber();
   Double_t phi2 = fEPhi2->GetNumber();
   if (phi2-phi1 > 360.) {
      phi2 -= 360.;
      fEPhi2->SetNumber(phi2);
   }   
   if (phi2<phi1+1.e-10) {
      phi2 = phi1 + 0.1;
      fEPhi2->SetNumber(phi2);
   }   
   if (!fLock) {
      DoModified();
      fLock = kTRUE;
      fSPhi->SetPosition(phi1,phi2);
   } else fLock = kFALSE;
   if (!IsDelayed()) DoApply();
}

//______________________________________________________________________________
void TGeoSphereEditor::DoPhi()
{
// Slot for phi slider.
   if (!fLock) {
      DoModified();
      fLock = kTRUE;
      fEPhi1->SetNumber(fSPhi->GetMinPosition());
      fLock = kTRUE;
      fEPhi2->SetNumber(fSPhi->GetMaxPosition());
   } else fLock = kFALSE;   
   if (!IsDelayed()) DoApply();
}

//______________________________________________________________________________
void TGeoSphereEditor::DoTheta1()
{
// Slot for theta1.
   Double_t theta1 = fETheta1->GetNumber();
   Double_t theta2 = fETheta2->GetNumber();
   if (theta2<theta1+1.e-10) {
      theta2 = theta1 + 0.1;
      fETheta2->SetNumber(theta2);
   }   
   if (!fLock) {
      DoModified();
      fLock = kTRUE;
      fSTheta->SetPosition(theta1,theta2);
   } else fLock = kFALSE;
   if (!IsDelayed()) DoApply();
}

//______________________________________________________________________________
void TGeoSphereEditor::DoTheta2()
{
// Slot for theta2.
   Double_t theta1 = fETheta1->GetNumber();
   Double_t theta2 = fETheta2->GetNumber();
   if (theta2<theta1+1.e-10) {
      theta1 = theta2 - 0.1;
      fETheta1->SetNumber(theta1);
   }   
   if (!fLock) {
      DoModified();
      fLock = kTRUE;
      fSTheta->SetPosition(theta1,theta2);
   } else fLock = kFALSE;
   if (!IsDelayed()) DoApply();
}

//______________________________________________________________________________
void TGeoSphereEditor::DoTheta()
{
   // Slot for theta slider.
   if (!fLock) {
      DoModified();
      fLock = kTRUE;
      fETheta1->SetNumber(fSTheta->GetMinPosition());
      fLock = kTRUE;
      fETheta2->SetNumber(fSTheta->GetMaxPosition());
   } else fLock = kFALSE;   
   if (!IsDelayed()) DoApply();
}
 TGeoSphereEditor.cxx:1
 TGeoSphereEditor.cxx:2
 TGeoSphereEditor.cxx:3
 TGeoSphereEditor.cxx:4
 TGeoSphereEditor.cxx:5
 TGeoSphereEditor.cxx:6
 TGeoSphereEditor.cxx:7
 TGeoSphereEditor.cxx:8
 TGeoSphereEditor.cxx:9
 TGeoSphereEditor.cxx:10
 TGeoSphereEditor.cxx:11
 TGeoSphereEditor.cxx:12
 TGeoSphereEditor.cxx:13
 TGeoSphereEditor.cxx:14
 TGeoSphereEditor.cxx:15
 TGeoSphereEditor.cxx:16
 TGeoSphereEditor.cxx:17
 TGeoSphereEditor.cxx:18
 TGeoSphereEditor.cxx:19
 TGeoSphereEditor.cxx:20
 TGeoSphereEditor.cxx:21
 TGeoSphereEditor.cxx:22
 TGeoSphereEditor.cxx:23
 TGeoSphereEditor.cxx:24
 TGeoSphereEditor.cxx:25
 TGeoSphereEditor.cxx:26
 TGeoSphereEditor.cxx:27
 TGeoSphereEditor.cxx:28
 TGeoSphereEditor.cxx:29
 TGeoSphereEditor.cxx:30
 TGeoSphereEditor.cxx:31
 TGeoSphereEditor.cxx:32
 TGeoSphereEditor.cxx:33
 TGeoSphereEditor.cxx:34
 TGeoSphereEditor.cxx:35
 TGeoSphereEditor.cxx:36
 TGeoSphereEditor.cxx:37
 TGeoSphereEditor.cxx:38
 TGeoSphereEditor.cxx:39
 TGeoSphereEditor.cxx:40
 TGeoSphereEditor.cxx:41
 TGeoSphereEditor.cxx:42
 TGeoSphereEditor.cxx:43
 TGeoSphereEditor.cxx:44
 TGeoSphereEditor.cxx:45
 TGeoSphereEditor.cxx:46
 TGeoSphereEditor.cxx:47
 TGeoSphereEditor.cxx:48
 TGeoSphereEditor.cxx:49
 TGeoSphereEditor.cxx:50
 TGeoSphereEditor.cxx:51
 TGeoSphereEditor.cxx:52
 TGeoSphereEditor.cxx:53
 TGeoSphereEditor.cxx:54
 TGeoSphereEditor.cxx:55
 TGeoSphereEditor.cxx:56
 TGeoSphereEditor.cxx:57
 TGeoSphereEditor.cxx:58
 TGeoSphereEditor.cxx:59
 TGeoSphereEditor.cxx:60
 TGeoSphereEditor.cxx:61
 TGeoSphereEditor.cxx:62
 TGeoSphereEditor.cxx:63
 TGeoSphereEditor.cxx:64
 TGeoSphereEditor.cxx:65
 TGeoSphereEditor.cxx:66
 TGeoSphereEditor.cxx:67
 TGeoSphereEditor.cxx:68
 TGeoSphereEditor.cxx:69
 TGeoSphereEditor.cxx:70
 TGeoSphereEditor.cxx:71
 TGeoSphereEditor.cxx:72
 TGeoSphereEditor.cxx:73
 TGeoSphereEditor.cxx:74
 TGeoSphereEditor.cxx:75
 TGeoSphereEditor.cxx:76
 TGeoSphereEditor.cxx:77
 TGeoSphereEditor.cxx:78
 TGeoSphereEditor.cxx:79
 TGeoSphereEditor.cxx:80
 TGeoSphereEditor.cxx:81
 TGeoSphereEditor.cxx:82
 TGeoSphereEditor.cxx:83
 TGeoSphereEditor.cxx:84
 TGeoSphereEditor.cxx:85
 TGeoSphereEditor.cxx:86
 TGeoSphereEditor.cxx:87
 TGeoSphereEditor.cxx:88
 TGeoSphereEditor.cxx:89
 TGeoSphereEditor.cxx:90
 TGeoSphereEditor.cxx:91
 TGeoSphereEditor.cxx:92
 TGeoSphereEditor.cxx:93
 TGeoSphereEditor.cxx:94
 TGeoSphereEditor.cxx:95
 TGeoSphereEditor.cxx:96
 TGeoSphereEditor.cxx:97
 TGeoSphereEditor.cxx:98
 TGeoSphereEditor.cxx:99
 TGeoSphereEditor.cxx:100
 TGeoSphereEditor.cxx:101
 TGeoSphereEditor.cxx:102
 TGeoSphereEditor.cxx:103
 TGeoSphereEditor.cxx:104
 TGeoSphereEditor.cxx:105
 TGeoSphereEditor.cxx:106
 TGeoSphereEditor.cxx:107
 TGeoSphereEditor.cxx:108
 TGeoSphereEditor.cxx:109
 TGeoSphereEditor.cxx:110
 TGeoSphereEditor.cxx:111
 TGeoSphereEditor.cxx:112
 TGeoSphereEditor.cxx:113
 TGeoSphereEditor.cxx:114
 TGeoSphereEditor.cxx:115
 TGeoSphereEditor.cxx:116
 TGeoSphereEditor.cxx:117
 TGeoSphereEditor.cxx:118
 TGeoSphereEditor.cxx:119
 TGeoSphereEditor.cxx:120
 TGeoSphereEditor.cxx:121
 TGeoSphereEditor.cxx:122
 TGeoSphereEditor.cxx:123
 TGeoSphereEditor.cxx:124
 TGeoSphereEditor.cxx:125
 TGeoSphereEditor.cxx:126
 TGeoSphereEditor.cxx:127
 TGeoSphereEditor.cxx:128
 TGeoSphereEditor.cxx:129
 TGeoSphereEditor.cxx:130
 TGeoSphereEditor.cxx:131
 TGeoSphereEditor.cxx:132
 TGeoSphereEditor.cxx:133
 TGeoSphereEditor.cxx:134
 TGeoSphereEditor.cxx:135
 TGeoSphereEditor.cxx:136
 TGeoSphereEditor.cxx:137
 TGeoSphereEditor.cxx:138
 TGeoSphereEditor.cxx:139
 TGeoSphereEditor.cxx:140
 TGeoSphereEditor.cxx:141
 TGeoSphereEditor.cxx:142
 TGeoSphereEditor.cxx:143
 TGeoSphereEditor.cxx:144
 TGeoSphereEditor.cxx:145
 TGeoSphereEditor.cxx:146
 TGeoSphereEditor.cxx:147
 TGeoSphereEditor.cxx:148
 TGeoSphereEditor.cxx:149
 TGeoSphereEditor.cxx:150
 TGeoSphereEditor.cxx:151
 TGeoSphereEditor.cxx:152
 TGeoSphereEditor.cxx:153
 TGeoSphereEditor.cxx:154
 TGeoSphereEditor.cxx:155
 TGeoSphereEditor.cxx:156
 TGeoSphereEditor.cxx:157
 TGeoSphereEditor.cxx:158
 TGeoSphereEditor.cxx:159
 TGeoSphereEditor.cxx:160
 TGeoSphereEditor.cxx:161
 TGeoSphereEditor.cxx:162
 TGeoSphereEditor.cxx:163
 TGeoSphereEditor.cxx:164
 TGeoSphereEditor.cxx:165
 TGeoSphereEditor.cxx:166
 TGeoSphereEditor.cxx:167
 TGeoSphereEditor.cxx:168
 TGeoSphereEditor.cxx:169
 TGeoSphereEditor.cxx:170
 TGeoSphereEditor.cxx:171
 TGeoSphereEditor.cxx:172
 TGeoSphereEditor.cxx:173
 TGeoSphereEditor.cxx:174
 TGeoSphereEditor.cxx:175
 TGeoSphereEditor.cxx:176
 TGeoSphereEditor.cxx:177
 TGeoSphereEditor.cxx:178
 TGeoSphereEditor.cxx:179
 TGeoSphereEditor.cxx:180
 TGeoSphereEditor.cxx:181
 TGeoSphereEditor.cxx:182
 TGeoSphereEditor.cxx:183
 TGeoSphereEditor.cxx:184
 TGeoSphereEditor.cxx:185
 TGeoSphereEditor.cxx:186
 TGeoSphereEditor.cxx:187
 TGeoSphereEditor.cxx:188
 TGeoSphereEditor.cxx:189
 TGeoSphereEditor.cxx:190
 TGeoSphereEditor.cxx:191
 TGeoSphereEditor.cxx:192
 TGeoSphereEditor.cxx:193
 TGeoSphereEditor.cxx:194
 TGeoSphereEditor.cxx:195
 TGeoSphereEditor.cxx:196
 TGeoSphereEditor.cxx:197
 TGeoSphereEditor.cxx:198
 TGeoSphereEditor.cxx:199
 TGeoSphereEditor.cxx:200
 TGeoSphereEditor.cxx:201
 TGeoSphereEditor.cxx:202
 TGeoSphereEditor.cxx:203
 TGeoSphereEditor.cxx:204
 TGeoSphereEditor.cxx:205
 TGeoSphereEditor.cxx:206
 TGeoSphereEditor.cxx:207
 TGeoSphereEditor.cxx:208
 TGeoSphereEditor.cxx:209
 TGeoSphereEditor.cxx:210
 TGeoSphereEditor.cxx:211
 TGeoSphereEditor.cxx:212
 TGeoSphereEditor.cxx:213
 TGeoSphereEditor.cxx:214
 TGeoSphereEditor.cxx:215
 TGeoSphereEditor.cxx:216
 TGeoSphereEditor.cxx:217
 TGeoSphereEditor.cxx:218
 TGeoSphereEditor.cxx:219
 TGeoSphereEditor.cxx:220
 TGeoSphereEditor.cxx:221
 TGeoSphereEditor.cxx:222
 TGeoSphereEditor.cxx:223
 TGeoSphereEditor.cxx:224
 TGeoSphereEditor.cxx:225
 TGeoSphereEditor.cxx:226
 TGeoSphereEditor.cxx:227
 TGeoSphereEditor.cxx:228
 TGeoSphereEditor.cxx:229
 TGeoSphereEditor.cxx:230
 TGeoSphereEditor.cxx:231
 TGeoSphereEditor.cxx:232
 TGeoSphereEditor.cxx:233
 TGeoSphereEditor.cxx:234
 TGeoSphereEditor.cxx:235
 TGeoSphereEditor.cxx:236
 TGeoSphereEditor.cxx:237
 TGeoSphereEditor.cxx:238
 TGeoSphereEditor.cxx:239
 TGeoSphereEditor.cxx:240
 TGeoSphereEditor.cxx:241
 TGeoSphereEditor.cxx:242
 TGeoSphereEditor.cxx:243
 TGeoSphereEditor.cxx:244
 TGeoSphereEditor.cxx:245
 TGeoSphereEditor.cxx:246
 TGeoSphereEditor.cxx:247
 TGeoSphereEditor.cxx:248
 TGeoSphereEditor.cxx:249
 TGeoSphereEditor.cxx:250
 TGeoSphereEditor.cxx:251
 TGeoSphereEditor.cxx:252
 TGeoSphereEditor.cxx:253
 TGeoSphereEditor.cxx:254
 TGeoSphereEditor.cxx:255
 TGeoSphereEditor.cxx:256
 TGeoSphereEditor.cxx:257
 TGeoSphereEditor.cxx:258
 TGeoSphereEditor.cxx:259
 TGeoSphereEditor.cxx:260
 TGeoSphereEditor.cxx:261
 TGeoSphereEditor.cxx:262
 TGeoSphereEditor.cxx:263
 TGeoSphereEditor.cxx:264
 TGeoSphereEditor.cxx:265
 TGeoSphereEditor.cxx:266
 TGeoSphereEditor.cxx:267
 TGeoSphereEditor.cxx:268
 TGeoSphereEditor.cxx:269
 TGeoSphereEditor.cxx:270
 TGeoSphereEditor.cxx:271
 TGeoSphereEditor.cxx:272
 TGeoSphereEditor.cxx:273
 TGeoSphereEditor.cxx:274
 TGeoSphereEditor.cxx:275
 TGeoSphereEditor.cxx:276
 TGeoSphereEditor.cxx:277
 TGeoSphereEditor.cxx:278
 TGeoSphereEditor.cxx:279
 TGeoSphereEditor.cxx:280
 TGeoSphereEditor.cxx:281
 TGeoSphereEditor.cxx:282
 TGeoSphereEditor.cxx:283
 TGeoSphereEditor.cxx:284
 TGeoSphereEditor.cxx:285
 TGeoSphereEditor.cxx:286
 TGeoSphereEditor.cxx:287
 TGeoSphereEditor.cxx:288
 TGeoSphereEditor.cxx:289
 TGeoSphereEditor.cxx:290
 TGeoSphereEditor.cxx:291
 TGeoSphereEditor.cxx:292
 TGeoSphereEditor.cxx:293
 TGeoSphereEditor.cxx:294
 TGeoSphereEditor.cxx:295
 TGeoSphereEditor.cxx:296
 TGeoSphereEditor.cxx:297
 TGeoSphereEditor.cxx:298
 TGeoSphereEditor.cxx:299
 TGeoSphereEditor.cxx:300
 TGeoSphereEditor.cxx:301
 TGeoSphereEditor.cxx:302
 TGeoSphereEditor.cxx:303
 TGeoSphereEditor.cxx:304
 TGeoSphereEditor.cxx:305
 TGeoSphereEditor.cxx:306
 TGeoSphereEditor.cxx:307
 TGeoSphereEditor.cxx:308
 TGeoSphereEditor.cxx:309
 TGeoSphereEditor.cxx:310
 TGeoSphereEditor.cxx:311
 TGeoSphereEditor.cxx:312
 TGeoSphereEditor.cxx:313
 TGeoSphereEditor.cxx:314
 TGeoSphereEditor.cxx:315
 TGeoSphereEditor.cxx:316
 TGeoSphereEditor.cxx:317
 TGeoSphereEditor.cxx:318
 TGeoSphereEditor.cxx:319
 TGeoSphereEditor.cxx:320
 TGeoSphereEditor.cxx:321
 TGeoSphereEditor.cxx:322
 TGeoSphereEditor.cxx:323
 TGeoSphereEditor.cxx:324
 TGeoSphereEditor.cxx:325
 TGeoSphereEditor.cxx:326
 TGeoSphereEditor.cxx:327
 TGeoSphereEditor.cxx:328
 TGeoSphereEditor.cxx:329
 TGeoSphereEditor.cxx:330
 TGeoSphereEditor.cxx:331
 TGeoSphereEditor.cxx:332
 TGeoSphereEditor.cxx:333
 TGeoSphereEditor.cxx:334
 TGeoSphereEditor.cxx:335
 TGeoSphereEditor.cxx:336
 TGeoSphereEditor.cxx:337
 TGeoSphereEditor.cxx:338
 TGeoSphereEditor.cxx:339
 TGeoSphereEditor.cxx:340
 TGeoSphereEditor.cxx:341
 TGeoSphereEditor.cxx:342
 TGeoSphereEditor.cxx:343
 TGeoSphereEditor.cxx:344
 TGeoSphereEditor.cxx:345
 TGeoSphereEditor.cxx:346
 TGeoSphereEditor.cxx:347
 TGeoSphereEditor.cxx:348
 TGeoSphereEditor.cxx:349
 TGeoSphereEditor.cxx:350
 TGeoSphereEditor.cxx:351
 TGeoSphereEditor.cxx:352
 TGeoSphereEditor.cxx:353
 TGeoSphereEditor.cxx:354
 TGeoSphereEditor.cxx:355
 TGeoSphereEditor.cxx:356
 TGeoSphereEditor.cxx:357
 TGeoSphereEditor.cxx:358
 TGeoSphereEditor.cxx:359
 TGeoSphereEditor.cxx:360
 TGeoSphereEditor.cxx:361
 TGeoSphereEditor.cxx:362
 TGeoSphereEditor.cxx:363
 TGeoSphereEditor.cxx:364
 TGeoSphereEditor.cxx:365
 TGeoSphereEditor.cxx:366
 TGeoSphereEditor.cxx:367
 TGeoSphereEditor.cxx:368
 TGeoSphereEditor.cxx:369
 TGeoSphereEditor.cxx:370
 TGeoSphereEditor.cxx:371
 TGeoSphereEditor.cxx:372
 TGeoSphereEditor.cxx:373
 TGeoSphereEditor.cxx:374
 TGeoSphereEditor.cxx:375
 TGeoSphereEditor.cxx:376
 TGeoSphereEditor.cxx:377
 TGeoSphereEditor.cxx:378
 TGeoSphereEditor.cxx:379
 TGeoSphereEditor.cxx:380
 TGeoSphereEditor.cxx:381
 TGeoSphereEditor.cxx:382
 TGeoSphereEditor.cxx:383
 TGeoSphereEditor.cxx:384
 TGeoSphereEditor.cxx:385
 TGeoSphereEditor.cxx:386
 TGeoSphereEditor.cxx:387
 TGeoSphereEditor.cxx:388
 TGeoSphereEditor.cxx:389
 TGeoSphereEditor.cxx:390
 TGeoSphereEditor.cxx:391
 TGeoSphereEditor.cxx:392
 TGeoSphereEditor.cxx:393
 TGeoSphereEditor.cxx:394
 TGeoSphereEditor.cxx:395
 TGeoSphereEditor.cxx:396
 TGeoSphereEditor.cxx:397
 TGeoSphereEditor.cxx:398
 TGeoSphereEditor.cxx:399
 TGeoSphereEditor.cxx:400
 TGeoSphereEditor.cxx:401
 TGeoSphereEditor.cxx:402
 TGeoSphereEditor.cxx:403
 TGeoSphereEditor.cxx:404
 TGeoSphereEditor.cxx:405
 TGeoSphereEditor.cxx:406
 TGeoSphereEditor.cxx:407
 TGeoSphereEditor.cxx:408
 TGeoSphereEditor.cxx:409
 TGeoSphereEditor.cxx:410
 TGeoSphereEditor.cxx:411
 TGeoSphereEditor.cxx:412
 TGeoSphereEditor.cxx:413
 TGeoSphereEditor.cxx:414
 TGeoSphereEditor.cxx:415
 TGeoSphereEditor.cxx:416
 TGeoSphereEditor.cxx:417
 TGeoSphereEditor.cxx:418
 TGeoSphereEditor.cxx:419
 TGeoSphereEditor.cxx:420
 TGeoSphereEditor.cxx:421
 TGeoSphereEditor.cxx:422
 TGeoSphereEditor.cxx:423
 TGeoSphereEditor.cxx:424
 TGeoSphereEditor.cxx:425
 TGeoSphereEditor.cxx:426
 TGeoSphereEditor.cxx:427
 TGeoSphereEditor.cxx:428
 TGeoSphereEditor.cxx:429
 TGeoSphereEditor.cxx:430
 TGeoSphereEditor.cxx:431
 TGeoSphereEditor.cxx:432
 TGeoSphereEditor.cxx:433
 TGeoSphereEditor.cxx:434
 TGeoSphereEditor.cxx:435
 TGeoSphereEditor.cxx:436
 TGeoSphereEditor.cxx:437
 TGeoSphereEditor.cxx:438
 TGeoSphereEditor.cxx:439
 TGeoSphereEditor.cxx:440
 TGeoSphereEditor.cxx:441
 TGeoSphereEditor.cxx:442
 TGeoSphereEditor.cxx:443
 TGeoSphereEditor.cxx:444
 TGeoSphereEditor.cxx:445
 TGeoSphereEditor.cxx:446
 TGeoSphereEditor.cxx:447
 TGeoSphereEditor.cxx:448
 TGeoSphereEditor.cxx:449
 TGeoSphereEditor.cxx:450
 TGeoSphereEditor.cxx:451
 TGeoSphereEditor.cxx:452
 TGeoSphereEditor.cxx:453
 TGeoSphereEditor.cxx:454
 TGeoSphereEditor.cxx:455
 TGeoSphereEditor.cxx:456
 TGeoSphereEditor.cxx:457
 TGeoSphereEditor.cxx:458
 TGeoSphereEditor.cxx:459
 TGeoSphereEditor.cxx:460