]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/hlt-macros/geom_gentle_hlt.C
2a0b8d7de5f22b4f04151a15cdaa1748f4707b25
[u/mrichter/AliRoot.git] / EVE / hlt-macros / geom_gentle_hlt.C
1 // $Id: geom_gentle.C 30976 2009-02-11 15:55:45Z mtadel $
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
10 // -----------------------------------------------------------------
11 TEveGeoShape* geom_gentle_hlt(Bool_t register_as_global=kTRUE) {
12   TFile f("$ALICE_ROOT/EVE/alice-data/gentle_geo.root");
13   TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
14   TEveGeoShape* gsre = TEveGeoShape::ImportShapeExtract(gse);
15   f.Close();
16
17   TEveElement* elTRD = gsre->FindChild("TRD+TOF");
18   elTRD->SetRnrState(kFALSE);
19
20   TEveElement* elHMPID = gsre->FindChild("HMPID");
21   elHMPID->SetRnrState(kFALSE);
22
23   if (register_as_global) {
24     gEve->AddGlobalElement(gsre);
25   }
26
27   return gsre;
28 }
29
30 // -----------------------------------------------------------------
31 TEveGeoShape* geom_gentle_rphi() {
32   // The resulting geometry is NOT added into the global scene!
33
34   TFile f("$ALICE_ROOT/EVE/alice-data/gentle_rphi_geo.root");
35   TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
36   TEveGeoShape* gsre = TEveGeoShape::ImportShapeExtract(gse);
37   f.Close();
38
39   return gsre;
40 }
41
42 // -----------------------------------------------------------------
43 TEveGeoShape* geom_gentle_rhoz() {
44   // The resulting geometry is NOT added into the global scene!
45
46   TFile f("$ALICE_ROOT/EVE/alice-data/gentle_rhoz_geo.root");
47   TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
48   TEveGeoShape* gsre = TEveGeoShape::ImportShapeExtract(gse);
49   f.Close();
50
51   return gsre;
52 }
53
54 // -----------------------------------------------------------------
55 TEveGeoShape* geom_gentle_trd() {
56   TFile f("$ALICE_ROOT/EVE/alice-data/gentle_geo_trd.root");
57   TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle TRD");
58   TEveGeoShape* gsre = TEveGeoShape::ImportShapeExtract(gse);
59   gEve->AddGlobalElement(gsre);
60   f.Close();
61
62   Int_t sm = 0;
63
64   // Fix visibility, color and transparency
65   gsre->SetRnrSelf(kFALSE);
66   for (TEveElement::List_i i = gsre->BeginChildren(); i != gsre->EndChildren(); ++i) {
67
68     TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
69     lvl1->SetRnrSelf(kFALSE);
70     for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); ++j) {
71
72       TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
73       
74       if ( sm == 0 || sm == 1 || sm == 7 || sm == 8 || sm == 9 || sm == 10 || sm == 17 )
75         lvl2->SetRnrSelf(kTRUE);        
76       else 
77         lvl2->SetRnrSelf(kFALSE);       
78
79       lvl2->SetMainColor(3);
80       lvl2->SetMainTransparency(80);
81
82       ++sm;
83     }
84     
85   }
86
87   return gsre;
88 }