From Pawel Debski.
authormtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 4 Dec 2009 11:48:09 +0000 (11:48 +0000)
committermtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 4 Dec 2009 11:48:09 +0000 (11:48 +0000)
More / better geometries and VizDBs.

Add saving pictures in high resolution (people had problems with it),
saving/loading DataSelection macros and VizDB macros.

16 files changed:
EVE/EveBase/AliEveConfigManager.cxx
EVE/EveBase/AliEveConfigManager.h
EVE/EveBase/AliEveMacroExecutor.cxx
EVE/EveBase/AliEveMacroExecutor.h
EVE/EveBase/AliEveMultiView.cxx
EVE/EveBase/AliEveMultiView.h
EVE/alice-macros/geom_gentle_bright.C [new file with mode: 0644]
EVE/alice-macros/geom_gentle_green.C [new file with mode: 0644]
EVE/alice-macros/geom_gentle_notransparency.C [new file with mode: 0644]
EVE/alice-macros/geom_gentle_transparent.C
EVE/alice-macros/geom_gentle_transparentdark.C
EVE/alice-macros/geom_gentle_transparentlight.C
EVE/alice-macros/geom_gentle_yellow.C [new file with mode: 0644]
EVE/macros/VizDB_scan_transparentdark.C
EVE/macros/VizDB_scan_transparentlight.C
EVE/macros/VizDB_scan_yellow.C [new file with mode: 0644]

index ebdc89c..87d2022 100644 (file)
 #include <AliEveMultiView.h>
 #include <TEveManager.h>
 #include <TEveBrowser.h>
+#include <TEveWindow.h>
 #include <TGFileDialog.h>
 #include <TGMenu.h>
 
+#include "AliEveEventManager.h"
+#include "AliEveMacroExecutor.h"
+#include "AliEveMacroExecutorWindow.h"
+#include "AliEveMacro.h"
+
 class AliEveMacroExecutor;
 class TEveProjectionManager;
 class TEveGeoShape;
@@ -36,7 +42,7 @@ namespace
 {
  enum EAliEveMenu_e
  {
-   kAEMSave, kAEMLoad, kAEMDefault, kAEMScreen, kAEMProjector, kAEMTransparentDark, kAEMTransparentLight, kAEMTransparentMonoDark, kAEMTransparentMonoLight, kAEMTpc
+   kAEMDefault, kAEMScreen, kAEMProjector, kAEMNotransparency, kAEMTransparentDark, kAEMTransparentLight, kAEMTransparentMonoDark, kAEMTransparentMonoLight, kAEMGreen, kAEMBright, kAEMYellow, kAEMTpc, kAEMAll, kAEM3d, kAEMRphi, kAEMRhoz, kAEMAllhr, kAEM3dhr, kAEMRphihr, kAEMRhozhr, kAEMSavemacros, kAEMLoadmacros, kAEMSave, kAEMOpen
  };
 }
  
@@ -76,10 +82,6 @@ AliEveConfigManager::AliEveConfigManager() :
   // Expected TEveManager is already initialized.
 
   fAliEvePopup = new TGPopupMenu(gClient->GetRoot());
-  fAliEvePopup->AddEntry("&Save", kAEMSave);
-  fAliEvePopup->AddEntry("&Load", kAEMLoad);
-
-  fAliEvePopup->AddSeparator();
 
   fAliEvePopup->AddEntry("&Default", kAEMDefault);
   fAliEvePopup->AddEntry("&Screen", kAEMScreen);
@@ -87,6 +89,10 @@ AliEveConfigManager::AliEveConfigManager() :
 
   fAliEvePopup->AddSeparator();
 
+  fAliEvePopup->AddEntry("&Low transparency", kAEMNotransparency);
+
+  fAliEvePopup->AddSeparator();
+
   fAliEvePopup->AddEntry("&Transparent screen", kAEMTransparentDark);
   fAliEvePopup->AddEntry("&Transparent projector", kAEMTransparentLight);
   fAliEvePopup->AddEntry("&Transparent mono dark", kAEMTransparentMonoDark);
@@ -94,12 +100,49 @@ AliEveConfigManager::AliEveConfigManager() :
 
   fAliEvePopup->AddSeparator();
 
-  fAliEvePopup->AddEntry("&TPC", kAEMTpc);
+  fAliEvePopup->AddEntry("&First collision setup", kAEMGreen);
+  fAliEvePopup->AddEntry("&Bright", kAEMBright);
+
+  fAliEvePopup->AddSeparator();
+
+  fAliEvePopup->AddEntry("&TPC Yellow", kAEMYellow);
+  fAliEvePopup->AddEntry("&TPC Blue", kAEMTpc);
+
+  fAliEvePopup->AddSeparator();
+  fAliEvePopup->AddSeparator();
+  fAliEvePopup->AddSeparator();
+
+  fAliEvePopup->AddEntry("&Save all views", kAEMAll);
+  fAliEvePopup->AddEntry("&Save 3D View",   kAEM3d);
+  fAliEvePopup->AddEntry("&Save RPhi View", kAEMRphi);
+  fAliEvePopup->AddEntry("&Save RhoZ View", kAEMRhoz);
+
+  fAliEvePopup->AddSeparator();
+
+  fAliEvePopup->AddEntry("&Save all views HR", kAEMAllhr);
+  fAliEvePopup->AddEntry("&Save 3D View HR",   kAEM3dhr);
+  fAliEvePopup->AddEntry("&Save RPhi View HR", kAEMRphihr);
+  fAliEvePopup->AddEntry("&Save RhoZ View HR", kAEMRhozhr);
+
+  fAliEvePopup->AddSeparator();
+  fAliEvePopup->AddSeparator();
+  fAliEvePopup->AddSeparator();
+
+  fAliEvePopup->AddEntry("&Save Data Selection macros", kAEMSavemacros);
+  fAliEvePopup->AddEntry("&Load Data Selection macros",   kAEMLoadmacros);
+
+  fAliEvePopup->AddSeparator();
+  fAliEvePopup->AddSeparator();
+  fAliEvePopup->AddSeparator();
+
+  fAliEvePopup->AddEntry("&Save VizDB", kAEMSave);
+  fAliEvePopup->AddEntry("&Load VizDB", kAEMOpen);
 
   fAliEvePopup->AddSeparator();
 
   fAliEvePopup->Connect("Activated(Int_t)", "AliEveConfigManager",
                         this, "AliEvePopupHandler(Int_t)");
+  fLoadCheck = kFALSE;
 
 #if ROOT_VERSION_CODE >= ROOT_VERSION(5,25,4)
   TGMenuBar *mBar = gEve->GetBrowser()->GetMenuBar();
@@ -122,10 +165,21 @@ AliEveConfigManager::AliEveConfigManager() :
 
 //==============================================================================
 
+#include <iostream>
+#include <fstream>
+#include <string>
+#include <sstream>
+
+using namespace std;
+
 namespace
 {
 const char *gMacroSaveAsTypes[] = {"CINT Macro", "*.C",
-                                   0, 0};
+                                   0, 0}; //for saving/loading macros
+
+const char *gPictureSaveAsTypes[] = {"PNG Image", "*.png",
+                                   0, 0}; //for saving pictures
+
 }
 
 void AliEveConfigManager::AliEvePopupHandler(Int_t id)
