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