ROOT logo
// GUI to draw the geometry shapes
// Author: M.Gheata  06/16/03
Bool_t comments = kTRUE;
Bool_t raytracing = kFALSE;
Bool_t rotate = kFALSE;
Bool_t axis = kTRUE;

//______________________________________________________________________________
void geodemo ()
{
// root[0] .x geodemo.C
// root[1] box();   //draw a TGeoBBox with description
//
// The box can be divided on one axis.
//
// root[2] box(iaxis, ndiv, start, step);
//
// where: iaxis = 1,2 or 3, meaning (X,Y,Z) or (Rxy, phi, Z) depending on shape type
//        ndiv  = number of slices
//        start = starting position (must be in shape range)
//        step  = division step
// If step=0, all range of a given axis will be divided
// 
// The same can procedure can be performed for visualizing other shapes.
// When drawing one shape after another, the old geometry/canvas will be deleted.
   gSystem->Load("libGeom");
   TString dir = gSystem->UnixPathName(gInterpreter->GetCurrentMacroName());
   dir.ReplaceAll("geodemo.C","");
   dir.ReplaceAll("/./","/");
   gROOT->LoadMacro(dir+"rootgeom.C");
   bar = new TControlBar("vertical", "TGeo shapes",10,10);
   bar->AddButton("How to run  ","help()","Instructions for running this macro"); 
   bar->AddButton("ROOTgeom    ","rootgeom()","A simple geometry example.");
   bar->AddButton("Arb8        ","arb8()","An arbitrary polyedron defined by vertices (max 8) sitting on 2 parallel planes");
   bar->AddButton("Box         ","box()","A box shape.");
   bar->AddButton("Composite   ","composite()","A composite shape");
   bar->AddButton("Cone        ","cone()","A conical tube");
   bar->AddButton("Cone segment","coneseg()","A conical segment");
   bar->AddButton("Cut tube    ","ctub()","A cut tube segment");
   bar->AddButton("Eliptical tube","eltu()","An eliptical tube");
   bar->AddButton("Extruded poly","xtru()","A general polygone extrusion");
   bar->AddButton("Hyperboloid  ","hype()","A hyperboloid"); 
   bar->AddButton("Paraboloid  ","parab()","A paraboloid"); 
   bar->AddButton("Polycone    ","pcon()","A polycone shape");
   bar->AddButton("Polygone    ","pgon()","A polygone"); 
   bar->AddButton("Parallelipiped","para()","A parallelipiped shape");
   bar->AddButton("Sphere      ","sphere()","A spherical sector");
   bar->AddButton("Trd1        ","trd1()","A trapezoid with dX varying with Z");
   bar->AddButton("Trd2        ","trd2()","A trapezoid with both dX and dY varying with Z");
   bar->AddButton("Trapezoid   ","trap()","A general trapezoid");
   bar->AddButton("Torus       ","torus()","A toroidal segment");
   bar->AddButton("Tube        ","tube()","A tube with inner and outer radius");
   bar->AddButton("Tube segment","tubeseg()","A tube segment");
   bar->AddButton("Twisted trap","gtra()","A twisted trapezoid");
   bar->AddButton("Aligned (ideal)","ideal()","An ideal (un-aligned) geometry");
   bar->AddButton("Un-aligned","align()","Some alignment operation");
   bar->AddButton("RAY-TRACE ON/OFF","raytrace()","Toggle ray-tracing mode");
   bar->AddButton("COMMENTS  ON/OFF","comments = !comments;","Toggle explanations pad ON/OFF");
   bar->AddButton("AXES ON/OFF","axes()","Toggle axes ON/OFF");
   bar->AddButton("AUTOROTATE ON/OFF","autorotate()","Toggle autorotation ON/OFF");
   bar->Show();
   gROOT->SaveContext();
   gRandom = new TRandom3();
}

//______________________________________________________________________________
autorotate()
{
   rotate = !rotate;
   if (!rotate) {
      gROOT->SetInterrupt(kTRUE);
      return;
   }   
   if (!gPad) return;
   TView *view = gPad->GetView();
   if (!view) return;
   if (!gGeoManager) return;
   TVirtualGeoPainter *painter = gGeoManager->GetGeomPainter();
   if (!painter) return;
   Double_t longit = view->GetLongitude();
   Double_t lat = view->GetLatitude();
   Double_t psi = view->GetPsi();
   Double_t dphi = 1.;
   Int_t i,irep;
   TProcessEventTimer *timer = new TProcessEventTimer(5);
   gROOT->SetInterrupt(kFALSE);
   while (rotate) {
      if (timer->ProcessEvents()) break;
      if (gROOT->IsInterrupted()) break;
      longit += dphi;
      if (longit>360) longit -= 360.;
      if (!gPad) {
         rotate = kFALSE;
         return;
      } 
      view = gPad->GetView();  
      if (!view) {
         rotate = kFALSE;
         return;
      } 
      view->SetView(longit,view->GetLatitude(),view->GetPsi(),irep);
      gPad->Modified();
      gPad->Update();
   } 
   delete timer;     
}

//______________________________________________________________________________
void axes()
{
   axis = !axis;
   if (!gPad) return;
   TView *view = gPad->GetView();
   view->ShowAxis();
}   

//______________________________________________________________________________
void rgeom()
{
   gROOT->GetListOfCanvases()->Delete();
   rootgeom();
   Bool_t is_raytracing = gGeoManager->GetGeomPainter()->IsRaytracing();
   if (is_raytracing != raytracing) {
      gGeoManager->GetTopVolume()->Draw();
      gGeoManager->GetGeomPainter()->SetRaytracing(raytracing);
      gPad->Modified();
      gPad->Update();
   }   
}   

//______________________________________________________________________________
void box(Int_t iaxis=0, Int_t ndiv=8, Double_t start=0, Double_t step=0)
{
   gROOT->GetListOfCanvases()->Delete();
   if (iaxis<0 || iaxis>3) {
      printf("Wrong division axis. Range is 1-3.\n");
      return;
   }   
   TCanvas *c = new TCanvas("box shape", "A simple box", 700,1000);
   if (comments) {
      c->Divide(1,2,0,0);
      c->cd(2);
      gPad->SetPad(0,0,1,0.4);
      c->cd(1);
      gPad->SetPad(0,0.4,1,1);
   }   
   if (gGeoManager) delete gGeoManager;
   new TGeoManager("box", "poza1");
   TGeoMaterial *mat = new TGeoMaterial("Al", 26.98,13,2.7);
   TGeoMedium *med = new TGeoMedium("MED",1,mat);
   TGeoVolume *top = gGeoManager->MakeBox("TOP",med,100,100,100);
   gGeoManager->SetTopVolume(top);
   TGeoVolume *vol = gGeoManager->MakeBox("BOX",med, 20,30,40);
   vol->SetLineColor(randomColor());
   vol->SetLineWidth(2);
   top->AddNode(vol,1);
   if (iaxis) {
      TGeoVolume *slice = vol->Divide("SLICE",iaxis,ndiv,start,step);
      if (!slice) return;
      slice->SetLineColor(randomColor());
   }
   gGeoManager->CloseGeometry();
   gGeoManager->SetNsegments(80);
   top->Draw();
   MakePicture();
   if (!comments) return;
   c->cd(2);
   TPaveText *pt = new TPaveText(0.01,0.01,0.99,0.99);
   pt->SetLineColor(1);
   TGeoBBox *box = (TGeoBBox*)(vol->GetShape());
   TText *text = pt->AddText("TGeoBBox - box class");
   text->SetTextColor(2);
   AddText(pt,"fDX",box->GetDX(),"half length in X");
   AddText(pt,"fDY",box->GetDY(),"half length in Y");
   AddText(pt,"fDZ",box->GetDZ(),"half length in Z");
   AddText(pt,"fOrigin[0]",(box->GetOrigin())[0],"box origin on X");
   AddText(pt,"fOrigin[1]",(box->GetOrigin())[1],"box origin on Y");
   AddText(pt,"fOrigin[2]",(box->GetOrigin())[2],"box origin on Z");
   if (iaxis) AddText(pt, vol->GetFinder(), iaxis);
   pt->AddText("Execute: box(iaxis, ndiv, start, step) to divide this.");
   pt->AddText("----- IAXIS can be 1, 2 or 3 (X, Y, Z)");
   pt->AddText("----- NDIV must be a positive integer");
   pt->AddText("----- START must be a valid axis offset within shape range on divided axis");
   pt->AddText("----- STEP is the division step. START+NDIV*STEP must be in range also");
   pt->AddText("----- If START and STEP are omitted, all range of the axis will be divided");
   pt->AddText(" ");
   pt->SetTextSize(0.044);
   pt->SetAllWith("-----","color",2);
   pt->SetAllWith("-----","font",72);
   pt->SetAllWith("-----","size",0.04);
   pt->SetAllWith("Execute","color",4);
   pt->SetTextAlign(12);
   pt->Draw();
//   SavePicture("box",c,vol,iaxis,step);
   c->cd(1);
   gROOT->SetInterrupt(kTRUE);
}

//______________________________________________________________________________
void para(Int_t iaxis=0, Int_t ndiv=8, Double_t start=0, Double_t step=0)
{
   gROOT->GetListOfCanvases()->Delete();
   TCanvas *c = new TCanvas("para shape", "A parallelipiped", 700,1000);
   if (comments) {
      c->Divide(1,2,0,0);
      c->cd(2);
      gPad->SetPad(0,0,1,0.4);
      c->cd(1);
      gPad->SetPad(0,0.4,1,1);
   }   
   if (gGeoManager) delete gGeoManager;
   new TGeoManager("para", "poza1");
   TGeoMaterial *mat = new TGeoMaterial("Al", 26.98,13,2.7);
   TGeoMedium *med = new TGeoMedium("MED",1,mat);
   TGeoVolume *top = gGeoManager->MakeBox("TOP",med,100,100,100);
   gGeoManager->SetTopVolume(top);
   TGeoVolume *vol = gGeoManager->MakePara("PARA",med, 20,30,40,30,15,30);
   vol->SetLineColor(randomColor());
   vol->SetLineWidth(2);
   top->AddNode(vol,1);
   if (iaxis) {
      TGeoVolume *slice = vol->Divide("SLICE",iaxis,ndiv,start,step);
      if (!slice) return;
      slice->SetLineColor(randomColor());
   }
   gGeoManager->CloseGeometry();
   gGeoManager->SetNsegments(80);
   top->Draw();
   MakePicture();
   if (!comments) return;
   c->cd(2);
   TPaveText *pt = new TPaveText(0.01,0.01,0.99,0.99);
   pt->SetLineColor(1);
   TGeoPara *para = (TGeoPara*)(vol->GetShape());
   TText *text = pt->AddText("TGeoPara - parallelipiped class");
   text->SetTextColor(2);
   AddText(pt,"fX",para->GetX(),"half length in X");
   AddText(pt,"fY",para->GetY(),"half length in Y");
   AddText(pt,"fZ",para->GetZ(),"half length in Z");
   AddText(pt,"fAlpha",para->GetAlpha(),"angle about Y of the Z bases");
   AddText(pt,"fTheta",para->GetTheta(),"inclination of para axis about Z");
   AddText(pt,"fPhi",para->GetPhi(),"phi angle of para axis");
   if (iaxis) AddText(pt, vol->GetFinder(), iaxis);
   pt->AddText("Execute: para(iaxis, ndiv, start, step) to divide this.");
   pt->AddText("----- IAXIS can be 1, 2 or 3 (X, Y, Z)");
   pt->AddText("----- NDIV must be a positive integer");
   pt->AddText("----- START must be a valid axis offset within shape range on divided axis");
   pt->AddText("----- STEP is the division step. START+NDIV*STEP must be in range also");
   pt->AddText("----- If START and STEP are omitted, all range of the axis will be divided");
   pt->AddText(" ");
   pt->SetTextSize(0.044);
   pt->SetAllWith("-----","color",2);
   pt->SetAllWith("-----","font",72);
   pt->SetAllWith("-----","size",0.04);
   pt->SetAllWith("Execute","color",4);
   pt->SetTextAlign(12);
   pt->Draw();
   c->cd(1);
//   SavePicture("para",c,vol,iaxis,step);
}

//______________________________________________________________________________
void tube(Int_t iaxis=0, Int_t ndiv=8, Double_t start=0, Double_t step=0)
{
   gROOT->GetListOfCanvases()->Delete();
   if (iaxis<0 || iaxis>3) {
      printf("Wrong division axis. Range is 1-3.\n");
      return;
   }   
   TCanvas *c = new TCanvas("tube shape", "A tube", 700,1000);
   if (comments) {
      c->Divide(1,2,0,0);
      c->cd(2);
      gPad->SetPad(0,0,1,0.4);
      c->cd(1);
      gPad->SetPad(0,0.4,1,1);
   }   
   if (gGeoManager) delete gGeoManager;
   new TGeoManager("tube", "poza2");
   TGeoMaterial *mat = new TGeoMaterial("Al", 26.98,13,2.7);
   TGeoMedium *med = new TGeoMedium("MED",1,mat);
   TGeoVolume *top = gGeoManager->MakeBox("TOP",med,100,100,100);
   gGeoManager->SetTopVolume(top);
   TGeoVolume *vol = gGeoManager->MakeTube("TUBE",med, 20,30,40);
   vol->SetLineColor(randomColor());
   vol->SetLineWidth(2);
   top->AddNode(vol,1);
   if (iaxis) {
      TGeoVolume *slice = vol->Divide("SLICE",iaxis,ndiv,start,step);
      if (!slice) return;
      slice->SetLineColor(randomColor());
   }
   gGeoManager->CloseGeometry();
//   gGeoManager->SetNsegments(40);
   gGeoManager->SetNsegments(80);
   top->Draw();
   MakePicture();
   if (!comments) return;
   c->cd(2);
   TPaveText *pt = new TPaveText(0.01,0.01,0.99,0.99);
   pt->SetLineColor(1);
   TGeoTube *tube = (TGeoTube*)(vol->GetShape());
   TText *text = pt->AddText("TGeoTube - tube class");
   text->SetTextColor(2);
   AddText(pt,"fRmin",tube->GetRmin(),"minimum radius");
   AddText(pt,"fRmax",tube->GetRmax(),"maximum radius");
   AddText(pt,"fDZ",  tube->GetDZ(),  "half length in Z");
   if (iaxis) AddText(pt, vol->GetFinder(), iaxis);
   pt->AddText("Execute: tube(iaxis, ndiv, start, step) to divide this.");
   pt->AddText("----- IAXIS can be 1, 2 or 3 (Rxy, Phi, Z)");
   pt->AddText("----- NDIV must be a positive integer");
   pt->AddText("----- START must be a valid axis offset within shape range on divided axis");
   pt->AddText("----- STEP is the division step. START+NDIV*STEP must be in range also");
   pt->AddText("----- If START and STEP are omitted, all range of the axis will be divided");
   pt->AddText(" ");
   pt->SetAllWith("-----","color",2);
   pt->SetAllWith("-----","font",72);
   pt->SetAllWith("-----","size",0.04);
   pt->SetAllWith("Execute","color",4);
   pt->SetTextAlign(12);
   pt->SetTextSize(0.044);
   pt->Draw();
   c->cd(1);
//   SavePicture("tube",c,vol,iaxis,step);
}

