]>
Commit | Line | Data |
---|---|---|
1 | // $Id$ | |
2 | // Main authors: Matevz Tadel & Alja Mrak-Tadel: 2008 | |
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 | ||
10 | // Import tracks from kinematics-tree / particle-stack. | |
11 | // Preliminary/minimal solution. | |
12 | #if !defined(__CINT__) || defined(__MAKECINT__) | |
13 | #include <TParticle.h> | |
14 | #include <TParticlePDG.h> | |
15 | ||
16 | #include <AliStack.h> | |
17 | #include <AliRunLoader.h> | |
18 | #include <AliEveEventManager.h> | |
19 | #endif | |
20 | void | |
21 | kine_print(Double_t min_pt = 0, Double_t min_p = 0) | |
22 | { | |
23 | AliRunLoader* rl = AliEveEventManager::AssertRunLoader(); | |
24 | rl->LoadKinematics(); | |
25 | AliStack* stack = rl->Stack(); | |
26 | if (!stack) { | |
27 | Error("kine_tracks.C", "can not get kinematics."); | |
28 | return; | |
29 | } | |
30 | ||
31 | printf("\n"); | |
32 | printf("%4s | %-11s | %3s | %4s | %9s | %s %s\n", | |
33 | "id", "name", "sts", | |
34 | "mth", "dghtrs", "p", "P"); | |
35 | printf("------------------------------------------------------------\n"); | |
36 | Int_t N = stack->GetNtrack(); | |
37 | for (Int_t i=0; i<N; ++i) | |
38 | { | |
39 | TParticle* p = stack->Particle(i); | |
40 | printf("%4d | %-11s | %3d | %4d | %4d %4d | %d %d\n", | |
41 | i, p->GetName(), p->GetStatusCode(), | |
42 | p->GetMother(0), p->GetDaughter(0), p->GetDaughter(1), | |
43 | p->IsPrimary(), stack->IsPhysicalPrimary(i)); | |
44 | } | |
45 | } |