]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EVE/alice-macros/geom_gentle_trd.C
doxy: code cleanup: comments and clarifications
[u/mrichter/AliRoot.git] / EVE / alice-macros / geom_gentle_trd.C
CommitLineData
20dae051 1// $Id$
503bfbc8 2// Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
3
4/**************************************************************************
5 * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
6 * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
7 * full copyright notice. *
8 **************************************************************************/
9
ba978640 10#if !defined(__CINT__) || defined(__MAKECINT__)
11#include <TFile.h>
12#include <TGLViewer.h>
13#include <TEveManager.h>
14#include <TEveElement.h>
15#include <TEveGeoShape.h>
16#include <TEveGeoShapeExtract.h>
17#endif
18
503bfbc8 19TEveGeoShape* geom_gentle_trd()
20{
81515106 21 TFile f("$ALICE_ROOT/EVE/alice-data/gentle_geo_trd.root");
503bfbc8 22 TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle TRD");
23 TEveGeoShape* gsre = TEveGeoShape::ImportShapeExtract(gse);
24 gEve->AddGlobalElement(gsre);
25 f.Close();
26
5165c1df 27 const Int_t smInstalled[]={0, 1, 2, 3, 6, 7, 8, 9, 10, 11, 15, 16, 17};
b2bfbf8e 28 const Int_t nInstalled = static_cast<Int_t>(sizeof(smInstalled)/sizeof(Int_t));
e2673345 29 Int_t sm = 0;
503bfbc8 30 // Fix visibility, color and transparency
31 gsre->SetRnrSelf(kFALSE);
32 for (TEveElement::List_i i = gsre->BeginChildren(); i != gsre->EndChildren(); ++i)
33 {
34 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
35 lvl1->SetRnrSelf(kFALSE);
36 for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); ++j)
37 {
38 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
b2bfbf8e 39 lvl2->SetRnrSelf(kFALSE);
40 for(Int_t ism(nInstalled); ism--;){
41 if ( sm == smInstalled[ism] ){
42 lvl2->SetRnrSelf(kTRUE);
43 break;
44 }
45 }
e2673345 46 lvl2->SetMainColor(3);
503bfbc8 47 lvl2->SetMainTransparency(80);
e2673345 48
49 ++sm;
503bfbc8 50 }
503bfbc8 51 }
52
53 return gsre;
54}