//______________________________________________________________________________
void tubeseg(Int_t iaxis=0, Int_t ndiv=8, Double_t start=0, Double_t step=0)
{
   gROOT->GetListOfCanvases()->Delete();
   if (iaxis<0 || iaxis>3) {
      printf("Wrong division axis. Range is 1-3.\n");
      return;
   }   
   TCanvas *c = new TCanvas("tubeseg shape", "A tube segment ", 700,1000);
   if (comments) {
      c->Divide(1,2,0,0);
      c->cd(2);
      gPad->SetPad(0,0,1,0.4);
      c->cd(1);
      gPad->SetPad(0,0.4,1,1);
   }   
   if (gGeoManager) delete gGeoManager;
   new TGeoManager("tubeseg", "poza3");
   TGeoMaterial *mat = new TGeoMaterial("Al", 26.98,13,2.7);
   TGeoMedium *med = new TGeoMedium("MED",1,mat);
   TGeoVolume *top = gGeoManager->MakeBox("TOP",med,100,100,100);
   gGeoManager->SetTopVolume(top);
   TGeoVolume *vol = gGeoManager->MakeTubs("TUBESEG",med, 20,30,40,-30,270);
   vol->SetLineColor(randomColor());
   if (iaxis) {
      TGeoVolume *slice = vol->Divide("SLICE",iaxis,ndiv,start,step);
      if (!slice) return;
      slice->SetLineColor(randomColor());
   }
   vol->SetLineWidth(2);
   top->AddNode(vol,1);
   gGeoManager->CloseGeometry();
//   gGeoManager->SetNsegments(40);
   gGeoManager->SetNsegments(80);
   top->Draw();
   MakePicture();
   if (!comments) return;
   c->cd(2);
   TPaveText *pt = new TPaveText(0.01,0.01,0.99,0.99);
   pt->SetLineColor(1);
   TGeoTubeSeg *tubeseg = (TGeoTubeSeg*)(vol->GetShape());
   TText *text = pt->AddText("TGeoTubeSeg - tube segment class");
   text->SetTextColor(2);
   AddText(pt,"fRmin",tubeseg->GetRmin(),"minimum radius");
   AddText(pt,"fRmax",tubeseg->GetRmax(),"maximum radius");
   AddText(pt,"fDZ",  tubeseg->GetDZ(),  "half length in Z");
   AddText(pt,"fPhi1",tubeseg->GetPhi1(),"first phi limit");
   AddText(pt,"fPhi2",tubeseg->GetPhi2(),"second phi limit");  
   if (iaxis) AddText(pt, vol->GetFinder(), iaxis);
   pt->AddText("Execute: tubeseg(iaxis, ndiv, start, step) to divide this.");
   pt->AddText("----- IAXIS can be 1, 2 or 3 (Rxy, Phi, Z)");
   pt->AddText("----- NDIV must be a positive integer");
   pt->AddText("----- START must be a valid axis offset within shape range on divided axis");
   pt->AddText("----- STEP is the division step. START+NDIV*STEP must be in range also");
   pt->AddText("----- If START and STEP are omitted, all range of the axis will be divided");
   pt->AddText(" ");
   pt->SetAllWith("-----","color",2);
   pt->SetAllWith("-----","font",72);
   pt->SetAllWith("-----","size",0.04);
   pt->SetAllWith("Execute","color",4);
   pt->SetTextAlign(12);
   pt->SetTextSize(0.044);
   pt->Draw();
   c->cd(1);
//   SavePicture("tubeseg",c,vol,iaxis,step);
}

//______________________________________________________________________________
void ctub(Int_t iaxis=0, Int_t ndiv=8, Double_t start=0, Double_t step=0)
{
   gROOT->GetListOfCanvases()->Delete();
   if (iaxis<0 || iaxis>2) {
      printf("Wrong division axis. Range is 1-2.\n");
      return;
   }   
   TCanvas *c = new TCanvas("ctub shape", "A cut tube segment ", 700,1000);
   if (comments) {
      c->Divide(1,2,0,0);
      c->cd(2);
      gPad->SetPad(0,0,1,0.4);
      c->cd(1);
      gPad->SetPad(0,0.4,1,1);
   }   
   if (gGeoManager) delete gGeoManager;
   new TGeoManager("ctub", "poza3");
   TGeoMaterial *mat = new TGeoMaterial("Al", 26.98,13,2.7);
   TGeoMedium *med = new TGeoMedium("MED",1,mat);
   TGeoVolume *top = gGeoManager->MakeBox("TOP",med,100,100,100);
   gGeoManager->SetTopVolume(top);
   Double_t theta = 160.*TMath::Pi()/180.;
   Double_t phi   = 30.*TMath::Pi()/180.;
   Double_t nlow[3];
   nlow[0] = TMath::Sin(theta)*TMath::Cos(phi);
   nlow[1] = TMath::Sin(theta)*TMath::Sin(phi);
   nlow[2] = TMath::Cos(theta);
   theta = 20.*TMath::Pi()/180.;
   phi   = 60.*TMath::Pi()/180.;
   Double_t nhi[3];
   nhi[0] = TMath::Sin(theta)*TMath::Cos(phi);
   nhi[1] = TMath::Sin(theta)*TMath::Sin(phi);
   nhi[2] = TMath::Cos(theta);
   TGeoVolume *vol = gGeoManager->MakeCtub("CTUB",med, 20,30,40,-30,250, nlow[0], nlow[1], nlow[2], nhi[0],nhi[1],nhi[2]);
   vol->SetLineColor(randomColor());
   if (iaxis) {
      TGeoVolume *slice = vol->Divide("SLICE",iaxis,ndiv,start,step);
      if (!slice) return;
      slice->SetLineColor(randomColor());
   }
   vol->SetLineWidth(2);
   top->AddNode(vol,1);
   gGeoManager->CloseGeometry();
//   gGeoManager->SetNsegments(40);
   gGeoManager->SetNsegments(80);
   top->Draw();
   MakePicture();
   if (!comments) return;
   c->cd(2);
   TPaveText *pt = new TPaveText(0.01,0.01,0.99,0.99);
   pt->SetLineColor(1);
   TGeoTubeSeg *tubeseg = (TGeoTubeSeg*)(vol->GetShape());
   TText *text = pt->AddText("TGeoTubeSeg - tube segment class");
   text->SetTextColor(2);
   AddText(pt,"fRmin",tubeseg->GetRmin(),"minimum radius");
   AddText(pt,"fRmax",tubeseg->GetRmax(),"maximum radius");
   AddText(pt,"fDZ",  tubeseg->GetDZ(),  "half length in Z");
   AddText(pt,"fPhi1",tubeseg->GetPhi1(),"first phi limit");
   AddText(pt,"fPhi2",tubeseg->GetPhi2(),"second phi limit");  
   if (iaxis) AddText(pt, vol->GetFinder(), iaxis);
   pt->AddText(" ");
   pt->SetTextAlign(12);
   pt->SetTextSize(0.044);
   pt->Draw();
   c->cd(1);
//   SavePicture("tubeseg",c,vol,iaxis,step);
}

//______________________________________________________________________________
void cone(Int_t iaxis=0, Int_t ndiv=8, Double_t start=0, Double_t step=0)
{
   gROOT->GetListOfCanvases()->Delete();
   if (iaxis<0 || iaxis>3) {
      printf("Wrong division axis. Range is 1-3.\n");
      return;
   }   
   if (iaxis==1) {
      printf("cannot divide cone on Rxy\n");
      return;
   }   
   TCanvas *c = new TCanvas("cone shape", "A cone", 700,1000);
   if (comments) {
      c->Divide(1,2,0,0);
      c->cd(2);
      gPad->SetPad(0,0,1,0.4);
      c->cd(1);
      gPad->SetPad(0,0.4,1,1);
   }   
   if (gGeoManager) delete gGeoManager;
   new TGeoManager("cone", "poza4");
   TGeoMaterial *mat = new TGeoMaterial("Al", 26.98,13,2.7);
   TGeoMedium *med = new TGeoMedium("MED",1,mat);
   TGeoVolume *top = gGeoManager->MakeBox("TOP",med,100,100,100);
   gGeoManager->SetTopVolume(top);
   TGeoVolume *vol = gGeoManager->MakeCone("CONE",med, 40,10,20,35,45);
   vol->SetLineColor(randomColor());
   vol->SetLineWidth(2);
   if (iaxis) {
      TGeoVolume *slice = vol->Divide("SLICE",iaxis,ndiv,start,step);
      if (!slice) return;
      slice->SetLineColor(randomColor());
   }
   top->AddNode(vol,1);
   gGeoManager->CloseGeometry();
   gGeoManager->SetNsegments(80);
   top->Draw();
   MakePicture();
   if (!comments) return;
   c->cd(2);
   TPaveText *pt = new TPaveText(0.01,0.01,0.99,0.99);
   pt->SetLineColor(1);
   TGeoCone *cone = (TGeoCone*)(vol->GetShape());
   TText *text = pt->AddText("TGeoCone - cone class");
   text->SetTextColor(2);
   AddText(pt,"fDZ",  cone->GetDZ(),    "half length in Z");
   AddText(pt,"fRmin1",cone->GetRmin1(),"inner radius at -dz");
   AddText(pt,"fRmax1",cone->GetRmax1(),"outer radius at -dz");
   AddText(pt,"fRmin2",cone->GetRmin2(),"inner radius at +dz");
   AddText(pt,"fRmax2",cone->GetRmax2(),"outer radius at +dz");
   if (iaxis) AddText(pt, vol->GetFinder(), iaxis);
   pt->AddText("Execute: cone(iaxis, ndiv, start, step) to divide this.");
   pt->AddText("----- IAXIS can be 2 or 3 (Phi, Z)");
   pt->AddText("----- NDIV must be a positive integer");
   pt->AddText("----- START must be a valid axis offset within shape range on divided axis");
   pt->AddText("----- STEP is the division step. START+NDIV*STEP must be in range also");
   pt->AddText("----- If START and STEP are omitted, all range of the axis will be divided");
   pt->AddText(" ");
   pt->SetAllWith("-----","color",2);
   pt->SetAllWith("-----","font",72);
   pt->SetAllWith("-----","size",0.04);
   pt->SetAllWith("Execute","color",4);
   pt->SetTextAlign(12);
   pt->SetTextSize(0.044);
   pt->Draw();
   c->cd(1);
//   SavePicture("cone",c,vol,iaxis,step);
}

//______________________________________________________________________________
void coneseg(Int_t iaxis=0, Int_t ndiv=8, Double_t start=0, Double_t step=0)
{
   gROOT->GetListOfCanvases()->Delete();
   if (iaxis<0 || iaxis>3) {
      printf("Wrong division axis. Range is 1-3.\n");
      return;
   }   
   TCanvas *c = new TCanvas("coneseg shape", "A cone segment", 700,1000);
   if (comments) {
      c->Divide(1,2,0,0);
      c->cd(2);
      gPad->SetPad(0,0,1,0.4);
      c->cd(1);
      gPad->SetPad(0,0.4,1,1);
   }   
   if (gGeoManager) delete gGeoManager;
   new TGeoManager("coneseg", "poza5");
   TGeoMaterial *mat = new TGeoMaterial("Al", 26.98,13,2.7);
   TGeoMedium *med = new TGeoMedium("MED",1,mat);
   TGeoVolume *top = gGeoManager->MakeBox("TOP",med,100,100,100);
   gGeoManager->SetTopVolume(top);
   TGeoVolume *vol = gGeoManager->MakeCons("CONESEG",med, 40,30,40,10,20,-30,250);
   vol->SetLineColor(randomColor());
//   vol->SetLineWidth(2);
   top->AddNode(vol,1);
   if (iaxis) {
      TGeoVolume *slice = vol->Divide("SLICE",iaxis,ndiv,start,step);
      if (!slice) return;
      slice->SetLineColor(randomColor());
   }
   gGeoManager->CloseGeometry();
   gGeoManager->SetNsegments(80);
   top->Draw();
   MakePicture();
   if (!comments) return;
   c->cd(2);
   TPaveText *pt = new TPaveText(0.01,0.01,0.99,0.99);
   pt->SetLineColor(1);
   TGeoConeSeg *coneseg = (TGeoConeSeg*)(vol->GetShape());
   TText *text = pt->AddText("TGeoConeSeg - coneseg class");
   text->SetTextColor(2);
   AddText(pt,"fDZ",  coneseg->GetDZ(),    "half length in Z");
   AddText(pt,"fRmin1",coneseg->GetRmin1(),"inner radius at -dz");
   AddText(pt,"fRmax1",coneseg->GetRmax1(),"outer radius at -dz");
   AddText(pt,"fRmin2",coneseg->GetRmin1(),"inner radius at +dz");
   AddText(pt,"fRmax2",coneseg->GetRmax1(),"outer radius at +dz");
   AddText(pt,"fPhi1",coneseg->GetPhi1(),"first phi limit");
   AddText(pt,"fPhi2",coneseg->GetPhi2(),"second phi limit"); 
   if (iaxis) AddText(pt, vol->GetFinder(), iaxis);
   pt->AddText("Execute: coneseg(iaxis, ndiv, start, step) to divide this.");
   pt->AddText("----- IAXIS can be 2 or 3 (Phi, Z)");
   pt->AddText("----- NDIV must be a positive integer");
   pt->AddText("----- START must be a valid axis offset within shape range on divided axis");
   pt->AddText("----- STEP is the division step. START+NDIV*STEP must be in range also");
   pt->AddText("----- If START and STEP are omitted, all range of the axis will be divided");
   pt->AddText(" ");
   pt->SetAllWith("-----","color",2);
   pt->SetAllWith("-----","font",72);
   pt->SetAllWith("-----","size",0.04);
   pt->SetAllWith("Execute","color",4);
   pt->SetTextAlign(12);
   pt->SetTextSize(0.044);
   pt->Draw();
   c->cd(1);
//   SavePicture("coneseg",c,vol,iaxis,step);
}

//______________________________________________________________________________
void eltu(Int_t iaxis=0, Int_t ndiv=8, Double_t start=0, Double_t step=0)
{
   gROOT->GetListOfCanvases()->Delete();
   TCanvas *c = new TCanvas("eltu shape", "An Elliptical tube", 700,1000);
   if (comments) {
      c->Divide(1,2,0,0);
      c->cd(2);
      gPad->SetPad(0,0,1,0.4);
      c->cd(1);
      gPad->SetPad(0,0.4,1,1);
   }   
   if (gGeoManager) delete gGeoManager;
   new TGeoManager("eltu", "poza6");
   TGeoMaterial *mat = new TGeoMaterial("Al", 26.98,13,2.7);
   TGeoMedium *med = new TGeoMedium("MED",1,mat);
   TGeoVolume *top = gGeoManager->MakeBox("TOP",med,100,100,100);
   gGeoManager->SetTopVolume(top);
   TGeoVolume *vol = gGeoManager->MakeEltu("ELTU",med, 30,10,40);
   vol->SetLineColor(randomColor());
//   vol->SetLineWidth(2);
   top->AddNode(vol,1);
   if (iaxis) {
      TGeoVolume *slice = vol->Divide("SLICE",iaxis,ndiv,start,step);
      if (!slice) return;
      slice->SetLineColor(randomColor());
   }
   gGeoManager->CloseGeometry();
   gGeoManager->SetNsegments(80);
   top->Draw();
   MakePicture();
   if (!comments) return;
   c->cd(2);
   TPaveText *pt = new TPaveText(0.01,0.01,0.99,0.99);
   pt->SetLineColor(1);
   TGeoEltu *eltu = (TGeoEltu*)(vol->GetShape());
   TText *text = pt->AddText("TGeoEltu - eltu class");
   text->SetTextColor(2);
   AddText(pt,"fA",eltu->GetA(), "semi-axis along x");
   AddText(pt,"fB",eltu->GetB(), "semi-axis along y");
   AddText(pt,"fDZ", eltu->GetDZ(),  "half length in Z");
   if (iaxis) AddText(pt, vol->GetFinder(), iaxis);
   pt->AddText("Execute: eltu(iaxis, ndiv, start, step) to divide this.");
   pt->AddText("----- IAXIS can be 2 or 3 (Phi, Z)");
   pt->AddText("----- NDIV must be a positive integer");
   pt->AddText("----- START must be a valid axis offset within shape range on divided axis");
   pt->AddText("----- STEP is the division step. START+NDIV*STEP must be in range also");
   pt->AddText("----- If START and STEP are omitted, all range of the axis will be divided");
   pt->AddText(" ");
   pt->SetAllWith("-----","color",2);
   pt->SetAllWith("-----","font",72);
   pt->SetAllWith("-----","size",0.04);
   pt->SetAllWith("Execute","color",4);
   pt->SetTextAlign(12);
   pt->SetTextSize(0.044);
   pt->Draw();
   c->cd(1);
//   SavePicture("eltu",c,vol,iaxis,step);
}

