Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Data Fields
mcscore.MCVertex Class Reference

Public Member Functions

def __init__
 
def append_particle
 
def printout
 
def dump_vertex
 
def __del__
 
def __init__
 
def append_particle
 
def printout
 
def dump_vertex
 
def __del__
 

Data Fields

 x
 
 y
 
 z
 
 nparticle
 
 particle_list
 

Detailed Description

Definition at line 46 of file mcscore.py.

Constructor & Destructor Documentation

def mcscore.MCVertex.__init__ (   self,
  ax,
  ay,
  az 
)

Definition at line 48 of file mcscore.py.

Referenced by mcscore.MCVertex.__init__().

48 
49  def __init__(self, ax, ay, az):
50  self.x = ax
51  self.y = ay
52  self.z = az
53  self.nparticle = 0
54  self.particle_list = []
def mcscore.MCVertex.__del__ (   self)

Definition at line 74 of file mcscore.py.

References mcscore.MCVertex.particle_list.

Referenced by mcscore.MCVertex.__del__().

74 
75  def __del__(self):
76  np = len(self.particle_list)
77  del self.particle_list[0:np]
78 
79 
80 # ==================================================================
81 # I/O interface
# ==================================================================
def mcscore.MCVertex.__init__ (   self,
  ax,
  ay,
  az 
)

Definition at line 48 of file python3/mcscore.py.

References mcscore.MCVertex.__init__(), mcscore.MCVertex.nparticle, mcscore.MCVertex.particle_list, mcscore.MCVertex.x, mcscore.MCVertex.y, and mcscore.MCVertex.z.

48 
49  def __init__(self, ax, ay, az):
50  self.x = ax
51  self.y = ay
52  self.z = az
53  self.nparticle = 0
54  self.particle_list = []
def mcscore.MCVertex.__del__ (   self)

Definition at line 74 of file python3/mcscore.py.

References mcscore.MCVertex.__del__(), mcscore.MCVertex.particle_list, print(), mcscore.read_next_vertex(), and mcscore.test().

74 
75  def __del__(self):
76  np = len(self.particle_list)
77  del self.particle_list[0:np]
78 
79 
80 # ==================================================================
81 # I/O interface
# ==================================================================

Member Function Documentation

def mcscore.MCVertex.append_particle (   self,
  aparticle 
)

Definition at line 55 of file mcscore.py.

References mcscore.MCVertex.nparticle.

Referenced by mcscore.MCVertex.append_particle().

55 
56  def append_particle(self, aparticle):
57  self.particle_list.append(aparticle)
58  self.nparticle= self.nparticle+1
def append_particle
Definition: mcscore.py:55
def mcscore.MCVertex.append_particle (   self,
  aparticle 
)

Definition at line 55 of file python3/mcscore.py.

References mcscore.MCVertex.append_particle(), and mcscore.MCVertex.nparticle.

55 
56  def append_particle(self, aparticle):
57  self.particle_list.append(aparticle)
58  self.nparticle= self.nparticle+1
def append_particle
Definition: mcscore.py:55
def mcscore.MCVertex.dump_vertex (   self,
  stream 
)

Definition at line 65 of file python3/mcscore.py.

References mcscore.MCVertex.dump_vertex(), mcscore.MCVertex.nparticle, mcscore.MCVertex.particle_list, mcscore.MCVertex.x, mcscore.MCVertex.y, and mcscore.MCVertex.z.

65 
66  def dump_vertex(self, stream):
67  aline = "%g %g %g %d\n" % \
68  (self.x/m, self.y/m, self.z/m, self.nparticle)
69  stream.write(aline)
70  for p in self.particle_list:
71  aline = " %s %d %d %g %g %g %g\n" % \
72  (p.name, p.Z, p.A, p.kineticE/MeV, p.px/MeV, p.py/MeV, p.pz/MeV)
73  stream.write(aline)
def mcscore.MCVertex.dump_vertex (   self,
  stream 
)

Definition at line 65 of file mcscore.py.

References mcscore.MCVertex.nparticle, mcscore.MCVertex.particle_list, mcscore.MCVertex.x, mcscore.MCVertex.y, and mcscore.MCVertex.z.

Referenced by mcscore.MCVertex.dump_vertex().

65 
66  def dump_vertex(self, stream):
67  aline = "%g %g %g %d\n" % \
68  (self.x/m, self.y/m, self.z/m, self.nparticle)
69  stream.write(aline)
70  for p in self.particle_list:
71  aline = " %s %d %d %g %g %g %g\n" % \
72  (p.name, p.Z, p.A, p.kineticE/MeV, p.px/MeV, p.py/MeV, p.pz/MeV)
73  stream.write(aline)
def mcscore.MCVertex.printout (   self)

Definition at line 59 of file mcscore.py.

References mcscore.MCVertex.nparticle, mcscore.MCVertex.particle_list, mcscore.MCVertex.x, mcscore.MCVertex.y, and mcscore.MCVertex.z.

Referenced by mcscore.MCVertex.printout().

59 
60  def printout(self):
61  print "@@@ vertex: x=(%g,%g,%g) Nsec=%3d" % \
62  (self.x/cm, self.y/cm, self.z/cm, self.nparticle)
63  for p in self.particle_list:
64  p.printout()
def mcscore.MCVertex.printout (   self)

Definition at line 59 of file python3/mcscore.py.

References mcscore.MCVertex.nparticle, mcscore.MCVertex.particle_list, print(), mcscore.MCVertex.printout(), mcscore.MCVertex.x, mcscore.MCVertex.y, and mcscore.MCVertex.z.

59 
60  def printout(self):
61  print("@@@ vertex: x=(%g,%g,%g) Nsec=%3d" % \
62  (self.x/cm, self.y/cm, self.z/cm, self.nparticle))
63  for p in self.particle_list:
64  p.printout()
void print(const std::vector< T > &data)
Definition: DicomRun.hh:111

Field Documentation

mcscore.MCVertex.nparticle

Definition at line 52 of file mcscore.py.

Referenced by mcscore.MCVertex.__init__(), mcscore.MCVertex.append_particle(), mcscore.MCVertex.dump_vertex(), and mcscore.MCVertex.printout().

mcscore.MCVertex.particle_list

Definition at line 53 of file mcscore.py.

Referenced by mcscore.MCVertex.__del__(), mcscore.MCVertex.__init__(), mcscore.MCVertex.dump_vertex(), and mcscore.MCVertex.printout().

mcscore.MCVertex.x

Definition at line 49 of file mcscore.py.

Referenced by mcscore.MCVertex.__init__(), mcscore.MCVertex.dump_vertex(), and mcscore.MCVertex.printout().

mcscore.MCVertex.y

Definition at line 50 of file mcscore.py.

Referenced by mcscore.MCVertex.__init__(), mcscore.MCVertex.dump_vertex(), and mcscore.MCVertex.printout().

mcscore.MCVertex.z

Definition at line 51 of file mcscore.py.

Referenced by mcscore.MCVertex.__init__(), mcscore.MCVertex.dump_vertex(), and mcscore.MCVertex.printout().


The documentation for this class was generated from the following file: