ROOT logo
// $Id$
// Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007

/**************************************************************************
 * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
 * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for          *
 * full copyright notice.                                                 *
 **************************************************************************/

#if !defined(__CINT__) || defined(__MAKECINT__)
#include <TTree.h>
#include <TEvePointSet.h>
#include <TEveElement.h>
#include <TEveManager.h>
#include <TEveTreeTools.h>

#include <AliRunLoader.h>
#include <AliEveEventManager.h>
#endif

TEvePointSet*
its_hits(const char *varexp    = "fX:fY:fZ",
	 const char *selection = "",
         TEveElement* cont = 0)
{
  AliRunLoader* rl =  AliEveEventManager::AssertRunLoader();
  rl->LoadHits("ITS");

  TTree* ht = rl->GetTreeH("ITS", false);

  TEvePointSet* points = new TEvePointSet(Form("ITS Hits '%s'", selection));

  TEvePointSelector ps(ht, points, varexp, selection);
  // ps.SetSubIdExp("fTrack:fStatus");
  ps.Select();

  if(points->Size() == 0 && gEve->GetKeepEmptyCont() == kFALSE) {
    Warning("its_hits", "No hits match '%s'", selection);
    delete points;
    return 0;
  }

  points->SetName(Form("ITS Hits"));
  points->SetTitle(Form("N=%d", points->Size()));

  points->ApplyVizTag("SIM Hits ITS", "Hits");

  gEve->AddElement(points, cont);
  gEve->Redraw3D();

  return points;
}
 its_hits.C:1
 its_hits.C:2
 its_hits.C:3
 its_hits.C:4
 its_hits.C:5
 its_hits.C:6
 its_hits.C:7
 its_hits.C:8
 its_hits.C:9
 its_hits.C:10
 its_hits.C:11
 its_hits.C:12
 its_hits.C:13
 its_hits.C:14
 its_hits.C:15
 its_hits.C:16
 its_hits.C:17
 its_hits.C:18
 its_hits.C:19
 its_hits.C:20
 its_hits.C:21
 its_hits.C:22
 its_hits.C:23
 its_hits.C:24
 its_hits.C:25
 its_hits.C:26
 its_hits.C:27
 its_hits.C:28
 its_hits.C:29
 its_hits.C:30
 its_hits.C:31
 its_hits.C:32
 its_hits.C:33
 its_hits.C:34
 its_hits.C:35
 its_hits.C:36
 its_hits.C:37
 its_hits.C:38
 its_hits.C:39
 its_hits.C:40
 its_hits.C:41
 its_hits.C:42
 its_hits.C:43
 its_hits.C:44
 its_hits.C:45
 its_hits.C:46
 its_hits.C:47
 its_hits.C:48
 its_hits.C:49
 its_hits.C:50
 its_hits.C:51
 its_hits.C:52
 its_hits.C:53