]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/alice-macros/tpc_hits_eta_split.C
AliInfo displays better than std::cout
[u/mrichter/AliRoot.git] / EVE / alice-macros / tpc_hits_eta_split.C
1 // $Id$
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          *
7  * full copyright notice.                                                 *
8  **************************************************************************/
9
10 #if !defined(__CINT__) || defined(__MAKECINT__)
11 #include <TTree.h>
12 #include <TEveManager.h>
13 #include <TEvePointSet.h>
14 #include <TEveTreeTools.h>
15
16 #include <AliRunLoader.h>
17 #include <AliEveEventManager.h>
18 #endif
19
20 void tpc_hits_eta_split(const char *varexp    =
21                         "TPC2.fArray.fR:TPC2.fArray.fFi:TPC2.fArray.fZ"
22                         ":TPC2.fArray.Eta()",
23                         const char *selection = "TPC2.fArray.fR>80")
24 {
25   // Extracts 'major' TPC hits (not the compressed ones).
26   // This gives ~2.5% of all hits.
27
28   AliRunLoader* rl =  AliEveEventManager::AssertRunLoader();
29   rl->LoadHits("TPC");
30
31   TTree* ht = rl->GetTreeH("TPC", false);
32
33   TEvePointSetArray* l = new TEvePointSetArray("TPC hits - Eta Slices", "");
34   l->SetSourceCS(TEvePointSelectorConsumer::kTVT_RPhiZ);
35   l->SetMarkerColor(3);
36   l->SetMarkerStyle(20); // full circle
37   l->SetMarkerSize(.5);
38
39   gEve->AddElement(l);
40   l->InitBins("Eta", 20, -2, 2);
41
42   TEvePointSelector ps(ht, l, varexp, selection);
43   ps.Select();
44
45   l->CloseBins();
46
47   gEve->Redraw3D();
48 }