New file, plot TRD hits.
authormtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 4 Sep 2006 17:43:54 +0000 (17:43 +0000)
committermtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 4 Sep 2006 17:43:54 +0000 (17:43 +0000)
EVE/alice-macros/trd_hits.C [new file with mode: 0644]

diff --git a/EVE/alice-macros/trd_hits.C b/EVE/alice-macros/trd_hits.C
new file mode 100644 (file)
index 0000000..17d3c13
--- /dev/null
@@ -0,0 +1,25 @@
+// $Id$
+
+Reve::PointSet*
+trd_hits(const char *varexp    = "fX:fY:fZ",
+        const char *selection = "")
+{
+  AliRunLoader* rl =  Alieve::Event::AssertRunLoader();
+  rl->LoadHits("TRD");
+
+  TTree* ht = rl->GetTreeH("TRD", false);
+  
+  Reve::PointSet* points = new Reve::PointSet(Form("TRD Hits '%s'", selection));
+
+  TPointSelector ps(ht, points, varexp, selection);
+  ps.Select();
+
+  points->SetTitle(Form("N=%d", points->Size()));
+  points->SetMarkerSize(.5);
+  points->SetMarkerColor((Color_t)4);
+
+  gReve->AddRenderElement(points);
+  gReve->Redraw3D();
+
+  return points;
+}