From Pawel Debski: more modes for VizDB.
[u/mrichter/AliRoot.git] / EVE / alice-macros / pmd_hits.C
CommitLineData
2fdd5418 1// $Id$
d810d0de 2// Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
3
4/**************************************************************************
5 * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
6 * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
51346b82 7 * full copyright notice. *
d810d0de 8 **************************************************************************/
2fdd5418 9
84aff7a4 10TEvePointSet*
2fdd5418 11pmd_hits(const char *varexp = "fX:fY:fZ",
12 const char *selection = "")
13{
d810d0de 14 AliRunLoader* rl = AliEveEventManager::AssertRunLoader();
2fdd5418 15 rl->LoadHits("PMD");
16
17 TTree* ht = rl->GetTreeH("PMD", false);
51346b82 18
30650838 19 TEvePointSet* points = new TEvePointSet(Form("PMD Hits '%s'", selection));
2fdd5418 20
84aff7a4 21 TEvePointSelector ps(ht, points, varexp, selection);
2fdd5418 22 ps.Select();
23
30650838 24 points->SetName(Form("PMD Hits"));
25 const TString viz_tag("SIM Hits PMD");
26 points->ApplyVizTag(viz_tag, "Hits");
27
9dcd42ea 28 points->SetTitle(Form("N=%d", points->Size()));
2fdd5418 29 points->SetMarkerSize(.5);
fbc350a3 30 points->SetMarkerColor(2);
2fdd5418 31
84aff7a4 32 gEve->AddElement(points);
33 gEve->Redraw3D();
2fdd5418 34
35 return points;
36}