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