]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVE/alice-macros/t0_hits.C
macros for ITS upgrade visualization
[u/mrichter/AliRoot.git] / EVE / alice-macros / t0_hits.C
index ff287d88cf79c65d90d310679379ab1b9202ecc1..38b01d47afad4c43b34f03a1c85beaa80817c718 100644 (file)
@@ -4,9 +4,21 @@
 /**************************************************************************
  * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
  * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for          *
- * full copyright notice.                                                 * 
+ * full copyright notice.                                                 *
  **************************************************************************/
 
+#if !defined(__CINT__) || defined(__MAKECINT__)
+#include <TClonesArray.h>
+#include <TTree.h>
+#include <TEvePointSet.h>
+#include <TEveElement.h>
+#include <TEveManager.h>
+#include <TEveTreeTools.h>
+
+#include <AliRunLoader.h>
+#include <AliEveEventManager.h>
+#endif
+
 TEvePointSet*
 t0_hits(const char *varexp    = "T0.fX:T0.fY:T0.fZ",
        const char *selection = "")
@@ -22,10 +34,10 @@ t0_hits(const char *varexp    = "T0.fX:T0.fY:T0.fZ",
   Int_t nTracks = ht->GetEntries();
   // printf("Found %d tracks. \n",nTracks);
   for (Int_t it = 0; it < nTracks; it++) {
+
     TClonesArray *hits = 0;
     ht->SetBranchAddress("T0",&hits);
+
     ht->GetEvent(it);
     // Int_t nHits = hits->GetEntriesFast();
     // printf("Found %d hits in track %d.\n", nHits, it);
@@ -39,7 +51,11 @@ t0_hits(const char *varexp    = "T0.fX:T0.fY:T0.fZ",
 
   points->SetTitle(Form("N=%d", points->Size()));
   points->SetMarkerSize(.5);
-  points->SetMarkerColor((Color_t)3);
+  points->SetMarkerColor(3);
+
+  points->SetName(Form("T0 Hits"));
+  const TString viz_tag("SIM Hits T0");
+  points->ApplyVizTag(viz_tag, "Hits");
 
   gEve->AddElement(points);
   gEve->Redraw3D();