/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Public Member Functions
main::MyGenToolsConfig Class Reference

List of all members.

Public Member Functions

def __init__

Detailed Description

Definition at line 3 of file main.py.


Constructor & Destructor Documentation

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

Definition at line 4 of file main.py.

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


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

Generated on Fri May 16 2014 10:22:12 for DetSimProc by doxygen 1.7.4