]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - FMD/DrawFMD.C
Moving the FMD offline trigger to its own class, AliFMDOfflineTrigger
[u/mrichter/AliRoot.git] / FMD / DrawFMD.C
index 49808a71463b57b7b411a7b3c55c2606f16e5168..cbcd7d1ac9bb91a9a7ad4a6b98bf103761e96d28 100644 (file)
@@ -1,18 +1,52 @@
-void DrawFMD()
+/** @file    DrawFMD.C
+    @author  Christian Holm Christensen <cholm@nbi.dk>
+    @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("FMD/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, 12, 12, .055, .055);
-   gMC->Gdhead(1111, "Forward Multiplicity Detector");
-   gMC->Gdman(16, 10, "MAN");
-   gPad->Modified();
-   gPad->cd();
+#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
 }