]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVE/alice-macros/geom_gentle_transparentlight.C
Modified macros to be compilable by ACLiC
[u/mrichter/AliRoot.git] / EVE / alice-macros / geom_gentle_transparentlight.C
index 44d32473c9fbcdd94d5e5f7dd98a93043cfdf9e8..89e4262fbb9bf75ee6f2e1918ad1aa4da0a4c4fc 100644 (file)
@@ -1,9 +1,26 @@
+#if !defined(__CINT__) || defined(__MAKECINT__)
+#include <TFile.h>
+#include <TGLViewer.h>
+#include <TEveManager.h>
+#include <TEveElement.h>
+#include <TEveGeoShape.h>
+#include <TEveGeoShapeExtract.h>
+
+#include <EVE/EveBase/AliEveEventManager.h>
+#include <EVE/EveBase/AliEveMultiView.h>
+#endif
+
+
 void geom_gentle_transparentlight(Bool_t register_as_global=kTRUE)
 {
-
+  TEveGeoShape* gsre1;
+  TEveGeoShape* gsre2;
+  TEveGeoShape* gsre3;
+  
+{
   TFile f("$ALICE_ROOT/EVE/alice-data/gentle_geo.root");
   TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
-  TEveGeoShape* gsre1 = TEveGeoShape::ImportShapeExtract(gse);
+  gsre1 = TEveGeoShape::ImportShapeExtract(gse);
   f.Close();
 
   if (register_as_global)
@@ -17,124 +34,128 @@ void geom_gentle_transparentlight(Bool_t register_as_global=kTRUE)
   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(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);
-
+  {
+    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);
-  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(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(1);
-  tpc1->SetMainTransparency(80);
-  m++;
-
-  TEveGeoShape* tpc2 = (TEveGeoShape*) *m;
-  tpc2->SetRnrSelf(kTRUE);
-  tpc2->SetMainColor(1);
-  tpc2->SetMainTransparency(80);
-  m++;
-
-  TEveGeoShape* tpc3 = (TEveGeoShape*) *m;
-  tpc3->SetRnrSelf(kTRUE);
-  tpc3->SetMainColor(1);
-  tpc3->SetMainTransparency(80);
-  m++;
-
+  {
+    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(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(1);
+    tpc1->SetMainTransparency(80);
+    m++;
+
+    TEveGeoShape* tpc2 = (TEveGeoShape*) *m;
+    tpc2->SetRnrSelf(kTRUE);
+    tpc2->SetMainColor(1);
+    tpc2->SetMainTransparency(80);
+    m++;
+
+    TEveGeoShape* tpc3 = (TEveGeoShape*) *m;
+    tpc3->SetRnrSelf(kTRUE);
+    tpc3->SetMainColor(1);
+    tpc3->SetMainTransparency(80);
+    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(1);
-  trd1->SetMainTransparency(80);
-  j++;
-
-  TEveGeoShape* tof1 = (TEveGeoShape*) *j;
-  tof1->SetRnrSelf(kTRUE);
-  tof1->SetMainColor(1);
-  tof1->SetMainTransparency(80);
-
+  {
+    TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+    lvl1->SetRnrSelf(kFALSE);
+    TEveElement::List_i j = lvl1->BeginChildren();
+
+    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
 
   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);
-    }
-
+  {
+    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);
+      }
+  }
+    
+}
 
-  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_rphi_geo.root");
   TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
-  TEveGeoShape* gsre2 = TEveGeoShape::ImportShapeExtract(gse);
+  gsre2 = TEveGeoShape::ImportShapeExtract(gse);
   f.Close();
 
   // Fix visibility, color and transparency
@@ -143,37 +164,37 @@ void geom_gentle_transparentlight(Bool_t register_as_global=kTRUE)
   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);
-
+  {
+    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);
 
@@ -184,12 +205,13 @@ void geom_gentle_transparentlight(Bool_t register_as_global=kTRUE)
       lvl2->SetMainColor(1);
       lvl2->SetMainTransparency(80);
     }
+  }
 
 //PHOS
 
   i++;
   i++;
-
+  {
   TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
   lvl1->SetRnrSelf(kFALSE);
 
@@ -201,11 +223,12 @@ void geom_gentle_transparentlight(Bool_t register_as_global=kTRUE)
       lvl2->SetMainTransparency(80);
 
     }
+  }
 
 //HMPID
 
   i++;
-
+  {
   TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
   lvl1->SetRnrSelf(kFALSE);
 
@@ -216,10 +239,14 @@ void geom_gentle_transparentlight(Bool_t register_as_global=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);
+  gsre3 = TEveGeoShape::ImportShapeExtract(gse);
   f.Close();
 
   // Fix visibility, color and transparency
@@ -228,65 +255,67 @@ void geom_gentle_transparentlight(Bool_t register_as_global=kTRUE)
   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);
-
+  {
+    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);
+  {
+    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);
-    }
+  {
+    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);
 
@@ -297,7 +326,8 @@ void geom_gentle_transparentlight(Bool_t register_as_global=kTRUE)
       lvl2->SetMainColor(1);
       lvl2->SetMainTransparency(80);
     }
-
+  }
+}
 
 //fix all the viewers
 
@@ -305,7 +335,7 @@ void geom_gentle_transparentlight(Bool_t register_as_global=kTRUE)
 
   AliEveMultiView *mv = AliEveMultiView::Instance();
 
-  mv->InitGeomGentle(gsre1, gsre2, gsre3);
+  mv->InitGeomGentle(gsre1, gsre2, gsre3, 0);
 
   gEve->FullRedraw3D(kTRUE, kTRUE);