Geometry for MFT (Brigitte)
[u/mrichter/AliRoot.git] / EVE / alice-macros / tpc_hits_eta_split.C
CommitLineData
5a5a1232 1// $Id$
d810d0de 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 *
51346b82 7 * full copyright notice. *
d810d0de 8 **************************************************************************/
5a5a1232 9
ba978640 10#if !defined(__CINT__) || defined(__MAKECINT__)
11#include <TTree.h>
12#include <TEveManager.h>
13#include <TEvePointSet.h>
14#include <TEveTreeTools.h>
15
6c49a8e1 16#include <AliRunLoader.h>
17#include <AliEveEventManager.h>
ba978640 18#endif
19
f37061fc 20void 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")
5a5a1232 24{
25 // Extracts 'major' TPC hits (not the compressed ones).
26 // This gives ~2.5% of all hits.
27
d810d0de 28 AliRunLoader* rl = AliEveEventManager::AssertRunLoader();
5a5a1232 29 rl->LoadHits("TPC");
30
31 TTree* ht = rl->GetTreeH("TPC", false);
5a5a1232 32
84aff7a4 33 TEvePointSetArray* l = new TEvePointSetArray("TPC hits - Eta Slices", "");
34 l->SetSourceCS(TEvePointSelectorConsumer::kTVT_RPhiZ);
fbc350a3 35 l->SetMarkerColor(3);
02fe340a 36 l->SetMarkerStyle(20); // full circle
8a68912d 37 l->SetMarkerSize(.5);
51346b82 38
84aff7a4 39 gEve->AddElement(l);
5b96ea20 40 l->InitBins("Eta", 20, -2, 2);
5a5a1232 41
84aff7a4 42 TEvePointSelector ps(ht, l, varexp, selection);
f37061fc 43 ps.Select();
5a5a1232 44
02fe340a 45 l->CloseBins();
5a5a1232 46
84aff7a4 47 gEve->Redraw3D();
5a5a1232 48}