@@ -136,82 +190,54 @@ void AliEveConfigManager::AliEvePopupHandler(Int_t id)
 
   switch (id)
   {
-    case kAEMSave:
-    {
-      TGFileInfo fi;
-      fi.fFileTypes   = gMacroSaveAsTypes;
-      fi.fIniDir      = StrDup(""); // current directory
-      fi.fFileTypeIdx = 0;
-      fi.fOverwrite   = kTRUE;
-      new TGFileDialog(gClient->GetDefaultRoot(), gEve->GetMainWindow(), kFDSave, &fi);
-      if (!fi.fFilename) return;
 
-      TPMERegexp filere(".*/([^/]+$");
-      if (filere.Match(fi.fFilename) != 2)
-      {
-        Warning("AliEvePopupHandler", "file '%s' bad.", fi.fFilename);
-        return;
-      }
-      printf("Saving...\n");
-
-      TString file(filere[1]);
-      if (!file.EndsWith(".C"))
-        file += ".C";
-      gSystem->ChangeDirectory(fi.fIniDir);
-      gEve->SaveVizDB(file);
-
-      printf("Saved\n");
-      break;
+    case kAEMDefault: //default geometry and VizDB
+    {
+      AliEveMultiView *mv = AliEveMultiView::Instance();
 
-    }
+      mv->DestroyAllGeometries(); //destroy RPhi and Rhoz geometries before putting new
 
-    case kAEMLoad:
-    {
+      gEve->LoadVizDB("geom_gentle_default.C", kTRUE, kTRUE); //loading geometry
 
-      printf("Loading...\n");
+      gEve->LoadVizDB("VizDB_scan.C", kTRUE, kTRUE); //loading VizDB
 
-      gEve->LoadVizDB("VizDB_custom.C", kTRUE, kTRUE);
+      if(!gEve->GetViewers()->UseLightColorSet())
+        gEve->GetViewers()->SwitchColorSet(); //white background
 
-      printf("Loaded\n");
+      gEve->FullRedraw3D();   
+      
       break;
-
     }
 
-    case kAEMDefault:
+    case kAEMScreen: //default geometry with black background
     {
+      AliEveMultiView *mv = AliEveMultiView::Instance();
 
-      gEve->GetScenes()->FirstChild()->DestroyElements();
-
-      gEve->GetScenes()->FindChild("RPhi Geometry")->LastChild()->DestroyElements();
-
-      gEve->GetScenes()->FindChild("RhoZ Geometry")->LastChild()->DestroyElements();
+      mv->DestroyAllGeometries();
 
       gEve->LoadVizDB("geom_gentle_default.C", kTRUE, kTRUE);
 
-      gEve->LoadVizDB("VizDB_scan.C", kTRUE, kTRUE);
+      gEve->LoadVizDB("VizDB_scan_screen.C", kTRUE, kTRUE);
 
       if(gEve->GetViewers()->UseLightColorSet())
         gEve->GetViewers()->SwitchColorSet();
 
-      gEve->FullRedraw3D();   
-      
+      gEve->FullRedraw3D();    
+
       break;
     }
 
-    case kAEMScreen:
+    case kAEMProjector: //default geometry with white background
     {
+      AliEveMultiView *mv = AliEveMultiView::Instance();
 
-      gEve->GetScenes()->FirstChild()->DestroyElements();
-
-      gEve->GetScenes()->FindChild("RPhi Geometry")->LastChild()->DestroyElements();
-
-      gEve->GetScenes()->FindChild("RhoZ Geometry")->LastChild()->DestroyElements();
+      mv->DestroyAllGeometries();
 
-      gEve->LoadVizDB("geom_gentle.C", kTRUE, kTRUE);
+      gEve->LoadVizDB("geom_gentle_default.C", kTRUE, kTRUE);
 
-      gEve->LoadVizDB("VizDB_scan_screen.C", kTRUE, kTRUE);
+      gEve->LoadVizDB("VizDB_scan_projector.C", kTRUE, kTRUE);
 
-      if(gEve->GetViewers()->UseLightColorSet())
+      if(!gEve->GetViewers()->UseLightColorSet())
         gEve->GetViewers()->SwitchColorSet();
 
       gEve->FullRedraw3D();    
@@ -219,18 +245,15 @@ void AliEveConfigManager::AliEvePopupHandler(Int_t id)
       break;
     }
 
-    case kAEMProjector:
+    case kAEMNotransparency: //default geometry with low transparency (5%)
     {
+      AliEveMultiView *mv = AliEveMultiView::Instance();
 
-      gEve->GetScenes()->FirstChild()->DestroyElements();
-
-      gEve->GetScenes()->FindChild("RPhi Geometry")->LastChild()->DestroyElements();
+      mv->DestroyAllGeometries();
 
-      gEve->GetScenes()->FindChild("RhoZ Geometry")->LastChild()->DestroyElements();
+      gEve->LoadVizDB("geom_gentle_notransparency.C", kTRUE, kTRUE);
 
-      gEve->LoadVizDB("geom_gentle.C", kTRUE, kTRUE);
-
-      gEve->LoadVizDB("VizDB_scan_projector.C", kTRUE, kTRUE);
+      gEve->LoadVizDB("VizDB_scan.C", kTRUE, kTRUE);
 
       if(!gEve->GetViewers()->UseLightColorSet())
         gEve->GetViewers()->SwitchColorSet();
@@ -240,14 +263,12 @@ void AliEveConfigManager::AliEvePopupHandler(Int_t id)
       break;
     }
 
-    case kAEMTransparentDark:
-    {
-
-      gEve->GetScenes()->FirstChild()->DestroyElements();
 
-      gEve->GetScenes()->FindChild("RPhi Geometry")->LastChild()->DestroyElements();
+    case kAEMTransparentDark: //default geometry with black background, high transparency (80%)
+    {
+      AliEveMultiView *mv = AliEveMultiView::Instance();
 
-      gEve->GetScenes()->FindChild("RhoZ Geometry")->LastChild()->DestroyElements();
+      mv->DestroyAllGeometries();
 
       gEve->LoadVizDB("geom_gentle_transparent.C", kTRUE, kTRUE);
 
@@ -261,14 +282,11 @@ void AliEveConfigManager::AliEvePopupHandler(Int_t id)
       break;
     }
 
-    case kAEMTransparentLight:
+    case kAEMTransparentLight: //default geometry with white background, high transparency (80%)
     {
+      AliEveMultiView *mv = AliEveMultiView::Instance();
 
-      gEve->GetScenes()->FirstChild()->DestroyElements();
-
-      gEve->GetScenes()->FindChild("RPhi Geometry")->LastChild()->DestroyElements();
-
-      gEve->GetScenes()->FindChild("RhoZ Geometry")->LastChild()->DestroyElements();
+      mv->DestroyAllGeometries();
 
       gEve->LoadVizDB("geom_gentle_transparent.C", kTRUE, kTRUE);
 
@@ -284,12 +302,9 @@ void AliEveConfigManager::AliEvePopupHandler(Int_t id)
 
     case kAEMTransparentMonoDark:
     {
+      AliEveMultiView *mv = AliEveMultiView::Instance();
 
-      gEve->GetScenes()->FirstChild()->DestroyElements();
-
-      gEve->GetScenes()->FindChild("RPhi Geometry")->LastChild()->DestroyElements();
-
-      gEve->GetScenes()->FindChild("RhoZ Geometry")->LastChild()->DestroyElements();
+      mv->DestroyAllGeometries();
 
       gEve->LoadVizDB("geom_gentle_transparentdark.C", kTRUE, kTRUE);
 
@@ -305,12 +320,9 @@ void AliEveConfigManager::AliEvePopupHandler(Int_t id)
 
     case kAEMTransparentMonoLight:
     {
+      AliEveMultiView *mv = AliEveMultiView::Instance();
 
-      gEve->GetScenes()->FirstChild()->DestroyElements();
-
-      gEve->GetScenes()->FindChild("RPhi Geometry")->LastChild()->DestroyElements();
-
-      gEve->GetScenes()->FindChild("RhoZ Geometry")->LastChild()->DestroyElements();
+      mv->DestroyAllGeometries();
 
       gEve->LoadVizDB("geom_gentle_transparentlight.C", kTRUE, kTRUE);
 
@@ -324,14 +336,65 @@ void AliEveConfigManager::AliEvePopupHandler(Int_t id)
       break;
     }
 
-    case kAEMTpc:
+    case kAEMGreen:
+    {
+      AliEveMultiView *mv = AliEveMultiView::Instance();
+
+      mv->DestroyAllGeometries();
+
+      gEve->LoadVizDB("geom_gentle_green.C", kTRUE, kTRUE);
+
+      gEve->LoadVizDB("VizDB_scan.C", kTRUE, kTRUE);
+
+      if(!gEve->GetViewers()->UseLightColorSet())
+        gEve->GetViewers()->SwitchColorSet();
+
+      gEve->FullRedraw3D();    
+
+      break;
+    }
+
+    case kAEMBright:
     {
+      AliEveMultiView *mv = AliEveMultiView::Instance();
 
-      gEve->GetScenes()->FirstChild()->DestroyElements();
+      mv->DestroyAllGeometries();
 
-      gEve->GetScenes()->FindChild("RPhi Geometry")->LastChild()->DestroyElements();
+      gEve->LoadVizDB("geom_gentle_bright.C", kTRUE, kTRUE);
+
+      gEve->LoadVizDB("VizDB_scan.C", kTRUE, kTRUE);
+
+      if(gEve->GetViewers()->UseLightColorSet())
+        gEve->GetViewers()->SwitchColorSet();
+
+      gEve->FullRedraw3D();
+
+      break;
+    }
+
+    case kAEMYellow:
+    {
+      AliEveMultiView *mv = AliEveMultiView::Instance();
 
-      gEve->GetScenes()->FindChild("RhoZ Geometry")->LastChild()->DestroyElements();
+      mv->DestroyAllGeometries();
+
+      gEve->LoadVizDB("geom_gentle_yellow.C", kTRUE, kTRUE);
+
+      gEve->LoadVizDB("VizDB_scan_yellow.C", kTRUE, kTRUE);
+
+      if(!gEve->GetViewers()->UseLightColorSet())
+        gEve->GetViewers()->SwitchColorSet();
+
+      gEve->FullRedraw3D();    
+
+      break;
+    }
+
+    case kAEMTpc:
+    {
+      AliEveMultiView *mv = AliEveMultiView::Instance();
+
+      mv->DestroyAllGeometries();
 
       gEve->LoadVizDB("geom_gentle_tpc.C", kTRUE, kTRUE);
 
@@ -345,6 +408,497 @@ void AliEveConfigManager::AliEvePopupHandler(Int_t id)
       break;
     }
 
+    case kAEMAll: //saving pictures from all three viewers
+    {
+      
+     TGFileInfo fi;
+     fi.fFileTypes   = gPictureSaveAsTypes;
+     fi.fIniDir      = StrDup(""); // current directory
+     fi.fFileTypeIdx = 0;
+     fi.fOverwrite   = kTRUE;
+     new TGFileDialog(gClient->GetDefaultRoot(),
+     gEve->GetMainWindow(), kFDSave, &fi); // dialog 
+     if (!fi.fFilename) return;
+
+     TPMERegexp filere(".*/([^/]+$)");
+     if (filere.Match(fi.fFilename) != 2)
+     {
+       Warning("AliEvePopupHandler", "file '%s' bad.", fi.fFilename);
+       return;
+     }
+
+     TString file1(filere[1]);
+     TString file2(filere[1]);
+     TString file3(filere[1]);
+     
+     if (!file1.EndsWith(".png"))
+       file1 += "_3D.png"; // adding extensions
+       
+     if (!file2.EndsWith(".png"))
+       file2 += "_RPhi.png"; // adding extensions
+       
+     if (!file3.EndsWith(".png"))
+       file3 += "_RhoZ.png"; // adding extensions
+
+     gSystem->ChangeDirectory(fi.fIniDir);
+      
+     printf("Saving...\n");
+
+     TEveViewerList *viewers = gEve->GetViewers();
+     TEveElement::List_i i = viewers->BeginChildren();
+     i++;
+     TEveViewer* view3d = ((TEveViewer*)*i);
+     view3d->GetGLViewer()->SavePicture(file1); // saving pictures
+     i++;
+     TEveViewer* viewrphi = ((TEveViewer*)*i);
+     viewrphi->GetGLViewer()->SavePicture(file2); // saving pictures
+     i++;
+     TEveViewer* viewrhoz = ((TEveViewer*)*i);
+     viewrhoz->GetGLViewer()->SavePicture(file3); // saving pictures
+     
+     printf("Done.\n"); 
+      
+      break;
+    }
+    
+    case kAEM3d: // saving only 3d view
+    {
+      
+     TGFileInfo fi;
+     fi.fFileTypes   = gPictureSaveAsTypes;
+     fi.fIniDir      = StrDup(""); // current directory
+     fi.fFileTypeIdx = 0;
+     fi.fOverwrite   = kTRUE;
+     new TGFileDialog(gClient->GetDefaultRoot(),
+     gEve->GetMainWindow(), kFDSave, &fi);
+     if (!fi.fFilename) return;
+
+     TPMERegexp filere(".*/([^/]+$)");
+     if (filere.Match(fi.fFilename) != 2)
+     {
+       Warning("AliEvePopupHandler", "file '%s' bad.", fi.fFilename);
+       return;
+     }
+
+     TString file1(filere[1]);
+     
+     if (!file1.EndsWith(".png"))
+       file1 += ".png";
+
+     gSystem->ChangeDirectory(fi.fIniDir);
+      
+     printf("Saving...\n");
+
+     TEveViewerList *viewers = gEve->GetViewers();
+     TEveElement::List_i i = viewers->BeginChildren();
+     i++;
+     TEveViewer* view3d = ((TEveViewer*)*i);
+     view3d->GetGLViewer()->SavePicture(file1);
+     
+     printf("Done.\n"); 
+      
+      break;
+    }
+    
+     case kAEMRphi: // saving only RPhi view
+    {
+      
+     TGFileInfo fi;
+     fi.fFileTypes   = gPictureSaveAsTypes;
+     fi.fIniDir      = StrDup(""); // current directory
+     fi.fFileTypeIdx = 0;
+     fi.fOverwrite   = kTRUE;
+     new TGFileDialog(gClient->GetDefaultRoot(),
+     gEve->GetMainWindow(), kFDSave, &fi);
+     if (!fi.fFilename) return;
+
+     TPMERegexp filere(".*/([^/]+$)");
+     if (filere.Match(fi.fFilename) != 2)
+     {
+       Warning("AliEvePopupHandler", "file '%s' bad.", fi.fFilename);
+       return;
+     }
+
+     TString file1(filere[1]);
+     
+     if (!file1.EndsWith(".png"))
+       file1 += ".png";
+     
+     gSystem->ChangeDirectory(fi.fIniDir);
+      
+     printf("Saving...\n");
+
+     TEveViewerList *viewers = gEve->GetViewers();
+     TEveElement::List_i i = viewers->BeginChildren();
+     i++;
+     i++;
+     TEveViewer* viewrphi = ((TEveViewer*)*i);
+     viewrphi->GetGLViewer()->SavePicture(file1);
+     
+     printf("Done.\n"); 
+      
+      break;
+    }
+    
+     case kAEMRhoz: // saving only RhoZ view
+    {
+    
+     TGFileInfo fi;
+     fi.fFileTypes   = gMacroSaveAsTypes;
+     fi.fIniDir      = StrDup(""); // current directory
+     fi.fFileTypeIdx = 0;
+     fi.fOverwrite   = kTRUE;
+     new TGFileDialog(gClient->GetDefaultRoot(),
+     gEve->GetMainWindow(), kFDSave, &fi);
+     if (!fi.fFilename) return;
+
+     TPMERegexp filere(".*/([^/]+$)");
+     if (filere.Match(fi.fFilename) != 2)
+     {
+       Warning("AliEvePopupHandler", "file '%s' bad.", fi.fFilename);
+       return;
+     }
+
+     TString file1(filere[1]);
+       
+     if (!file1.EndsWith(".png"))
+       file1 += ".png";
+
+     gSystem->ChangeDirectory(fi.fIniDir);
+     
+     printf("Saving...\n");
+
+     TEveViewerList *viewers = gEve->GetViewers();
+     TEveElement::List_i i = viewers->BeginChildren();
+     i++;
+     i++;
+     i++;
+     TEveViewer* viewrhoz = ((TEveViewer*)*i);
+     viewrhoz->GetGLViewer()->SavePicture(file1);
+     
+     printf("Done.\n"); 
+      
+      break;
+    }
+
+    case kAEMAllhr: // saving all three views in high resolution
+    {
+      
+     TGFileInfo fi;
+     fi.fFileTypes   = gPictureSaveAsTypes;
+     fi.fIniDir      = StrDup(""); // current directory
+     fi.fFileTypeIdx = 0;
+     fi.fOverwrite   = kTRUE;
+     new TGFileDialog(gClient->GetDefaultRoot(),
+     gEve->GetMainWindow(), kFDSave, &fi);
+     if (!fi.fFilename) return;
+
+     TPMERegexp filere(".*/([^/]+$)");
+     if (filere.Match(fi.fFilename) != 2)
+     {
+       Warning("AliEvePopupHandler", "file '%s' bad.", fi.fFilename);
+       return;
+     }
+
+     TString file1(filere[1]);
+     TString file2(filere[1]);
+     TString file3(filere[1]);
+     
+     if (!file1.EndsWith(".png"))
+       file1 += "_3D.png";
+       
+     if (!file2.EndsWith(".png"))
+       file2 += "_RPhi.png";
+       
+     if (!file3.EndsWith(".png"))
+       file3 += "_RhoZ.png";
+
+     gSystem->ChangeDirectory(fi.fIniDir);
+      
+     printf("Saving...\n");
+
+     TEveViewerList *viewers = gEve->GetViewers();
+     TEveElement::List_i i = viewers->BeginChildren();
+     i++;
+     TEveViewer* view3d = ((TEveViewer*)*i);
+     view3d->GetGLViewer()->SavePictureScale(file1,4.0); // getting high resolution
+     i++;
+     TEveViewer* viewrphi = ((TEveViewer*)*i);
+     viewrphi->GetGLViewer()->SavePictureScale(file2,4.0);
+     i++;
+     TEveViewer* viewrhoz = ((TEveViewer*)*i);
+     viewrhoz->GetGLViewer()->SavePictureScale(file3,4.0);
+     
+     printf("Done.\n"); 
+      
+      break;
+    }
+    
+    case kAEM3dhr: // saving only 3d view in high resolution
+    {
+      
+     TGFileInfo fi;
+     fi.fFileTypes   = gPictureSaveAsTypes;
+     fi.fIniDir      = StrDup(""); // current directory
+     fi.fFileTypeIdx = 0;
+     fi.fOverwrite   = kTRUE;
+     new TGFileDialog(gClient->GetDefaultRoot(),
+     gEve->GetMainWindow(), kFDSave, &fi);
+     if (!fi.fFilename) return;
+
+     TPMERegexp filere(".*/([^/]+$)");
+     if (filere.Match(fi.fFilename) != 2)
+     {
+       Warning("AliEvePopupHandler", "file '%s' bad.", fi.fFilename);
+       return;
+     }
+
+     TString file1(filere[1]);
+     
+     if (!file1.EndsWith(".png"))
+       file1 += ".png";
+
+     gSystem->ChangeDirectory(fi.fIniDir);
+      
+     printf("Saving...\n");
+
+     TEveViewerList *viewers = gEve->GetViewers();
+     TEveElement::List_i i = viewers->BeginChildren();
+     i++;
+     TEveViewer* view3d = ((TEveViewer*)*i);
+     view3d->GetGLViewer()->SavePictureScale(file1,4.0);
+     
+     printf("Done.\n"); 
+      
+      break;
+    }
+    
+     case kAEMRphihr: // saving only RPhi view in high resolution
+    {
+      
+     TGFileInfo fi;
+     fi.fFileTypes   = gPictureSaveAsTypes;
+     fi.fIniDir      = StrDup(""); // current directory
+     fi.fFileTypeIdx = 0;
+     fi.fOverwrite   = kTRUE;
+     new TGFileDialog(gClient->GetDefaultRoot(),
+     gEve->GetMainWindow(), kFDSave, &fi);
+     if (!fi.fFilename) return;
+
+     TPMERegexp filere(".*/([^/]+$)");
+     if (filere.Match(fi.fFilename) != 2)
+     {
+       Warning("AliEvePopupHandler", "file '%s' bad.", fi.fFilename);
+       return;
+     }
+
+     TString file1(filere[1]);
+     
+     if (!file1.EndsWith(".png"))
+       file1 += ".png";
+     
+     gSystem->ChangeDirectory(fi.fIniDir);
+      
+     printf("Saving...\n");
+
+     TEveViewerList *viewers = gEve->GetViewers();
+     TEveElement::List_i i = viewers->BeginChildren();
+     i++;
+     i++;
+     TEveViewer* viewrphi = ((TEveViewer*)*i);
+     viewrphi->GetGLViewer()->SavePictureScale(file1,4.0);
+     
+     printf("Done.\n"); 
+      
+      break;
+    }
+    
+     case kAEMRhozhr: // saving only RhoZ view in high resolution
+    {
+    
+     TGFileInfo fi;
+     fi.fFileTypes   = gMacroSaveAsTypes;
+     fi.fIniDir      = StrDup(""); // current directory
+     fi.fFileTypeIdx = 0;
+     fi.fOverwrite   = kTRUE;
+     new TGFileDialog(gClient->GetDefaultRoot(),
+     gEve->GetMainWindow(), kFDSave, &fi);
+     if (!fi.fFilename) return;
+
+     TPMERegexp filere(".*/([^/]+$)");
+     if (filere.Match(fi.fFilename) != 2)
+     {
+       Warning("AliEvePopupHandler", "file '%s' bad.", fi.fFilename);
+       return;
+     }
+
+     TString file1(filere[1]);
+       
+     if (!file1.EndsWith(".png"))
+       file1 += ".png";
+
+     gSystem->ChangeDirectory(fi.fIniDir);
+     
+     printf("Saving...\n");
+
+     TEveViewerList *viewers = gEve->GetViewers();
+     TEveElement::List_i i = viewers->BeginChildren();
+     i++;
+     i++;
+     i++;
+     TEveViewer* viewrhoz = ((TEveViewer*)*i);
+     viewrhoz->GetGLViewer()->SavePictureScale(file1,4.0);
+     
+     printf("Done.\n"); 
+      
+      break;
+    }
+
+     case kAEMSavemacros:// Saving Data Selection macros
+    {
+
+      AliEveMacroExecutor *exec = AliEveEventManager::GetMaster()->GetExecutor();
+
+      exec->SaveAddedMacros();
+
+      break;
+    }
+   case kAEMLoadmacros://Loading Data Selection macros
+    {
+
+      TEveBrowser *browser = gEve->GetBrowser();
+      browser->ShowCloseTab(kFALSE);
+
+      if(fLoadCheck)
+        browser->RemoveTab(TRootBrowser::kRight, 5);//remove the tab with previous DataSelection window
+      else
+        browser->RemoveTab(TRootBrowser::kRight, 2);
+
+
+      TGFileInfo fi;
+      fi.fFileTypes   = gMacroSaveAsTypes;
+      fi.fIniDir      = StrDup(""); // current directory
+      fi.fFileTypeIdx = 0;
+      fi.fOverwrite   = kTRUE;
+      new TGFileDialog(gClient->GetDefaultRoot(), gEve->GetMainWindow(), kFDOpen, &fi);//dialog
+      if (!fi.fFilename) return;
+
+      TPMERegexp filere(".*/([^/]+$)");
+      if (filere.Match(fi.fFilename) != 2)
+      {
+        Warning("AliEvePopupHandler", "file '%s' bad.", fi.fFilename);
+        return;
+      }
+      printf("Loading...\n");
+
+      TString file(filere[1]);
+      gSystem->ChangeDirectory(fi.fIniDir);
+
+      TEveUtil::Macro(file);//run macro
+
+      AliEveEventManager *eman = AliEveEventManager::GetMaster();//reload event (gEve->Refresh() crashes)
+      Int_t ev = eman->GetEventId();
+      eman->Close();
+      eman->Open();
+      eman->GotoEvent(ev);
+
+      printf("Done.\n");
+
+      fLoadCheck = kTRUE;
+
+      break;
+
+    }
+
+    case kAEMSave://saving VizDB
+    {
+      TGFileInfo fi;
+      fi.fFileTypes   = gMacroSaveAsTypes;
+      fi.fIniDir      = StrDup(""); // current directory
+      fi.fFileTypeIdx = 0;
+      fi.fOverwrite   = kTRUE;
+      new TGFileDialog(gClient->GetDefaultRoot(), gEve->GetMainWindow(), kFDSave, &fi);
+      if (!fi.fFilename) return;
+
+      TPMERegexp filere(".*/([^/]+$)");
+      if (filere.Match(fi.fFilename) != 2)
+      {
+        Warning("AliEvePopupHandler", "file '%s' bad.", fi.fFilename);
+        return;
+      }
+      printf("Saving...\n");
+
+      TString file(filere[1]);
+      if (!file.EndsWith(".C"))
+        file += ".C";
+      gSystem->ChangeDirectory(fi.fIniDir);
+      gEve->SaveVizDB(file);
+
+//Last line "gEve->SaveVizDB(file);" gives macro with many unnecessary
+//lines like "x038->SetMinPt(0);" tahat are not interpreted properly later
+
+      string text;
+      string all;
+
+      ifstream myfile1(file);
+      if(myfile1.is_open())
+        {
+        while(!myfile1.eof())
+          {
+            getline(myfile1,text);
+            TString check(text);
+            if(!(check.EndsWith("MinPt(0);")||check.EndsWith("MaxPt(0);")
+               ||check.EndsWith("LimPt(0);")||check.EndsWith("MinP(0);")
+               ||check.EndsWith("MaxP(0);")||check.EndsWith("LimP(0);")))
+              {
+              all += text; //Cut off unnecessary lines and bring everything together
+              all += "\n";
+              }
+          }
+        myfile1.close();
+        }
+
+      ofstream myfile2(file); //Replacing old file with the one without "bad" lines
+      myfile2 << all;
+      myfile2.close();
+
+      printf("Done.\n");
+      break;
+
+    }
+
+    case kAEMOpen://Opening VizDB
+    {
+      TGFileInfo fi;
+      fi.fFileTypes   = gMacroSaveAsTypes;
+      fi.fIniDir      = StrDup(""); // current directory
+      fi.fFileTypeIdx = 0;
+      fi.fOverwrite   = kTRUE;
+      new TGFileDialog(gClient->GetDefaultRoot(), gEve->GetMainWindow(), kFDOpen, &fi);
+      if (!fi.fFilename) return;
+
+      TPMERegexp filere(".*/([^/]+$)");
+      if (filere.Match(fi.fFilename) != 2)
+      {
+        Warning("AliEvePopupHandler", "file '%s' bad.", fi.fFilename);
+        return;
+      }
+      printf("Opening...\n");
+
+      TString file(filere[1]);
+
+      gSystem->ChangeDirectory(fi.fIniDir);
+
+      gEve->LoadVizDB(file, kTRUE, kTRUE);
+
+      gEve->Redraw3D(kTRUE);
+
+      printf("Done.\n");
+      break;
+
+    }
+
     default:
     {
       Warning(kEH, "Unknown menu entry.");
index 12dea41..f47ebd2 100644 (file)
@@ -33,6 +33,8 @@ protected:
 
   TGPopupMenu      *fAliEvePopup; // AliEve menu.
 
+  Bool_t           fLoadCheck; //for Data Selection Save/Load
+
 private:
   AliEveConfigManager();
 
index 1443e96..0a5a9af 100644 (file)
 #include <TList.h>
 #include <TROOT.h>
 
+#include <TEveManager.h>
+#include <TGFileDialog.h>
+#include <TGMenu.h>
+
+#include <TSystem.h>
+#include <TPRegexp.h>
+#include <RVersion.h>
+
+
 //______________________________________________________________________________
 //
 // Contains a list of AliEveMacros.
@@ -53,7 +62,7 @@ void AliEveMacroExecutor::AddMacro(AliEveMacro* mac)
   const TString mname = mac->GetMacro();
   if ( ! mname.IsNull() && TEveUtil::CheckMacro(mname) == kFALSE)
   {
-    TEveUtil::LoadMacro(mname);
+    TEveUtil::LoadMacro(mname);  
   }
   fMacros->Add(mac);
 }
@@ -75,6 +84,13 @@ AliEveMacro* AliEveMacroExecutor::FindMacro(const TString& func)
 
 /******************************************************************************/
 
+void AliEveMacroExecutor::RemoveMacros()
+{
+  fMacros->Clear();
+}
+
+/******************************************************************************/
+
 #include "Api.h"
 #include "TInterpreter.h"
 
@@ -155,3 +171,73 @@ void AliEveMacroExecutor::ExecMacros()
     }
   }
 }
+
+/******************************************************************************/
+
+#include <iostream>
+#include <fstream>
+using namespace std;
+
+namespace
+{
+const char *gMacroSaveAsTypes[] = {"CINT Macro", "*.C",
+                                   0, 0};
+}
+
+void AliEveMacroExecutor::SaveAddedMacros()
+{
+
+  TGFileInfo fi;
+  fi.fFileTypes   = gMacroSaveAsTypes;
+  fi.fIniDir      = StrDup(""); // current directory
+  fi.fFileTypeIdx = 0;
+  fi.fOverwrite   = kTRUE;
+  new TGFileDialog(gClient->GetDefaultRoot(), gEve->GetMainWindow(), kFDSave, &fi);
+  if (!fi.fFilename) return;
+
+  TPMERegexp filere(".*/([^/]+$)");
+  if (filere.Match(fi.fFilename) != 2)
+  {
+    Warning("AliEvePopupHandler", "file '%s' bad.", fi.fFilename);
+    return;
+  }
+  printf("Saving...\n");
+
+  TString file(filere[1]);
+  TString file1;
+  if (!file.EndsWith(".C"))
+  file1 = file + ".C";
+  gSystem->ChangeDirectory(fi.fIniDir);
+  ofstream myfile;
+  myfile.open (file1);
+
+  TIter next(fMacros);
+  AliEveMacro* mac;
+
+
+  myfile <<"//Macro generated automatically by AliEveMacroExecutor\n\n";
+
+  myfile <<"void "<<file<<"(){\n\n";
+  myfile <<"  AliEveMacroExecutor *exec = AliEveEventManager::GetMaster()->GetExecutor();\n";
+  myfile <<"  exec->RemoveMacros();\n";
+  myfile <<"  TEveBrowser *browser = gEve->GetBrowser();\n";
+  myfile <<"  browser->ShowCloseTab(kFALSE);\n";
+      
+  while ((mac = (AliEveMacro*) next()))
+  {
+    myfile <<"  exec->AddMacro(new AliEveMacro("<<mac->GetSources()<<", "<<char(34)<<mac->GetTags()<<char(34)<<", "
+     <<char(34)<<mac->GetMacro()<<char(34)<<", "<<char(34)<<mac->GetFunc()<<char(34)<<", "<<char(34)<<mac->GetArgs()
+     <<char(34)<<", "<<mac->GetActive()<<"));\n\n";
+  }
+
+  myfile <<"  TEveWindowSlot *slot = TEveWindow::CreateWindowInTab(browser->GetTabRight());\n";
+  myfile <<"  slot->StartEmbedding();\n";
+  myfile <<"  AliEveMacroExecutorWindow* exewin = new AliEveMacroExecutorWindow(exec);\n";
+  myfile <<"  slot->StopEmbedding("<<char(34)<<"DataSelection"<<char(34)<<");\n";
+  myfile <<"  exewin->PopulateMacros();\n\n";
+
+  myfile <<"\n}";
+  myfile.close();
+  printf("Saved...\n");
+
+}
index bd7eab6..c17d951 100644 (file)
@@ -31,6 +31,10 @@ public:
 
   void ExecMacros();
 
+  void SaveAddedMacros();
+
+  void RemoveMacros();
+
 protected:
   TList*   fMacros;
 
index a26312c..6405938 100644 (file)
@@ -217,3 +217,13 @@ void AliEveMultiView::SetCenterRhoZ(Double_t x, Double_t y, Double_t z)
   fRhoZMgr->SetCenter(x, y, z);
 }
 
+void AliEveMultiView::DestroyAllGeometries()
+{
+  // Destroy 3d, r-phi and rho-z geometries.
+
+  fGeomGentle->DestroyElements();
+  fGeomGentleRPhi->DestroyElements();
+  fGeomGentleRhoZ->DestroyElements();
+
+}
+
index 7f45849..c695611 100644 (file)
@@ -57,6 +57,8 @@ public:
   void SetCenterRPhi(Double_t x, Double_t y, Double_t z);
   void SetCenterRhoZ(Double_t x, Double_t y, Double_t z);
 
+  void DestroyAllGeometries();
+
   //-------------------------------------------------------------------------
 
   TEveViewer* Get3DView()   { return f3DView; }
diff --git a/EVE/alice-macros/geom_gentle_bright.C b/EVE/alice-macros/geom_gentle_bright.C
new file mode 100644 (file)
index 0000000..ccb930c
--- /dev/null
@@ -0,0 +1,312 @@
+void geom_gentle_bright(Bool_t register_as_global=kTRUE)
+{
+
+  TFile f("$ALICE_ROOT/EVE/alice-data/gentle_geo.root");
+  TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
+  TEveGeoShape* gsre1 = TEveGeoShape::ImportShapeExtract(gse);
+  f.Close();
+
+  if (register_as_global)
+  {
+    gEve->AddGlobalElement(gsre1);
+  }
+
+  // Fix visibility, color and transparency
+
+  gsre1->SetRnrSelf(kFALSE);
+  TEveElement::List_i i = gsre1->BeginChildren();
+
+//ITS
+
+  TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+  lvl1->SetRnrSelf(kFALSE);
+  TEveElement::List_i j = lvl1->BeginChildren();
+
+  TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+  lvl2->SetRnrSelf(kFALSE);
+  TEveElement::List_i k = lvl2->BeginChildren();
+
+  TEveGeoShape* its1 = (TEveGeoShape*) *k;
+  its1->SetRnrSelf(kTRUE);
+  its1->SetMainColor(kOrange+10);
+//  its1->SetMainTransparency(60);
+  k++;
+
+  TEveGeoShape* its2 = (TEveGeoShape*) *k;
+  its2->SetRnrSelf(kTRUE);
+  its2->SetMainColor(kOrange-3);
+//  its2->SetMainTransparency(60);
+  k++;
+
+  TEveGeoShape* its3 = (TEveGeoShape*) *k;
+  its3->SetRnrSelf(kTRUE);
+  its3->SetMainColor(kYellow);
+//  its3->SetMainTransparency(60);
+
+//TPC
+
+  i++;
+
+  TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+  lvl1->SetRnrSelf(kFALSE);
+  TEveElement::List_i j = lvl1->BeginChildren();
+
+  TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+  lvl2->SetRnrSelf(kFALSE);
+  TEveElement::List_i k = lvl2->BeginChildren();
+
+  TEveGeoShape* lvl3 = (TEveGeoShape*) *k;
+  lvl3->SetRnrSelf(kTRUE);
+  lvl3->SetMainColor(kCyan);
+//  lvl3->SetMainTransparency(70);
+  TEveElement::List_i l = lvl3->BeginChildren();
+
+  TEveGeoShape* lvl4 = (TEveGeoShape*) *l;
+  lvl4->SetRnrSelf(kFALSE);
+  TEveElement::List_i m = lvl4->BeginChildren();
+
+  TEveGeoShape* tpc1 = (TEveGeoShape*) *m;
+  tpc1->SetRnrSelf(kTRUE);
+//  tpc1->SetMainColor(1);
+//  tpc1->SetMainTransparency(70);
+  m++;
+
+  TEveGeoShape* tpc2 = (TEveGeoShape*) *m;
+  tpc2->SetRnrSelf(kTRUE);
+//  tpc2->SetMainColor(1);
+//  tpc2->SetMainTransparency(70);
+  m++;
+
+  TEveGeoShape* tpc3 = (TEveGeoShape*) *m;
+  tpc3->SetRnrSelf(kTRUE);
+//  tpc3->SetMainColor(1);
+//  tpc3->SetMainTransparency(70);
+  m++;
+
+//TRD+TOF
+
+  i++;
+
+  TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+  lvl1->SetRnrSelf(kFALSE);
+  TEveElement::List_i j = lvl1->BeginChildren();
+
+  TEveGeoShape* trd1 = (TEveGeoShape*) *j;
+  trd1->SetRnrSelf(kTRUE);
+  trd1->SetMainColor(kAzure-7);
+//  trd1->SetMainTransparency(80);
+  j++;
+
+  TEveGeoShape* tof1 = (TEveGeoShape*) *j;
+  tof1->SetRnrSelf(kTRUE);
+  tof1->SetMainColor(kMagenta+3);
+//  tof1->SetMainTransparency(80);
+
+//PHOS
+
+  i++;
+
+  TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+  lvl1->SetRnrSelf(kFALSE);
+
+  for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); ++j)
+    {
+      TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+      lvl2->SetRnrSelf(kTRUE);
+      lvl2->SetMainColor(kRed);
+//      lvl2->SetMainTransparency(20);
+    }
+
+//HMPID
+
+  i++;
+
+  TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+  lvl1->SetRnrSelf(kFALSE);
+
+  for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); ++j)
+    {
+      TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+      lvl2->SetRnrSelf(kTRUE);
+      lvl2->SetMainColor(kBlue);
+//      lvl2->SetMainTransparency(20);
+    }
+
+  TFile f("$ALICE_ROOT/EVE/alice-data/gentle_rphi_geo.root");
+  TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
+  TEveGeoShape* gsre2 = TEveGeoShape::ImportShapeExtract(gse);
+  f.Close();
+
+  // Fix visibility, color and transparency
+
+  gsre2->SetRnrSelf(kFALSE);
+  TEveElement::List_i i = gsre2->BeginChildren();
+
+//ITS
+
+  TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+  lvl1->SetRnrSelf(kFALSE);
+  TEveElement::List_i j = lvl1->BeginChildren();
+
+  TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+  lvl2->SetRnrSelf(kFALSE);
+  TEveElement::List_i k = lvl2->BeginChildren();
+
+  TEveGeoShape* its1 = (TEveGeoShape*) *k;
+  its1->SetRnrSelf(kTRUE);
+  its1->SetMainColor(1);
+  its1->SetMainTransparency(80);
+
+  k++;
+
+  TEveGeoShape* its2 = (TEveGeoShape*) *k;
+  its2->SetRnrSelf(kTRUE);
+  its2->SetMainColor(1);
+  its2->SetMainTransparency(80);
+  k++;
+
+  TEveGeoShape* its3 = (TEveGeoShape*) *k;
+  its3->SetRnrSelf(kTRUE);
+  its3->SetMainColor(1);
+  its3->SetMainTransparency(80);
+
+//TPC
+
+  i++;
+
+  TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+  lvl1->SetRnrSelf(kFALSE);
+
+  for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
+    {
+      TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+      lvl2->SetRnrSelf(kTRUE);
+      lvl2->SetMainColor(1);
+      lvl2->SetMainTransparency(80);
+    }
+
+//PHOS
+
+  i++;
+  i++;
+
+  TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+  lvl1->SetRnrSelf(kFALSE);
+
+  for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
+    {
+      TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+      lvl2->SetRnrSelf(kTRUE);
+      lvl2->SetMainColor(1);
+      lvl2->SetMainTransparency(80);
+
+    }
+
+//HMPID
+
+  i++;
+
+  TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+  lvl1->SetRnrSelf(kFALSE);
+
+  for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
+    {
+      TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+      lvl2->SetRnrSelf(kTRUE);
+      lvl2->SetMainColor(1);
+      lvl2->SetMainTransparency(80);
+    }
+
+  TFile f("$ALICE_ROOT/EVE/alice-data/gentle_rhoz_geo.root");
+  TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
+  TEveGeoShape* gsre3 = TEveGeoShape::ImportShapeExtract(gse);
+  f.Close();
+
+  // Fix visibility, color and transparency
+
+  gsre3->SetRnrSelf(kFALSE);
+  TEveElement::List_i i = gsre3->BeginChildren();
+
+//ITS
+
+  TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+  lvl1->SetRnrSelf(kFALSE);
+  TEveElement::List_i j = lvl1->BeginChildren();
+
+  TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+  lvl2->SetRnrSelf(kFALSE);
+  TEveElement::List_i k = lvl2->BeginChildren();
+
+  TEveGeoShape* its1 = (TEveGeoShape*) *k;
+  its1->SetRnrSelf(kTRUE);
+  its1->SetMainColor(1);
+  k++;
+
+  TEveGeoShape* its2 = (TEveGeoShape*) *k;
+  its2->SetRnrSelf(kTRUE);
+  its2->SetMainColor(1);
+  k++;
+
+  TEveGeoShape* its3 = (TEveGeoShape*) *k;
+  its3->SetRnrSelf(kTRUE);
+  its3->SetMainColor(1);
+
+//TPC
+
+  i++;
+
+  TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+  lvl1->SetRnrSelf(kFALSE);
+
+  for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
+    {
+      TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+      lvl2->SetRnrSelf(kTRUE);
+      lvl2->SetMainColor(1);
+      lvl2->SetMainTransparency(80);
+
+    }
+
+//PHOS
+
+  i++;
+  i++;
+  TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+  lvl1->SetRnrSelf(kFALSE);
+
+  for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
+    {
+      TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+      lvl2->SetRnrSelf(kTRUE);
+      lvl2->SetMainColor(1);
+      lvl2->SetMainTransparency(80);
+    }
+
+//HMPID
+
+  i++;
+
+  TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+  lvl1->SetRnrSelf(kFALSE);
+
+  for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
+    {
+      TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+      lvl2->SetRnrSelf(kTRUE);
+      lvl2->SetMainColor(1);
+      lvl2->SetMainTransparency(80);
+    }
+
+
+//fix all the viewers
+
+  TEveElement* top = gEve->GetCurrentEvent();
+
+  AliEveMultiView *mv = AliEveMultiView::Instance();
+
+  mv->InitGeomGentle(gsre1, gsre2, gsre3);
+
+  gEve->FullRedraw3D(kTRUE, kTRUE);
+
+}
diff --git a/EVE/alice-macros/geom_gentle_green.C b/EVE/alice-macros/geom_gentle_green.C
new file mode 100644 (file)
index 0000000..f585648
--- /dev/null
@@ -0,0 +1,312 @@
+void geom_gentle_green(Bool_t register_as_global=kTRUE)
+{
+
+  TFile f("$ALICE_ROOT/EVE/alice-data/gentle_geo.root");
+  TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
+  TEveGeoShape* gsre1 = TEveGeoShape::ImportShapeExtract(gse);
+  f.Close();
+
+  if (register_as_global)
+  {
+    gEve->AddGlobalElement(gsre1);
+  }
+
+  // Fix visibility, color and transparency
+
+  gsre1->SetRnrSelf(kFALSE);
+  TEveElement::List_i i = gsre1->BeginChildren();
+
+//ITS
+
+  TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+  lvl1->SetRnrSelf(kFALSE);
+  TEveElement::List_i j = lvl1->BeginChildren();
+
+  TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+  lvl2->SetRnrSelf(kFALSE);
+  TEveElement::List_i k = lvl2->BeginChildren();
+
+  TEveGeoShape* its1 = (TEveGeoShape*) *k;
+  its1->SetRnrSelf(kTRUE);
+  its1->SetMainColor(kMagenta-5);
+  its1->SetMainTransparency(60);
+  k++;
+
+  TEveGeoShape* its2 = (TEveGeoShape*) *k;
+  its2->SetRnrSelf(kTRUE);
+  its2->SetMainColor(kCyan-5);
+  its2->SetMainTransparency(60);
+  k++;
+
+  TEveGeoShape* its3 = (TEveGeoShape*) *k;
+  its3->SetRnrSelf(kTRUE);
+  its3->SetMainColor(kGreen-5);
+  its3->SetMainTransparency(60);
+
+//TPC
+
+  i++;
+
+  TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+  lvl1->SetRnrSelf(kFALSE);
+  TEveElement::List_i j = lvl1->BeginChildren();
+
+  TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+  lvl2->SetRnrSelf(kFALSE);
+  TEveElement::List_i k = lvl2->BeginChildren();
+
+  TEveGeoShape* lvl3 = (TEveGeoShape*) *k;
+  lvl3->SetRnrSelf(kFALSE);
+  lvl3->SetMainColor(1);
+  lvl3->SetMainTransparency(70);
+  TEveElement::List_i l = lvl3->BeginChildren();
+
+  TEveGeoShape* lvl4 = (TEveGeoShape*) *l;
+  lvl4->SetRnrSelf(kFALSE);
+  TEveElement::List_i m = lvl4->BeginChildren();
+
+  TEveGeoShape* tpc1 = (TEveGeoShape*) *m;
+  tpc1->SetRnrSelf(kTRUE);
+  tpc1->SetMainColor(1);
+  tpc1->SetMainTransparency(70);
+  m++;
+
+  TEveGeoShape* tpc2 = (TEveGeoShape*) *m;
+  tpc2->SetRnrSelf(kTRUE);
+  tpc2->SetMainColor(1);
+  tpc2->SetMainTransparency(70);
+  m++;
+
+  TEveGeoShape* tpc3 = (TEveGeoShape*) *m;
+  tpc3->SetRnrSelf(kTRUE);
+  tpc3->SetMainColor(1);
+  tpc3->SetMainTransparency(70);
+  m++;
+
+//TRD+TOF
+
+  i++;
+
+  TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+  lvl1->SetRnrSelf(kFALSE);
+  TEveElement::List_i j = lvl1->BeginChildren();
+
+  TEveGeoShape* trd1 = (TEveGeoShape*) *j;
+  trd1->SetRnrSelf(kTRUE);
+  trd1->SetMainColor(kMagenta-8);
+  trd1->SetMainTransparency(80);
+  j++;
+
+  TEveGeoShape* tof1 = (TEveGeoShape*) *j;
+  tof1->SetRnrSelf(kTRUE);
+  tof1->SetMainColor(kMagenta-1);
+  tof1->SetMainTransparency(80);
+
+//PHOS
+
+  i++;
+
+  TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+  lvl1->SetRnrSelf(kFALSE);
+
+  for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); ++j)
+    {
+      TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+      lvl2->SetRnrSelf(kTRUE);
+      lvl2->SetMainColor(kGreen-8);
+      lvl2->SetMainTransparency(20);
+    }
+
+//HMPID
+
+  i++;
+
+  TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+  lvl1->SetRnrSelf(kFALSE);
+
+  for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); ++j)
+    {
+      TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+      lvl2->SetRnrSelf(kTRUE);
+      lvl2->SetMainColor(kBlue-5);
+      lvl2->SetMainTransparency(20);
+    }
+
+  TFile f("$ALICE_ROOT/EVE/alice-data/gentle_rphi_geo.root");
+  TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
+  TEveGeoShape* gsre2 = TEveGeoShape::ImportShapeExtract(gse);
+  f.Close();
+
+  // Fix visibility, color and transparency
+
+  gsre2->SetRnrSelf(kFALSE);
+  TEveElement::List_i i = gsre2->BeginChildren();
+
+//ITS
+
+  TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+  lvl1->SetRnrSelf(kFALSE);
+  TEveElement::List_i j = lvl1->BeginChildren();
+
+  TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+  lvl2->SetRnrSelf(kFALSE);
+  TEveElement::List_i k = lvl2->BeginChildren();
+
+  TEveGeoShape* its1 = (TEveGeoShape*) *k;
+  its1->SetRnrSelf(kTRUE);
+  its1->SetMainColor(1);
+  its1->SetMainTransparency(80);
+
+  k++;
+
+  TEveGeoShape* its2 = (TEveGeoShape*) *k;
+  its2->SetRnrSelf(kTRUE);
+  its2->SetMainColor(1);
+  its2->SetMainTransparency(80);
+  k++;
+
+  TEveGeoShape* its3 = (TEveGeoShape*) *k;
+  its3->SetRnrSelf(kTRUE);
+  its3->SetMainColor(1);
+  its3->SetMainTransparency(80);
+
+//TPC
+
+  i++;
+
+  TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+  lvl1->SetRnrSelf(kFALSE);
+
+  for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
+    {
+      TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+      lvl2->SetRnrSelf(kTRUE);
+      lvl2->SetMainColor(1);
+      lvl2->SetMainTransparency(80);
+    }
+
+//PHOS
+
+  i++;
+  i++;
+
+  TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+  lvl1->SetRnrSelf(kFALSE);
+
+  for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
+    {
+      TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+      lvl2->SetRnrSelf(kTRUE);
+      lvl2->SetMainColor(1);
+      lvl2->SetMainTransparency(80);
+
+    }
+
+//HMPID
+
+  i++;
+
+  TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+  lvl1->SetRnrSelf(kFALSE);
+
+  for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
+    {
+      TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+      lvl2->SetRnrSelf(kTRUE);
+      lvl2->SetMainColor(1);
+      lvl2->SetMainTransparency(80);
+    }
+
+  TFile f("$ALICE_ROOT/EVE/alice-data/gentle_rhoz_geo.root");
+  TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
+  TEveGeoShape* gsre3 = TEveGeoShape::ImportShapeExtract(gse);
+  f.Close();
+
+  // Fix visibility, color and transparency
+
+  gsre3->SetRnrSelf(kFALSE);
+  TEveElement::List_i i = gsre3->BeginChildren();
+
+//ITS
+
+  TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+  lvl1->SetRnrSelf(kFALSE);
+  TEveElement::List_i j = lvl1->BeginChildren();
+
+  TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+  lvl2->SetRnrSelf(kFALSE);
+  TEveElement::List_i k = lvl2->BeginChildren();
+
+  TEveGeoShape* its1 = (TEveGeoShape*) *k;
+  its1->SetRnrSelf(kTRUE);
+  its1->SetMainColor(1);
+  k++;
+
+  TEveGeoShape* its2 = (TEveGeoShape*) *k;
+  its2->SetRnrSelf(kTRUE);
+  its2->SetMainColor(1);
+  k++;
+
+  TEveGeoShape* its3 = (TEveGeoShape*) *k;
+  its3->SetRnrSelf(kTRUE);
+  its3->SetMainColor(1);
+
+//TPC
+
+  i++;
+
+  TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+  lvl1->SetRnrSelf(kFALSE);
+
+  for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
+    {
+      TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+      lvl2->SetRnrSelf(kTRUE);
+      lvl2->SetMainColor(1);
+      lvl2->SetMainTransparency(80);
+
+    }
+
+//PHOS
+
+  i++;
+  i++;
+  TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+  lvl1->SetRnrSelf(kFALSE);
+
+  for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
+    {
+      TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+      lvl2->SetRnrSelf(kTRUE);
+      lvl2->SetMainColor(1);
+      lvl2->SetMainTransparency(80);
+    }
+
+//HMPID
+
+  i++;
+
+  TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+  lvl1->SetRnrSelf(kFALSE);
+
+  for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
+    {
+      TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+      lvl2->SetRnrSelf(kTRUE);
+      lvl2->SetMainColor(1);
+      lvl2->SetMainTransparency(80);
+    }
+
+
+//fix all the viewers
+
+  TEveElement* top = gEve->GetCurrentEvent();
+
+  AliEveMultiView *mv = AliEveMultiView::Instance();
+
+  mv->InitGeomGentle(gsre1, gsre2, gsre3);
+
+  gEve->FullRedraw3D(kTRUE, kTRUE);
+
+}
diff --git a/EVE/alice-macros/geom_gentle_notransparency.C b/EVE/alice-macros/geom_gentle_notransparency.C
new file mode 100644 (file)
index 0000000..3e2d26b
--- /dev/null
@@ -0,0 +1,145 @@
+void geom_gentle_notransparency(Bool_t register_as_global=kTRUE)
+{
+
+  TFile f("$ALICE_ROOT/EVE/alice-data/gentle_geo.root");
+  TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
+  TEveGeoShape* gsre1 = TEveGeoShape::ImportShapeExtract(gse);
+  f.Close();
+
+  if (register_as_global)
+  {
+    gEve->AddGlobalElement(gsre1);
+  }
+
+  // Fix visibility, color and transparency
+
+  gsre1->SetRnrSelf(kFALSE);
+  TEveElement::List_i i = gsre1->BeginChildren();
+
+//ITS
+
+  TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+  lvl1->SetRnrSelf(kFALSE);
+  TEveElement::List_i j = lvl1->BeginChildren();
+
+  TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+  lvl2->SetRnrSelf(kFALSE);
+  TEveElement::List_i k = lvl2->BeginChildren();
+
+  TEveGeoShape* its1 = (TEveGeoShape*) *k;
+  its1->SetRnrSelf(kTRUE);
+  its1->SetMainTransparency(5);
+  k++;
+
+  TEveGeoShape* its2 = (TEveGeoShape*) *k;
+  its2->SetRnrSelf(kTRUE);
+  its2->SetMainTransparency(5);
+  k++;
+
+  TEveGeoShape* its3 = (TEveGeoShape*) *k;
+  its3->SetRnrSelf(kTRUE);
+  its3->SetMainTransparency(5);
+
+//TPC
+
+  i++;
+
+  TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+  lvl1->SetRnrSelf(kFALSE);
+  TEveElement::List_i j = lvl1->BeginChildren();
+
+  TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+  lvl2->SetRnrSelf(kFALSE);
+  TEveElement::List_i k = lvl2->BeginChildren();
+
+  TEveGeoShape* lvl3 = (TEveGeoShape*) *k;
+  lvl3->SetRnrSelf(kTRUE);
+  lvl3->SetMainTransparency(5);
+  TEveElement::List_i l = lvl3->BeginChildren();
+
+  TEveGeoShape* lvl4 = (TEveGeoShape*) *l;
+  lvl4->SetRnrSelf(kFALSE);
+  TEveElement::List_i m = lvl4->BeginChildren();
+
+  TEveGeoShape* tpc1 = (TEveGeoShape*) *m;
+  tpc1->SetRnrSelf(kTRUE);
+  tpc1->SetMainTransparency(5);
+  m++;
+
+  TEveGeoShape* tpc2 = (TEveGeoShape*) *m;
+  tpc2->SetMainColor(kGray);
+  tpc2->SetMainTransparency(5);
+  m++;
+
+  TEveGeoShape* tpc3 = (TEveGeoShape*) *m;
+  tpc3->SetRnrSelf(kTRUE);
+  tpc3->SetMainTransparency(5);
+  m++;
+
+//TRD+TOF
+
+  i++;
+
+  TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+  lvl1->SetRnrSelf(kFALSE);
+  TEveElement::List_i j = lvl1->BeginChildren();
+
+  TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+  lvl2->SetRnrSelf(kTRUE);
+  lvl2->SetMainTransparency(5);
+  j++;
+
+  TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+  lvl2->SetRnrSelf(kTRUE);
+  lvl2->SetMainTransparency(5);
+  j++;
+
+//PHOS
+
+  i++;
+
+  TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+  lvl1->SetRnrSelf(kFALSE);
+
+  for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
+    {
+      TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+      lvl2->SetRnrSelf(kTRUE);
+      lvl2->SetMainTransparency(5);
+    }
+
+//HMPID
+
+  i++;
+
+  TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+  lvl1->SetRnrSelf(kFALSE);
+
+  for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
+    {
+      TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+      lvl2->SetRnrSelf(kTRUE);
+      lvl2->SetMainTransparency(5);
+    }
+
+
+  TFile f("$ALICE_ROOT/EVE/alice-data/gentle_rphi_geo.root");
+  TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
+  TEveGeoShape* gsre2 = TEveGeoShape::ImportShapeExtract(gse);
+  f.Close();
+
+  TFile f("$ALICE_ROOT/EVE/alice-data/gentle_rhoz_geo.root");
+  TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
+  TEveGeoShape* gsre3 = TEveGeoShape::ImportShapeExtract(gse);
+  f.Close();
+
+  TEveElement* top = gEve->GetCurrentEvent();
+
+  AliEveMultiView *mv = AliEveMultiView::Instance();
+
+  mv->InitGeomGentle(gsre1, gsre2, gsre3);
+
+  gEve->FullRedraw3D(kTRUE, kTRUE);
+
+}
+
index 18a9573..9243c27 100644 (file)
@@ -82,14 +82,17 @@ void geom_gentle_transparent(Bool_t register_as_global=kTRUE)
 
   TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
   lvl1->SetRnrSelf(kFALSE);
