Commit of new FMD3 geometry and other geometry related issues.
[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
9 AliGeomManager::LoadGeometry(file);
10 TGeoVolume* top = gGeoManager->GetTopVolume();
11 top->InvisibleAll(kTRUE);
12 for (Int_t i = 1; i <= 3; i++) {
13 for (Int_t j = 0; j < 2; j++) {
14 TString name(Form("F%dM%c", i, (j == 0 ? 'T' : 'B')));
15 TGeoVolume* v = gGeoManager->FindVolumeFast(name.Data());
16 if (!v) {
17 std::cerr << "FMD" << i << " "
18 << (j == 0 ? "top" : "bottom")
19 << " Volume " << name << " not found" << std::endl;
20 continue;
21 }
22 v->InvisibleAll(kFALSE);
23 v->SetVisDaughters(kTRUE);
24 v->SetVisLeaves(kTRUE);
25 }
26 }
27 top->Draw(option);
28
29#else
f4ee3d57 30 // gSystem->Load("/usr/lib/libshift");
31 // gSystem->Load("/usr/lib/libgfortran");
baa92757 32 gSystem->Load("libgeant321");
33 gMC = new TGeant3TGeo;
ed82d35e 34 gMC->Gsatt("*", "seen", -1);
35 gMC->Gsatt("alic", "seen", 0);
36 gROOT->LoadMacro("FMD/ViewFMD.C");
37 gInterpreter->ProcessLine("ViewFMD()");
38 gROOT->LoadMacro("ITS/ViewITS.C");
39 gInterpreter->ProcessLine("ViewITS()");
40 gMC->Gdopt("hide", "on");
41 gMC->Gdopt("shad", "on");
42 gMC->Gsatt("*", "fill", 7);
43 gMC->SetClipBox(".");
44 gMC->SetClipBox("*", 0, 1000, -1000, 1000, -1000, 1000);
45 gMC->DefaultRange();
46 gMC->Gdraw("alic", 40, 30, 0, 12, 12, .055, .055);
47 gMC->Gdhead(1111, "Forward Multiplicity Detector");
48 gMC->Gdman(16, 10, "MAN");
49 gPad->Modified();
50 gPad->cd();
51#endif
fe4da5cc 52}