/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 | Public Attributes
my::GenToolsConfig Class Reference

List of all members.

Public Member Functions

def __init__
def init
def init_gen_tools

Public Attributes

 app
 nevents
 seed
 volume
 hepevt_source

Detailed Description

Definition at line 3 of file my.py.


Constructor & Destructor Documentation

def my::GenToolsConfig::__init__ (   self,
  volume = "/dd/Geometry/AD/lvAD",
  nevents = 10,
  seed = 1234567,
  hepevt_source = "Co60.exe -seed %(seed)s -n %(nevents)s|" 
)

Definition at line 4 of file my.py.

00010                                                                          :
00011         import GaudiPython as gm
00012         self.app = gm.AppMgr()
00013         #msg = self.app.service("MessageSvc")
00014         #msg.OutputLevel = 1
00015         self.nevents = nevents
00016         self.seed = seed
00017         self.volume = volume
00018         self.hepevt_source=hepevt_source
00019         self.init()
00020         return


Member Function Documentation

def my::GenToolsConfig::init (   self)

Definition at line 21 of file my.py.

00022                   :
00023         self.init_gen_tools()
00024         return

def my::GenToolsConfig::init_gen_tools (   self)

Definition at line 25 of file my.py.

00026                             :
00027         from GaudiKernel import SystemOfUnits as units
00028 
00029         #print " init_gen_tools"
00030 
00031         # Set up timerator
00032         tim = self.app.property("ToolSvc.GtTimeratorTool")
00033         #tim.OutputLevel=1
00034         tim.LifeTime = int(1*units.second)
00035 
00036 
00037         # Set up positioner
00038         #print " Creating poser"
00039         poser = self.app.property("ToolSvc.GtPositionerTool")
00040         poser.OutputLevel = 2
00041         poser.Volume = self.volume
00042         poser.Strategy = "FullVolume" # also "AvoidDaughters" and "Surface"
00043         poser.Mode = "Uniform"
00044         poser.Spread = 10*units.cm
00045         poser.Position = [0,0,0]
00046 
00047         # Deal with executable
00048         if self.hepevt_source[-1] == "|":
00049             exe = self.hepevt_source.split(' ')[0]
00050             if exe[0] != '/':   # Try to find full path
00051                 import os, os.path
00052                 path = os.getenv('PATH')
00053                 for p in path:
00054                     if (os.path.isfile(path+"/"+exe)):
00055                         exe = path+"/"+exe
00056                         break
00057                     continue
00058                 pass
00059             source = exe + ' ' + ' '.join(self.hepevt_source.split(' ')[1:])
00060             if "%" in source:   # Fill in any placemarks
00061                 source = source%{'nevents':str(self.nevents),
00062                                  'seed':str(self.seed)}
00063                 pass
00064             pass
00065         
00066 
00067         # HEPEvt -> HepMC generator
00068         #hepevt = self.app.property("ToolSvc.GtHepEvtGenTool")
00069         #hepevt.HepEvtDataSource = source
00070         #print " HepEvtGenTool with", source
00071 
00072         # Set up gun
00073         gun = self.app.property("ToolSvc.GtGunGenTool")
00074         gun.OutputLevel = 2
00075         gun.ParticleName = "opticalphoton"
00076         gun.MomentumMode = "Fixed"
00077         gun.Momentum = 2.5*units.eV
00078         gun.DirectionMode = "Fixed"
00079         gun.Direction = [ 0.0,0.0,-1.0 ]
00080 
00081         return
00082 


Member Data Documentation

Definition at line 4 of file my.py.

Definition at line 4 of file my.py.

Definition at line 4 of file my.py.

Definition at line 4 of file my.py.

Definition at line 4 of file my.py.


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:20:44 for Gnrtr by doxygen 1.7.4