| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

main::MyGenToolsConfig Class Reference

List of all members.

Public Member Functions

def __init__

Detailed Description

Definition at line 3 of file main.py.


Member Function Documentation

def main::MyGenToolsConfig::__init__ (   self,
  volume 
)

Definition at line 4 of file main.py.

00004                              :
00005         from  GaudiPython import AppMgr
00006         from GaudiKernel import SystemOfUnits as units
00007 
00008         app = AppMgr()
00009         app.TopAlg = []
00010 
00011         # Set up timerator
00012         import GaudiKernel.SystemOfUnits as units
00013         tim = app.property("ToolSvc.GtTimeratorTool")
00014         tim.LifeTime = int(1*units.second)
00015 
00016         # Set up positioner
00017         poser = app.property("ToolSvc.GtPositionerTool")
00018         poser.Volume = volume
00019         poser.Mode = "Fixed"
00020         poser.Position = [0,0,5.0/16.0*units.meter]
00021         poser.OutputLevel = 7
00022 
00023         # Set up gun
00024         gun = app.property("ToolSvc.GtGunGenTool")
00025         gun.OutputLevel = 7
00026         gun.Volume = volume
00027         gun.ParticlesPerEvent = 1
00028         gun.ParticleName = "opticalphoton"
00029         gun.Momentum = 2.5*units.eV
00030         #gun.ParticleName = "mu+"
00031         #gun.Momentum = 10*units.GeV
00032         gun.MomentumMode = "Fixed"
00033         gun.DirectionMode = "Fixed"
00034         from math import sin, cos, pi
00035         pmt_column_number = 9
00036         angle = (2*pmt_column_number - 1)*pi/24.0;
00037         gun.Direction = [ cos(angle),sin(angle),0 ] # aim for PMT 
00038         print 'gun.Direction=',gun.Direction
00039 
00040         app.TopAlg += [ "GaudiSequencer/GenSeq" ]
00041         genseq = app.algorithm("GenSeq")
00042         genseq.Members = [ "GtGenerator/GenAlg", "GtHepMCDumper/GenDump" ]
00043 
00044 
00045         gen = app.algorithm("GenAlg")
00046         gen.OutputLevel = 7
00047         gen.GenTools = [ "GtGunGenTool", "GtPositionerTool", "GtTimeratorTool" ]
00048         gen.GenName = "Bang Bang"
00049         gen.Location = "/Event/Gen/HepMCEvents" # this is default anyways
00050 
00051         #print " GtDumper"
00052         gendump = app.algorithm("GenDump")
00053         gendump.Location = "/Event/Gen/HepMCEvents"  # this is default anyways.
00054 
00055         return
00056 
if '__main__' == __name__:


The documentation for this class was generated from the following file:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 21:03:44 2011 for DetSimProc by doxygen 1.4.7