+  TEveElement::List_i j = lvl1->BeginChildren();
 
-  for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
-    {
-      TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
-      lvl2->SetRnrSelf(kTRUE);
-      lvl2->SetMainTransparency(80);
+  TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+  lvl2->SetRnrSelf(kTRUE);
+  lvl2->SetMainTransparency(80);
+  j++;
 
-    }
+  TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+  lvl2->SetRnrSelf(kTRUE);
+  lvl2->SetMainTransparency(80);
+  j++;
 
 //PHOS
 
index d54883a..69c4cdd 100644 (file)
@@ -67,7 +67,7 @@ void geom_gentle_transparentdark(Bool_t register_as_global=kTRUE)
   TEveElement::List_i k = lvl2->BeginChildren();
 
   TEveGeoShape* lvl3 = (TEveGeoShape*) *k;
-  lvl3->SetRnrSelf(kFALSE);
+  lvl3->SetRnrSelf(kTRUE);
   lvl3->SetMainColor(0);
   lvl3->SetMainTransparency(80);
   TEveElement::List_i l = lvl3->BeginChildren();
@@ -100,16 +100,18 @@ void geom_gentle_transparentdark(Bool_t register_as_global=kTRUE)
 
   TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
   lvl1->SetRnrSelf(kFALSE);
