2 // Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
4 /**************************************************************************
5 * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
6 * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
7 * full copyright notice. *
8 **************************************************************************/
10 #if !defined(__CINT__) || defined(__MAKECINT__)
11 #include <TClonesArray.h>
13 #include <TEvePointSet.h>
14 #include <TEveElement.h>
15 #include <TEveManager.h>
16 #include <TEveTreeTools.h>
18 #include <AliRunLoader.h>
19 #include <AliEveEventManager.h>
23 t0_hits(const char *varexp = "T0.fX:T0.fY:T0.fZ",
24 const char *selection = "")
29 AliRunLoader* rl = AliEveEventManager::AssertRunLoader();
32 TTree* ht = rl->GetTreeH("T0", false);
34 Int_t nTracks = ht->GetEntries();
35 // printf("Found %d tracks. \n",nTracks);
36 for (Int_t it = 0; it < nTracks; it++) {
38 TClonesArray *hits = 0;
39 ht->SetBranchAddress("T0",&hits);
42 // Int_t nHits = hits->GetEntriesFast();
43 // printf("Found %d hits in track %d.\n", nHits, it);
46 TEvePointSet* points = new TEvePointSet(Form("T0 Hits '%s'", selection));
47 points->SetSourceCS(TEvePointSelectorConsumer::kTVT_XYZ);
49 TEvePointSelector ps(ht, points, varexp, selection);
52 points->SetTitle(Form("N=%d", points->Size()));
53 points->SetMarkerSize(.5);
54 points->SetMarkerColor(3);
56 points->SetName(Form("T0 Hits"));
57 const TString viz_tag("SIM Hits T0");
58 points->ApplyVizTag(viz_tag, "Hits");
60 gEve->AddElement(points);