Geometry for MFT (Brigitte)
[u/mrichter/AliRoot.git] / EVE / alice-macros / phos_clusters.C
index 47bcf38..66e12fd 100644 (file)
@@ -7,6 +7,20 @@
  * full copyright notice.                                                 *
  **************************************************************************/
 
+#if !defined(__CINT__) || defined(__MAKECINT__)
+#include <TObjArray.h>
+#include <TBranch.h>
+#include <TTree.h>
+#include <TString.h>
+#include <TEveManager.h>
+#include <TEveElement.h>
+#include <TEvePointSet.h>
+
+#include <AliCluster.h>
+#include <AliRunLoader.h>
+#include <AliEveEventManager.h>
+#endif
+
 TEvePointSet* phos_clusters(TEveElement* cont=0)
 {
   AliEveEventManager::AssertGeometry();
@@ -16,6 +30,8 @@ TEvePointSet* phos_clusters(TEveElement* cont=0)
 
   TTree *cTree = rl->GetTreeR("PHOS", false);
 
+       if(!cTree) return 0;
+
   TEvePointSet* clusters = new TEvePointSet(10000);
   clusters->SetOwnIds(kTRUE);
 
@@ -52,10 +68,16 @@ TEvePointSet* phos_clusters(TEveElement* cont=0)
   clusters->SetMarkerSize(0.5);
   clusters->SetMarkerColor(4);
 
-  clusters->SetName(Form("REC Clusters PHOS"));
+  clusters->SetName("PHOS Clusters");
 
   clusters->SetTitle(Form("N=%d", clusters->Size()));
+
+  const TString viz_tag("REC Clusters PHOS");
+
+  clusters->ApplyVizTag(viz_tag, "Clusters");
+
   gEve->AddElement(clusters);
+
   gEve->Redraw3D();
 
   return clusters;