From: mtadel Date: Tue, 5 May 2009 11:07:50 +0000 (+0000) Subject: From Bogdan: New macro for stand-alone visualization of MUON geometry. X-Git-Url: http://git.uio.no/git/?a=commitdiff_plain;h=83ab188ee5bd01148c2fe635971a883947e6028b;p=u%2Fmrichter%2FAliRoot.git From Bogdan: New macro for stand-alone visualization of MUON geometry. --- diff --git a/EVE/alice-macros/geom_gentle_muon_draw.C b/EVE/alice-macros/geom_gentle_muon_draw.C new file mode 100644 index 00000000000..59e58275561 --- /dev/null +++ b/EVE/alice-macros/geom_gentle_muon_draw.C @@ -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; + +} +