//______________________________________________________________________________
void sphere(Int_t iaxis=0, Int_t ndiv=8, Double_t start=0, Double_t step=0)
{
   gROOT->GetListOfCanvases()->Delete();
   if (iaxis!=0) {
      printf("Cannot divide spheres\n");
      return;
   }   
   TCanvas *c = new TCanvas("Sphere shap", "A spherical sector", 700,1000);
   if (comments) {
      c->Divide(1,2,0,0);
      c->cd(2);
      gPad->SetPad(0,0,1,0.4);
      c->cd(1);
      gPad->SetPad(0,0.4,1,1);
   }   
   if (gGeoManager) delete gGeoManager;
   new TGeoManager("sphere", "poza7");
   TGeoMaterial *mat = new TGeoMaterial("Al", 26.98,13,2.7);
   TGeoMedium *med = new TGeoMedium("MED",1,mat);
   TGeoVolume *top = gGeoManager->MakeBox("TOP",med,100,100,100);
   gGeoManager->SetTopVolume(top);
   TGeoVolume *vol = gGeoManager->MakeSphere("SPHERE",med, 30,40,60,120,30,240);
   vol->SetLineColor(randomColor());
   vol->SetLineWidth(2);
   top->AddNode(vol,1);
   if (iaxis) {
      TGeoVolume *slice = vol->Divide("SLICE",iaxis,ndiv,start,step);
      if (!slice) return;
      slice->SetLineColor(randomColor());
   }
   gGeoManager->CloseGeometry();
   gGeoManager->SetNsegments(80);
   top->Draw();
   MakePicture();
   if (!comments) return;
   c->cd(2);
   TPaveText *pt = new TPaveText(0.01,0.01,0.99,0.99);
   pt->SetLineColor(1);
   TGeoSphere *sphere = (TGeoSphere*)(vol->GetShape());
   TText *text = pt->AddText("TGeoSphere- sphere class");
   text->SetTextColor(2);
   AddText(pt,"fRmin",sphere->GetRmin(),"inner radius");
   AddText(pt,"fRmax",sphere->GetRmax(),"outer radius");
   AddText(pt,"fTheta1",sphere->GetTheta1(),"lower theta limit");
   AddText(pt,"fTheta2",sphere->GetTheta2(),"higher theta limit");
   AddText(pt,"fPhi1",sphere->GetPhi1(),"lower phi limit");
   AddText(pt,"fPhi2",sphere->GetPhi2(),"higher phi limit"); 
   if (iaxis) AddText(pt, vol->GetFinder(), iaxis);
   pt->AddText(" ");
   pt->SetTextSize(0.044);
   pt->Draw();
   c->cd(1);
//   SavePicture("sphere",c,vol,iaxis,step);
}

//______________________________________________________________________________
void torus(Int_t iaxis=0, Int_t ndiv=8, Double_t start=0, Double_t step=0)
{
   gROOT->GetListOfCanvases()->Delete();
   if (iaxis!=0) {
      printf("Cannot divide a torus\n");
      return;
   }   
   TCanvas *c = new TCanvas("torus shape", "A toroidal segment", 700,1000);
   if (comments) {
      c->Divide(1,2,0,0);
      c->cd(2);
      gPad->SetPad(0,0,1,0.4);
      c->cd(1);
      gPad->SetPad(0,0.4,1,1);
   }   
   if (gGeoManager) delete gGeoManager;
   new TGeoManager("torus", "poza2");
   TGeoMaterial *mat = new TGeoMaterial("Al", 26.98,13,2.7);
   TGeoMedium *med = new TGeoMedium("MED",1,mat);
   TGeoVolume *top = gGeoManager->MakeBox("TOP",med,100,100,100);
   gGeoManager->SetTopVolume(top);
   TGeoVolume *vol = gGeoManager->MakeTorus("TORUS",med, 40,20,25,0,270);
   vol->SetLineColor(randomColor());
   top->AddNode(vol,1);
   if (iaxis) {
      TGeoVolume *slice = vol->Divide("SLICE",iaxis,ndiv,start,step);
      if (!slice) return;
      slice->SetLineColor(2);
   }
   gGeoManager->CloseGeometry();
   gGeoManager->SetNsegments(80);
   top->Draw();
   MakePicture();
   if (!comments) return;
   c->cd(2);
   TPaveText *pt = new TPaveText(0.01,0.01,0.99,0.99);
   pt->SetLineColor(1);
   TGeoTorus *tor = (TGeoTorus*)(vol->GetShape());
   TText *text = pt->AddText("TGeoTorus - torus class");
   text->SetTextColor(2);
   AddText(pt,"fR",tor->GetR(),"radius of the ring");
   AddText(pt,"fRmin",tor->GetRmin(),"minimum radius");
   AddText(pt,"fRmax",tor->GetRmax(),"maximum radius");
   AddText(pt,"fPhi1",  tor->GetPhi1(),  "starting phi angle");
   AddText(pt,"fDphi",  tor->GetDphi(),  "phi range");
   if (iaxis) AddText(pt, vol->GetFinder(), iaxis);
   pt->AddText(" ");
   pt->SetTextSize(0.044);
   pt->Draw();
   c->cd(1);
}	 

//______________________________________________________________________________
void trd1(Int_t iaxis=0, Int_t ndiv=8, Double_t start=0, Double_t step=0)
{
   gROOT->GetListOfCanvases()->Delete();
   if (iaxis<0 || iaxis>3) {
      printf("Wrong division axis. Range is 1-3.\n");
      return;
   }   
   if (iaxis==1) {
      printf("Cannot divide trd1 on X axis\n");
      return;
   }   
   
   TCanvas *c = new TCanvas("trd1 shape", "A trapezoid with dX varying", 700,1000);
   if (comments) {
      c->Divide(1,2,0,0);
      c->cd(2);
      gPad->SetPad(0,0,1,0.4);
      c->cd(1);
      gPad->SetPad(0,0.4,1,1);
   }   
   if (gGeoManager) delete gGeoManager;
   new TGeoManager("trd1", "poza8");
   TGeoMaterial *mat = new TGeoMaterial("Al", 26.98,13,2.7);
   TGeoMedium *med = new TGeoMedium("MED",1,mat);
   TGeoVolume *top = gGeoManager->MakeBox("TOP",med,100,100,100);
   gGeoManager->SetTopVolume(top);
   TGeoVolume *vol = gGeoManager->MakeTrd1("Trd1",med, 10,20,30,40);
   vol->SetLineColor(randomColor());
   vol->SetLineWidth(2);
   top->AddNode(vol,1);
   if (iaxis) {
      TGeoVolume *slice = vol->Divide("SLICE",iaxis,ndiv,start,step);
      if (!slice) return;
      slice->SetLineColor(randomColor());
   }
   gGeoManager->CloseGeometry();
   gGeoManager->SetNsegments(80);
   top->Draw();
   MakePicture();
   if (!comments) return;
   c->cd(2);
   TPaveText *pt = new TPaveText(0.01,0.01,0.99,0.99);
   pt->SetLineColor(1);
   TGeoTrd1 *trd1 = (TGeoTrd1*)(vol->GetShape());
   TText *text = pt->AddText("TGeoTrd1 - Trd1 class");
   text->SetTextColor(2);
   AddText(pt,"fDx1",trd1->GetDx1(),"half length in X at lower Z surface(-dz)");
   AddText(pt,"fDx2",trd1->GetDx2(),"half length in X at higher Z surface(+dz)");
   AddText(pt,"fDy",trd1->GetDy(),"half length in Y");
   AddText(pt,"fDz",trd1->GetDz(),"half length in Z");
   if (iaxis) AddText(pt, vol->GetFinder(), iaxis);
   pt->AddText("Execute: trd1(iaxis, ndiv, start, step) to divide this.");
   pt->AddText("----- IAXIS can be 2 or 3 (Y, Z)");
   pt->AddText("----- NDIV must be a positive integer");
   pt->AddText("----- START must be a valid axis offset within shape range on divided axis");
   pt->AddText("----- STEP is the division step. START+NDIV*STEP must be in range also");
   pt->AddText("----- If START and STEP are omitted, all range of the axis will be divided");
   pt->AddText(" ");
   pt->SetAllWith("-----","color",2);
   pt->SetAllWith("-----","font",72);
   pt->SetAllWith("-----","size",0.04);
   pt->SetAllWith("Execute","color",4);
   pt->SetTextAlign(12);
   pt->SetTextSize(0.044);
   pt->Draw();
   c->cd(1);
//   SavePicture("trd1",c,vol,iaxis,step);
}

//______________________________________________________________________________
void parab()
{
   gROOT->GetListOfCanvases()->Delete();
   TCanvas *c = new TCanvas("parab shape", "A paraboloid segment", 700,1000);
   if (comments) {
      c->Divide(1,2,0,0);
      c->cd(2);
      gPad->SetPad(0,0,1,0.4);
      c->cd(1);
      gPad->SetPad(0,0.4,1,1);
   }   
   if (gGeoManager) delete gGeoManager;
   new TGeoManager("parab", "paraboloid");
   TGeoMaterial *mat = new TGeoMaterial("Al", 26.98,13,2.7);
   TGeoMedium *med = new TGeoMedium("MED",1,mat);
   TGeoVolume *top = gGeoManager->MakeBox("TOP",med,100,100,100);
   gGeoManager->SetTopVolume(top);
   TGeoVolume *vol = gGeoManager->MakeParaboloid("PARAB",med,0, 40, 50); 
   TGeoParaboloid *par = (TGeoParaboloid*)vol->GetShape();
   vol->SetLineColor(randomColor());
   vol->SetLineWidth(2);
   top->AddNode(vol,1);
   gGeoManager->CloseGeometry();
   gGeoManager->SetNsegments(80);
   top->Draw();
   MakePicture();
   if (!comments) return;
   c->cd(2);
   TPaveText *pt = new TPaveText(0.01,0.01,0.99,0.99);
   pt->SetLineColor(1);
   TText *text = pt->AddText("TGeoParaboloid - Paraboloid class");
   text->SetTextColor(2);
   AddText(pt,"fRlo",par->GetRlo(),"radius at Z=-dz");
   AddText(pt,"fRhi",par->GetRhi(),"radius at Z=+dz");
   AddText(pt,"fDz",par->GetDz(),"half-length on Z axis");
   pt->AddText("----- A paraboloid is described by the equation:");
   pt->AddText("-----    z = a*r*r + b;   where: r = x*x + y*y");
   pt->AddText("----- Create with:    TGeoParaboloid *parab = new TGeoParaboloid(rlo, rhi, dz);");
   pt->AddText("-----    dz:  half-length in Z (range from -dz to +dz");
   pt->AddText("-----    rlo: radius at z=-dz given by: -dz = a*rlo*rlo + b");
   pt->AddText("-----    rhi: radius at z=+dz given by:  dz = a*rhi*rhi + b");
   pt->AddText("-----      rlo != rhi; both >= 0");
   pt->AddText(" ");
   pt->SetAllWith("-----","color",2);
   pt->SetAllWith("-----","font",72);
   pt->SetAllWith("-----","size",0.04);
   pt->SetTextAlign(12);
   pt->SetTextSize(0.044);
   pt->Draw();
   c->cd(1);
}

//______________________________________________________________________________
void hype()
{
   gROOT->GetListOfCanvases()->Delete();
   TCanvas *c = new TCanvas("hype shape", "A hyperboloid", 700,1000);
   if (comments) {
      c->Divide(1,2,0,0);
      c->cd(2);
      gPad->SetPad(0,0,1,0.4);
      c->cd(1);
      gPad->SetPad(0,0.4,1,1);
   }   
   if (gGeoManager) delete gGeoManager;
   new TGeoManager("hype", "hyperboloid");
   TGeoMaterial *mat = new TGeoMaterial("Al", 26.98,13,2.7);
   TGeoMedium *med = new TGeoMedium("MED",1,mat);
   TGeoVolume *top = gGeoManager->MakeBox("TOP",med,100,100,100);
   gGeoManager->SetTopVolume(top);
   TGeoVolume *vol = gGeoManager->MakeHype("HYPE",med,10, 45 ,20,45,40); 
   TGeoHype *hype = (TGeoHype*)vol->GetShape();
   vol->SetLineColor(randomColor());
   vol->SetLineWidth(2);
   top->AddNode(vol,1);
   gGeoManager->CloseGeometry();
   gGeoManager->SetNsegments(80);
   top->Draw();
   MakePicture();
   if (!comments) return;
   c->cd(2);
   TPaveText *pt = new TPaveText(0.01,0.01,0.99,0.99);
   pt->SetLineColor(1);
   TText *text = pt->AddText("TGeoHype - Hyperboloid class");
   text->SetTextColor(2);
   AddText(pt,"fRmin",hype->GetRmin(),"minimum inner radius");
   AddText(pt,"fStIn",hype->GetStIn(),"inner surface stereo angle [deg]");
   AddText(pt,"fRmax",hype->GetRmax(),"minimum outer radius");
   AddText(pt,"fStOut",hype->GetStOut(),"outer surface stereo angle [deg]");
   AddText(pt,"fDz",hype->GetDz(),"half-length on Z axis");
   pt->AddText("----- A hyperboloid is described by the equation:");
   pt->AddText("-----    r^2 - (tan(stereo)*z)^2 = rmin^2;   where: r = x*x + y*y");
   pt->AddText("----- Create with:    TGeoHype *hype = new TGeoHype(rin, stin, rout, stout, dz);");
   pt->AddText("-----      rin < rout; rout > 0");
   pt->AddText("-----      rin = 0; stin > 0 => inner surface conical");
   pt->AddText("-----      stin/stout = 0 => corresponding surface cyllindrical");
   pt->AddText(" ");
   pt->SetAllWith("-----","color",2);
   pt->SetAllWith("-----","font",72);
   pt->SetAllWith("-----","size",0.04);
   pt->SetTextAlign(12);
   pt->SetTextSize(0.044);
   pt->Draw();
   c->cd(1);
}
//______________________________________________________________________________
void pcon(Int_t iaxis=0, Int_t ndiv=8, Double_t start=0, Double_t step=0)
{
   gROOT->GetListOfCanvases()->Delete();
   if (iaxis<0 || iaxis>3) {
      printf("Wrong division axis. Range is 1-3.\n");
      return;
   }   
   if (iaxis==1) {
      printf("Cannot divide pcon on Rxy\n");
      return;
   }   
   TCanvas *c = new TCanvas("pcon shape", "A polycone", 700,1000);
   if (comments) {
      c->Divide(1,2,0,0);
      c->cd(2);
      gPad->SetPad(0,0,1,0.4);
      c->cd(1);
      gPad->SetPad(0,0.4,1,1);
   }   
   if (gGeoManager) delete gGeoManager;
   new TGeoManager("pcon", "poza10");
   TGeoMaterial *mat = new TGeoMaterial("Al", 26.98,13,2.7);
   TGeoMedium *med = new TGeoMedium("MED",1,mat);
   TGeoVolume *top = gGeoManager->MakeBox("TOP",med,100,100,100);
   gGeoManager->SetTopVolume(top);
   TGeoVolume *vol = gGeoManager->MakePcon("PCON",med, -30.0,300,4);
   TGeoPcon *pcon = (TGeoPcon*)(vol->GetShape());
   pcon->DefineSection(0,0,15,20);
   pcon->DefineSection(1,20,15,20);
   pcon->DefineSection(2,20,15,25);
   pcon->DefineSection(3,50,15,20);
   vol->SetLineColor(randomColor());
   vol->SetLineWidth(2);
   top->AddNode(vol,1);
   if (iaxis) {
      TGeoVolume *slice = vol->Divide("SLICE",iaxis,ndiv,start,step);
      if (!slice) return;
      slice->SetLineColor(randomColor());
   }
   gGeoManager->CloseGeometry();
   gGeoManager->SetNsegments(80);
   top->Draw();
   MakePicture();
   if (!comments) return;
   c->cd(2);
   TPaveText *pt = new TPaveText(0.01,0.01,0.99,0.99);
   pt->SetLineColor(1);
   TText *text = pt->AddText("TGeoPcon - pcon class");
   text->SetTextColor(2);
   AddText(pt,"fPhi1",pcon->GetPhi1(),"lower phi limit");
   AddText(pt,"fDphi",pcon->GetDphi(),"phi range");
   AddText(pt,"fNz",pcon->GetNz(),"number of z planes");
   for (Int_t j=0; j<pcon->GetNz(); j++) {
      char line[128];
      sprintf(line, "fZ[%i]=%5.2f  fRmin[%i]=%5.2f  fRmax[%i]=%5.2f", 
              j,pcon->GetZ()[j],j,pcon->GetRmin()[j],j,pcon->GetRmax()[j]);
      text = pt->AddText(line);
      text->SetTextColor(4);
      text->SetTextAlign(12);
   }   
   if (iaxis) AddText(pt, vol->GetFinder(), iaxis);
   pt->AddText("Execute: pcon(iaxis, ndiv, start, step) to divide this.");
   pt->AddText("----- IAXIS can be 2 or 3 (Phi, Z)");
   pt->AddText("----- NDIV must be a positive integer");
   pt->AddText("----- START must be a valid axis offset within shape range on divided axis");
   pt->AddText("----- STEP is the division step. START+NDIV*STEP must be in range also");
   pt->AddText("----- If START and STEP are omitted, all range of the axis will be divided");
   pt->AddText(" ");
   pt->SetAllWith("-----","color",2);
   pt->SetAllWith("-----","font",72);
   pt->SetAllWith("-----","size",0.04);
   pt->SetAllWith("Execute","color",4);
   pt->SetTextAlign(12);
   pt->SetTextSize(0.044);
   pt->Draw();
   c->cd(1);
//   SavePicture("pcon",c,vol,iaxis,step);
}

