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 <TString.h>
#include <TTree.h>
#include <TEvePointSet.h>
#include <TEveElement.h>
#include <TEveManager.h>
#include <TEveTreeTools.h>

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

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

  TTree* ht = rl->GetTreeH("TOF", false);
  
  TEvePointSet* points = new TEvePointSet(Form("TOF Hits '%s'", selection));

  TEvePointSelector ps(ht, points, varexp, selection);
  ps.Select();

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

 // PD - added tags
  
  points->SetName(Form("TOF Hits"));
  const TString viz_tag("SIM Hits TOF");
  points->ApplyVizTag(viz_tag, "Hits");

  // PD

  points->SetTitle(Form("N=%d", points->Size()));
  points->SetMarkerSize(.5);
  points->SetMarkerColor(2);

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

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