-//  TEveElement::List_i j = lvl1->BeginChildren();
+  TEveElement::List_i j = lvl1->BeginChildren();
 
-  for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); ++j)
-    {
-      TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
-      lvl2->SetRnrSelf(kTRUE);
-      lvl2->SetMainColor(0);
-      lvl2->SetMainTransparency(80);
+  TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+  lvl2->SetRnrSelf(kTRUE);
+  lvl2->SetMainColor(0);
+  lvl2->SetMainTransparency(80);
+  j++;
 
-    }
+  TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+  lvl2->SetRnrSelf(kTRUE);
+  lvl2->SetMainColor(0);
+  lvl2->SetMainTransparency(80);
 
 //PHOS
 
@@ -188,7 +190,6 @@ void geom_gentle_transparentdark(Bool_t register_as_global=kTRUE)
 //TPC
 
   i++;
-  i++;
 
   TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
   lvl1->SetRnrSelf(kFALSE);
@@ -205,6 +206,7 @@ void geom_gentle_transparentdark(Bool_t register_as_global=kTRUE)
 //PHOS
 
   i++;
+  i++;
 
   TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
   lvl1->SetRnrSelf(kFALSE);
@@ -276,7 +278,6 @@ void geom_gentle_transparentdark(Bool_t register_as_global=kTRUE)
 //TPC
 
   i++;