//______________________________________________________________________________
void pgon(Int_t iaxis=0, Int_t ndiv=8, Double_t start=0, Double_t step=0)
{
   gROOT->GetListOfCanvases()->Delete();
   if (iaxis<0 || iaxis>3) {
      printf("Wrong division axis. Range is 1-3.\n");
      return;
   }   
   if (iaxis==1) {
      printf("Cannot divide pgon on Rxy\n");
      return;
   }   
   TCanvas *c = new TCanvas("pgon shape", "A polygone", 700,1000);
   if (comments) {
      c->Divide(1,2,0,0);
      c->cd(2);
      gPad->SetPad(0,0,1,0.4);
      c->cd(1);
      gPad->SetPad(0,0.4,1,1);
   }   
   if (gGeoManager) delete gGeoManager;
   new TGeoManager("pgon", "poza11");
   TGeoMaterial *mat = new TGeoMaterial("Al", 26.98,13,2.7);
   TGeoMedium *med = new TGeoMedium("MED",1,mat);
   TGeoVolume *top = gGeoManager->MakeBox("TOP",med,150,150,100);
   gGeoManager->SetTopVolume(top);
   TGeoVolume *vol = gGeoManager->MakePgon("PGON",med, -45.0,270.0,4,4);
   TGeoPgon *pgon = (TGeoPgon*)(vol->GetShape());
   pgon->DefineSection(0,-70,45,50);
   pgon->DefineSection(1,0,35,40);
   pgon->DefineSection(2,0,30,35);
   pgon->DefineSection(3,70,90,100);
   vol->SetLineColor(randomColor());
   vol->SetLineWidth(2);
   top->AddNode(vol,1);
   if (iaxis) {
      TGeoVolume *slice = vol->Divide("SLICE",iaxis,ndiv,start,step);
      if (!slice) return;
      slice->SetLineColor(randomColor());
   }
   gGeoManager->CloseGeometry();
   gGeoManager->SetNsegments(80);
   top->Draw();
   MakePicture();
   if (!comments) return;
   c->cd(2);
   TPaveText *pt = new TPaveText(0.01,0.01,0.99,0.99);
   pt->SetLineColor(1);
   TText *text = pt->AddText("TGeoPgon - pgon class");
   text->SetTextColor(2);
   AddText(pt,"fPhi1",pgon->GetPhi1(),"lower phi limit");
   AddText(pt,"fDphi",pgon->GetDphi(),"phi range");
   AddText(pt,"fNedges",pgon->GetNedges(),"number of edges");
    AddText(pt,"fNz",pgon->GetNz(),"number of z planes");
   for (Int_t j=0; j<pgon->GetNz(); j++) {
      char line[128];
      sprintf(line, "fZ[%i]=%5.2f  fRmin[%i]=%5.2f  fRmax[%i]=%5.2f", 
              j,pgon->GetZ()[j],j,pgon->GetRmin()[j],j,pgon->GetRmax()[j]);
      text = pt->AddText(line);
      text->SetTextColor(4);
      text->SetTextAlign(12);
   }   
   if (iaxis) AddText(pt, vol->GetFinder(), iaxis);
   pt->AddText("Execute: pgon(iaxis, ndiv, start, step) to divide this.");
   pt->AddText("----- IAXIS can be 2 or 3 (Phi, Z)");
   pt->AddText("----- NDIV must be a positive integer");
   pt->AddText("----- START must be a valid axis offset within shape range on divided axis");
   pt->AddText("----- STEP is the division step. START+NDIV*STEP must be in range also");
   pt->AddText("----- If START and STEP are omitted, all range of the axis will be divided");
   pt->AddText(" ");
   pt->SetAllWith("-----","color",2);
   pt->SetAllWith("-----","font",72);
   pt->SetAllWith("-----","size",0.04);
   pt->SetAllWith("Execute","color",4);
   pt->SetTextAlign(12);
   pt->SetTextSize(0.044);
   pt->SetTextSize(0.044);
   pt->Draw();
   c->cd(1);
//   SavePicture("pgon",c,vol,iaxis,step);
}

//______________________________________________________________________________
void arb8(Int_t iaxis=0, Int_t ndiv=8, Double_t start=0, Double_t step=0)
{
   gROOT->GetListOfCanvases()->Delete();
   if (iaxis!=0) {
      printf("Cannot divide arb8\n");
      return;
   }   
   TCanvas *c = new TCanvas("arb8 shape", "An arbitrary polyedron", 700,1000);
   if (comments) {
      c->Divide(1,2,0,0);
      c->cd(2);
      gPad->SetPad(0,0,1,0.4);
      c->cd(1);
      gPad->SetPad(0,0.4,1,1);
   }   
   if (gGeoManager) delete gGeoManager;
   new TGeoManager("arb8", "poza12");
   TGeoMaterial *mat = new TGeoMaterial("Al", 26.98,13,2.7);
   TGeoMedium *med = new TGeoMedium("MED",1,mat);
   TGeoVolume *top = gGeoManager->MakeBox("TOP",med,100,100,100);
   gGeoManager->SetTopVolume(top);
   TGeoArb8 *arb = new TGeoArb8(20);
   arb->SetVertex(0,-30,-25);
   arb->SetVertex(1,-25,25);
   arb->SetVertex(2,5,25);
   arb->SetVertex(3,25,-25);
   arb->SetVertex(4,-28,-23);
   arb->SetVertex(5,-23,27);
   arb->SetVertex(6,-23,27);
   arb->SetVertex(7,13,-27);
   TGeoVolume *vol = new TGeoVolume("ARB8",arb,med);
   vol->SetLineColor(randomColor());
   vol->SetLineWidth(2);
   top->AddNode(vol,1);
   if (iaxis) {
      TGeoVolume *slice = vol->Divide("SLICE",iaxis,ndiv,start,step);
      if (!slice) return;
      slice->SetLineColor(randomColor());
   }
   gGeoManager->CloseGeometry();
   gGeoManager->SetNsegments(80);
   top->Draw();
   MakePicture();
   if (!comments) return;
   c->cd(2);
   TPaveText *pt = new TPaveText(0.01,0.01,0.99,0.99);
   pt->SetLineColor(1);
   TText *text = pt->AddText("TGeoArb8 - arb8 class");
   text->SetTextColor(2);
   AddText(pt,"fDz",arb->GetDz(),"Z half length");
   char line[128];
   Double_t *vert = arb->GetVertices();
   text = pt->AddText("Vertices on lower Z plane:");
   text->SetTextColor(3);
   Int_t i;
   for (i=0; i<4; i++) {
      sprintf(line,"   fXY[%d] = (%5.2f, %5.2f)", i, vert[2*i], vert[2*i+1]);
      text = pt->AddText(line);
      text->SetTextSize(0.043);
      text->SetTextColor(4);
   }      
   text = pt->AddText("Vertices on higher Z plane:");
   text->SetTextColor(3);
   for (i=4; i<8; i++) {
      sprintf(line,"   fXY[%d] = (%5.2f, %5.2f)", i, vert[2*i], vert[2*i+1]);
      text = pt->AddText(line);
      text->SetTextSize(0.043);
      text->SetTextColor(4);
   }      
      
   if (iaxis) AddText(pt, vol->GetFinder(), iaxis);
   pt->AddText(" ");
   pt->SetTextSize(0.043);
   pt->Draw();
   c->cd(1);
//   SavePicture("arb8",c,vol,iaxis,step);
}

//______________________________________________________________________________
void trd2(Int_t iaxis=0, Int_t ndiv=8, Double_t start=0, Double_t step=0)
{
   gROOT->GetListOfCanvases()->Delete();
   if (iaxis && iaxis!=3) {
      printf("Wrong division axis. Can divide only in Z (3)\n");
      return;
   }   
   TCanvas *c = new TCanvas("trd2 shape", "A trapezoid with dX and dY varying with Z", 700,1000);
   if (comments) {
      c->Divide(1,2,0,0);
      c->cd(2);
      gPad->SetPad(0,0,1,0.4);
      c->cd(1);
      gPad->SetPad(0,0.4,1,1);
   }   
   if (gGeoManager) delete gGeoManager;
   new TGeoManager("trd2", "poza9");
   TGeoMaterial *mat = new TGeoMaterial("Al", 26.98,13,2.7);
   TGeoMedium *med = new TGeoMedium("MED",1,mat);
   TGeoVolume *top = gGeoManager->MakeBox("TOP",med,100,100,100);
   gGeoManager->SetTopVolume(top);
   TGeoVolume *vol = gGeoManager->MakeTrd2("Trd2",med, 10,20,30,10,40);
   vol->SetLineColor(randomColor());
   vol->SetLineWidth(2);
   top->AddNode(vol,1);
   if (iaxis) {
      TGeoVolume *slice = vol->Divide("SLICE",iaxis,ndiv,start,step);
      if (!slice) return;
      slice->SetLineColor(randomColor());
   }
   gGeoManager->CloseGeometry();
   gGeoManager->SetNsegments(80);
   top->Draw();
   MakePicture();
   if (!comments) return;
   c->cd(2);
   TPaveText *pt = new TPaveText(0.01,0.01,0.99,0.99);
   pt->SetLineColor(1);
   TGeoTrd2 *trd2 = (TGeoTrd2*)(vol->GetShape());
   TText *text = pt->AddText("TGeoTrd2 - Trd2 class");
   text->SetTextColor(2);
   AddText(pt,"fDx1",trd2->GetDx1(),"half length in X at lower Z surface(-dz)");
   AddText(pt,"fDx2",trd2->GetDx2(),"half length in X at higher Z surface(+dz)");
   AddText(pt,"fDy1",trd2->GetDy1(),"half length in Y at lower Z surface(-dz)");
   AddText(pt,"fDy2",trd2->GetDy2(),"half length in Y at higher Z surface(-dz)");
   AddText(pt,"fDz",trd2->GetDz(),"half length in Z");
   if (iaxis) AddText(pt, vol->GetFinder(), iaxis);
   pt->AddText("Execute: trd2(iaxis, ndiv, start, step) to divide this.");
   pt->AddText("----- IAXIS can be only 3 (Z)");
   pt->AddText("----- NDIV must be a positive integer");
   pt->AddText("----- START must be a valid axis offset within shape range on divided axis");
   pt->AddText("----- STEP is the division step. START+NDIV*STEP must be in range also");
   pt->AddText("----- If START and STEP are omitted, all range of the axis will be divided");
   pt->AddText(" ");
   pt->SetAllWith("-----","color",2);
   pt->SetAllWith("-----","font",72);
   pt->SetAllWith("-----","size",0.04);
   pt->SetAllWith("Execute","color",4);
   pt->SetTextAlign(12);
   pt->SetTextSize(0.044);
   pt->Draw();
   c->cd(1);
//   SavePicture("trd2",c,vol,iaxis,step);
}

//______________________________________________________________________________
void trap(Int_t iaxis=0, Int_t ndiv=8, Double_t start=0, Double_t step=0)
{
   gROOT->GetListOfCanvases()->Delete();
   if (iaxis && iaxis!=3) {
      printf("Wrong division axis. Can divide only in Z (3)\n");
      return;
   }   
   TCanvas *c = new TCanvas("trap shape", "A more general trapezoid", 700,1000);
   if (comments) {
      c->Divide(1,2,0,0);
      c->cd(2);
      gPad->SetPad(0,0,1,0.4);
      c->cd(1);
      gPad->SetPad(0,0.4,1,1);
   }   
   if (gGeoManager) delete gGeoManager;
   new TGeoManager("trap", "poza10");
   TGeoMaterial *mat = new TGeoMaterial("Al", 26.98,13,2.7);
   TGeoMedium *med = new TGeoMedium("MED",1,mat);
   TGeoVolume *top = gGeoManager->MakeBox("TOP",med,100,100,100);
   gGeoManager->SetTopVolume(top);
   TGeoVolume *vol = gGeoManager->MakeTrap("Trap",med, 30,15,30,20,10,15,0,20,10,15,0);
   vol->SetLineColor(randomColor());
   vol->SetLineWidth(2);
   top->AddNode(vol,1);
   if (iaxis) {
      TGeoVolume *slice = vol->Divide("SLICE",iaxis,ndiv,start,step);
      if (!slice) return;
      slice->SetLineColor(randomColor());
   }
   gGeoManager->CloseGeometry();
   gGeoManager->SetNsegments(80);
   top->Draw();
   MakePicture();
   if (!comments) return;
   c->cd(2);
   TPaveText *pt = new TPaveText(0.01,0.01,0.99,0.99);
   pt->SetLineColor(1);
   TGeoTrap *trap = (TGeoTrap*)(vol->GetShape());
   TText *text = pt->AddText("TGeoTrap - Trapezoid class");
   text->SetTextColor(2);
   AddText(pt,"fDz",trap->GetDz(),"half length in Z");
   AddText(pt,"fTheta",trap->GetTheta(),"theta angle of trapezoid axis");
   AddText(pt,"fPhi",trap->GetPhi(),"phi angle of trapezoid axis");
   AddText(pt,"fH1",trap->GetH1(),"half length in y at -fDz");
   AddText(pt,"fAlpha1",trap->GetAlpha1(),"angle between centers of x edges and y axis at -fDz");
   AddText(pt,"fBl1",trap->GetBl1(),"half length in x at -dZ and y=-fH1");
   AddText(pt,"fTl1",trap->GetTl1(),"half length in x at -dZ and y=+fH1");
   AddText(pt,"fH2",trap->GetH2(),"half length in y at +fDz");
   AddText(pt,"fBl2",trap->GetBl2(),"half length in x at +dZ and y=-fH1");
   AddText(pt,"fTl2",trap->GetTl2(),"half length in x at +dZ and y=+fH1");
   AddText(pt,"fAlpha2",trap->GetAlpha2(),"angle between centers of x edges and y axis at +fDz");
   if (iaxis) AddText(pt, vol->GetFinder(), iaxis);
   pt->AddText("Execute: trap(iaxis, ndiv, start, step) to divide this.");
   pt->AddText("----- IAXIS can be only 3 (Z)");
   pt->AddText("----- NDIV must be a positive integer");
   pt->AddText("----- START must be a valid axis offset within shape range on divided axis");
   pt->AddText("----- STEP is the division step. START+NDIV*STEP must be in range also");
   pt->AddText("----- If START and STEP are omitted, all range of the axis will be divided");
   pt->AddText(" ");
   pt->SetAllWith("-----","color",2);
   pt->SetAllWith("-----","font",72);
   pt->SetAllWith("-----","size",0.04);
   pt->SetAllWith("Execute","color",4);
   pt->SetTextAlign(12);
   pt->SetTextSize(0.044);
   pt->Draw();
   c->cd(1);
//   SavePicture("trap",c,vol,iaxis,step);
}

