From Cesar: Macro to visualize jets.
authormtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 6 Aug 2007 14:31:28 +0000 (14:31 +0000)
committermtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 6 Aug 2007 14:31:28 +0000 (14:31 +0000)
EVE/alice-macros/jetplane.C [new file with mode: 0644]

diff --git a/EVE/alice-macros/jetplane.C b/EVE/alice-macros/jetplane.C
new file mode 100644 (file)
index 0000000..4aa96a6
--- /dev/null
@@ -0,0 +1,43 @@
+Alieve::JetPlane* jetplane(Int_t iev)
+
+{      
+       TFile* f       = new TFile("aod.root");
+       TTree* treeAOD = (TTree*) f->Get("AOD");
+       AliAODEvent* aod = new AliAODEvent();
+  aod->ReadFromTree(treeAOD);
+  treeAOD->GetEntry(iev);
+
+       using namespace Alieve;
+       JetPlane* jp = new JetPlane(iev);
+
+       // Read Jets in current event
+
+       TClonesArray* jets = aod->GetJets();
+       Int_t njets = jets->GetEntries();
+       printf("Event: %5d Number of jets: %5d \n", iev, njets);
+
+       for (Int_t ij = 0; ij < njets; ij++)
+       {
+               AliAODJet jet = (AliAODJet) jets->At(ij);
+               jp->AddJet(jet);
+       }
+
+// Read tracks in current event
+
+       TClonesArray* tracks = aod->GetTracks();
+       Int_t ntracks = tracks->GetEntries();
+       printf("Event: %5d Number of tracks: %5d \n", iev, ntracks);
+
+       for (Int_t ij = 0; ij < ntracks; ij++)
+       {
+               AliAODTrack track = (AliAODTrack) tracks->At(ij);
+               jp->AddTrack(track);
+       }
+
+// Render Jet Plane
+       gStyle->SetPalette(1, 0);
+       gReve->AddRenderElement(jp);
+       gReve->Redraw3D();
+
+       return jp;
+}