Functions | Variables
MakeVectorFile Namespace Reference

Functions

def MakeEvent (outfile, status=1, pdg=int(options.pdg), mother1=0, mother2=0, daughter1=0, daughter2=0, momentum=float(options.momentum), direction=(0.0, 0.0, 1.0), position=(50., 0.0, 0.0), time=float(options.time))
 Function which creates events. More...
 

Variables

string usage = "usage: %prog [options] <trigger file>"
 
 parser = OptionParser(usage=usage)
 
 default
 
 help
 
 metavar
 
 options
 
 args
 
dictionary massref = { 11:0.000511, 13:0.105 }
 Particle Masses. More...
 
 vecfile = open(options.direction+"scan.vec","w")
 
 N = int(options.number)
 
 minimum = float(options.min)
 
 maximum = float(options.max)
 
tuple step = (maximum - minimum)/(N - 1)
 
 val = minimum+eventno*step
 
tuple pos = ( val, 0., 0.)
 
tuple dir = (0., 0., 1.)
 
 position
 
 direction
 

Function Documentation

def MakeVectorFile.MakeEvent (   outfile,
  status = 1,
  pdg = int(options.pdg),
  mother1 = 0,
  mother2 = 0,
  daughter1 = 0,
  daughter2 = 0,
  momentum = float(options.momentum),
  direction = (0.0, 0.0, 1.0),
  position = (50., 0.0, 0.0),
  time = float(options.time) 
)

Function which creates events.

Definition at line 39 of file MakeVectorFile.py.

39  time = float(options.time) ):
40  global eventno
41 
42  momx, momy, momz = tuple([ momentum*x for x in direction ])
43  mass = massref[abs(pdg)]
44  energy = sqrt(momentum**2 + mass**2)
45  posx, posy, posz = position
46 
47  print(eventno, 1, file=outfile)
48  print(status, pdg, end=' ', file=outfile)
49  print(mother1, mother2, daughter1, daughter2, end=' ', file=outfile)
50  print(momx, momy, momz, energy, mass, end=' ', file=outfile)
51  print(posx, posy, posz, time, file=outfile)
52  eventno += 1
53 
54 
55 
T abs(T value)

Variable Documentation

MakeVectorFile.args

Definition at line 23 of file MakeVectorFile.py.

MakeVectorFile.default

Definition at line 16 of file MakeVectorFile.py.

tuple MakeVectorFile.dir = (0., 0., 1.)

Definition at line 69 of file MakeVectorFile.py.

MakeVectorFile.direction

Definition at line 80 of file MakeVectorFile.py.

MakeVectorFile.help

Definition at line 16 of file MakeVectorFile.py.

dictionary MakeVectorFile.massref = { 11:0.000511, 13:0.105 }

Particle Masses.

Definition at line 27 of file MakeVectorFile.py.

MakeVectorFile.maximum = float(options.max)

Definition at line 60 of file MakeVectorFile.py.

MakeVectorFile.metavar

Definition at line 16 of file MakeVectorFile.py.

MakeVectorFile.minimum = float(options.min)

Definition at line 59 of file MakeVectorFile.py.

MakeVectorFile.N = int(options.number)

Definition at line 58 of file MakeVectorFile.py.

MakeVectorFile.options

Definition at line 23 of file MakeVectorFile.py.

MakeVectorFile.parser = OptionParser(usage=usage)

Definition at line 15 of file MakeVectorFile.py.

tuple MakeVectorFile.pos = ( val, 0., 0.)

Definition at line 68 of file MakeVectorFile.py.

MakeVectorFile.position

Definition at line 80 of file MakeVectorFile.py.

tuple MakeVectorFile.step = (maximum - minimum)/(N - 1)

Definition at line 61 of file MakeVectorFile.py.

string MakeVectorFile.usage = "usage: %prog [options] <trigger file>"

Definition at line 14 of file MakeVectorFile.py.

MakeVectorFile.val = minimum+eventno*step

Definition at line 65 of file MakeVectorFile.py.

MakeVectorFile.vecfile = open(options.direction+"scan.vec","w")

Definition at line 56 of file MakeVectorFile.py.