From Pawel Debski: more modes for VizDB.
[u/mrichter/AliRoot.git] / EVE / alice-macros / vzero_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 11vzero_hits(const char *varexp = "fX:fY:fZ",
91989f58 12 const char *selection = "")
2fdd5418 13{
d810d0de 14 AliRunLoader* rl = AliEveEventManager::AssertRunLoader();
2fdd5418 15 rl->LoadHits("VZERO");
16
17 TTree* ht = rl->GetTreeH("VZERO", false);
51346b82 18
9dcd42ea 19 TEvePointSet* points = new TEvePointSet(Form("SIM Hits VZERO '%s'", selection));
2fdd5418 20
84aff7a4 21 TEvePointSelector ps(ht, points, varexp, selection);
2fdd5418 22 ps.Select();
23
199f125c 24 points->SetName(Form("VZERO Hits"));
25 const TString viz_tag("SIM Hits VZERO");
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}