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