]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
From Bogdan: New macro for stand-alone visualization of MUON geometry.
authormtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 5 May 2009 11:07:50 +0000 (11:07 +0000)
committermtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 5 May 2009 11:07:50 +0000 (11:07 +0000)
EVE/alice-macros/geom_gentle_muon_draw.C [new file with mode: 0644]

diff --git a/EVE/alice-macros/geom_gentle_muon_draw.C b/EVE/alice-macros/geom_gentle_muon_draw.C
new file mode 100644 (file)
index 0000000..59e5827
--- /dev/null
@@ -0,0 +1,34 @@
+void DrawDeep(TEveGeoShape *gsre) {
+  
+  for (TEveElement::List_i i = gsre->BeginChildren(); i != gsre->EndChildren(); ++i) {
+    TEveGeoShape* lvl = (TEveGeoShape*) *i;
+    lvl->SetRnrSelf(kFALSE);
+    if (!lvl->HasChildren()) {
+      lvl->SetRnrSelf(kTRUE);
+      lvl->SetMainColor(3);
+      lvl->SetMainTransparency(50);
+    }
+    DrawDeep(lvl);
+  }
+
+}
+
+TEveGeoShape* geom_gentle_muon_draw() {
+
+  TFile f("$ALICE_ROOT/EVE/alice-data/gentle_geo_muon.root");
+  TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle MUON");
+  TEveGeoShape* gsre = TEveGeoShape::ImportShapeExtract(gse);
+  gEve->AddGlobalElement(gsre);
+  f.Close();
+
+  gsre->SetRnrSelf(kFALSE);
+
+  DrawDeep(gsre);
+
+  TGLViewer* v = gEve->GetDefaultGLViewer();
+  v->UpdateScene();
+
+  return gsre;
+
+}
+