]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
From Basanta: new files for PMD digit visualization.
authormtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 26 Feb 2007 16:25:04 +0000 (16:25 +0000)
committermtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 26 Feb 2007 16:25:04 +0000 (16:25 +0000)
EVE/Alieve/LinkDef.h
EVE/Alieve/PMDModule.cxx [new file with mode: 0644]
EVE/Alieve/PMDModule.h [new file with mode: 0644]
EVE/Alieve/PMDModuleEditor.cxx [new file with mode: 0644]
EVE/Alieve/PMDModuleEditor.h [new file with mode: 0644]
EVE/alice-macros/pmd_digits.C [new file with mode: 0644]
EVE/alice-macros/pmd_raw.C [new file with mode: 0644]

index 11d9300aa21a99cb10dbdee4de8bea11a9beee6b..bb36643a6e5bdefce1df2679ae7072cff17ba9bd 100644 (file)
 #pragma link C++ class Alieve::MUONChamberEditor+;
 #pragma link C++ class Alieve::MUONChamberGL+;
 
+// PMD
+#pragma link C++ class Alieve::PMDModule+;
+#pragma link C++ class Alieve::PMDModuleEditor+;
+
 // TPC
 #pragma link C++ class Alieve::TPCData+;
 
diff --git a/EVE/Alieve/PMDModule.cxx b/EVE/Alieve/PMDModule.cxx
new file mode 100644 (file)
index 0000000..3ee1161
--- /dev/null
@@ -0,0 +1,342 @@
+// $Header$
+
+#include "PMDModule.h"
+
+#include "AliPMDdigit.h"
+#include "AliPMDddldata.h"
+
+using namespace Reve;
+using namespace Alieve;
+
+const Float_t PMDModule::fgkRad     = 0.25;
+const Float_t PMDModule::fgkSqRoot3 = 1.732050808;
+const Float_t PMDModule::fgkZpos    = 0.;
+//______________________________________________________________________
+// PMDModule
+//
+
+
+ClassImp(PMDModule)
+
+PMDModule::PMDModule():
+  fX(0.),
+  fY(0.),
+  fZ(0.),
+  fNPads(0)
+{
+
+}
+// -------------------------------------------------------------------- //
+void PMDModule::DisplayInit(Int_t ism)
+{
+  TString smodule = "Module";
+  smodule+= ism;
+  
+  Float_t xism =0, yism = 0;
+  Float_t dxism =0, dyism = 0;
+
+  GenerateBox(ism,xism,yism,dxism,dyism);
+
+  Reve::FrameBox *pmdModBox = new FrameBox();
+  pmdModBox->SetAAQuadXY(xism, yism, 0, dxism, dyism);
+  pmdModBox->SetFrameColor((Color_t) 31);
+
+  Reve::RGBAPalette *pmdModPalette  = new RGBAPalette(20, 1000);
+  pmdModPalette->SetLimits(0, 1000);
+
+  //  Reve::QuadSet* q = this;
+  SetName(smodule.Data());
+  SetOwnIds(kTRUE);
+  Reset(Reve::QuadSet::QT_HexagonXY, kFALSE, 32);
+  
+  SetFrame(pmdModBox);
+  SetPalette(pmdModPalette);
+
+}
+// -------------------------------------------------------------------- //
+void PMDModule::DisplayDigitsData(Int_t ism, TTree *pmdt)
+{
+
+  DisplayInit(ism);
+
+  Int_t det, smn, irow, icol, adc;
+  Int_t xpad = 0, ypad = 0;
+  Float_t xpos, ypos;
+
+  TClonesArray *digits = new TClonesArray("AliPMDdigit", 0); 
+
+  TBranch *branch = pmdt->GetBranch("PMDDigit");
+  branch->SetAddress(&digits);
+
+  AliPMDdigit  *pmddigit;
+
+  branch->GetEntry(ism); 
+  Int_t nentries = digits->GetLast();
+  //printf("%d\n", nentries);
+
+  for (Int_t ient = 0; ient < nentries+1; ient++)
+    {
+      pmddigit = (AliPMDdigit*)digits->UncheckedAt(ient);
+      
+      det    = pmddigit->GetDetector();
+      smn    = pmddigit->GetSMNumber();
+      irow   = pmddigit->GetRow();
+      icol   = pmddigit->GetColumn();
+      adc    = (Int_t) pmddigit->GetADC();
+
+      if(smn <12)
+       {
+         xpad = icol;
+         ypad = irow;
+       }
+      else if(smn >=12 && smn < 24)
+       {
+         xpad = irow;
+         ypad = icol;
+       }
+             
+      RectGeomCellPos(smn, xpad, ypad, xpos, ypos);
+
+      AddHexagon(xpos, ypos, fgkZpos, fgkRad);
+      
+      QuadValue(adc);
+         
+      QuadId(new AliPMDdigit(*pmddigit));
+      // new TNamed(Form("Quad with idx=%d", ient),
+      //  "This title is not confusing."));
+
+      ++fNPads;
+    }
+
+  RefitPlex();
+
+  fHMTrans.SetPos(fX, fY, fZ);
+
+  delete digits;
+}
+// -------------------------------------------------------------------- //
+
+void PMDModule::DisplayRawData(Int_t ism, TObjArray *ddlcont)
+{
+
+  if (ism > 23) ism -= 24;
+
+  DisplayInit(ism);
+
+  Int_t det, smn, irow, icol, adc;
+  Int_t xpad = 0, ypad = 0;
+  Float_t xpos, ypos;
+
+  Int_t nentries = ddlcont->GetEntries();
+  //printf("%d\n", nentries);
+
+  for (Int_t ient = 0; ient < nentries; ient++)
+    {
+      AliPMDddldata *pmdddl = (AliPMDddldata*)ddlcont->UncheckedAt(ient);
+      
+      det    = pmdddl->GetDetector();
+      smn    = pmdddl->GetSMN();
+      if (smn != ism) continue;
+      irow   = pmdddl->GetRow();
+      icol   = pmdddl->GetColumn();
+      adc    = pmdddl->GetSignal();
+
+      if(smn <12)
+       {
+         xpad = icol;
+         ypad = irow;
+       }
+      else if(smn >=12 && smn < 24)
+       {
+         xpad = irow;
+         ypad = icol;
+       }
+             
+      RectGeomCellPos(smn, xpad, ypad, xpos, ypos);
+
+      AddHexagon(xpos, ypos, fgkZpos, fgkRad);
+      
+      QuadValue(adc);
+         
+      QuadId(new AliPMDddldata(*pmdddl));
+      //new TNamed(Form("Quad with idx=%d", ient),
+      //  "This title is not confusing."));
+
+      ++fNPads;
+    }
+
+  RefitPlex();
+
+  fHMTrans.SetPos(fX, fY, fZ);
+  
+}
+// -------------------------------------------------------------------- //
+
+void PMDModule::RectGeomCellPos(Int_t ism, Int_t xpad, Int_t ypad,
+                               Float_t &xpos, Float_t &ypos)
+{
+  // This routine finds the cell eta,phi for the new PMD rectangular 
+  // geometry in ALICE
+  // Authors : Bedanga Mohanty and Dipak Mishra - 29.4.2003
+  // modified by B. K. Nandi for change of coordinate sys
+  //
+  // SMA  ---> Supermodule Type A           ( SM - 0)
+  // SMAR ---> Supermodule Type A ROTATED   ( SM - 1)
+  // SMB  ---> Supermodule Type B           ( SM - 2)
+  // SMBR ---> Supermodule Type B ROTATED   ( SM - 3)
+  //
+  // ism   : Serial module number from 0 to 23 for each plane
+
+  // Corner positions (x,y) of the 24 unit moudles in ALICE PMD
+
+  const Double_t kXcorner[24] =
+    {
+      74.8833,  53.0045, 31.1255,    //Type-A
+      74.8833,  53.0045, 31.1255,    //Type-A
+      -74.8833, -53.0044, -31.1255,  //Type-AR
+      -74.8833, -53.0044, -31.1255,  //Type-AR
+      8.9165, -33.7471,            //Type-B
+      8.9165, -33.7471,            //Type-B
+      8.9165, -33.7471,            //Type-B
+      -8.9165, 33.7471,            //Type-BR
+      -8.9165, 33.7471,            //Type-BR
+      -8.9165, 33.7471,            //Type-BR
+    };
+
+  
+  const Double_t kYcorner[24] =
+    {
+      86.225,  86.225,  86.225,      //Type-A
+      37.075,  37.075,  37.075,      //Type-A
+      -86.225, -86.225, -86.225,     //Type-AR
+      -37.075, -37.075, -37.075,     //Type-AR
+      86.225,  86.225,               //Type-B
+      61.075,  61.075,               //Type-B
+      35.925,  35.925,               //Type-B
+      -86.225, -86.225,              //Type-BR
+      -61.075, -61.075,              //Type-BR
+      -35.925, -35.925               //Type-BR
+    };
+
+  
+  //  const Float_t kSqroot3      = 1.732050808;  // sqrt(3.);
+  //  const Float_t kCellRadius   = 0.25;
+  
+  //
+  //Every even row of cells is shifted and placed
+  //in geant so this condition
+  //
+  Float_t shift = 0.0;
+  if(ypad%2 == 0)
+    {
+      shift = 0.0;
+    }
+  else
+    {
+      shift = 0.25;
+    }
+
+
+  if(ism < 6)
+    {
+      ypos = kYcorner[ism] - (Float_t) xpad*fgkRad*2.0 - shift;
+      xpos = kXcorner[ism] - (Float_t) ypad*fgkSqRoot3*fgkRad;
+    }
+  else if(ism >=6 && ism < 12)
+    {
+      ypos = kYcorner[ism] + (Float_t) xpad*fgkRad*2.0 + shift;
+      xpos = kXcorner[ism] + (Float_t) ypad*fgkSqRoot3*fgkRad;
+    }
+  else if(ism >= 12 && ism < 18)
+    {
+      ypos = kYcorner[ism] - (Float_t) xpad*fgkRad*2.0 - shift;
+      xpos = kXcorner[ism] - (Float_t) ypad*fgkSqRoot3*fgkRad;
+    }
+  else if(ism >= 18 && ism < 24)
+    {
+      ypos = kYcorner[ism] + (Float_t) xpad*fgkRad*2.0 + shift;
+      xpos = kXcorner[ism] + (Float_t) ypad*fgkSqRoot3*fgkRad;
+    }
+
+}
+// -------------------------------------------------------------------- //
+void PMDModule::GenerateBox(Int_t ism, Float_t &xism, Float_t &yism,
+                           Float_t &dxism, Float_t &dyism)
+{
+  const Float_t kDia     = 0.50;
+
+  const Double_t kXcorner[24] =
+    {
+      74.8833,  53.0045, 31.1255,    //Type-A
+      74.8833,  53.0045, 31.1255,    //Type-A
+      -74.8833, -53.0044, -31.1255,  //Type-AR
+      -74.8833, -53.0044, -31.1255,  //Type-AR
+      8.9165, -33.7471,            //Type-B
+      8.9165, -33.7471,            //Type-B
+      8.9165, -33.7471,            //Type-B
+      -8.9165, 33.7471,            //Type-BR
+      -8.9165, 33.7471,            //Type-BR
+      -8.9165, 33.7471,            //Type-BR
+    };
+
+  
+  const Double_t kYcorner[24] =
+    {
+      86.225,  86.225,  86.225,      //Type-A
+      37.075,  37.075,  37.075,      //Type-A
+      -86.225, -86.225, -86.225,     //Type-AR
+      -37.075, -37.075, -37.075,     //Type-AR
+      86.225,  86.225,               //Type-B
+      61.075,  61.075,               //Type-B
+      35.925,  35.925,               //Type-B
+      -86.225, -86.225,              //Type-BR
+      -61.075, -61.075,              //Type-BR
+      -35.925, -35.925               //Type-BR
+    };
+
+
+  if (ism > 23) ism -= 24;
+
+
+  if (ism < 6)
+    {
+      xism  = kXcorner[ism] + fgkRad;
+      yism  = kYcorner[ism] + fgkRad;
+      dxism = -fgkRad*fgkSqRoot3*48.;
+      dyism = -kDia*96. - fgkRad;
+  }
+  if (ism >= 6 && ism < 12)
+    {
+      xism  = kXcorner[ism] - fgkRad;
+      yism  = kYcorner[ism] - fgkRad;
+      dxism = fgkRad*fgkSqRoot3*48.;
+      dyism = kDia*96. + fgkRad;
+  }
+  if (ism >= 12 && ism < 18)
+    {
+      xism  = kXcorner[ism] + fgkRad;
+      yism  = kYcorner[ism] + fgkRad;
+      dxism = -fgkRad*fgkSqRoot3*96.;
+      dyism = -kDia*48. - fgkRad;
+  }
+  if (ism >= 18 && ism < 24)
+    {
+      xism  = kXcorner[ism] - fgkRad;
+      yism  = kYcorner[ism] - fgkRad;
+      dxism = fgkRad*fgkSqRoot3*96.;
+      dyism = kDia*48. + fgkRad;
+  }
+  
+}
+
+// -------------------------------------------------------------------- //
+
+void PMDModule::SetPosition(Float_t x, Float_t y, Float_t z)
+{
+  fX = x;
+  fY = y;
+  fZ = z;
+}
+
+// -------------------------------------------------------------------- //
diff --git a/EVE/Alieve/PMDModule.h b/EVE/Alieve/PMDModule.h
new file mode 100644 (file)
index 0000000..a2062ee
--- /dev/null
@@ -0,0 +1,51 @@
+// $Header$
+
+#ifndef ALIEVE_PMDModule_H
+#define ALIEVE_PMDModule_H
+
+#include <Reve/Reve.h>
+#include <Reve/QuadSet.h>
+
+#include <TObject.h>
+#include <TObjArray.h>
+#include <TTree.h>
+
+namespace Alieve {
+
+class PMDModule : public Reve::QuadSet
+{
+private:
+  PMDModule(const PMDModule&);            // Not implemented
+  PMDModule& operator=(const PMDModule&); // Not implemented
+
+  void RectGeomCellPos(Int_t ism, Int_t irow, Int_t icol,
+                      Float_t &xpos, Float_t &ypos);
+  void GenerateBox(Int_t ism, Float_t &xism, Float_t &yism,
+                  Float_t &dxism, Float_t &dyism);
+
+protected:
+  Float_t       fX, fY, fZ;
+  Int_t         fNPads;
+
+  static const Float_t fgkRad;
+  static const Float_t fgkSqRoot3;
+  static const Float_t fgkZpos;
+
+
+public:
+  PMDModule();
+  virtual ~PMDModule() {}
+
+  Int_t GetNPads() const { return fNPads; }
+
+  void DisplayInit(Int_t ism);
+  void DisplayDigitsData(Int_t ism, TTree *pmdt);
+  void DisplayRawData(Int_t ism,   TObjArray *ddlcont);
+  void SetPosition(Float_t x, Float_t y, Float_t z);
+
+  ClassDef(PMDModule, 1);
+}; // endclass PMDModule
+
+}
+
+#endif
diff --git a/EVE/Alieve/PMDModuleEditor.cxx b/EVE/Alieve/PMDModuleEditor.cxx
new file mode 100644 (file)
index 0000000..5774e3e
--- /dev/null
@@ -0,0 +1,66 @@
+// $Header$
+
+#include "PMDModuleEditor.h"
+#include <Alieve/PMDModule.h>
+
+#include <TVirtualPad.h>
+#include <TColor.h>
+
+#include <TGLabel.h>
+#include <TGButton.h>
+#include <TGNumberEntry.h>
+#include <TGColorSelect.h>
+#include <TGDoubleSlider.h>
+
+using namespace Reve;
+using namespace Alieve;
+
+//______________________________________________________________________
+// PMDModuleEditor
+//
+
+ClassImp(PMDModuleEditor)
+
+PMDModuleEditor::PMDModuleEditor(const TGWindow *p, Int_t width, Int_t height,
+                                UInt_t options, Pixel_t back) :
+  TGedFrame(p, width, height, options | kVerticalFrame, back),
+  fM(0),
+  fInfoLabel(0)
+  // Initialize widget pointers to 0
+{
+  MakeTitle("PMDModule");
+
+  // Create widgets
+  // fXYZZ = new TGSomeWidget(this, ...);
+  // AddFrame(fXYZZ, new TGLayoutHints(...));
+  // fXYZZ->Connect("SignalName()", "Alieve::PMDModuleEditor", this, "DoXYZZ()");
+
+  fInfoLabel = new TGLabel(this);
+  fInfoLabel->SetTextJustify(kTextLeft);
+  AddFrame(fInfoLabel, new TGLayoutHints(kLHintsLeft|kLHintsExpandX,
+                                        8, 0, 2, 0));
+}
+
+PMDModuleEditor::~PMDModuleEditor()
+{}
+
+/**************************************************************************/
+
+void PMDModuleEditor::SetModel(TObject* obj)
+{
+  fM = dynamic_cast<PMDModule*>(obj);
+
+  // Set values of widgets
+  // fXYZZ->SetValue(fM->GetXYZZ());
+  fInfoLabel->SetText(Form("Pads hit: %d", fM->GetNPads()));
+}
+
+/**************************************************************************/
+
+// Implements callback/slot methods
+
+// void PMDModuleEditor::DoXYZZ()
+// {
+//   fM->SetXYZZ(fXYZZ->GetValue());
+//   Update();
+// }
diff --git a/EVE/Alieve/PMDModuleEditor.h b/EVE/Alieve/PMDModuleEditor.h
new file mode 100644 (file)
index 0000000..7009565
--- /dev/null
@@ -0,0 +1,43 @@
+// $Header$
+
+#ifndef ALIEVE_PMDModuleEditor_H
+#define ALIEVE_PMDModuleEditor_H
+
+#include <TGedFrame.h>
+
+class TGCheckButton;
+class TGNumberEntry;
+class TGColorSelect;
+
+namespace Alieve {
+
+class PMDModule;
+
+class PMDModuleEditor : public TGedFrame
+{
+private:
+  PMDModuleEditor(const PMDModuleEditor&);            // Not implemented
+  PMDModuleEditor& operator=(const PMDModuleEditor&); // Not implemented
+
+protected:
+  PMDModule* fM; // fModel dynamic-casted to PMDModuleEditor
+
+  TGLabel*   fInfoLabel;
+  // Declare widgets
+  // TGSomeWidget*   fXYZZ;
+
+public:
+  PMDModuleEditor(const TGWindow* p=0, Int_t width=170, Int_t height=30, UInt_t options = kChildFrame, Pixel_t back=GetDefaultFrameBackground());
+  virtual ~PMDModuleEditor();
+
+  virtual void SetModel(TObject* obj);
+
+  // Declare callback/slot methods
+  // void DoXYZZ();
+
+  ClassDef(PMDModuleEditor, 0); // Editor for PMDModule
+}; // endclass PMDModuleEditor
+
+}
+
+#endif
diff --git a/EVE/alice-macros/pmd_digits.C b/EVE/alice-macros/pmd_digits.C
new file mode 100644 (file)
index 0000000..085df0e
--- /dev/null
@@ -0,0 +1,97 @@
+// ---------------------------------------------------------------------- //
+void pmd_digits()
+{
+  gStyle->SetPalette(1, 0);
+
+  gReve->DisableRedraw();
+
+
+  TString spl;
+
+  TString sddl;
+  TString bsddl="DDL";
+
+
+  AliRunLoader* rl =  Alieve::Event::AssertRunLoader();
+  rl->LoadDigits("PMD");
+  TTree* pmdt = rl->GetTreeD("PMD", false);
+
+  //  cout << pmdt->GetEntries() << endl;
+
+  Reve::RenderElementList* l = new Reve::RenderElementList("PMD");
+  // l->SetTitle("tooltip");
+  // l->SetMainColor((Color_t)3);
+  gReve->AddRenderElement(l);
+  
+  Int_t istartDDL = 0;
+  Int_t iendDDL    = 0;
+  Int_t modnumber = 0;
+  Int_t NSM       = 0;
+
+  for (Int_t ipl = 0; ipl < 1; ipl++)
+    {
+
+      if (ipl == 0)
+       {
+         spl = "PRE";
+         istartDDL = 0;
+         iendDDL   = 4;
+       }
+      if (ipl == 1)
+       {
+         spl = "CPV";
+         istartDDL = 4;
+         iendDDL   = 6;
+       }
+      
+      Reve::RenderElementList* lplane = new Reve::RenderElementList(spl.Data());
+      //  l->SetMainColor((Color_t)3);
+      gReve->AddRenderElement(l,lplane);
+      
+      for (Int_t iddl = istartDDL; iddl < iendDDL; iddl++)
+       {
+         sddl = bsddl;
+         sddl += iddl;
+         Reve::RenderElementList* lddl = new Reve::RenderElementList(sddl.Data());
+         //  l->SetMainColor((Color_t)3);
+         gReve->AddRenderElement(lplane,lddl);
+
+         modnumber = iddl*6;
+
+         if (iddl < 4)
+           {
+             NSM = 6;
+           }
+         else if (iddl >=4 && iddl < 6)
+           {
+             NSM = 12;
+           }
+
+         for (Int_t ism = 0; ism < NSM; ism++)
+           {
+             
+             Alieve::PMDModule *lmodule = new Alieve::PMDModule();
+             lmodule->SetPosition(0.,0.,360.);
+             lmodule->DisplayDigitsData(modnumber, pmdt);
+             gReve->AddRenderElement(lddl, lmodule);
+             modnumber++;
+             if (iddl == 4 && modnumber == 30) modnumber = 42;
+           }
+
+       }
+
+    }
+
+
+
+
+
+
+
+
+  gReve->EnableRedraw();
+  
+  gReve->Redraw3D();
+}
+
+// ---------------------------------------------------------------------- //
diff --git a/EVE/alice-macros/pmd_raw.C b/EVE/alice-macros/pmd_raw.C
new file mode 100644 (file)
index 0000000..a2ef09c
--- /dev/null
@@ -0,0 +1,94 @@
+// ---------------------------------------------------------------------- //
+void pmd_raw()
+{
+  gStyle->SetPalette(1, 0);
+
+  gReve->DisableRedraw();
+
+  TObjArray *pmdddlcont = new TObjArray();
+
+  TString spl;
+
+  TString sddl;
+  TString bsddl="DDL";
+
+  Int_t ievt = 0;
+  AliRawReaderRoot reader("raw.root",ievt);
+  AliPMDRawStream stream(&reader);
+
+
+  Reve::RenderElementList* l = new Reve::RenderElementList("Parent Dir");
+  l->SetTitle("PMD");
+  //  l->SetMainColor((Color_t)3);
+  gReve->AddRenderElement(l);
+  
+  Int_t istartDDL = 0;
+  Int_t iendDDL    = 0;
+  Int_t modnumber = 0;
+  Int_t NSM       = 0;
+
+  for (Int_t ipl = 1; ipl < 2; ipl++)
+    {
+
+      if (ipl == 0)
+       {
+         spl = "PRE";
+         istartDDL = 0;
+         iendDDL   = 4;
+       }
+      if (ipl == 1)
+       {
+         spl = "CPV";
+         istartDDL = 4;
+         iendDDL   = 6;
+       }
+      
+      Reve::RenderElementList* lplane = new Reve::RenderElementList(spl.Data());
+      //  l->SetMainColor((Color_t)3);
+      gReve->AddRenderElement(l,lplane);
+      
+      for (Int_t iddl = istartDDL; iddl < iendDDL; iddl++)
+      //for (Int_t iddl = 0; iddl < 1; iddl++)
+       {
+         sddl = bsddl;
+         sddl += iddl;
+         Reve::RenderElementList* lddl = new Reve::RenderElementList(sddl.Data());
+         //  l->SetMainColor((Color_t)3);
+         gReve->AddRenderElement(lplane,lddl);
+
+         modnumber = iddl*6;
+
+         if (iddl < 4)
+           {
+             NSM = 6;
+           }
+         else if (iddl >=4 && iddl < 6)
+           {
+             NSM = 12;
+           }
+
+         reader.Select("PMD", iddl, iddl);
+         Bool_t junk = stream.DdlData(iddl,pmdddlcont);
+
+         for (Int_t ism = 0; ism < NSM; ism++)
+         //for (Int_t ism = 0; ism < 1; ism++)
+           {
+             Alieve::PMDModule *lmodule = new Alieve::PMDModule();
+             lmodule->SetPosition(0.,0.,360.);
+             lmodule->DisplayRawData(modnumber,pmdddlcont);
+             gReve->AddRenderElement(lddl, lmodule);
+             modnumber++;
+             if (iddl == 4 && modnumber == 30) modnumber = 42;
+           }
+
+         pmdddlcont->Clear();
+       }
+    }
+
+
+  gReve->EnableRedraw();
+  
+  gReve->Redraw3D();
+}
+
+// ---------------------------------------------------------------------- //