]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/alice-macros/geom_gentle.C
Make macros compilable with ACLiC
[u/mrichter/AliRoot.git] / EVE / alice-macros / geom_gentle.C
1 // $Id$
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 TEveGeoShape* geom_gentle(Bool_t register_as_global=kTRUE)
11 {
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* elPHOS = gsre->FindChild("PHOS");
18   elPHOS->SetRnrState(kTRUE);
19   elPHOS->FindChild("PHOS_4")->SetRnrState(kFALSE);
20   elPHOS->FindChild("PHOS_5")->SetRnrState(kFALSE);
21
22   if (register_as_global)
23   {
24     gEve->AddGlobalElement(gsre);
25   }
26
27   return gsre;
28 }
29
30 TEveGeoShape* geom_gentle_rphi()
31 {
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   TEveElement* elPHOS = gsre->FindChild("PHOS");
40   elPHOS->SetRnrState(kTRUE);
41   elPHOS->FindChild("PHOS_4")->SetRnrState(kFALSE);
42   elPHOS->FindChild("PHOS_5")->SetRnrState(kFALSE);
43
44   return gsre;
45 }
46
47 TEveGeoShape* geom_gentle_rhoz()
48 {
49   // The resulting geometry is NOT added into the global scene!
50
51   TFile f("$ALICE_ROOT/EVE/alice-data/gentle_rhoz_geo.root");
52   TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
53   TEveGeoShape* gsre = TEveGeoShape::ImportShapeExtract(gse);
54   f.Close();
55
56   return gsre;
57 }