]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EVE/alice-macros/its_hits_layer_split.C
Coverity
[u/mrichter/AliRoot.git] / EVE / alice-macros / its_hits_layer_split.C
CommitLineData
04d43ba5 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 **************************************************************************/
04d43ba5 9
84aff7a4 10void its_hits_layer_split(const char *varexp = "fX:fY:fZ:GetLayer()",
04d43ba5 11 const char *selection = "")
12{
13 // Extracts 'major' TPC hits (not the compressed ones).
14 // This gives ~2.5% of all hits.
15
84aff7a4 16 printf("THIS SCRIPT DOES NOT WORK.\n"
17 "GetLayer() crashes when trying to load ITS geometry.\n"
18 "Needs to be fixed together with ITS experts.\n");
19 return;
20
d810d0de 21 AliRunLoader* rl = AliEveEventManager::AssertRunLoader();
04d43ba5 22 rl->LoadHits("ITS");
23
24 TTree* ht = rl->GetTreeH("ITS", false);
25
84aff7a4 26 TEvePointSetArray* l = new TEvePointSetArray("ITS hits - Layer Slices", "");
fbc350a3 27 l->SetMarkerColor(2);
04d43ba5 28 l->SetMarkerStyle(2); // cross
29 l->SetMarkerSize(.2);
30
84aff7a4 31 gEve->AddElement(l);
04d43ba5 32 l->InitBins("Layer", 6, 0.5, 6.5);
33
84aff7a4 34 TEvePointSelector ps(ht, l, varexp, selection);
04d43ba5 35 ps.Select();
36
37 l->CloseBins();
38
84aff7a4 39 gEve->Redraw3D();
04d43ba5 40}