-  i++;
 
   TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
   lvl1->SetRnrSelf(kFALSE);
@@ -294,6 +295,7 @@ void geom_gentle_transparentdark(Bool_t register_as_global=kTRUE)
 //PHOS
 
   i++;
+  i++;
 
   TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
   lvl1->SetRnrSelf(kFALSE);
@@ -323,9 +325,6 @@ void geom_gentle_transparentdark(Bool_t register_as_global=kTRUE)
       lvl2->SetMainTransparency(80);
     }
 
-//======================================
-
-
   TEveElement* top = gEve->GetCurrentEvent();
 
   AliEveMultiView *mv = AliEveMultiView::Instance();
index e1732c8..44d3247 100644 (file)
@@ -72,7 +72,7 @@ void geom_gentle_transparentlight(Bool_t register_as_global=kTRUE)
   m++;
 
   TEveGeoShape* tpc2 = (TEveGeoShape*) *m;
-  tpc2->SetMainColor(kGray);
+  tpc2->SetRnrSelf(kTRUE);
   tpc2->SetMainColor(1);
   tpc2->SetMainTransparency(80);
   m++;
@@ -89,15 +89,18 @@ void geom_gentle_transparentlight(Bool_t register_as_global=kTRUE)
 
   TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
   lvl1->SetRnrSelf(kFALSE);
