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