]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/alice-macros/geom_gentle_muon.C
update for the new location of TRD performance train
[u/mrichter/AliRoot.git] / EVE / alice-macros / geom_gentle_muon.C
1 void DrawDeep(TEveGeoShape *gsre) {
2   
3   for (TEveElement::List_i i = gsre->BeginChildren(); i != gsre->EndChildren(); ++i) {
4     TEveGeoShape* lvl = (TEveGeoShape*) *i;
5     lvl->SetRnrSelf(kFALSE);
6     if (!lvl->HasChildren()) {
7       lvl->SetRnrSelf(kTRUE);
8       lvl->SetMainColor(3);
9       lvl->SetMainTransparency(50);
10     }
11     DrawDeep(lvl);
12   }
13
14 }
15
16 TEveGeoShape* geom_gentle_muon(Bool_t updateScene = kTRUE) {
17
18   TFile f("$ALICE_ROOT/EVE/alice-data/gentle_geo_muon.root");
19   TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle MUON");
20   TEveGeoShape* gsre = TEveGeoShape::ImportShapeExtract(gse);
21   gEve->AddGlobalElement(gsre);
22   f.Close();
23
24   gsre->SetRnrSelf(kFALSE);
25
26   DrawDeep(gsre);
27
28   if ( updateScene ) {
29     TGLViewer* v = gEve->GetDefaultGLViewer();
30     v->UpdateScene();
31   }
32
33   return gsre;
34
35 }
36