]>
Commit | Line | Data |
---|---|---|
aa26cc37 | 1 | // $Id$ |
d810d0de | 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 * | |
51346b82 | 7 | * full copyright notice. * |
d810d0de | 8 | **************************************************************************/ |
aa26cc37 | 9 | |
ba978640 | 10 | #if !defined(__CINT__) || defined(__MAKECINT__) |
11 | #include <TFile.h> | |
12 | #include <TEveManager.h> | |
13 | #include <TEveGeoNode.h> | |
14 | #include <TEveElement.h> | |
15 | #include <TEveGeoShape.h> | |
16 | #include <TEveGeoShapeExtract.h> | |
17 | #endif | |
18 | ||
b1916ff9 | 19 | TEveGeoShape* geom_gentle(Bool_t register_as_global=kTRUE) |
aa26cc37 | 20 | { |
81515106 | 21 | TFile f("$ALICE_ROOT/EVE/alice-data/gentle_geo.root"); |
84aff7a4 | 22 | TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle"); |
a15e6d7d | 23 | TEveGeoShape* gsre = TEveGeoShape::ImportShapeExtract(gse); |
aa26cc37 | 24 | f.Close(); |
32e219c2 | 25 | |
e2673345 | 26 | TEveElement* elPHOS = gsre->FindChild("PHOS"); |
27 | elPHOS->SetRnrState(kTRUE); | |
28 | elPHOS->FindChild("PHOS_4")->SetRnrState(kFALSE); | |
29 | elPHOS->FindChild("PHOS_5")->SetRnrState(kFALSE); | |
30 | ||
b1916ff9 | 31 | if (register_as_global) |
32 | { | |
33 | gEve->AddGlobalElement(gsre); | |
34 | } | |
35 | ||
32e219c2 | 36 | return gsre; |
aa26cc37 | 37 | } |
5e078eda | 38 | |
39 | TEveGeoShape* geom_gentle_rphi() | |
40 | { | |
41 | // The resulting geometry is NOT added into the global scene! | |
42 | ||
43 | TFile f("$ALICE_ROOT/EVE/alice-data/gentle_rphi_geo.root"); | |
44 | TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle"); | |
45 | TEveGeoShape* gsre = TEveGeoShape::ImportShapeExtract(gse); | |
46 | f.Close(); | |
47 | ||
e2673345 | 48 | TEveElement* elPHOS = gsre->FindChild("PHOS"); |
49 | elPHOS->SetRnrState(kTRUE); | |
50 | elPHOS->FindChild("PHOS_4")->SetRnrState(kFALSE); | |
51 | elPHOS->FindChild("PHOS_5")->SetRnrState(kFALSE); | |
52 | ||
5e078eda | 53 | return gsre; |
54 | } | |
55 | ||
56 | TEveGeoShape* geom_gentle_rhoz() | |
57 | { | |
58 | // The resulting geometry is NOT added into the global scene! | |
59 | ||
60 | TFile f("$ALICE_ROOT/EVE/alice-data/gentle_rhoz_geo.root"); | |
61 | TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle"); | |
62 | TEveGeoShape* gsre = TEveGeoShape::ImportShapeExtract(gse); | |
63 | f.Close(); | |
64 | ||
65 | return gsre; | |
66 | } |