]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EVE/alice-macros/kine_print.C
SetSeed dummy implementations
[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.
ba978640 12#if !defined(__CINT__) || defined(__MAKECINT__)
13#include <TParticle.h>
14#include <TParticlePDG.h>
92bd3b8a 15
6c49a8e1 16#include <AliStack.h>
17#include <AliRunLoader.h>
18#include <AliEveEventManager.h>
ba978640 19#endif
92bd3b8a 20void
21kine_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.");
ba978640 28 return;
92bd3b8a 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}