Logo ROOT  
Reference Guide
TMCParticle.cxx
Go to the documentation of this file.
1// @(#)root/pythia6:$Id$
2// Author: Piotr Golonka 17/09/97
3
4/** \class TMCParticle
5 \ingroup pythia6
6
7This class serves as a data storage for description of one particle.
8
9It is especially convenient to store information taken from LUJETS common,
10which is done by interface class TPythia.
11
12Author: Piotr Golonka 17/09/97
13*/
14
15#include "TMCParticle.h"
16#include "TPrimary.h"
17
18#ifndef WIN32
19# define pyname pyname_
20extern "C" void pyname(const Int_t &kf, const char *name, const Int_t len);
21#else
22# define pyname PYNAME
23extern "C" void pyname(const Int_t &kf, const char *name, const Int_t len);
24#endif
25
27
28////////////////////////////////////////////////////////////////////////////////
29
31{
32 printf("(%2i,%4i) <-%3i, =>[%3i,%3i]",fKS,fKF,fParent,
34 printf(": p=(%7.3f,%7.3f,%9.3f) ;",fPx,fPy,fPz);
35
36 printf(" E=%8.3f ; m=%7.3f ; V=(%g,%g,%g); t=%g, tau=%g\n",
38}
39
40////////////////////////////////////////////////////////////////////////////////
41/// Return name of this particle via Pythia
42
43const char *TMCParticle::GetName() const
44{
45 static char name[20];
46 pyname(fKF,name,16); name[15] = 0;
47 for (Int_t i=14;i>0;i--) {
48 if (name[i] != ' ') break;
49 name[i] = 0;
50 }
51 return name;
52}
int Int_t
Definition: RtypesCore.h:41
const char Option_t
Definition: RtypesCore.h:62
#define ClassImp(name)
Definition: Rtypes.h:365
char name[80]
Definition: TGX11.cxx:109
#define pyname
Definition: TMCParticle.cxx:19
This class serves as a data storage for description of one particle.
Definition: TMCParticle.h:20
Float_t fLifetime
Definition: TMCParticle.h:40
Float_t fPx
Definition: TMCParticle.h:30
Int_t fParent
Definition: TMCParticle.h:26
virtual void ls(Option_t *option) const
The ls function lists the contents of a class on stdout.
Definition: TMCParticle.cxx:30
Int_t fFirstChild
Definition: TMCParticle.h:27
Float_t fPy
Definition: TMCParticle.h:31
Float_t fPz
Definition: TMCParticle.h:32
Float_t fEnergy
Definition: TMCParticle.h:33
Float_t fTime
Definition: TMCParticle.h:39
virtual const char * GetName() const
Return name of this particle via Pythia.
Definition: TMCParticle.cxx:43
Float_t fVz
Definition: TMCParticle.h:38
Float_t fMass
Definition: TMCParticle.h:34
Int_t fLastChild
Definition: TMCParticle.h:28
Float_t fVx
Definition: TMCParticle.h:36
Float_t fVy
Definition: TMCParticle.h:37