TMCParticle.cxx

Go to the documentation of this file.
00001 // @(#)root/pythia6:$Id: TMCParticle.cxx 20882 2007-11-19 11:31:26Z rdm $
00002 // Author: Piotr Golonka   17/09/97
00003 ////////////////////////////////////////////////////////////////////////////////
00004 //                                                                            //
00005 //  class TMCParticle                                                         //
00006 //                                                                            //
00007 // This class serves as a data storage for description of one particle.       //
00008 // It is especially convenient to store information taken from LUJETS common, //
00009 // which is done by interface class TPythia.                                  //
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    // Return name of this particle via Pythia
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 }

Generated on Tue Jul 5 14:45:16 2011 for ROOT_528-00b_version by  doxygen 1.5.1