X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=blobdiff_plain;f=FMD%2FDrawFMD.C;h=cbcd7d1ac9bb91a9a7ad4a6b98bf103761e96d28;hp=72744cc6d16a00cfd2ba80bff1e4dca1fa365b8e;hb=d63c707d4b8dd86f9dd9c9309086fb5394cb7c9a;hpb=4e47b8822bcc8928e9bb85c4351c614cc5fce27d diff --git a/FMD/DrawFMD.C b/FMD/DrawFMD.C index 72744cc6d16..cbcd7d1ac9b 100644 --- a/FMD/DrawFMD.C +++ b/FMD/DrawFMD.C @@ -1,16 +1,52 @@ -void DrawFMD() +/** @file DrawFMD.C + @author Christian Holm Christensen + @date Mon Mar 27 14:18:21 2006 + @brief Script to draw the FMD3 - obsolete +*/ +void DrawFMD(const char* file="geometry.root", const char* option="ogl") { - gMC->Gsatt("*", "seen", -1); - gMC->Gsatt("alic", "seen", 0); - gROOT->LoadMacro("ViewFMD.C"); - gInterpreter->ProcessLine("ViewFMD()"); - gMC->Gdopt("hide", "on"); - gMC->Gdopt("shad", "on"); - gMC->Gsatt("*", "fill", 7); - gMC->SetClipBox("."); - gMC->SetClipBox("*", 0, 1000, -1000, 1000, -1000, 1000); - gMC->DefaultRange(); - gMC->Gdraw("alic", 40, 30, 0, 6, 9, .08, .08); - gMC->Gdhead(1111, "Forward Multiplicity Detector"); - gMC->Gdman(13, 9, "MAN"); +#if 1 + AliGeomManager::LoadGeometry(file); + TGeoVolume* top = gGeoManager->GetTopVolume(); + top->InvisibleAll(kTRUE); + for (Int_t i = 1; i <= 3; i++) { + for (Int_t j = 0; j < 2; j++) { + TString name(Form("F%dM%c", i, (j == 0 ? 'T' : 'B'))); + TGeoVolume* v = gGeoManager->FindVolumeFast(name.Data()); + if (!v) { + std::cerr << "FMD" << i << " " + << (j == 0 ? "top" : "bottom") + << " Volume " << name << " not found" << std::endl; + continue; + } + v->InvisibleAll(kFALSE); + v->SetVisDaughters(kTRUE); + v->SetVisLeaves(kTRUE); + } + } + top->Draw(option); + +#else + // gSystem->Load("/usr/lib/libshift"); + // gSystem->Load("/usr/lib/libgfortran"); + gSystem->Load("libgeant321"); + gMC = new TGeant3TGeo; + gMC->Gsatt("*", "seen", -1); + gMC->Gsatt("alic", "seen", 0); + gROOT->LoadMacro("FMD/ViewFMD.C"); + gInterpreter->ProcessLine("ViewFMD()"); + gROOT->LoadMacro("ITS/ViewITS.C"); + gInterpreter->ProcessLine("ViewITS()"); + gMC->Gdopt("hide", "on"); + gMC->Gdopt("shad", "on"); + gMC->Gsatt("*", "fill", 7); + gMC->SetClipBox("."); + gMC->SetClipBox("*", 0, 1000, -1000, 1000, -1000, 1000); + gMC->DefaultRange(); + gMC->Gdraw("alic", 40, 30, 0, 12, 12, .055, .055); + gMC->Gdhead(1111, "Forward Multiplicity Detector"); + gMC->Gdman(16, 10, "MAN"); + gPad->Modified(); + gPad->cd(); +#endif }