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

In This Package:

Functions
gun Namespace Reference

Functions

def gunGenerator

Function Documentation

def gun::gunGenerator (   volume)

Definition at line 3 of file gun.py.

00004                         :
00005 
00006 
00007     import GaudiPython as gm
00008     app = gm.AppMgr()            
00009     #msg = self.app.service("MessageSvc")
00010     #msg.OutputLevel = 1
00011 
00012     #processor
00013     gen = app.algorithm("gunGenerator")
00014     #gen.OutputLevel = 2
00015     #gen.GenTools = [ "GtHepEvtGenTool", "GtPositionerTool", "GtTimeratorTool" ]
00016     gen.GenTools = [ "GtGunGenTool/GunGen", "GtPositionerTool/GunPos", "GtTimeratorTool/GunTim" ]
00017     gen.GenName = "Bang Bang"
00018     gen.Location = "/Event/Gen/HepMCEvents" # this is default anyways
00019     #
00020     from GaudiKernel import SystemOfUnits as units
00021 
00022 
00023     # Set up gun
00024     app.property('ToolSvc.GunGen').OutputLevel = 0
00025     app.property('ToolSvc.GunGen').Volume=volume
00026     ##app.property('ToolSvc.GunGen').ParticleName = "mu+"
00027     app.property('ToolSvc.GunGen').ParticleName = "opticalphoton"
00028     app.property('ToolSvc.GunGen').ParticlesPerEvent = 100
00029 
00030     app.property('ToolSvc.GunGen').MomentumMode = "Fixed"
00031     app.property('ToolSvc.GunGen').Momentum = 2.5*units.eV
00032     app.property('ToolSvc.GunGen').DirectionMode = "Fixed"
00033     from math import sin, cos, pi
00034     pmt_column_number = 9
00035     angle = (2*pmt_column_number - 1)*pi/24.0;
00036     app.property('ToolSvc.GunGen').Direction = [ cos(angle),sin(angle),0 ]
00037 
00038     # Set up positioner
00039     #print " Creating poser"
00040     app.property('ToolSvc.GunPos').OutputLevel = 2
00041     #    app.property('ToolSvc.GunPos').Volume = "/dd/Structure/steel-2/water-2"
00042     app.property('ToolSvc.GunPos').Volume = volume
00043     app.property('ToolSvc.GunPos').Strategy = "FullVolume" # also "AvoidDaughters" and "Surface"
00044     app.property('ToolSvc.GunPos').Mode = "Uniform"
00045     app.property('ToolSvc.GunPos').Spread = 10*units.cm
00046     app.property('ToolSvc.GunPos').Position = [0,0,5.0/16.0*units.meter]
00047     
00048     # Set up timerator
00049     app.property('ToolSvc.GunTim').LifeTime = int(5*units.ns)
00050     
00051     
00052     return
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 10:20:44 for Gnrtr by doxygen 1.7.4