]>
Commit | Line | Data |
---|---|---|
1 | /************************************************************************** | |
2 | * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. * | |
3 | * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for * | |
4 | * full copyright notice. * | |
5 | **************************************************************************/ | |
6 | ||
7 | /* | |
8 | * Geometry as used for HLT | |
9 | */ | |
10 | ||
11 | #include "AliEveMUONData.h" | |
12 | #include "AliEveMUONChamber.h" | |
13 | #include "AliCDBManager.h" | |
14 | ||
15 | #include "TEveGeoShapeExtract.h" | |
16 | #include "TEveGeoNode.h" | |
17 | #include "TEveManager.h" | |
18 | #include "TEveEventManager.h" | |
19 | #include "TEveElement.h" | |
20 | ||
21 | #include "TFile.h" | |
22 | #include "TStyle.h" | |
23 | ||
24 | TEveGeoShape* geom_hlt() | |
25 | { | |
26 | TFile f("$ALICE_ROOT/EVE/alice-data/gentle_geo.root"); | |
27 | TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle"); | |
28 | TEveGeoShape* gsre = TEveGeoShape::ImportShapeExtract(gse, 0); | |
29 | gEve->AddGlobalElement(gsre); | |
30 | f.Close(); | |
31 | ||
32 | TEveElement* elTRD = gsre->FindChild("TRD+TOF"); | |
33 | elTRD->SetRnrState(kFALSE); | |
34 | ||
35 | TEveElement* elPHOS = gsre->FindChild("PHOS"); | |
36 | elPHOS->SetRnrState(kFALSE); | |
37 | ||
38 | TEveElement* elHMPID = gsre->FindChild("HMPID"); | |
39 | elHMPID->SetRnrState(kFALSE); | |
40 | ||
41 | Int_t MUON_geom(); | |
42 | MUON_geom(); | |
43 | ||
44 | return gsre; | |
45 | } | |
46 | ||
47 | //#if 0 | |
48 | ||
49 | Int_t MUON_geom() | |
50 | { | |
51 | gStyle->SetPalette(1, 0); | |
52 | gEve->DisableRedraw(); | |
53 | ||
54 | AliCDBManager *cdb = AliCDBManager::Instance(); | |
55 | cdb->SetDefaultStorage("local://$ALICE_ROOT"); | |
56 | cdb->SetRun(0); | |
57 | ||
58 | AliEveMUONData *g_muon_data = new AliEveMUONData; | |
59 | ||
60 | TEveElementList* l = new TEveElementList("MUONChambers"); | |
61 | l->SetTitle("MUON chambers"); | |
62 | l->SetMainColor(2); | |
63 | gEve->AddGlobalElement(l); | |
64 | ||
65 | for (Int_t ic = 0; ic < 14; ic++) | |
66 | { | |
67 | AliEveMUONChamber* mucha = new AliEveMUONChamber(ic); | |
68 | ||
69 | mucha->SetFrameColor(2); | |
70 | mucha->SetChamberID(ic); | |
71 | ||
72 | mucha->SetDataSource(g_muon_data); | |
73 | ||
74 | gEve->AddElement(mucha, l); | |
75 | } | |
76 | ||
77 | gEve->Redraw3D(kTRUE); | |
78 | gEve->EnableRedraw(); | |
79 | ||
80 | ||
81 | ||
82 | ||
83 | return true; | |
84 | } | |
85 | ||
86 | //#endif |