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__)
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 tpc_hits(const char *varexp = "TPC2.fArray.fR:TPC2.fArray.fFi:TPC2.fArray.fZ",
24 const char *selection = "TPC2.fArray.fR>80",
25 TEveElement *cont = 0)
27 // Extracts 'major' TPC hits (not the compressed ones).
28 // This gives ~2.5% of all hits.
30 AliRunLoader* rl = AliEveEventManager::AssertRunLoader();
33 TTree* ht = rl->GetTreeH("TPC", false);
35 TEvePointSet* points = new TEvePointSet(Form("TPC Hits '%s'", selection));
36 points->SetSourceCS(TEvePointSelectorConsumer::kTVT_RPhiZ);
38 TEvePointSelector ps(ht, points, varexp, selection);
41 if (points->Size() == 0 && gEve->GetKeepEmptyCont() == kFALSE) {
42 Warning("tpc_hits", "No hits match '%s'", selection);
47 points->SetName(Form("TPC Hits"));
48 const TString viz_tag("SIM Hits TPC");
49 points->ApplyVizTag(viz_tag, "Hits");
51 points->SetTitle(Form("N=%d", points->Size()));
52 points->SetMarkerSize(.5);
53 points->SetMarkerColor(3);
55 gEve->AddElement(points, cont);