In muon-related macros in EVE:
[u/mrichter/AliRoot.git] / EVE / alice-macros / kine_print.C
CommitLineData
20dae051 1// $Id$
92bd3b8a 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
13#include "TParticlePDG.h"
14
15void
16kine_print(Double_t min_pt = 0, Double_t min_p = 0)
17{
18 AliRunLoader* rl = AliEveEventManager::AssertRunLoader();
19 rl->LoadKinematics();
20 AliStack* stack = rl->Stack();
21 if (!stack) {
22 Error("kine_tracks.C", "can not get kinematics.");
23 return 0;
24 }
25
26 printf("\n");
27 printf("%4s | %-11s | %3s | %4s | %9s | %s %s\n",
28 "id", "name", "sts",
29 "mth", "dghtrs", "p", "P");
30 printf("------------------------------------------------------------\n");
31 Int_t N = stack->GetNtrack();
32 for (Int_t i=0; i<N; ++i)
33 {
34 TParticle* p = stack->Particle(i);
35 printf("%4d | %-11s | %3d | %4d | %4d %4d | %d %d\n",
36 i, p->GetName(), p->GetStatusCode(),
37 p->GetMother(0), p->GetDaughter(0), p->GetDaughter(1),
38 p->IsPrimary(), stack->IsPhysicalPrimary(i));
39 }
40}