//______________________________________________________________________________
void gtra(Int_t iaxis=0, Int_t ndiv=8, Double_t start=0, Double_t step=0)
{
   gROOT->GetListOfCanvases()->Delete();
   if (iaxis && iaxis!=3) {
      printf("Wrong division axis. Can divide only in Z (3)\n");
      return;
   }   
   TCanvas *c = new TCanvas("gtra shape", "A twisted trapezoid", 700,1000);
   if (comments) {
      c->Divide(1,2,0,0);
      c->cd(2);
      gPad->SetPad(0,0,1,0.4);
      c->cd(1);
      gPad->SetPad(0,0.4,1,1);
   }   
   if (gGeoManager) delete gGeoManager;
   new TGeoManager("gtra", "poza11");
   TGeoMaterial *mat = new TGeoMaterial("Al", 26.98,13,2.7);
   TGeoMedium *med = new TGeoMedium("MED",1,mat);
   TGeoVolume *top = gGeoManager->MakeBox("TOP",med,100,100,100);
   gGeoManager->SetTopVolume(top);
   TGeoVolume *vol = gGeoManager->MakeGtra("Gtra",med, 30,15,30,30,20,10,15,0,20,10,15,0);
   vol->SetLineColor(randomColor());
   vol->SetLineWidth(2);
   top->AddNode(vol,1);
   if (iaxis) {
      TGeoVolume *slice = vol->Divide("SLICE",iaxis,ndiv,start,step);
      if (!slice) return;
      slice->SetLineColor(randomColor());
   }
   gGeoManager->CloseGeometry();
   gGeoManager->SetNsegments(80);
   top->Draw();
   MakePicture();
   if (!comments) return;
   c->cd(2);
   TPaveText *pt = new TPaveText(0.01,0.01,0.99,0.99);
   pt->SetLineColor(1);
   TGeoGtra *trap = (TGeoGtra*)(vol->GetShape());
   TText *text = pt->AddText("TGeoGtra - Twisted trapezoid class");
   text->SetTextColor(2);
   AddText(pt,"fDz",trap->GetDz(),"half length in Z");
   AddText(pt,"fTheta",trap->GetTheta(),"theta angle of trapezoid axis");
   AddText(pt,"fPhi",trap->GetPhi(),"phi angle of trapezoid axis");
   AddText(pt,"fTwist",trap->GetTwistAngle(), "twist angle");
   AddText(pt,"fH1",trap->GetH1(),"half length in y at -fDz");
   AddText(pt,"fAlpha1",trap->GetAlpha1(),"angle between centers of x edges and y axis at -fDz");
   AddText(pt,"fBl1",trap->GetBl1(),"half length in x at -dZ and y=-fH1");
   AddText(pt,"fTl1",trap->GetTl1(),"half length in x at -dZ and y=+fH1");
   AddText(pt,"fH2",trap->GetH2(),"half length in y at +fDz");
   AddText(pt,"fBl2",trap->GetBl2(),"half length in x at +dZ and y=-fH1");
   AddText(pt,"fTl2",trap->GetTl2(),"half length in x at +dZ and y=+fH1");
   AddText(pt,"fAlpha2",trap->GetAlpha2(),"angle between centers of x edges and y axis at +fDz");
   if (iaxis) AddText(pt, vol->GetFinder(), iaxis);
   pt->AddText("Execute: gtra(iaxis, ndiv, start, step) to divide this.");
   pt->AddText("----- IAXIS can be only 3 (Z)");
   pt->AddText("----- NDIV must be a positive integer");
   pt->AddText("----- START must be a valid axis offset within shape range on divided axis");
   pt->AddText("----- STEP is the division step. START+NDIV*STEP must be in range also");
   pt->AddText("----- If START and STEP are omitted, all range of the axis will be divided");
   pt->AddText(" ");
   pt->SetAllWith("-----","color",2);
   pt->SetAllWith("-----","font",72);
   pt->SetAllWith("-----","size",0.04);
   pt->SetAllWith("Execute","color",4);
   pt->SetTextAlign(12);
   pt->SetTextSize(0.044);
   pt->Draw();
   c->cd(1);
//   SavePicture("gtra",c,vol,iaxis,step);
}

//______________________________________________________________________________
void xtru()
{
   gROOT->GetListOfCanvases()->Delete();
   TCanvas *c = new TCanvas("gtra shape", "A twisted trapezoid", 700,1000);
   if (comments) {
      c->Divide(1,2,0,0);
      c->cd(2);
      gPad->SetPad(0,0,1,0.4);
      c->cd(1);
      gPad->SetPad(0,0.4,1,1);
   }   
   if (gGeoManager) delete gGeoManager;
   new TGeoManager("xtru", "poza12");
   TGeoMaterial *mat = new TGeoMaterial("Al", 26.98,13,2.7);
   TGeoMedium *med = new TGeoMedium("MED",1,mat);
   TGeoVolume *top = gGeoManager->MakeBox("TOP",med,100,100,100);
   gGeoManager->SetTopVolume(top);
   TGeoVolume *vol = gGeoManager->MakeXtru("XTRU",med,4); 
   TGeoXtru *xtru = (TGeoXtru*)vol->GetShape();
   Double_t x[8] = {-30,-30,30,30,15,15,-15,-15};
   Double_t y[8] = {-30,30,30,-30,-30,15,15,-30};
   xtru->DefinePolygon(8,x,y);
   xtru->DefineSection(0,-40, -20., 10., 1.5);
   xtru->DefineSection(1, 10, 0., 0., 0.5);
   xtru->DefineSection(2, 10, 0., 0., 0.7);
   xtru->DefineSection(3, 40, 10., 20., 0.9);
   vol->SetLineColor(randomColor());
   vol->SetLineWidth(2);
   top->AddNode(vol,1);
   gGeoManager->CloseGeometry();
   gGeoManager->SetNsegments(80);
   top->Draw();
   MakePicture();
   if (!comments) return;
   c->cd(2);
   TPaveText *pt = new TPaveText(0.01,0.01,0.99,0.99);
   pt->SetLineColor(1);
   TText *text = pt->AddText("TGeoXtru - Polygonal extrusion class");
   text->SetTextColor(2);
   AddText(pt,"fNvert",xtru->GetNvert(),"number of polygone vertices");
   AddText(pt,"fNz",xtru->GetNz(),"number of Z sections");
   pt->AddText("----- Any Z section is an arbitrary polygone");
   pt->AddText("----- The shape can have an arbitrary number of Z sections, as for pcon/pgon");
   pt->AddText("----- Create with:    TGeoXtru *xtru = new TGeoXtru(nz);");
   pt->AddText("----- Define the blueprint polygon :");
   pt->AddText("-----                 Double_t x[8] = {-30,-30,30,30,15,15,-15,-15};");
   pt->AddText("-----                 Double_t y[8] = {-30,30,30,-30,-30,15,15,-30};");
   pt->AddText("-----                 xtru->DefinePolygon(8,x,y);");
   pt->AddText("----- Define translations/scales of the blueprint for Z sections :");
   pt->AddText("-----                 xtru->DefineSection(i, Zsection, x0, y0, scale);");
   pt->AddText("----- Sections have to be defined in increasing Z order");
   pt->AddText("----- 2 sections can be defined at same Z (not for first/last sections)");
   pt->AddText(" ");
   pt->SetAllWith("-----","color",2);
   pt->SetAllWith("-----","font",72);
   pt->SetAllWith("-----","size",0.04);
   pt->SetTextAlign(12);
   pt->SetTextSize(0.044);
   pt->Draw();
   c->cd(1);
}

//______________________________________________________________________________
void composite()
{
   gROOT->GetListOfCanvases()->Delete();
   TCanvas *c = new TCanvas("composite shape", "A Boolean shape composition", 700,1000);
   if (comments) {
      c->Divide(1,2,0,0);
      c->cd(2);
      gPad->SetPad(0,0,1,0.4);
      c->cd(1);
      gPad->SetPad(0,0.4,1,1);
   }   
   if (gGeoManager) delete gGeoManager;
   new TGeoManager("xtru", "poza12");
   TGeoMaterial *mat = new TGeoMaterial("Al", 26.98,13,2.7);
   TGeoMedium *med = new TGeoMedium("MED",1,mat);
   TGeoVolume *top = gGeoManager->MakeBox("TOP",med,100,100,100);
   gGeoManager->SetTopVolume(top);

   // define shape components with names
   TGeoPgon *pgon = new TGeoPgon("pg",0.,360.,6,2); 
   pgon->DefineSection(0,0,0,20);
   pgon->DefineSection(1, 30,0,20);

   TGeoSphere *sph = new TGeoSphere("sph", 40., 45.);
   // define named geometrical transformations with names
   TGeoTranslation *tr = new TGeoTranslation(0., 0., 45.);
   tr->SetName("tr");
   // register all used transformations
   tr->RegisterYourself();
   // create the composite shape based on a Boolean expression
   TGeoCompositeShape *cs = new TGeoCompositeShape("mir", "sph:tr*pg");

   TGeoVolume *vol = new TGeoVolume("COMP",cs);
   vol->SetLineColor(randomColor());
   top->AddNode(vol,1);
   gGeoManager->CloseGeometry();
   gGeoManager->SetNsegments(100);
   top->Draw();
   MakePicture();
   if (!comments) return;
   c->cd(2);
   TPaveText *pt = new TPaveText(0.01,0.01,0.99,0.99);
   pt->SetLineColor(1);
   TText *text = pt->AddText("TGeoCompositeShape - composite shape class");
   text->SetTextColor(2);
   pt->AddText("----- Define the shape components and don't forget to name them");
   pt->AddText("----- Define geometrical transformations that apply to shape components");
   pt->AddText("----- Name all transformations and register them");
   pt->AddText("----- Define the composite shape based on a Boolean expression");
   pt->AddText("                TGeoCompositeShape(\"someName\", \"expression\")");
   pt->AddText("----- Expression is made of <shapeName:transfName> components related by Boolean operators");
   pt->AddText("----- Boolean operators can be: (+) union, (-) subtraction and (*) intersection");
   pt->AddText("----- Use paranthesys in the expression to force precedence");   
   pt->AddText(" ");
   pt->SetAllWith("-----","color",4);
   pt->SetAllWith("-----","font",72);
   pt->SetAllWith("-----","size",0.04);
   pt->SetTextAlign(12);
   pt->SetTextSize(0.044);
   pt->Draw();
   c->cd(1);
}

//______________________________________________________________________________
void ideal()
{
// This is an ideal geometry. In real life, some geometry pieces are moved/rotated
// with respect to their ideal positions. This is called alignment. Alignment
// operations can be handled by TGeo starting from a CLOSED geometry (applied a posteriori)
// Alignment is handled by PHYSICAL NODES, representing an unique object in geometry.
//
// Creating physical nodes:
// 1. TGeoPhysicalNode *node = gGeoManager->MakePhysicalNode(const char *path)
//   - creates a physical node represented by path
//   - path can be : TOP_1/A_2/B_3
//   - B_3 is the 'final node' e.g. the logical node represented by this physical node
// 2. TGeoPhysicalNode *node = gGeoManager->MakePhysicalNode()
//   - creates a physical node representing the current modeller state

// Setting visualisation options for TGeoPhysicalNode *node:
// 1.   node->SetVisibility(Bool_t flag); // set node visible(*) or invisible
// 2.   node->SetIsVolAtt(Bool_t flag);   // set line attributes to match the ones of the volumes in the branch
//    - default - TRUE 
//    - when called with FALSE - the attributes defined for the physical node will be taken
//       node->SetLineColor(color);
//       node->SetLineWidth(width);
//       node->SetLineStyle(style);
// 3.   node->SetVisibleFull(Bool_t flag); // not only last node in the branch is visible (default) 
//
// Activating/desactivating physical nodes drawing - not needed in case of alignment

// Aligning physical nodes
//==========================
//      node->Align(TGeoMatrix *newmat, TGeoShape *newshape, Bool_t check=kFALSE);
//   newmat = new matrix to replace final node LOCAL matrix
//   newshape = new shape to replace final node shape
//   check = optional check if the new aligned node is overlapping
// gGeoManager->SetDrawExtraPaths(Bool_t flag)
   gROOT->GetListOfCanvases()->Delete();
   TCanvas *c = new TCanvas("composite shape", "A Boolean shape composition", 700,1000);
   if (comments) {
      c->Divide(1,2,0,0);
      c->cd(2);
      gPad->SetPad(0,0,1,0.4);
      c->cd(1);
      gPad->SetPad(0,0.4,1,1);
   }   
   gSystem->Load("libGeom");
   if (gGeoManager) delete gGeoManager;
   new TGeoManager("alignment", "Ideal geometry");
   TGeoMaterial *mat = new TGeoMaterial("Al", 26.98,13,2.7);
   TGeoMedium *med = new TGeoMedium("MED",1,mat);
   TGeoVolume *top = gGeoManager->MakeBox("TOP",med,100,100,10);
   gGeoManager->SetTopVolume(top);
   TGeoVolume *slicex = top->Divide("SX",1,10,-100,10);
   TGeoVolume *slicey = slicex->Divide("SY",2,10,-100,10);
   TGeoVolume *vol = gGeoManager->MakePgon("CELL",med,0.,360.,6,2);
   TGeoPgon *pgon = (TGeoPgon*)(vol->GetShape());
   pgon->DefineSection(0,-5,0.,2.);
   pgon->DefineSection(1,5,0.,2.);
   vol->SetLineColor(randomColor());
   slicey->AddNode(vol,1);
   gGeoManager->CloseGeometry();
   gGeoManager->SetNsegments(80);
   top->Draw();
   MakePicture();
   if (!comments) return;
   c->cd(2);
   TPaveText *pt = new TPaveText(0.01,0.01,0.99,0.99);
   pt->SetLineColor(1);
   TText *text = pt->AddText("Ideal / Aligned geometry");
   text->SetTextColor(2);
   pt->AddText("-- Create physical nodes for the objects you want to align");
   pt->AddText("-- You must start from a valid CLOSED geometry");
   pt->AddText("    TGeoPhysicalNode *node = gGeoManager->MakePhysicalNode(const char *path)");
   pt->AddText("    + creates a physical node represented by path, e.g. TOP_1/A_2/B_3");
   pt->AddText("    node->Align(TGeoMatrix *newmat, TGeoShape *newshape, Bool_t check=kFALSE)");
   pt->AddText("    + newmat = new matrix to replace final node LOCAL matrix");
   pt->AddText("    + newshape = new shape to replace final node shape");
   pt->AddText("    + check = optional check if the new aligned node is overlapping");
   pt->AddText(" ");
   pt->SetAllWith("--","color",4);
   pt->SetAllWith("--","font",72);
   pt->SetAllWith("--","size",0.04);
   pt->SetAllWith("+","color",2);
   pt->SetAllWith("+","font",72);
   pt->SetAllWith("+","size",0.04);
   pt->SetTextAlign(12);
   pt->SetTextSize(0.044);
   pt->Draw();
   c->cd(1);
}

//______________________________________________________________________________
void align()
{
   if (!gGeoManager) return;
   if (strcmp(gGeoManager->GetName(),"alignment")) {
      printf("Click: <Ideal geometry> first\n");
      return;
   }   
   char name[30];
   TObjArray *list = gGeoManager->GetListOfPhysicalNodes();
   TGeoPhysicalNode *node;
   TGeoTranslation *tr;
   for (Int_t i=1; i<=10; i++) {
      for (Int_t j=1; j<=10; j++) {
         node = 0;
         sprintf(name, "TOP_1/SX_%d/SY_%d/CELL_1",i,j);
         if (list) node = (TGeoPhysicalNode*)list->At(10*(i-1)+j-1);         
         if (!node) node = gGeoManager->MakePhysicalNode(name);
         if (node->IsAligned()) {
            tr = (TGeoTranslation*)node->GetNode()->GetMatrix();
            tr->SetTranslation(2.*gRandom->Rndm(), 2.*gRandom->Rndm(),0.);
         } else {  
            tr = new TGeoTranslation(2.*gRandom->Rndm(), 2.*gRandom->Rndm(),0.);
         }   
         node->Align(tr);
      }
   }
   if (gPad) {
      gPad->Modified();
      gPad->Update();
   }   
}

//______________________________________________________________________________
void MakePicture()
{
   TView *view = gPad->GetView();
   if (view) {
//      view->RotateView(248,66);
      if (axis) view->ShowAxis();
   }
   Bool_t is_raytracing = gGeoManager->GetGeomPainter()->IsRaytracing();
   if (is_raytracing != raytracing) {
      gGeoManager->GetGeomPainter()->SetRaytracing(raytracing);
      gPad->Modified();
      gPad->Update();
   }   
}
      
//______________________________________________________________________________
void AddText(TPaveText *pave, const char *datamember, Double_t value, const char *comment)
{
   char line[128];
   for (Int_t i=0; i<128; i++) line[i] = ' ';
   memcpy(&line[0], datamember, strlen(datamember));
   line[10] = '=';
   char number[20];
   sprintf(number, "%5.2f", value);
   memcpy(&line[12], number, strlen(number));
   line[26] = '=';
   line[27] = '>';
   sprintf(&line[30], "%s",comment);
   TText *text = pave->AddText(line);
//   text->SetTextColor(4);
   text->SetTextAlign(12);//12
}

//______________________________________________________________________________
void AddText(TPaveText *pave, const char *datamember, Int_t value, const char *comment)
{
   char line[128];
   for (Int_t i=0; i<128; i++) line[i] = ' ';
   memcpy(&line[0], datamember, strlen(datamember));
   line[10] = '=';
   char number[20];
   sprintf(number, "%5i", value);
   memcpy(&line[12], number, strlen(number));
   line[26] = '=';
   line[27] = '>';
   sprintf(&line[30], "%s",comment);
   TText *text = pave->AddText(line);
//   text->SetTextColor(4);
   text->SetTextAlign(12);
}

//______________________________________________________________________________
void AddText(TPaveText *pave, TObject *pf, Int_t iaxis)
{
   char line[128];
   TGeoPatternFinder *finder = (TGeoPatternFinder*)pf;
   if (!pave || !pf) return;
   for (Int_t i=0; i<128; i++) line[i] = ' ';
   TGeoVolume *volume = finder->GetVolume();
   TGeoShape *sh = volume->GetShape();
   sprintf(line, "Division of %s on axis %d (%s)", volume->GetName(), iaxis,sh->GetAxisName(iaxis));
   TText *text = pave->AddText(line);
   text->SetTextColor(3);
   text->SetTextAlign(12);
   AddText(pave, "fNdiv",finder->GetNdiv(),"number of divisions");
   AddText(pave, "fStart",finder->GetStart(),"start divisioning position");
   AddText(pave, "fStep",finder->GetStep(),"division step");
}

