Fixes for reading ITS raw-data.
[u/mrichter/AliRoot.git] / EVE / alice-macros / jetplane.C
CommitLineData
d810d0de 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 *
51346b82 7 * full copyright notice. *
d810d0de 8 **************************************************************************/
9AliEveJetPlane* jetplane(Int_t iev)
51346b82 10{
84aff7a4 11 TFile* f = new TFile("aod.root");
12 TTree* treeAOD = (TTree*) f->Get("AOD");
13 AliAODEvent* aod = new AliAODEvent();
8c47e13d 14 aod->ReadFromTree(treeAOD);
15 treeAOD->GetEntry(iev);
16
d810d0de 17 AliEveJetPlane* jp = new AliEveJetPlane(iev);
8c47e13d 18
84aff7a4 19 // Read Jets in current event
8c47e13d 20
84aff7a4 21 TClonesArray* jets = aod->GetJets();
22 Int_t njets = jets->GetEntries();
d810d0de 23 printf("AliEveEventManager: %5d Number of jets: %5d \n", iev, njets);
8c47e13d 24
84aff7a4 25 for (Int_t ij = 0; ij < njets; ij++)
26 {
27 AliAODJet jet = (AliAODJet) jets->At(ij);
28 jp->AddJet(jet);
29 }
8c47e13d 30
84aff7a4 31 // Read tracks in current event
8c47e13d 32
84aff7a4 33 TClonesArray* tracks = aod->GetTracks();
34 Int_t ntracks = tracks->GetEntries();
d810d0de 35 printf("AliEveEventManager: %5d Number of tracks: %5d \n", iev, ntracks);
8c47e13d 36
84aff7a4 37 for (Int_t ij = 0; ij < ntracks; ij++)
38 {
39 AliAODTrack track = (AliAODTrack) tracks->At(ij);
40 jp->AddTrack(track);
41 }
8c47e13d 42
84aff7a4 43 // Render Jet Plane
44 gStyle->SetPalette(1, 0);
45 gEve->AddElement(jp);
46 gEve->Redraw3D();
8c47e13d 47
84aff7a4 48 return jp;
8c47e13d 49}