This commit was generated by cvs2svn to compensate for changes in r13732,
[u/mrichter/AliRoot.git] / EVE / alice-macros / tpc_hits.C
1 // $Id$
2
3 Reve::PointSet*
4 tpc_hits(const char *varexp    = "TPC2.fArray.fR:TPC2.fArray.fFi:TPC2.fArray.fZ",
5          const char *selection = "TPC2.fArray.fR>80",
6          Option_t *option      = "goff")
7 {
8   // Extracts 'major' TPC hits (not the compressed ones).
9   // This gives ~2.5% of all hits.
10
11   AliRunLoader* rl =  Alieve::Event::AssertRunLoader();
12   rl->LoadHits("TPC");
13
14   TTree* ht = rl->GetTreeH("TPC", false);
15   ht->SetEstimate(400*ht->GetEntries());
16   ht->Draw(varexp, selection, option);
17   
18   Reve::PointSet* points =
19     new Reve::PointSet(Form("TPC Hits '%s'", selection), ht,
20                        Reve::PointSet::TVT_RPhiZ);
21   points->SetTitle(Form("N=%d", points->GetN()));
22   points->SetMarkerColor((Color_t)3);
23
24   gReve->AddRenderElement(points);
25   gReve->DrawRenderElement(points);
26
27   return points;
28 }