//______________________________________________________________________________
void SavePicture(const char *name, TObject *objcanvas, TObject *objvol, Double_t iaxis, Double_t step)
{
   TCanvas *c = (TCanvas*)objcanvas;
   TGeoVolume *vol = (TGeoVolume*)objvol;
   if (!c || !vol) return;
   c->cd();
   char fname[32];
   switch (iaxis) {
      case 0:
         sprintf(fname,"t_%s.gif",name);
	 break;
      default:
         if (step==0) sprintf(fname,"t_%sdiv%s.gif", name,vol->GetShape()->GetAxisName(iaxis));
         else sprintf(fname,"t_%sdivstep%s.gif", name,vol->GetShape()->GetAxisName(iaxis));
   }	 
   c->Print(fname);
}

//______________________________________________________________________________
Int_t randomColor()
{
   Double_t color = 7.*gRandom->Rndm();
   return (1+Int_t(color));
}   

//______________________________________________________________________________
void raytrace() {
   raytracing = !raytracing;
   if (!gGeoManager) return;
   TVirtualGeoPainter *painter = gGeoManager->GetGeomPainter();
   if (!painter) return;
   painter->SetRaytracing(raytracing);
   if (!gPad) return;
   gPad->Modified();
   gPad->Update();
}

//______________________________________________________________________________
void help() {
   //
  
   new TCanvas("chelp","Help to run demos",200,10,700,600);

   welcome = new TPaveText(.1,.8,.9,.97);
   welcome->AddText("Welcome to the new geometry package");
   welcome->SetTextFont(32);
   welcome->SetTextColor(4);
   welcome->SetFillColor(24);
   welcome->Draw();

   hdemo = new TPaveText(.05,.05,.95,.7);
   hdemo->SetTextAlign(12);
   hdemo->SetTextFont(52);
   hdemo->AddText("- Demo for building TGeo basic shapes and simple geometry. Shape parameters are");
   hdemo->AddText("  displayed in the right pad");
   hdemo->AddText("- Click left mouse button to execute one demo");
   hdemo->AddText("- While pointing the mouse to the pad containing the geometry, do:");
   hdemo->AddText("- .... click-and-move to rotate");
   hdemo->AddText("- .... press j/k to zoom/unzoom");
   hdemo->AddText("- .... press l/h/u/i to move the view center arround");
   hdemo->AddText("- Click Ray-trace ON/OFF to toggle ray-tracing");
   hdemo->AddText("- Use <View with x3d> from the <View> menu to get an x3d view");
   hdemo->AddText("- .... same methods to rotate/zoom/move the view");
   hdemo->AddText("- Execute box(1,8) to divide a box in 8 equal slices along X");
   hdemo->AddText("- Most shapes can be divided on X,Y,Z,Rxy or Phi :");
   hdemo->AddText("- .... root[0] <shape>(IAXIS, NDIV, START, STEP);");
   hdemo->AddText("  .... IAXIS = 1,2,3 meaning (X,Y,Z) or (Rxy, Phi, Z)");
   hdemo->AddText("  .... NDIV  = number of slices");
   hdemo->AddText("  .... START = start slicing position");
   hdemo->AddText("  .... STEP  = division step");
   hdemo->AddText("- Click Comments ON/OFF to toggle comments");
   hdemo->AddText("- Click Ideal/Align geometry to see how alignment works");
   hdemo->AddText(" ");
   hdemo->SetAllWith("....","color",2);
   hdemo->SetAllWith("....","font",72);
   hdemo->SetAllWith("....","size",0.03);

   hdemo->Draw();
}
 geodemo.C:1
 geodemo.C:2
 geodemo.C:3
 geodemo.C:4
 geodemo.C:5
 geodemo.C:6
 geodemo.C:7
 geodemo.C:8
 geodemo.C:9
 geodemo.C:10
 geodemo.C:11
 geodemo.C:12
 geodemo.C:13
 geodemo.C:14
 geodemo.C:15
 geodemo.C:16
 geodemo.C:17
 geodemo.C:18
 geodemo.C:19
 geodemo.C:20
 geodemo.C:21
 geodemo.C:22
 geodemo.C:23
 geodemo.C:24
 geodemo.C:25
 geodemo.C:26
 geodemo.C:27
 geodemo.C:28
 geodemo.C:29
 geodemo.C:30
 geodemo.C:31
 geodemo.C:32
 geodemo.C:33
 geodemo.C:34
 geodemo.C:35
 geodemo.C:36
 geodemo.C:37
 geodemo.C:38
 geodemo.C:39
 geodemo.C:40
 geodemo.C:41
 geodemo.C:42
 geodemo.C:43
 geodemo.C:44
 geodemo.C:45
 geodemo.C:46
 geodemo.C:47
 geodemo.C:48
 geodemo.C:49
 geodemo.C:50
 geodemo.C:51
 geodemo.C:52
 geodemo.C:53
 geodemo.C:54
 geodemo.C:55
 geodemo.C:56
 geodemo.C:57
 geodemo.C:58
 geodemo.C:59
 geodemo.C:60
 geodemo.C:61
 geodemo.C:62
 geodemo.C:63
 geodemo.C:64
 geodemo.C:65
 geodemo.C:66
 geodemo.C:67
 geodemo.C:68
 geodemo.C:69
 geodemo.C:70
 geodemo.C:71
 geodemo.C:72
 geodemo.C:73
 geodemo.C:74
 geodemo.C:75
 geodemo.C:76
 geodemo.C:77
 geodemo.C:78
 geodemo.C:79
 geodemo.C:80
 geodemo.C:81
 geodemo.C:82
 geodemo.C:83
 geodemo.C:84
 geodemo.C:85
 geodemo.C:86
 geodemo.C:87
 geodemo.C:88
 geodemo.C:89
 geodemo.C:90
 geodemo.C:91
 geodemo.C:92
 geodemo.C:93
 geodemo.C:94
 geodemo.C:95
 geodemo.C:96
 geodemo.C:97
 geodemo.C:98
 geodemo.C:99
 geodemo.C:100
 geodemo.C:101
 geodemo.C:102
 geodemo.C:103
 geodemo.C:104
 geodemo.C:105
 geodemo.C:106
 geodemo.C:107
 geodemo.C:108
 geodemo.C:109
 geodemo.C:110
 geodemo.C:111
 geodemo.C:112
 geodemo.C:113
 geodemo.C:114
 geodemo.C:115
 geodemo.C:116
 geodemo.C:117
 geodemo.C:118
 geodemo.C:119
 geodemo.C:120
 geodemo.C:121
 geodemo.C:122
 geodemo.C:123
 geodemo.C:124
 geodemo.C:125
 geodemo.C:126
 geodemo.C:127
 geodemo.C:128
 geodemo.C:129
 geodemo.C:130
 geodemo.C:131
 geodemo.C:132
 geodemo.C:133
 geodemo.C:134
 geodemo.C:135
 geodemo.C:136
 geodemo.C:137
 geodemo.C:138
 geodemo.C:139
 geodemo.C:140
 geodemo.C:141
 geodemo.C:142
 geodemo.C:143
 geodemo.C:144
 geodemo.C:145
 geodemo.C:146
 geodemo.C:147
 geodemo.C:148
 geodemo.C:149
 geodemo.C:150
 geodemo.C:151
 geodemo.C:152
 geodemo.C:153
 geodemo.C:154
 geodemo.C:155
 geodemo.C:156
 geodemo.C:157
 geodemo.C:158
 geodemo.C:159
 geodemo.C:160
 geodemo.C:161
 geodemo.C:162
 geodemo.C:163
 geodemo.C:164
 geodemo.C:165
 geodemo.C:166
 geodemo.C:167
 geodemo.C:168
 geodemo.C:169
 geodemo.C:170
 geodemo.C:171
 geodemo.C:172
 geodemo.C:173
 geodemo.C:174
 geodemo.C:175
 geodemo.C:176
 geodemo.C:177
 geodemo.C:178
 geodemo.C:179
 geodemo.C:180
 geodemo.C:181
 geodemo.C:182
 geodemo.C:183
 geodemo.C:184
 geodemo.C:185
 geodemo.C:186
 geodemo.C:187
 geodemo.C:188
 geodemo.C:189
 geodemo.C:190
 geodemo.C:191
 geodemo.C:192
 geodemo.C:193
 geodemo.C:194
 geodemo.C:195
 geodemo.C:196
 geodemo.C:197
 geodemo.C:198
 geodemo.C:199
 geodemo.C:200
 geodemo.C:201
 geodemo.C:202
 geodemo.C:203
 geodemo.C:204
 geodemo.C:205
 geodemo.C:206
 geodemo.C:207
 geodemo.C:208
 geodemo.C:209
 geodemo.C:210
 geodemo.C:211
 geodemo.C:212
 geodemo.C:213
 geodemo.C:214
 geodemo.C:215
 geodemo.C:216
 geodemo.C:217
 geodemo.C:218
 geodemo.C:219
 geodemo.C:220
 geodemo.C:221
 geodemo.C:222
 geodemo.C:223
 geodemo.C:224
 geodemo.C:225
 geodemo.C:226
 geodemo.C:227
 geodemo.C:228
 geodemo.C:229
 geodemo.C:230
 geodemo.C:231
 geodemo.C:232
 geodemo.C:233
 geodemo.C:234
 geodemo.C:235
 geodemo.C:236
 geodemo.C:237
 geodemo.C:238
 geodemo.C:239
 geodemo.C:240
 geodemo.C:241
 geodemo.C:242
 geodemo.C:243
 geodemo.C:244
 geodemo.C:245
 geodemo.C:246
 geodemo.C:247
 geodemo.C:248
 geodemo.C:249
 geodemo.C:250
 geodemo.C:251
 geodemo.C:252
 geodemo.C:253
 geodemo.C:254
 geodemo.C:255
 geodemo.C:256
 geodemo.C:257
 geodemo.C:258
 geodemo.C:259
 geodemo.C:260
 geodemo.C:261
 geodemo.C:262
 geodemo.C:263
 geodemo.C:264
 geodemo.C:265
 geodemo.C:266
 geodemo.C:267
 geodemo.C:268
 geodemo.C:269
 geodemo.C:270
 geodemo.C:271
 geodemo.C:272
 geodemo.C:273
 geodemo.C:274
 geodemo.C:275
 geodemo.C:276
 geodemo.C:277
 geodemo.C:278
 geodemo.C:279
 geodemo.C:280
 geodemo.C:281
 geodemo.C:282
 geodemo.C:283
 geodemo.C:284
 geodemo.C:285
 geodemo.C:286
 geodemo.C:287
 geodemo.C:288
 geodemo.C:289
 geodemo.C:290
 geodemo.C:291
 geodemo.C:292
 geodemo.C:293
 geodemo.C:294
 geodemo.C:295
 geodemo.C:296
 geodemo.C:297
 geodemo.C:298
 geodemo.C:299
 geodemo.C:300
 geodemo.C:301
 geodemo.C:302
 geodemo.C:303
 geodemo.C:304
 geodemo.C:305
 geodemo.C:306
 geodemo.C:307
 geodemo.C:308
 geodemo.C:309
 geodemo.C:310
 geodemo.C:311
 geodemo.C:312
 geodemo.C:313
 geodemo.C:314
 geodemo.C:315
 geodemo.C:316
 geodemo.C:317
 geodemo.C:318
 geodemo.C:319
 geodemo.C:320
 geodemo.C:321
 geodemo.C:322
 geodemo.C:323
 geodemo.C:324
 geodemo.C:325
 geodemo.C:326
 geodemo.C:327
 geodemo.C:328
 geodemo.C:329
 geodemo.C:330
 geodemo.C:331
 geodemo.C:332
 geodemo.C:333
 geodemo.C:334
 geodemo.C:335
 geodemo.C:336
 geodemo.C:337
 geodemo.C:338
 geodemo.C:339
 geodemo.C:340
 geodemo.C:341
 geodemo.C:342
 geodemo.C:343
 geodemo.C:344
 geodemo.C:345
 geodemo.C:346
 geodemo.C:347
 geodemo.C:348
 geodemo.C:349
 geodemo.C:350
 geodemo.C:351
 geodemo.C:352
 geodemo.C:353
 geodemo.C:354
 geodemo.C:355
 geodemo.C:356
 geodemo.C:357
 geodemo.C:358
 geodemo.C:359
 geodemo.C:360
 geodemo.C:361
 geodemo.C:362
 geodemo.C:363
 geodemo.C:364
 geodemo.C:365
 geodemo.C:366
 geodemo.C:367
 geodemo.C:368
 geodemo.C:369
 geodemo.C:370
 geodemo.C:371
 geodemo.C:372
 geodemo.C:373
 geodemo.C:374
 geodemo.C:375
 geodemo.C:376
 geodemo.C:377
 geodemo.C:378
 geodemo.C:379
 geodemo.C:380
 geodemo.C:381
 geodemo.C:382
 geodemo.C:383
 geodemo.C:384
 geodemo.C:385
 geodemo.C:386
 geodemo.C:387
 geodemo.C:388
 geodemo.C:389
 geodemo.C:390
 geodemo.C:391
 geodemo.C:392
 geodemo.C:393
 geodemo.C:394
 geodemo.C:395
 geodemo.C:396
 geodemo.C:397
 geodemo.C:398
 geodemo.C:399
 geodemo.C:400
 geodemo.C:401
 geodemo.C:402
 geodemo.C:403
 geodemo.C:404
 geodemo.C:405
 geodemo.C:406
 geodemo.C:407
 geodemo.C:408
 geodemo.C:409
 geodemo.C:410
 geodemo.C:411
 geodemo.C:412
 geodemo.C:413
 geodemo.C:414
 geodemo.C:415
 geodemo.C:416
 geodemo.C:417
 geodemo.C:418
 geodemo.C:419
 geodemo.C:420
 geodemo.C:421
 geodemo.C:422
 geodemo.C:423
 geodemo.C:424
 geodemo.C:425
 geodemo.C:426
 geodemo.C:427
 geodemo.C:428
 geodemo.C:429
 geodemo.C:430
 geodemo.C:431
 geodemo.C:432
 geodemo.C:433
 geodemo.C:434
 geodemo.C:435
 geodemo.C:436
 geodemo.C:437
 geodemo.C:438
 geodemo.C:439
 geodemo.C:440
 geodemo.C:441
 geodemo.C:442
 geodemo.C:443
 geodemo.C:444
 geodemo.C:445
 geodemo.C:446
 geodemo.C:447
 geodemo.C:448
 geodemo.C:449
 geodemo.C:450
 geodemo.C:451
 geodemo.C:452
 geodemo.C:453
 geodemo.C:454
 geodemo.C:455
 geodemo.C:456
 geodemo.C:457
 geodemo.C:458
 geodemo.C:459
 geodemo.C:460
 geodemo.C:461
 geodemo.C:462
 geodemo.C:463
 geodemo.C:464
 geodemo.C:465
 geodemo.C:466
 geodemo.C:467
 geodemo.C:468
 geodemo.C:469
 geodemo.C:470
 geodemo.C:471
 geodemo.C:472
 geodemo.C:473
 geodemo.C:474
 geodemo.C:475
 geodemo.C:476
 geodemo.C:477
 geodemo.C:478
 geodemo.C:479
 geodemo.C:480
 geodemo.C:481
 geodemo.C:482
 geodemo.C:483
 geodemo.C:484
 geodemo.C:485
 geodemo.C:486
 geodemo.C:487
 geodemo.C:488
 geodemo.C:489
 geodemo.C:490
 geodemo.C:491
 geodemo.C:492
 geodemo.C:493
 geodemo.C:494
 geodemo.C:495
 geodemo.C:496
 geodemo.C:497
 geodemo.C:498
 geodemo.C:499
 geodemo.C:500
 geodemo.C:501
 geodemo.C:502
 geodemo.C:503
 geodemo.C:504
 geodemo.C:505
 geodemo.C:506
 geodemo.C:507
 geodemo.C:508
 geodemo.C:509
 geodemo.C:510
 geodemo.C:511
 geodemo.C:512
 geodemo.C:513
 geodemo.C:514
 geodemo.C:515
 geodemo.C:516
 geodemo.C:517
 geodemo.C:518
 geodemo.C:519
 geodemo.C:520
 geodemo.C:521
 geodemo.C:522
 geodemo.C:523
 geodemo.C:524
 geodemo.C:525
 geodemo.C:526
 geodemo.C:527
 geodemo.C:528
 geodemo.C:529
 geodemo.C:530
 geodemo.C:531
 geodemo.C:532
 geodemo.C:533
 geodemo.C:534
 geodemo.C:535
 geodemo.C:536
 geodemo.C:537
 geodemo.C:538
 geodemo.C:539
 geodemo.C:540
 geodemo.C:541
 geodemo.C:542
 geodemo.C:543
 geodemo.C:544
 geodemo.C:545
 geodemo.C:546
 geodemo.C:547
 geodemo.C:548
 geodemo.C:549
 geodemo.C:550
 geodemo.C:551
 geodemo.C:552
 geodemo.C:553
 geodemo.C:554
 geodemo.C:555
 geodemo.C:556
 geodemo.C:557
 geodemo.C:558
 geodemo.C:559
 geodemo.C:560
 geodemo.C:561
 geodemo.C:562
 geodemo.C:563
 geodemo.C:564
 geodemo.C:565
 geodemo.C:566
 geodemo.C:567
 geodemo.C:568
 geodemo.C:569
 geodemo.C:570
 geodemo.C:571
 geodemo.C:572
 geodemo.C:573
 geodemo.C:574
 geodemo.C:575
 geodemo.C:576
 geodemo.C:577
 geodemo.C:578
 geodemo.C:579
 geodemo.C:580
 geodemo.C:581
 geodemo.C:582
 geodemo.C:583
 geodemo.C:584
 geodemo.C:585
 geodemo.C:586
 geodemo.C:587
 geodemo.C:588
 geodemo.C:589
 geodemo.C:590
 geodemo.C:591
 geodemo.C:592
 geodemo.C:593
 geodemo.C:594
 geodemo.C:595
 geodemo.C:596
 geodemo.C:597
 geodemo.C:598
 geodemo.C:599
 geodemo.C:600
 geodemo.C:601
 geodemo.C:602
 geodemo.C:603
 geodemo.C:604
 geodemo.C:605
 geodemo.C:606
 geodemo.C:607
 geodemo.C:608
 geodemo.C:609
 geodemo.C:610
 geodemo.C:611
 geodemo.C:612
 geodemo.C:613
 geodemo.C:614
 geodemo.C:615
 geodemo.C:616
 geodemo.C:617
 geodemo.C:618
 geodemo.C:619
 geodemo.C:620
 geodemo.C:621
 geodemo.C:622
 geodemo.C:623
 geodemo.C:624
 geodemo.C:625
 geodemo.C:626
 geodemo.C:627
 geodemo.C:628
 geodemo.C:629
 geodemo.C:630
 geodemo.C:631
 geodemo.C:632
 geodemo.C:633
 geodemo.C:634
 geodemo.C:635
 geodemo.C:636
 geodemo.C:637
 geodemo.C:638
 geodemo.C:639
 geodemo.C:640
 geodemo.C:641
 geodemo.C:642
 geodemo.C:643
 geodemo.C:644
 geodemo.C:645
 geodemo.C:646
 geodemo.C:647
 geodemo.C:648
 geodemo.C:649
 geodemo.C:650
 geodemo.C:651
 geodemo.C:652
 geodemo.C:653
 geodemo.C:654
 geodemo.C:655
 geodemo.C:656
 geodemo.C:657
 geodemo.C:658
 geodemo.C:659
 geodemo.C:660
 geodemo.C:661
 geodemo.C:662
 geodemo.C:663
 geodemo.C:664
 geodemo.C:665
 geodemo.C:666
 geodemo.C:667
 geodemo.C:668
 geodemo.C:669
 geodemo.C:670
 geodemo.C:671
 geodemo.C:672
 geodemo.C:673
 geodemo.C:674
 geodemo.C:675
 geodemo.C:676
 geodemo.C:677
 geodemo.C:678
 geodemo.C:679
 geodemo.C:680
 geodemo.C:681
 geodemo.C:682
 geodemo.C:683
 geodemo.C:684
 geodemo.C:685
 geodemo.C:686
 geodemo.C:687
 geodemo.C:688
 geodemo.C:689
 geodemo.C:690
 geodemo.C:691
 geodemo.C:692
 geodemo.C:693
 geodemo.C:694
 geodemo.C:695
 geodemo.C:696
 geodemo.C:697
 geodemo.C:698
 geodemo.C:699
 geodemo.C:700
 geodemo.C:701
 geodemo.C:702
 geodemo.C:703
 geodemo.C:704
 geodemo.C:705
 geodemo.C:706
 geodemo.C:707
 geodemo.C:708
 geodemo.C:709
 geodemo.C:710
 geodemo.C:711
 geodemo.C:712
 geodemo.C:713
 geodemo.C:714
 geodemo.C:715
 geodemo.C:716
 geodemo.C:717
 geodemo.C:718
 geodemo.C:719
 geodemo.C:720
 geodemo.C:721
 geodemo.C:722
 geodemo.C:723
 geodemo.C:724
 geodemo.C:725
 geodemo.C:726
 geodemo.C:727
 geodemo.C:728
 geodemo.C:729
 geodemo.C:730
 geodemo.C:731
 geodemo.C:732
 geodemo.C:733
 geodemo.C:734
 geodemo.C:735
 geodemo.C:736
 geodemo.C:737
 geodemo.C:738
 geodemo.C:739
 geodemo.C:740
 geodemo.C:741
 geodemo.C:742
 geodemo.C:743
 geodemo.C:744
 geodemo.C:745
 geodemo.C:746
 geodemo.C:747
 geodemo.C:748
 geodemo.C:749
 geodemo.C:750
 geodemo.C:751
 geodemo.C:752
 geodemo.C:753
 geodemo.C:754
 geodemo.C:755
 geodemo.C:756
 geodemo.C:757
 geodemo.C:758
 geodemo.C:759
 geodemo.C:760
 geodemo.C:761
 geodemo.C:762
 geodemo.C:763
 geodemo.C:764
 geodemo.C:765
 geodemo.C:766
 geodemo.C:767
 geodemo.C:768
 geodemo.C:769
 geodemo.C:770
 geodemo.C:771
 geodemo.C:772
 geodemo.C:773
 geodemo.C:774
 geodemo.C:775
 geodemo.C:776
 geodemo.C:777
 geodemo.C:778
 geodemo.C:779
 geodemo.C:780
 geodemo.C:781
 geodemo.C:782
 geodemo.C:783
 geodemo.C:784
 geodemo.C:785
 geodemo.C:786
 geodemo.C:787
 geodemo.C:788
 geodemo.C:789
 geodemo.C:790
 geodemo.C:791
 geodemo.C:792
 geodemo.C:793
 geodemo.C:794
 geodemo.C:795
 geodemo.C:796
 geodemo.C:797
 geodemo.C:798
 geodemo.C:799
 geodemo.C:800
 geodemo.C:801
 geodemo.C:802
 geodemo.C:803
 geodemo.C:804
 geodemo.C:805
 geodemo.C:806
 geodemo.C:807
 geodemo.C:808
 geodemo.C:809
 geodemo.C:810
 geodemo.C:811
 geodemo.C:812
 geodemo.C:813
 geodemo.C:814
 geodemo.C:815
 geodemo.C:816
 geodemo.C:817
 geodemo.C:818
 geodemo.C:819
 geodemo.C:820
 geodemo.C:821
 geodemo.C:822
 geodemo.C:823
 geodemo.C:824
 geodemo.C:825
 geodemo.C:826
 geodemo.C:827
 geodemo.C:828
 geodemo.C:829
 geodemo.C:830
 geodemo.C:831
 geodemo.C:832
 geodemo.C:833
 geodemo.C:834
 geodemo.C:835
 geodemo.C:836
 geodemo.C:837
 geodemo.C:838
 geodemo.C:839
 geodemo.C:840
 geodemo.C:841
 geodemo.C:842
 geodemo.C:843
 geodemo.C:844
 geodemo.C:845
 geodemo.C:846
 geodemo.C:847
 geodemo.C:848
 geodemo.C:849
 geodemo.C:850
 geodemo.C:851
 geodemo.C:852
 geodemo.C:853
 geodemo.C:854
 geodemo.C:855
 geodemo.C:856
 geodemo.C:857
 geodemo.C:858
 geodemo.C:859
 geodemo.C:860
 geodemo.C:861
 geodemo.C:862
 geodemo.C:863
 geodemo.C:864
 geodemo.C:865
 geodemo.C:866
 geodemo.C:867
 geodemo.C:868
 geodemo.C:869
 geodemo.C:870
 geodemo.C:871
 geodemo.C:872
 geodemo.C:873
 geodemo.C:874
 geodemo.C:875
 geodemo.C:876
 geodemo.C:877
 geodemo.C:878
 geodemo.C:879
 geodemo.C:880
 geodemo.C:881
 geodemo.C:882
 geodemo.C:883
 geodemo.C:884
 geodemo.C:885
 geodemo.C:886
 geodemo.C:887
 geodemo.C:888
 geodemo.C:889
 geodemo.C:890
 geodemo.C:891
 geodemo.C:892
 geodemo.C:893
 geodemo.C:894
 geodemo.C:895
 geodemo.C:896
 geodemo.C:897
 geodemo.C:898
 geodemo.C:899
 geodemo.C:900
 geodemo.C:901
 geodemo.C:902
 geodemo.C:903
 geodemo.C:904
 geodemo.C:905
 geodemo.C:906
 geodemo.C:907
 geodemo.C:908
 geodemo.C:909
 geodemo.C:910
 geodemo.C:911
 geodemo.C:912
 geodemo.C:913
 geodemo.C:914
 geodemo.C:915
 geodemo.C:916
 geodemo.C:917
 geodemo.C:918
 geodemo.C:919
 geodemo.C:920
 geodemo.C:921
 geodemo.C:922
 geodemo.C:923
 geodemo.C:924
 geodemo.C:925
 geodemo.C:926
 geodemo.C:927
 geodemo.C:928
 geodemo.C:929
 geodemo.C:930
 geodemo.C:931
 geodemo.C:932
 geodemo.C:933
 geodemo.C:934
 geodemo.C:935
 geodemo.C:936
 geodemo.C:937
 geodemo.C:938
 geodemo.C:939
 geodemo.C:940
 geodemo.C:941
 geodemo.C:942
 geodemo.C:943
 geodemo.C:944
 geodemo.C:945
 geodemo.C:946
 geodemo.C:947
 geodemo.C:948
 geodemo.C:949
 geodemo.C:950
 geodemo.C:951
 geodemo.C:952
 geodemo.C:953
 geodemo.C:954
 geodemo.C:955
 geodemo.C:956
 geodemo.C:957
 geodemo.C:958
 geodemo.C:959
 geodemo.C:960
 geodemo.C:961
 geodemo.C:962
 geodemo.C:963
 geodemo.C:964
 geodemo.C:965
 geodemo.C:966
 geodemo.C:967
 geodemo.C:968
 geodemo.C:969
 geodemo.C:970
 geodemo.C:971
 geodemo.C:972
 geodemo.C:973
 geodemo.C:974
 geodemo.C:975
 geodemo.C:976
 geodemo.C:977
 geodemo.C:978
 geodemo.C:979
 geodemo.C:980
 geodemo.C:981
 geodemo.C:982
 geodemo.C:983
 geodemo.C:984
 geodemo.C:985
 geodemo.C:986
 geodemo.C:987
 geodemo.C:988
 geodemo.C:989
 geodemo.C:990
 geodemo.C:991
 geodemo.C:992
 geodemo.C:993
 geodemo.C:994
 geodemo.C:995
 geodemo.C:996
 geodemo.C:997
 geodemo.C:998
 geodemo.C:999
 geodemo.C:1000
 geodemo.C:1001
 geodemo.C:1002
 geodemo.C:1003
 geodemo.C:1004
 geodemo.C:1005
 geodemo.C:1006
 geodemo.C:1007
 geodemo.C:1008
 geodemo.C:1009
 geodemo.C:1010
 geodemo.C:1011
 geodemo.C:1012
 geodemo.C:1013
 geodemo.C:1014
 geodemo.C:1015
 geodemo.C:1016
 geodemo.C:1017
 geodemo.C:1018
 geodemo.C:1019
 geodemo.C:1020
 geodemo.C:1021
 geodemo.C:1022
 geodemo.C:1023
 geodemo.C:1024
 geodemo.C:1025
 geodemo.C:1026
 geodemo.C:1027
 geodemo.C:1028
 geodemo.C:1029
 geodemo.C:1030
 geodemo.C:1031
 geodemo.C:1032
 geodemo.C:1033
 geodemo.C:1034
 geodemo.C:1035
 geodemo.C:1036
 geodemo.C:1037
 geodemo.C:1038
 geodemo.C:1039
 geodemo.C:1040
 geodemo.C:1041
 geodemo.C:1042
 geodemo.C:1043
 geodemo.C:1044
 geodemo.C:1045
 geodemo.C:1046
 geodemo.C:1047
 geodemo.C:1048
 geodemo.C:1049
 geodemo.C:1050
 geodemo.C:1051
 geodemo.C:1052
 geodemo.C:1053
 geodemo.C:1054
 geodemo.C:1055
 geodemo.C:1056
 geodemo.C:1057
 geodemo.C:1058
 geodemo.C:1059
 geodemo.C:1060
 geodemo.C:1061
 geodemo.C:1062
 geodemo.C:1063
 geodemo.C:1064
 geodemo.C:1065
 geodemo.C:1066
 geodemo.C:1067
 geodemo.C:1068
 geodemo.C:1069
 geodemo.C:1070
 geodemo.C:1071
 geodemo.C:1072
 geodemo.C:1073
 geodemo.C:1074
 geodemo.C:1075
 geodemo.C:1076
 geodemo.C:1077
 geodemo.C:1078
 geodemo.C:1079
 geodemo.C:1080
 geodemo.C:1081
 geodemo.C:1082
 geodemo.C:1083
 geodemo.C:1084
 geodemo.C:1085
 geodemo.C:1086
 geodemo.C:1087
 geodemo.C:1088
 geodemo.C:1089
 geodemo.C:1090
 geodemo.C:1091
 geodemo.C:1092
 geodemo.C:1093
 geodemo.C:1094
 geodemo.C:1095
 geodemo.C:1096
 geodemo.C:1097
 geodemo.C:1098
 geodemo.C:1099
 geodemo.C:1100
 geodemo.C:1101
 geodemo.C:1102
 geodemo.C:1103
 geodemo.C:1104
 geodemo.C:1105
 geodemo.C:1106
 geodemo.C:1107
 geodemo.C:1108
 geodemo.C:1109
 geodemo.C:1110
 geodemo.C:1111
 geodemo.C:1112
 geodemo.C:1113
 geodemo.C:1114
 geodemo.C:1115
 geodemo.C:1116
 geodemo.C:1117
 geodemo.C:1118
 geodemo.C:1119
 geodemo.C:1120
 geodemo.C:1121
 geodemo.C:1122
 geodemo.C:1123
 geodemo.C:1124
 geodemo.C:1125
 geodemo.C:1126
 geodemo.C:1127
 geodemo.C:1128
 geodemo.C:1129
 geodemo.C:1130
 geodemo.C:1131
 geodemo.C:1132
 geodemo.C:1133
 geodemo.C:1134
 geodemo.C:1135
 geodemo.C:1136
 geodemo.C:1137
 geodemo.C:1138
 geodemo.C:1139
 geodemo.C:1140
 geodemo.C:1141
 geodemo.C:1142
 geodemo.C:1143
 geodemo.C:1144
 geodemo.C:1145
 geodemo.C:1146
 geodemo.C:1147
 geodemo.C:1148
 geodemo.C:1149
 geodemo.C:1150
 geodemo.C:1151
 geodemo.C:1152
 geodemo.C:1153
 geodemo.C:1154
 geodemo.C:1155
 geodemo.C:1156
 geodemo.C:1157
 geodemo.C:1158
 geodemo.C:1159
 geodemo.C:1160
 geodemo.C:1161
 geodemo.C:1162
 geodemo.C:1163
 geodemo.C:1164
 geodemo.C:1165
 geodemo.C:1166
 geodemo.C:1167
 geodemo.C:1168
 geodemo.C:1169
 geodemo.C:1170
 geodemo.C:1171
 geodemo.C:1172
 geodemo.C:1173
 geodemo.C:1174
 geodemo.C:1175
 geodemo.C:1176
 geodemo.C:1177
 geodemo.C:1178
 geodemo.C:1179
 geodemo.C:1180
 geodemo.C:1181
 geodemo.C:1182
 geodemo.C:1183
 geodemo.C:1184
 geodemo.C:1185
 geodemo.C:1186
 geodemo.C:1187
 geodemo.C:1188
 geodemo.C:1189
 geodemo.C:1190
 geodemo.C:1191
 geodemo.C:1192
 geodemo.C:1193
 geodemo.C:1194
 geodemo.C:1195
 geodemo.C:1196
 geodemo.C:1197
 geodemo.C:1198
 geodemo.C:1199
 geodemo.C:1200
 geodemo.C:1201
 geodemo.C:1202
 geodemo.C:1203
 geodemo.C:1204
 geodemo.C:1205
 geodemo.C:1206
 geodemo.C:1207
 geodemo.C:1208
 geodemo.C:1209
 geodemo.C:1210
 geodemo.C:1211
 geodemo.C:1212
 geodemo.C:1213
 geodemo.C:1214
 geodemo.C:1215
 geodemo.C:1216
 geodemo.C:1217
 geodemo.C:1218
 geodemo.C:1219
 geodemo.C:1220
 geodemo.C:1221
 geodemo.C:1222
 geodemo.C:1223
 geodemo.C:1224
 geodemo.C:1225
 geodemo.C:1226
 geodemo.C:1227
 geodemo.C:1228
 geodemo.C:1229
 geodemo.C:1230
 geodemo.C:1231
 geodemo.C:1232
 geodemo.C:1233
 geodemo.C:1234
 geodemo.C:1235
 geodemo.C:1236
 geodemo.C:1237
 geodemo.C:1238
 geodemo.C:1239
 geodemo.C:1240
 geodemo.C:1241
 geodemo.C:1242
 geodemo.C:1243
 geodemo.C:1244
 geodemo.C:1245
 geodemo.C:1246
 geodemo.C:1247
 geodemo.C:1248
 geodemo.C:1249
 geodemo.C:1250
 geodemo.C:1251
 geodemo.C:1252
 geodemo.C:1253
 geodemo.C:1254
 geodemo.C:1255
 geodemo.C:1256
 geodemo.C:1257
 geodemo.C:1258
 geodemo.C:1259
 geodemo.C:1260
 geodemo.C:1261
 geodemo.C:1262
 geodemo.C:1263
 geodemo.C:1264
 geodemo.C:1265
 geodemo.C:1266
 geodemo.C:1267
 geodemo.C:1268
 geodemo.C:1269
 geodemo.C:1270
 geodemo.C:1271
 geodemo.C:1272
 geodemo.C:1273
 geodemo.C:1274
 geodemo.C:1275
 geodemo.C:1276
 geodemo.C:1277
 geodemo.C:1278
 geodemo.C:1279
 geodemo.C:1280
 geodemo.C:1281
 geodemo.C:1282
 geodemo.C:1283
 geodemo.C:1284
 geodemo.C:1285
 geodemo.C:1286
 geodemo.C:1287
 geodemo.C:1288
 geodemo.C:1289
 geodemo.C:1290
 geodemo.C:1291
 geodemo.C:1292
 geodemo.C:1293
 geodemo.C:1294
 geodemo.C:1295
 geodemo.C:1296
 geodemo.C:1297
 geodemo.C:1298
 geodemo.C:1299
 geodemo.C:1300
 geodemo.C:1301
 geodemo.C:1302
 geodemo.C:1303
 geodemo.C:1304
 geodemo.C:1305
 geodemo.C:1306
 geodemo.C:1307
 geodemo.C:1308
 geodemo.C:1309
 geodemo.C:1310
 geodemo.C:1311
 geodemo.C:1312
 geodemo.C:1313
 geodemo.C:1314
 geodemo.C:1315
 geodemo.C:1316
 geodemo.C:1317
 geodemo.C:1318
 geodemo.C:1319
 geodemo.C:1320
 geodemo.C:1321
 geodemo.C:1322
 geodemo.C:1323
 geodemo.C:1324
 geodemo.C:1325
 geodemo.C:1326
 geodemo.C:1327
 geodemo.C:1328
 geodemo.C:1329
 geodemo.C:1330
 geodemo.C:1331
 geodemo.C:1332
 geodemo.C:1333
 geodemo.C:1334
 geodemo.C:1335
 geodemo.C:1336
 geodemo.C:1337
 geodemo.C:1338
 geodemo.C:1339
 geodemo.C:1340
 geodemo.C:1341
 geodemo.C:1342
 geodemo.C:1343
 geodemo.C:1344
 geodemo.C:1345
 geodemo.C:1346
 geodemo.C:1347
 geodemo.C:1348
 geodemo.C:1349
 geodemo.C:1350
 geodemo.C:1351
 geodemo.C:1352
 geodemo.C:1353
 geodemo.C:1354
 geodemo.C:1355
 geodemo.C:1356
 geodemo.C:1357
 geodemo.C:1358
 geodemo.C:1359
 geodemo.C:1360
 geodemo.C:1361
 geodemo.C:1362
 geodemo.C:1363
 geodemo.C:1364
 geodemo.C:1365
 geodemo.C:1366
 geodemo.C:1367
 geodemo.C:1368
 geodemo.C:1369
 geodemo.C:1370
 geodemo.C:1371
 geodemo.C:1372
 geodemo.C:1373
 geodemo.C:1374
 geodemo.C:1375
 geodemo.C:1376
 geodemo.C:1377
 geodemo.C:1378
 geodemo.C:1379
 geodemo.C:1380
 geodemo.C:1381
 geodemo.C:1382
 geodemo.C:1383
 geodemo.C:1384
 geodemo.C:1385
 geodemo.C:1386
 geodemo.C:1387
 geodemo.C:1388
 geodemo.C:1389
 geodemo.C:1390
 geodemo.C:1391
 geodemo.C:1392
 geodemo.C:1393
 geodemo.C:1394
 geodemo.C:1395
 geodemo.C:1396
 geodemo.C:1397
 geodemo.C:1398
 geodemo.C:1399
 geodemo.C:1400
 geodemo.C:1401
 geodemo.C:1402
 geodemo.C:1403
 geodemo.C:1404
 geodemo.C:1405
 geodemo.C:1406
 geodemo.C:1407
 geodemo.C:1408
 geodemo.C:1409
 geodemo.C:1410
 geodemo.C:1411
 geodemo.C:1412
 geodemo.C:1413
 geodemo.C:1414
 geodemo.C:1415
 geodemo.C:1416
 geodemo.C:1417
 geodemo.C:1418
 geodemo.C:1419
 geodemo.C:1420
 geodemo.C:1421
 geodemo.C:1422
 geodemo.C:1423
 geodemo.C:1424
 geodemo.C:1425
 geodemo.C:1426
 geodemo.C:1427
 geodemo.C:1428
 geodemo.C:1429
 geodemo.C:1430
 geodemo.C:1431
 geodemo.C:1432
 geodemo.C:1433
 geodemo.C:1434
 geodemo.C:1435
 geodemo.C:1436
 geodemo.C:1437
 geodemo.C:1438
 geodemo.C:1439
 geodemo.C:1440
 geodemo.C:1441
 geodemo.C:1442
 geodemo.C:1443
 geodemo.C:1444
 geodemo.C:1445
 geodemo.C:1446
 geodemo.C:1447
 geodemo.C:1448
 geodemo.C:1449
 geodemo.C:1450
 geodemo.C:1451
 geodemo.C:1452
 geodemo.C:1453
 geodemo.C:1454
 geodemo.C:1455
 geodemo.C:1456
 geodemo.C:1457
 geodemo.C:1458
 geodemo.C:1459
 geodemo.C:1460
 geodemo.C:1461
 geodemo.C:1462
 geodemo.C:1463
 geodemo.C:1464
 geodemo.C:1465
 geodemo.C:1466
 geodemo.C:1467
 geodemo.C:1468
 geodemo.C:1469
 geodemo.C:1470
 geodemo.C:1471
 geodemo.C:1472
 geodemo.C:1473
 geodemo.C:1474
 geodemo.C:1475
 geodemo.C:1476
 geodemo.C:1477
 geodemo.C:1478
 geodemo.C:1479
 geodemo.C:1480
 geodemo.C:1481
 geodemo.C:1482
 geodemo.C:1483
 geodemo.C:1484
 geodemo.C:1485
 geodemo.C:1486
 geodemo.C:1487
 geodemo.C:1488
 geodemo.C:1489
 geodemo.C:1490
 geodemo.C:1491
 geodemo.C:1492
 geodemo.C:1493
 geodemo.C:1494
 geodemo.C:1495
 geodemo.C:1496
 geodemo.C:1497
 geodemo.C:1498
 geodemo.C:1499
 geodemo.C:1500
 geodemo.C:1501
 geodemo.C:1502
 geodemo.C:1503
 geodemo.C:1504
 geodemo.C:1505
 geodemo.C:1506
 geodemo.C:1507
 geodemo.C:1508
 geodemo.C:1509
 geodemo.C:1510
 geodemo.C:1511
 geodemo.C:1512
 geodemo.C:1513
 geodemo.C:1514
 geodemo.C:1515
 geodemo.C:1516
 geodemo.C:1517
 geodemo.C:1518
 geodemo.C:1519
 geodemo.C:1520
 geodemo.C:1521
 geodemo.C:1522
 geodemo.C:1523
 geodemo.C:1524
 geodemo.C:1525
 geodemo.C:1526
 geodemo.C:1527
 geodemo.C:1528
 geodemo.C:1529
 geodemo.C:1530
 geodemo.C:1531
 geodemo.C:1532
 geodemo.C:1533
 geodemo.C:1534
 geodemo.C:1535
 geodemo.C:1536
 geodemo.C:1537
 geodemo.C:1538
 geodemo.C:1539
 geodemo.C:1540
 geodemo.C:1541
 geodemo.C:1542
 geodemo.C:1543
 geodemo.C:1544
 geodemo.C:1545
 geodemo.C:1546
 geodemo.C:1547
 geodemo.C:1548
 geodemo.C:1549
 geodemo.C:1550
 geodemo.C:1551
 geodemo.C:1552
 geodemo.C:1553
 geodemo.C:1554
 geodemo.C:1555
 geodemo.C:1556
 geodemo.C:1557
 geodemo.C:1558
 geodemo.C:1559
 geodemo.C:1560
 geodemo.C:1561
 geodemo.C:1562
 geodemo.C:1563
 geodemo.C:1564
 geodemo.C:1565
 geodemo.C:1566
 geodemo.C:1567
 geodemo.C:1568
 geodemo.C:1569
 geodemo.C:1570
 geodemo.C:1571
 geodemo.C:1572
 geodemo.C:1573
 geodemo.C:1574
 geodemo.C:1575
 geodemo.C:1576
 geodemo.C:1577
 geodemo.C:1578
 geodemo.C:1579
 geodemo.C:1580
 geodemo.C:1581
 geodemo.C:1582
 geodemo.C:1583
 geodemo.C:1584
 geodemo.C:1585
 geodemo.C:1586
 geodemo.C:1587
 geodemo.C:1588
 geodemo.C:1589
 geodemo.C:1590
 geodemo.C:1591
 geodemo.C:1592
 geodemo.C:1593
 geodemo.C:1594
 geodemo.C:1595
 geodemo.C:1596
 geodemo.C:1597
 geodemo.C:1598
 geodemo.C:1599
 geodemo.C:1600
 geodemo.C:1601
 geodemo.C:1602
 geodemo.C:1603
 geodemo.C:1604
 geodemo.C:1605
 geodemo.C:1606
 geodemo.C:1607
 geodemo.C:1608
 geodemo.C:1609
 geodemo.C:1610
 geodemo.C:1611
 geodemo.C:1612
 geodemo.C:1613
 geodemo.C:1614
 geodemo.C:1615
 geodemo.C:1616
 geodemo.C:1617
 geodemo.C:1618
 geodemo.C:1619
 geodemo.C:1620
 geodemo.C:1621
 geodemo.C:1622
 geodemo.C:1623
 geodemo.C:1624
 geodemo.C:1625
 geodemo.C:1626
 geodemo.C:1627
 geodemo.C:1628
 geodemo.C:1629
 geodemo.C:1630
 geodemo.C:1631
 geodemo.C:1632
 geodemo.C:1633
 geodemo.C:1634
 geodemo.C:1635
 geodemo.C:1636
 geodemo.C:1637
 geodemo.C:1638
 geodemo.C:1639
 geodemo.C:1640
 geodemo.C:1641
 geodemo.C:1642
 geodemo.C:1643
 geodemo.C:1644
 geodemo.C:1645
 geodemo.C:1646
 geodemo.C:1647
 geodemo.C:1648
 geodemo.C:1649
 geodemo.C:1650
 geodemo.C:1651
 geodemo.C:1652
 geodemo.C:1653
 geodemo.C:1654
 geodemo.C:1655
 geodemo.C:1656
 geodemo.C:1657
 geodemo.C:1658
 geodemo.C:1659
 geodemo.C:1660
 geodemo.C:1661
 geodemo.C:1662
 geodemo.C:1663
 geodemo.C:1664
 geodemo.C:1665
 geodemo.C:1666
 geodemo.C:1667
 geodemo.C:1668
 geodemo.C:1669
 geodemo.C:1670
 geodemo.C:1671
 geodemo.C:1672
 geodemo.C:1673
 geodemo.C:1674
 geodemo.C:1675
 geodemo.C:1676
 geodemo.C:1677
 geodemo.C:1678
 geodemo.C:1679
 geodemo.C:1680
 geodemo.C:1681
 geodemo.C:1682
 geodemo.C:1683
 geodemo.C:1684
 geodemo.C:1685
 geodemo.C:1686
 geodemo.C:1687
 geodemo.C:1688
 geodemo.C:1689
 geodemo.C:1690
 geodemo.C:1691
 geodemo.C:1692
 geodemo.C:1693
 geodemo.C:1694
 geodemo.C:1695
 geodemo.C:1696
 geodemo.C:1697
 geodemo.C:1698
 geodemo.C:1699
 geodemo.C:1700
 geodemo.C:1701
 geodemo.C:1702
 geodemo.C:1703
 geodemo.C:1704
 geodemo.C:1705
 geodemo.C:1706
 geodemo.C:1707
 geodemo.C:1708
 geodemo.C:1709
 geodemo.C:1710
 geodemo.C:1711
 geodemo.C:1712
 geodemo.C:1713
 geodemo.C:1714
 geodemo.C:1715
 geodemo.C:1716
 geodemo.C:1717
 geodemo.C:1718
 geodemo.C:1719
 geodemo.C:1720
 geodemo.C:1721
 geodemo.C:1722
 geodemo.C:1723
 geodemo.C:1724
 geodemo.C:1725
 geodemo.C:1726
 geodemo.C:1727
 geodemo.C:1728
 geodemo.C:1729
 geodemo.C:1730
 geodemo.C:1731
 geodemo.C:1732
 geodemo.C:1733
 geodemo.C:1734
 geodemo.C:1735
 geodemo.C:1736
 geodemo.C:1737
 geodemo.C:1738
 geodemo.C:1739
 geodemo.C:1740
 geodemo.C:1741
 geodemo.C:1742
 geodemo.C:1743
 geodemo.C:1744
 geodemo.C:1745
 geodemo.C:1746
 geodemo.C:1747
 geodemo.C:1748
 geodemo.C:1749
 geodemo.C:1750
 geodemo.C:1751
 geodemo.C:1752
 geodemo.C:1753
 geodemo.C:1754
 geodemo.C:1755
 geodemo.C:1756
 geodemo.C:1757
 geodemo.C:1758
 geodemo.C:1759
 geodemo.C:1760
 geodemo.C:1761
 geodemo.C:1762
 geodemo.C:1763
 geodemo.C:1764
 geodemo.C:1765
 geodemo.C:1766
 geodemo.C:1767
 geodemo.C:1768
 geodemo.C:1769
 geodemo.C:1770
 geodemo.C:1771
 geodemo.C:1772
 geodemo.C:1773
 geodemo.C:1774
 geodemo.C:1775
 geodemo.C:1776
 geodemo.C:1777
 geodemo.C:1778
 geodemo.C:1779
 geodemo.C:1780
 geodemo.C:1781
 geodemo.C:1782
 geodemo.C:1783
 geodemo.C:1784
 geodemo.C:1785
 geodemo.C:1786
 geodemo.C:1787
 geodemo.C:1788
 geodemo.C:1789
 geodemo.C:1790
 geodemo.C:1791
 geodemo.C:1792
 geodemo.C:1793
 geodemo.C:1794
 geodemo.C:1795
 geodemo.C:1796
 geodemo.C:1797
 geodemo.C:1798