+  TEveElement::List_i j = lvl1->BeginChildren();
 
-  for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); ++j)
-    {
-      TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
-      lvl2->SetRnrSelf(kTRUE);
-      lvl2->SetMainColor(1);
-      lvl2->SetMainTransparency(80);
+  TEveGeoShape* trd1 = (TEveGeoShape*) *j;
+  trd1->SetRnrSelf(kTRUE);
+  trd1->SetMainColor(1);
+  trd1->SetMainTransparency(80);
+  j++;
 
-    }
+  TEveGeoShape* tof1 = (TEveGeoShape*) *j;
+  tof1->SetRnrSelf(kTRUE);
+  tof1->SetMainColor(1);
+  tof1->SetMainTransparency(80);
 
 //PHOS
 
@@ -170,7 +173,6 @@ void geom_gentle_transparentlight(Bool_t register_as_global=kTRUE)
 //TPC
 
   i++;
-  i++;
 
   TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
   lvl1->SetRnrSelf(kFALSE);
@@ -186,6 +188,7 @@ void geom_gentle_transparentlight(Bool_t register_as_global=kTRUE)
 //PHOS
 
   i++;
+  i++;
 
   TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
   lvl1->SetRnrSelf(kFALSE);
@@ -251,7 +254,6 @@ void geom_gentle_transparentlight(Bool_t register_as_global=kTRUE)
 //TPC
 
   i++;
-  i++;
 
   TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
   lvl1->SetRnrSelf(kFALSE);
@@ -268,7 +270,8 @@ void geom_gentle_transparentlight(Bool_t register_as_global=kTRUE)
 //PHOS
 
   i++;
-
+  i++;
   TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
   lvl1->SetRnrSelf(kFALSE);
 
