]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/alice-macros/trd_hits.C
Add option to color tracks according to PDG code.
[u/mrichter/AliRoot.git] / EVE / alice-macros / trd_hits.C
1 // $Id$
2
3 Reve::PointSet*
4 trd_hits(const char *varexp    = "fX:fY:fZ",
5          const char *selection = "")
6 {
7   AliRunLoader* rl =  Alieve::Event::AssertRunLoader();
8   rl->LoadHits("TRD");
9
10   TTree* ht = rl->GetTreeH("TRD", false);
11   
12   //PH The line below is replaced waiting for a fix in Root
13   //PH which permits to use variable siza arguments in CINT
14   //PH on some platforms (alphalinuxgcc, solariscc5, etc.)
15   //PH  Reve::PointSet* points = new Reve::PointSet(Form("TRD Hits '%s'", selection));
16   char form[1000];
17   sprintf(form,"TRD Hits '%s'", selection);
18   Reve::PointSet* points = new Reve::PointSet(form);
19
20   TPointSelector ps(ht, points, varexp, selection);
21   ps.Select();
22
23   //PH  points->SetTitle(Form("N=%d", points->Size()));
24   sprintf(form,"N=%d", points->Size());
25   points->SetTitle(form);
26   points->SetMarkerSize(.5);
27   points->SetMarkerColor((Color_t)7);
28
29   gReve->AddRenderElement(points);
30   gReve->Redraw3D();
31
32   return points;
33 }