]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVE/hlt-macros/geom_gentle_hlt.C
Converting PWGPPpid to native cmake
[u/mrichter/AliRoot.git] / EVE / hlt-macros / geom_gentle_hlt.C
index 2a0b8d7de5f22b4f04151a15cdaa1748f4707b25..1778f4865f9e253f6244678f01254314cd4600a8 100644 (file)
@@ -7,6 +7,18 @@
  * full copyright notice.                                                 *
  **************************************************************************/
 
+#if !defined(__CINT__) || defined(__MAKECINT__)
+#include "TEveGeoShapeExtract.h"
+#include "TEveGeoNode.h"
+#include "TEveManager.h"
+#include "TEveEventManager.h"
+#include "TEveElement.h"
+#include "TGLViewer.h"
+
+#include "TFile.h"
+#include "TStyle.h"
+#endif
+
 // -----------------------------------------------------------------
 TEveGeoShape* geom_gentle_hlt(Bool_t register_as_global=kTRUE) {
   TFile f("$ALICE_ROOT/EVE/alice-data/gentle_geo.root");
@@ -20,6 +32,12 @@ TEveGeoShape* geom_gentle_hlt(Bool_t register_as_global=kTRUE) {
   TEveElement* elHMPID = gsre->FindChild("HMPID");
   elHMPID->SetRnrState(kFALSE);
 
+  TEveElement* elPHOS = gsre->FindChild("PHOS");
+  elPHOS->SetRnrState(kTRUE);
+  elPHOS->FindChild("PHOS_4")->SetRnrState(kFALSE);
+  elPHOS->FindChild("PHOS_5")->SetRnrState(kFALSE);
+
+
   if (register_as_global) {
     gEve->AddGlobalElement(gsre);
   }
@@ -36,6 +54,11 @@ TEveGeoShape* geom_gentle_rphi() {
   TEveGeoShape* gsre = TEveGeoShape::ImportShapeExtract(gse);
   f.Close();
 
+  TEveElement* elPHOS = gsre->FindChild("PHOS");
+  elPHOS->SetRnrState(kTRUE);
+  elPHOS->FindChild("PHOS_4")->SetRnrState(kFALSE);
+  elPHOS->FindChild("PHOS_5")->SetRnrState(kFALSE);
+
   return gsre;
 }
 
@@ -86,3 +109,39 @@ TEveGeoShape* geom_gentle_trd() {
 
   return gsre;
 }
+
+void DrawDeep(TEveGeoShape *gsre) {
+  
+  for (TEveElement::List_i i = gsre->BeginChildren(); i != gsre->EndChildren(); ++i) {
+    TEveGeoShape* lvl = (TEveGeoShape*) *i;
+    lvl->SetRnrSelf(kFALSE);
+    if (!lvl->HasChildren()) {
+      lvl->SetRnrSelf(kTRUE);
+      lvl->SetMainColor(3);
+      lvl->SetMainTransparency(50);
+    }
+    DrawDeep(lvl);
+  }
+
+}
+
+TEveGeoShape* geom_gentle_muon(Bool_t updateScene = kTRUE) {
+
+  TFile f("$ALICE_ROOT/EVE/alice-data/gentle_geo_muon.root");
+  TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle MUON");
+  TEveGeoShape* gsre = TEveGeoShape::ImportShapeExtract(gse);
+  gEve->AddGlobalElement(gsre);
+  f.Close();
+
+  gsre->SetRnrSelf(kFALSE);
+
+  DrawDeep(gsre);
+
+  if ( updateScene ) {
+    TGLViewer* v = gEve->GetDefaultGLViewer();
+    v->UpdateScene();
+  }
+
+  return gsre;
+
+}