diff --git a/EVE/alice-macros/geom_gentle_yellow.C b/EVE/alice-macros/geom_gentle_yellow.C
new file mode 100644 (file)
index 0000000..f45760c
--- /dev/null
@@ -0,0 +1,313 @@
+// $Id$
+// Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
+
+/**************************************************************************
+ * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
+ * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for          *
+ * full copyright notice.                                                 *
+ **************************************************************************/
+
+void geom_gentle_yellow(Bool_t register_as_global=kTRUE)
+{
+
+  TFile f("$ALICE_ROOT/EVE/alice-data/gentle_geo.root");
+  TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
+  TEveGeoShape* gsre1 = TEveGeoShape::ImportShapeExtract(gse);
+  f.Close();
+
+  if (register_as_global)
+  {
+    gEve->AddGlobalElement(gsre1);
+  }
+
+  // Fix visibility, color and transparency
+
+  gsre1->SetRnrSelf(kFALSE);
+  TEveElement::List_i i = gsre1->BeginChildren();
+
+//ITS
+
+  TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+  lvl1->SetRnrSelf(kFALSE);
+  TEveElement::List_i j = lvl1->BeginChildren();
+
+  TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+  lvl2->SetRnrSelf(kFALSE);
+  TEveElement::List_i k = lvl2->BeginChildren();
+
+  TEveGeoShape* its1 = (TEveGeoShape*) *k;
+  its1->SetRnrSelf(kTRUE);
+  its1->SetMainColor(kYellow-4);
+  its1->SetMainTransparency(50);
+  k++;
+
+  TEveGeoShape* its2 = (TEveGeoShape*) *k;
+  its2->SetRnrSelf(kTRUE);
+  its2->SetMainColor(kYellow-7);
+  its2->SetMainTransparency(50);
+  k++;
+
+  TEveGeoShape* its3 = (TEveGeoShape*) *k;
+  its3->SetRnrSelf(kTRUE);
+  its3->SetMainColor(kYellow-9);
+  its3->SetMainTransparency(50);
+
+//TPC
+
+  i++;
+
+  TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+  lvl1->SetRnrSelf(kFALSE);
+  TEveElement::List_i j = lvl1->BeginChildren();
+
+  TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+  lvl2->SetRnrSelf(kFALSE);
+  TEveElement::List_i k = lvl2->BeginChildren();
+
+  TEveGeoShape* lvl3 = (TEveGeoShape*) *k;
+  lvl3->SetRnrSelf(kTRUE);
+  lvl3->SetMainColor(kGray);
+  lvl3->SetMainTransparency(80);
+  TEveElement::List_i l = lvl3->BeginChildren();
+
+  TEveGeoShape* lvl4 = (TEveGeoShape*) *l;
+  lvl4->SetRnrSelf(kFALSE);
+  TEveElement::List_i m = lvl4->BeginChildren();
+
+  TEveGeoShape* tpc1 = (TEveGeoShape*) *m;
+  tpc1->SetRnrSelf(kTRUE);
+  tpc1->SetMainColor(kGray+2);
+  tpc1->SetMainTransparency(80);
+  m++;
+
+  TEveGeoShape* tpc2 = (TEveGeoShape*) *m;
+  tpc2->SetMainColor(kGray);
+  tpc2->SetMainColor(kGray+2);
+  tpc2->SetMainTransparency(80);
+  m++;
+
+  TEveGeoShape* tpc3 = (TEveGeoShape*) *m;
+  tpc3->SetRnrSelf(kTRUE);
+  tpc3->SetMainColor(kGray+2);
+  tpc3->SetMainTransparency(80);
+  m++;
+
+//TRD+TOF
+
+  i++;
+
+  TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+  lvl1->SetRnrSelf(kFALSE);
+
+  for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); ++j)
+    {
+      TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+      lvl2->SetRnrSelf(kFALSE);
+      lvl2->SetMainColor(0);
+      lvl2->SetMainTransparency(80);
+
+    }
+
+//PHOS
+
+  i++;
+
+  TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+  lvl1->SetRnrSelf(kFALSE);
+
+  for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); ++j)
+    {
+      TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+      lvl2->SetRnrSelf(kTRUE);
+      lvl2->SetMainTransparency(30);
+    }
+
+//HMPID
+
+  i++;
+
+  TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+  lvl1->SetRnrSelf(kFALSE);
+
+  for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); ++j)
+    {
+      TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+      lvl2->SetRnrSelf(kTRUE);
+      lvl2->SetMainTransparency(30);
+    }
+
+  // The resulting geometry is NOT added into the global scene!
+
+  TFile f("$ALICE_ROOT/EVE/alice-data/gentle_rphi_geo.root");
+  TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
+  TEveGeoShape* gsre2 = TEveGeoShape::ImportShapeExtract(gse);
+  f.Close();
+
+  // Fix visibility, color and transparency
+
+  gsre2->SetRnrSelf(kFALSE);
+  TEveElement::List_i i = gsre2->BeginChildren();
+
+//ITS
+
+  TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+  lvl1->SetRnrSelf(kFALSE);
+  TEveElement::List_i j = lvl1->BeginChildren();
+
+  TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+  lvl2->SetRnrSelf(kFALSE);
+  TEveElement::List_i k = lvl2->BeginChildren();
+
+  TEveGeoShape* its1 = (TEveGeoShape*) *k;
+  its1->SetRnrSelf(kTRUE);
+  its1->SetMainColor(kYellow-4);
+  its1->SetMainTransparency(50);
+
+  k++;
+
+  TEveGeoShape* its2 = (TEveGeoShape*) *k;
+  its2->SetRnrSelf(kTRUE);
+  its2->SetMainColor(kYellow-7);
+  its2->SetMainTransparency(50);
+  k++;
+
+  TEveGeoShape* its3 = (TEveGeoShape*) *k;
+  its3->SetRnrSelf(kTRUE);
+  its3->SetMainColor(kYellow-9);
+  its3->SetMainTransparency(50);
+
+//TPC
+
+  i++;
+
+  TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+  lvl1->SetRnrSelf(kFALSE);
+
+  for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
+    {
+      TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+      lvl2->SetRnrSelf(kTRUE);
+      lvl2->SetMainColor(kGray);
+      lvl2->SetMainTransparency(80);
+    }
+
+//PHOS
+
+  i++;
+  i++;
+
+  TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+  lvl1->SetRnrSelf(kFALSE);
+
+  for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
+    {
+      TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+      lvl2->SetRnrSelf(kTRUE);
+      lvl2->SetMainTransparency(30);
+
+    }
+
+//HMPID
+
+  i++;
+
+  TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+  lvl1->SetRnrSelf(kFALSE);
+
+  for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
+    {
+      TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+      lvl2->SetRnrSelf(kTRUE);
+      lvl2->SetMainTransparency(30);
+    }
+
+  // The resulting geometry is NOT added into the global scene!
+
+  TFile f("$ALICE_ROOT/EVE/alice-data/gentle_rhoz_geo.root");
+  TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
+  TEveGeoShape* gsre3 = TEveGeoShape::ImportShapeExtract(gse);
+  f.Close();
+
+  // Fix visibility, color and transparency
+
+  gsre3->SetRnrSelf(kFALSE);
+  TEveElement::List_i i = gsre3->BeginChildren();
+
+//ITS
+
+  TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+  lvl1->SetRnrSelf(kFALSE);
+  TEveElement::List_i j = lvl1->BeginChildren();
+
+  TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+  lvl2->SetRnrSelf(kFALSE);
+  TEveElement::List_i k = lvl2->BeginChildren();
+
+  TEveGeoShape* its1 = (TEveGeoShape*) *k;
+  its1->SetRnrSelf(kTRUE);
+  its1->SetMainColor(kYellow-4);
+  k++;
+
+  TEveGeoShape* its2 = (TEveGeoShape*) *k;
+  its2->SetRnrSelf(kTRUE);
+  its2->SetMainColor(kYellow-7);
+  k++;
+
+  TEveGeoShape* its3 = (TEveGeoShape*) *k;
+  its3->SetRnrSelf(kTRUE);
+  its3->SetMainColor(kYellow-9);
+
+//TPC
+
+  i++;
+
+  TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+  lvl1->SetRnrSelf(kFALSE);
+
+  for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
+    {
+      TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+      lvl2->SetRnrSelf(kTRUE);
+      lvl2->SetMainColor(kGray);
+      lvl2->SetMainTransparency(80);
+
+    }
+
+//PHOS
+
+  i++;
+  i++;
+
+  TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+  lvl1->SetRnrSelf(kFALSE);
+
+  for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
+    {
+      TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+      lvl2->SetRnrSelf(kTRUE);
+      lvl2->SetMainTransparency(30);
+    }
+
+//HMPID
+
+  i++;
+
+  TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+  lvl1->SetRnrSelf(kFALSE);
+
+  for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
+    {
+      TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+      lvl2->SetRnrSelf(kTRUE);
+      lvl2->SetMainTransparency(30);
+    }
+
+  TEveElement* top = gEve->GetCurrentEvent();
+
+  AliEveMultiView *mv = AliEveMultiView::Instance();
+
+  mv->InitGeomGentle(gsre1, gsre2, gsre3);
+
+  gEve->FullRedraw3D(kTRUE, kTRUE);
+
+}
index a5c6094..6983de7 100644 (file)
@@ -80,44 +80,44 @@ void VizDB_scan_transparentdark()
 
   ps = new TEvePointSet();
   ps->SetMarkerColor(2);
-  ps->SetMarkerSize(0.5);
+  ps->SetMarkerSize(0.4);
   ps->SetMarkerStyle(2);
   gEve->InsertVizDBEntry("Clusters", ps);
 
   ps = new TEvePointSet();
-  ps->SetMarkerColor(5);
-  ps->SetMarkerSize(0.2);
-  ps->SetMarkerStyle(2);
+  ps->SetMarkerColor(kRed);
+  ps->SetMarkerSize(0.4);
+  ps->SetMarkerStyle(8);
   gEve->InsertVizDBEntry("REC Clusters ITS", ps);
 
   ps = new TEvePointSet();
-  ps->SetMarkerColor(4);
-  ps->SetMarkerSize(0.2);
-  ps->SetMarkerStyle(2);
+  ps->SetMarkerColor(kOrange-3);
+  ps->SetMarkerSize(0.3);
+  ps->SetMarkerStyle(8);
   gEve->InsertVizDBEntry("REC Clusters TPC", ps);
 
   ps = new TEvePointSet();
-  ps->SetMarkerColor(7);
+  ps->SetMarkerColor(kYellow);
   ps->SetMarkerSize(0.5);
-  ps->SetMarkerStyle(4);
+  ps->SetMarkerStyle(8);
   gEve->InsertVizDBEntry("REC Clusters TRD", ps);
 
   ps = new TEvePointSet();
-  ps->SetMarkerColor(kOrange);
-  ps->SetMarkerSize(0.5);
-  ps->SetMarkerStyle(4);
+  ps->SetMarkerColor(0);
+  ps->SetMarkerSize(0.9);
+  ps->SetMarkerStyle(8);
   gEve->InsertVizDBEntry("REC Clusters TOF", ps);
 
   ps = new TEvePointSet();
   ps->SetMarkerColor(4);
-  ps->SetMarkerSize(0.2);
-  ps->SetMarkerStyle(2);
+  ps->SetMarkerSize(0.9);
+  ps->SetMarkerStyle(8);
   gEve->InsertVizDBEntry("REC Clusters HMPID", ps);
 
   ps = new TEvePointSet();
   ps->SetMarkerColor(4);
   ps->SetMarkerSize(0.5);
-  ps->SetMarkerStyle(2);
+  ps->SetMarkerStyle(8);
   gEve->InsertVizDBEntry("REC Clusters PHOS", ps);
 
   //============================================================================
index 5c6242f..85debb0 100644 (file)
@@ -86,37 +86,37 @@ void VizDB_scan_transparentlight()
 
   ps = new TEvePointSet();
   ps->SetMarkerColor(5);
-  ps->SetMarkerSize(1);
+  ps->SetMarkerSize(0.3);
   ps->SetMarkerStyle(8);
   gEve->InsertVizDBEntry("REC Clusters ITS", ps);
 
   ps = new TEvePointSet();
-  ps->SetMarkerColor(4);
-  ps->SetMarkerSize(1);
+  ps->SetMarkerColor(kBlue+4);
+  ps->SetMarkerSize(0.3);
   ps->SetMarkerStyle(8);
   gEve->InsertVizDBEntry("REC Clusters TPC", ps);
 
-  ps = new TEvePointSet();
+  ps = new TEvePointSet(kBlue);
   ps->SetMarkerColor(2);
-  ps->SetMarkerSize(1);
+  ps->SetMarkerSize(0.5);
   ps->SetMarkerStyle(8);
   gEve->InsertVizDBEntry("REC Clusters TRD", ps);
 
-  ps = new TEvePointSet();
+  ps = new TEvePointSet(kMagenta+4);
   ps->SetMarkerColor(kOrange);
-  ps->SetMarkerSize(1);
+  ps->SetMarkerSize(0.9);
   ps->SetMarkerStyle(8);
   gEve->InsertVizDBEntry("REC Clusters TOF", ps);
 
-  ps = new TEvePointSet();
+  ps = new TEvePointSet(kRed);
   ps->SetMarkerColor(5);
-  ps->SetMarkerSize(1);
+  ps->SetMarkerSize(0.9);
   ps->SetMarkerStyle(8);
   gEve->InsertVizDBEntry("REC Clusters HMPID", ps);
 
-  ps = new TEvePointSet();
+  ps = new TEvePointSet(kBlack);
   ps->SetMarkerColor(5);
-  ps->SetMarkerSize(1);
+  ps->SetMarkerSize(0.9);
   ps->SetMarkerStyle(8);
   gEve->InsertVizDBEntry("REC Clusters PHOS", ps);
 
