ROOT
6.30.04
Reference Guide
All
Namespaces
Files
Pages
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
7
This class serves as a data storage for description of one particle.
8
9
It is especially convenient to store information taken from LUJETS common,
10
which is done by interface class TPythia.
11
12
Author: Piotr Golonka 17/09/97
13
*/
14
15
#include "
TMCParticle.h
"
16
#include "
TPrimary.h
"
17
18
#ifndef WIN32
19
# define pyname pyname_
20
extern
"C"
void
pyname(
const
Int_t &kf,
const
char
*name,
const
Int_t len);
21
#else
22
# define pyname PYNAME
23
extern
"C"
void
pyname(
const
Int_t &kf,
const
char
*name,
const
Int_t len);
24
#endif
25
26
ClassImp(TMCParticle);
27
28
////////////////////////////////////////////////////////////////////////////////
29
30
void
TMCParticle::ls(Option_t *)
const
31
{
32
printf(
"(%2i,%4i) <-%3i, =>[%3i,%3i]"
,fKS,fKF,fParent,
33
fFirstChild,fLastChild);
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"
,
37
fEnergy,fMass,fVx,fVy,fVz,fTime,fLifetime);
38
}
39
40
////////////////////////////////////////////////////////////////////////////////
41
/// Return name of this particle via Pythia
42
43
const
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
}
TPrimary.h
TMCParticle.h
montecarlo
pythia6
src
TMCParticle.cxx
Generated on Tue May 5 2020 14:03:09 for ROOT by
1.8.5