]> git.uio.no Git - u/mrichter/AliRoot.git/blame - FMD/DrawFMD.C
Fixes for macosx
[u/mrichter/AliRoot.git] / FMD / DrawFMD.C
CommitLineData
c2fc1258 1/** @file DrawFMD.C
2 @author Christian Holm Christensen <cholm@nbi.dk>
3 @date Mon Mar 27 14:18:21 2006
4 @brief Script to draw the FMD3 - obsolete
5*/
ed82d35e 6void DrawFMD(const char* file="geometry.root", const char* option="ogl")
fe4da5cc 7{
ed82d35e 8#if 1
40fa2e58 9 AliCDBManager* cdb = AliCDBManager::Instance();
10 cdb->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
11 cdb->SetRun(0);
ed82d35e 12 AliGeomManager::LoadGeometry(file);
13 TGeoVolume* top = gGeoManager->GetTopVolume();
40fa2e58 14 TGeoIterator next(top);
15 TGeoNode* node = 0;
16 while ((node = next())) {
17 TGeoVolume* v = node->GetVolume();
18 v->SetVisibility(kFALSE);
19 v->InvisibleAll(kTRUE);
20 v->VisibleDaughters(kFALSE);
21
22 TString name(v->GetName());
23 if (name[0] == 'F') {
24 if (name[1] == '1' || name[1] == '2' || name[1] == '3' ||
25 name[1] == 'I' || name[1] == 'O' || name[1] == 'M') {
26 v->SetVisibility(kTRUE);
27 v->InvisibleAll(kFALSE);
28 v->VisibleDaughters(kTRUE);
29 std::cout << "Making " << name << " visible" << std::endl;
30 continue;
ed82d35e 31 }
ed82d35e 32 }
40fa2e58 33 if (name[0] == 'C') {
34 if ((name[1] == 'P' || name[1] == 'p') &&
35 (name[2] == '1' || name[2] == '2' || name[3] == '3')) {
36 v->SetVisibility(kTRUE);
37 v->InvisibleAll(kFALSE);
38 v->VisibleDaughters(kTRUE);
39 std::cout << "Making " << name << " visible" << std::endl;
40 continue;
41 }
ed82d35e 42 }
40fa2e58 43 // for (
44 gGeoManager->SetVisLevel(5);
45 top->InvisibleAll(kFALSE);
ed82d35e 46 top->Draw(option);
47
48#else
f4ee3d57 49 // gSystem->Load("/usr/lib/libshift");
50 // gSystem->Load("/usr/lib/libgfortran");
baa92757 51 gSystem->Load("libgeant321");
52 gMC = new TGeant3TGeo;
ed82d35e 53 gMC->Gsatt("*", "seen", -1);
54 gMC->Gsatt("alic", "seen", 0);
55 gROOT->LoadMacro("FMD/ViewFMD.C");
56 gInterpreter->ProcessLine("ViewFMD()");
57 gROOT->LoadMacro("ITS/ViewITS.C");
58 gInterpreter->ProcessLine("ViewITS()");
59 gMC->Gdopt("hide", "on");
60 gMC->Gdopt("shad", "on");
61 gMC->Gsatt("*", "fill", 7);
62 gMC->SetClipBox(".");
63 gMC->SetClipBox("*", 0, 1000, -1000, 1000, -1000, 1000);
64 gMC->DefaultRange();
65 gMC->Gdraw("alic", 40, 30, 0, 12, 12, .055, .055);
66 gMC->Gdhead(1111, "Forward Multiplicity Detector");
67 gMC->Gdman(16, 10, "MAN");
68 gPad->Modified();
69 gPad->cd();
70#endif
fe4da5cc 71}