9e78371d |
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"); |
d20d2124 |
21 | elHMPID->SetRnrState(kTRUE); |
22 | |
23 | TEveElement* elPHOS = gsre->FindChild("PHOS"); |
24 | elPHOS->SetRnrState(kTRUE); |
25 | elPHOS->FindChild("PHOS_4")->SetRnrState(kFALSE); |
26 | elPHOS->FindChild("PHOS_5")->SetRnrState(kFALSE); |
9e78371d |
27 | |
28 | if (register_as_global) { |
29 | gEve->AddGlobalElement(gsre); |
30 | } |
31 | |
32 | return gsre; |
33 | } |
34 | |
35 | // ----------------------------------------------------------------- |
36 | TEveGeoShape* geom_gentle_rphi() { |
37 | // The resulting geometry is NOT added into the global scene! |
38 | |
39 | TFile f("$ALICE_ROOT/EVE/alice-data/gentle_rphi_geo.root"); |
40 | TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle"); |
41 | TEveGeoShape* gsre = TEveGeoShape::ImportShapeExtract(gse); |
42 | f.Close(); |
43 | |
d20d2124 |
44 | TEveElement* elPHOS = gsre->FindChild("PHOS"); |
45 | elPHOS->SetRnrState(kTRUE); |
46 | elPHOS->FindChild("PHOS_4")->SetRnrState(kFALSE); |
47 | elPHOS->FindChild("PHOS_5")->SetRnrState(kFALSE); |
48 | |
9e78371d |
49 | return gsre; |
50 | } |
51 | |
52 | // ----------------------------------------------------------------- |
53 | TEveGeoShape* geom_gentle_rhoz() { |
54 | // The resulting geometry is NOT added into the global scene! |
55 | |
56 | TFile f("$ALICE_ROOT/EVE/alice-data/gentle_rhoz_geo.root"); |
57 | TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle"); |
58 | TEveGeoShape* gsre = TEveGeoShape::ImportShapeExtract(gse); |
59 | f.Close(); |
60 | |
61 | return gsre; |
62 | } |
63 | |
64 | // ----------------------------------------------------------------- |
65 | TEveGeoShape* geom_gentle_trd() { |
66 | TFile f("$ALICE_ROOT/EVE/alice-data/gentle_geo_trd.root"); |
67 | TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle TRD"); |
68 | TEveGeoShape* gsre = TEveGeoShape::ImportShapeExtract(gse); |
69 | gEve->AddGlobalElement(gsre); |
70 | f.Close(); |
71 | |
72 | Int_t sm = 0; |
73 | |
74 | // Fix visibility, color and transparency |
75 | gsre->SetRnrSelf(kFALSE); |
76 | for (TEveElement::List_i i = gsre->BeginChildren(); i != gsre->EndChildren(); ++i) { |
77 | |
78 | TEveGeoShape* lvl1 = (TEveGeoShape*) *i; |
79 | lvl1->SetRnrSelf(kFALSE); |
80 | for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); ++j) { |
81 | |
82 | TEveGeoShape* lvl2 = (TEveGeoShape*) *j; |
83 | |
84 | if ( sm == 0 || sm == 1 || sm == 7 || sm == 8 || sm == 9 || sm == 10 || sm == 17 ) |
85 | lvl2->SetRnrSelf(kTRUE); |
86 | else |
87 | lvl2->SetRnrSelf(kFALSE); |
88 | |
89 | lvl2->SetMainColor(3); |
90 | lvl2->SetMainTransparency(80); |
91 | |
92 | ++sm; |
93 | } |
94 | |
95 | } |
96 | |
97 | return gsre; |
98 | } |