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