diff --git a/EVE/macros/VizDB_scan_yellow.C b/EVE/macros/VizDB_scan_yellow.C
new file mode 100644 (file)
index 0000000..509d72a
--- /dev/null
@@ -0,0 +1,291 @@
+void VizDB_scan_yellow()
+{
+
+  TEvePointSet        *ps = 0;
+  TEveStraightLineSet *ls = 0;
+
+  //============================================================================
+  // Hits
+  //============================================================================
+
+  ps = new TEvePointSet();
+  ps->SetMarkerColor(2);
+  ps->SetMarkerSize(0.5);
+  ps->SetMarkerStyle(2);
+  gEve->InsertVizDBEntry("Hits", ps);
+
+  ps = new TEvePointSet();
+  ps->SetMarkerColor(2);
+  ps->SetMarkerSize(0.5);
+  ps->SetMarkerStyle(2);
+  gEve->InsertVizDBEntry("SIM Hits ITS", ps);
+
+  ps = new TEvePointSet();
+  ps->SetMarkerColor(3);
+  ps->SetMarkerSize(0.5);
+  ps->SetMarkerStyle(2);
+  gEve->InsertVizDBEntry("SIM Hits TPC", ps);
+
+  ps = new TEvePointSet();
+  ps->SetMarkerColor(3);
+  ps->SetMarkerSize(0.5);
+  ps->SetMarkerStyle(4);
+  gEve->InsertVizDBEntry("SIM Hits T0", ps);
+
+  ps = new TEvePointSet();
+  ps->SetMarkerColor(2);
+  ps->SetMarkerSize(0.5);
+  ps->SetMarkerStyle(4);
+  gEve->InsertVizDBEntry("SIM Hits FMD", ps);
+
+  ps = new TEvePointSet();
+  ps->SetMarkerColor(2);
+  ps->SetMarkerSize(.5);
+  ps->SetMarkerStyle(4);
+  gEve->InsertVizDBEntry("SIM Hits ACORDE", ps);
+
+  ps = new TEvePointSet();
+  ps->SetMarkerColor(2);
+  ps->SetMarkerSize(.5);
+  ps->SetMarkerStyle(4);
+  gEve->InsertVizDBEntry("SIM Hits EMCAL", ps);
+
+  ps = new TEvePointSet();
+  ps->SetMarkerColor(2);
+  ps->SetMarkerSize(.5);
+  ps->SetMarkerStyle(4);
+  gEve->InsertVizDBEntry("SIM Hits PMD", ps);
+
+  ps = new TEvePointSet();
+  ps->SetMarkerColor(2);
+  ps->SetMarkerSize(.5);
+  ps->SetMarkerStyle(4);
+  gEve->InsertVizDBEntry("SIM Hits TOF", ps);
+
+  ps = new TEvePointSet();
+  ps->SetMarkerColor(7);
+  ps->SetMarkerSize(.5);
+  ps->SetMarkerStyle(4);
+  gEve->InsertVizDBEntry("SIM Hits TRD", ps);
+
+  ps = new TEvePointSet();
+  ps->SetMarkerColor(2);
+  ps->SetMarkerSize(.5);
+  ps->SetMarkerStyle(4);
+  gEve->InsertVizDBEntry("SIM Hits VZERO", ps);
+
+  //============================================================================
+  // Clusters
+  //============================================================================
+
+  ps = new TEvePointSet();
+  ps->SetMarkerColor(2);
+  ps->SetMarkerSize(0.5);
+  ps->SetMarkerStyle(2);
+  gEve->InsertVizDBEntry("Clusters", ps);
+
+  ps = new TEvePointSet();
+  ps->SetMarkerColor(kRed+4);
+  ps->SetMarkerSize(0.4);
+  ps->SetMarkerStyle(8);
+  gEve->InsertVizDBEntry("REC Clusters ITS", ps);
+
+  ps = new TEvePointSet();
+  ps->SetMarkerColor(1);
+  ps->SetMarkerSize(0.3);
+  ps->SetMarkerStyle(8);
+  gEve->InsertVizDBEntry("REC Clusters TPC", ps);
+
+  ps = new TEvePointSet();
+  ps->SetMarkerColor(kBlue);
+  ps->SetMarkerSize(0.5);
+  ps->SetMarkerStyle(8);
+  gEve->InsertVizDBEntry("REC Clusters TRD", ps);
+
+  ps = new TEvePointSet();
+  ps->SetMarkerColor(kCyan);
+  ps->SetMarkerSize(0.9);
+  ps->SetMarkerStyle(8);
+  gEve->InsertVizDBEntry("REC Clusters TOF", ps);
+
+  ps = new TEvePointSet();
+  ps->SetMarkerColor(4);
+  ps->SetMarkerSize(0.2);
+  ps->SetMarkerStyle(2);
+  gEve->InsertVizDBEntry("REC Clusters HMPID", ps);
+
+  ps = new TEvePointSet();
+  ps->SetMarkerColor(4);
+  ps->SetMarkerSize(0.5);
+  ps->SetMarkerStyle(2);
+  gEve->InsertVizDBEntry("REC Clusters PHOS", ps);
+
+  //============================================================================
+  // Primary vertex
+  //============================================================================
+
+  // Combined vertex
+
+  ls = new TEveStraightLineSet;
+  ls->SetMarkerStyle(2);
+  ls->SetMarkerColor(7);
+  ls->SetLineColor(7);
+  ls->SetLineWidth(3);
+  gEve->InsertVizDBEntry("REC PVTX", ls);
+
+  ls = new TEveStraightLineSet;
+  ls->SetMarkerStyle(2);
+  ls->SetMarkerColor(7);
+  ls->SetLineColor(7);
+  ls->SetLineWidth(1);
+  gEve->InsertVizDBEntry("REC PVTX Ellipse", ls);
+
+  ls = new TEveStraightLineSet;
+  ls->SetMarkerStyle(2);
+  ls->SetMarkerColor(7);
+  ls->SetLineColor(7);
+  ls->SetLineWidth(1);
+  gEve->InsertVizDBEntry("REC PVTX Box", ls);
+
+  // SPD vertex
+
+  ls = new TEveStraightLineSet;
+  ls->SetMarkerStyle(2);
+  ls->SetMarkerColor(6);
+  ls->SetLineColor(6);
+  ls->SetLineWidth(3);
+  gEve->InsertVizDBEntry("REC PVTX SPD", ls);
+
+  ls = new TEveStraightLineSet;
+  ls->SetMarkerStyle(2);
+  ls->SetMarkerColor(6);
+  ls->SetLineColor(6);
+  ls->SetLineWidth(1);
+  gEve->InsertVizDBEntry("REC PVTX Ellipse SPD", ls);
+
+  ls = new TEveStraightLineSet;
+  ls->SetMarkerStyle(2);
+  ls->SetMarkerColor(6);
+  ls->SetLineColor(6);
+  ls->SetLineWidth(1);
+  gEve->InsertVizDBEntry("REC PVTX Box SPD", ls);
+
+  // TPC vertex
+
+  ls = new TEveStraightLineSet;
+  ls->SetMarkerStyle(2);
+  ls->SetMarkerColor(5);
+  ls->SetLineColor(5);
+  ls->SetLineWidth(3);
+  gEve->InsertVizDBEntry("REC PVTX TPC", ls);
+
+  ls = new TEveStraightLineSet;
+  ls->SetMarkerStyle(2);
+  ls->SetMarkerColor(5);
+  ls->SetLineColor(5);
+  ls->SetLineWidth(1);
+  gEve->InsertVizDBEntry("REC PVTX Ellipse TPC", ls);
+
+  ls = new TEveStraightLineSet;
+  ls->SetMarkerStyle(2);
+  ls->SetMarkerColor(5);
+  ls->SetLineColor(5);
+  ls->SetLineWidth(1);
+  gEve->InsertVizDBEntry("REC PVTX Box TPC", ls);
+
+  //Tracks
+
+  tl = new TEveTrackList("ESD Tracks");
+  tl->SetLineStyle(6);
+  tl->SetMainColor(1);
+  tl->SetLineWidth(1);
+  gEve->InsertVizDBEntry("REC Tracks",tl);
+
+  tl = new TEveTrackList("ESD Tracks MI");
+  tl->SetLineStyle(6);
+  tl->SetMainColor(1);
+  tl->SetLineWidth(1);
+  gEve->InsertVizDBEntry("REC Tracks MI",tl);
+
+  TEveElementList* el = new TEveElementList("ESD Tracks by category");
+  TEveTrackList *tltemp[7];
+  tltemp[0] = new TEveTrackList("Sigma < 3");
+  tltemp[0]->SetLineStyle(6);
+  tltemp[0]->SetLineColor(1);
+  tltemp[0]->SetLineWidth(1);
+  el->AddElement(tltemp[0]);
+
+  tltemp[1] = new TEveTrackList("3 < Sigma < 5");
+  tltemp[1]->SetLineStyle(6);
+  tltemp[1]->SetLineColor(1);
+  tltemp[1]->SetLineWidth(1);
+  el->AddElement(tltemp[1]);
+
+  tltemp[2] = new TEveTrackList("5 < Sigma");
+  tltemp[2]->SetLineStyle(6);
+  tltemp[2]->SetLineColor(1);
+  tltemp[2]->SetLineWidth(1);
+  el->AddElement(tltemp[2]);
+
+  tltemp[3] = new TEveTrackList("no ITS refit; Sigma < 5");
+  tltemp[3]->SetLineStyle(6);
+  tltemp[3]->SetLineColor(1);
+  tltemp[3]->SetLineWidth(1);
+  el->AddElement(tltemp[3]);
+
+  tltemp[4] = new TEveTrackList("no ITS refit; Sigma > 5");
+  tltemp[4]->SetLineStyle(6);
+  tltemp[4]->SetLineColor(1);
+  tltemp[4]->SetLineWidth(1);
+  el->AddElement(tltemp[4]);
+
+  tltemp[5] = new TEveTrackList("no TPC refit");
+  tltemp[5]->SetLineStyle(6);
+  tltemp[5]->SetLineColor(1);
+  tltemp[5]->SetLineWidth(1);
+  el->AddElement(tltemp[5]);
+
+  tltemp[6] = new TEveTrackList("ITS stand-alone");
+  tltemp[6]->SetLineStyle(6);
+  tltemp[6]->SetLineColor(1);
+  tltemp[6]->SetLineWidth(1);
+  el->AddElement(tltemp[6]);
+
+  el->SetVizTag("ESD Tracks by category");
+  gEve->AddElement(el);
+
+  TEveElementList* el = new TEveElementList("ESD Tracks by anal cuts");
+  TEveTrackList *tlac[2];
+  tlac[0] = new TEveTrackList("Passed");
+  tlac[0]->SetLineStyle(6);
+  tlac[0]->SetMainColor(1);
+  tlac[0]->SetLineWidth(1);
+  el->AddElement(tlac[0]);
+
+  tlac[1] = new TEveTrackList("Rejected");
+  tlac[1]->SetLineStyle(6);
+  tlac[1]->SetMainColor(1);
+  tlac[1]->SetLineWidth(1);
+  el->AddElement(tlac[1]);
+
+  el->SetVizTag("ESD Tracks by anal cut");
+  gEve->AddElement(el);
+
+  TEveElementList* el = new TEveElementList("ESD Tracklets SPD");
+  TEveTrackList *tlac[2];
+  tlac[0] = new TEveTrackList("Good");
+  tlac[0]->SetLineStyle(6);
+  tlac[0]->SetMainColor(1);
+  tlac[0]->SetLineWidth(1);
+  el->AddElement(tlac[0]);
+
+  tlac[1] = new TEveTrackList("Bad");
+  tlac[1]->SetLineStyle(6);
+  tlac[1]->SetMainColor(1);
+  tlac[1]->SetLineWidth(1);
+  el->AddElement(tlac[1]);
+
+  el->SetVizTag("ESD Tracklets SPD");
+  gEve->AddElement(el);
+
+}