00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #include "TMCParticle.h"
00013 #include "TPrimary.h"
00014
00015 #ifndef WIN32
00016 # define pyname pyname_
00017 extern "C" void pyname(const Int_t &kf, const char *name, const Int_t len);
00018 #else
00019 # define pyname PYNAME
00020 extern "C" void pyname(const Int_t &kf, const char *name, const Int_t len);
00021 #endif
00022
00023 ClassImp(TMCParticle)
00024
00025
00026 void TMCParticle::ls(Option_t *) const
00027 {
00028 printf("(%2i,%4i) <-%3i, =>[%3i,%3i]",fKS,fKF,fParent,
00029 fFirstChild,fLastChild);
00030 printf(": p=(%7.3f,%7.3f,%9.3f) ;",fPx,fPy,fPz);
00031
00032 printf(" E=%8.3f ; m=%7.3f ; V=(%g,%g,%g); t=%g, tau=%g\n",
00033 fEnergy,fMass,fVx,fVy,fVz,fTime,fLifetime);
00034 }
00035
00036
00037 const char *TMCParticle::GetName() const
00038 {
00039
00040
00041 static char name[20];
00042 pyname(fKF,name,16); name[15] = 0;
00043 for (Int_t i=14;i>0;i--) {
00044 if (name[i] != ' ') break;
00045 name[i] = 0;
00046 }
00047 return name;
00048 }