]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/alice-macros/tpc_hits_charge_split.C
Put all classes in Alieve/ sub-module out of the Alieve namespace and
[u/mrichter/AliRoot.git] / EVE / alice-macros / tpc_hits_charge_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 void tpc_hits_charge_split(const char *varexp    =
11                         "TPC2.fArray.fR:TPC2.fArray.fFi:TPC2.fArray.fZ"
12                         ":log(TPC2.fArray.fCharge)",
13                         const char *selection = "TPC2.fArray.fR>80")
14 {
15   // Extracts 'major' TPC hits (not the compressed ones).
16   // This gives ~2.5% of all hits.
17
18   AliRunLoader* rl =  AliEveEventManager::AssertRunLoader();
19   rl->LoadHits("TPC");
20
21   TTree* ht = rl->GetTreeH("TPC", false);
22
23   TEvePointSetArray* l = new TEvePointSetArray("TPC hits - Log-Charge Slices", "");
24   l->SetSourceCS(TEvePointSelectorConsumer::kTVT_RPhiZ);
25   l->SetMarkerColor((Color_t)3);
26   l->SetMarkerStyle(20); // full circle
27   l->SetMarkerSize(.5);
28   
29   gEve->AddElement(l);
30   l->InitBins("Log Charge", 20, 0, 5);
31
32   TEvePointSelector ps(ht, l, varexp, selection);
33   ps.Select();
34
35   l->CloseBins();
36
37   gEve->Redraw3D();
38 }