/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
runIBD15::IBD::IBD Class Reference

List of all members.

Public Member Functions

def __init__

Detailed Description

   configure IBD generator

Definition at line 3 of file IBD.py.


Constructor & Destructor Documentation

def runIBD15::IBD::IBD::__init__ (   self,
  stage = 'null',
  name = 'IBD',
  volume = '/dd/Structure/AD/db-oil1',
  start_time = 0,
  seed = 1234567 
)

Definition at line 8 of file IBD.py.

00014                               :
00015 
00016         # set up Gnrtr itself
00017         from Gnrtr.GnrtrConf import Gnrtr
00018         gnrtr = Gnrtr(name);
00019 
00020         gnrtr.GenTools = [ "GtHepEvtGenTool/"+name+"Gen",
00021                            "GtPositionerTool/"+name+"Pos",
00022                            "GtTimeratorTool/"+name+"Tim",
00023                            "GtTransformTool/"+name+"Tra"]
00024 
00025         gnrtr.ThisStageName = "Kinematic"
00026         gnrtr.TimeStamp = start_time
00027 
00028         if stage != 'null':
00029             stage.KinematicSequence.Members.append(gnrtr)
00030 
00031         # set up each tools
00032         from GaudiKernel import SystemOfUnits as units
00033         from GenTools.GenToolsConf import GtPositionerTool, GtTransformTool, GtTimeratorTool, GtHepEvtGenTool
00034         # Set up Gen
00035         nevents=10000
00036         hepevt_source="InverseBeta.exe -seed %(seed)s -n %(nevents)s|"
00037         # Deal with executable
00038         if hepevt_source[-1] == "|":
00039             exe = hepevt_source.split(' ')[0]
00040             if exe[0] != '/':   # Try to find full path
00041                 import os, os.path
00042                 path = os.getenv('PATH')
00043                 for p in path:
00044                     if (os.path.isfile(path+"/"+exe)):
00045                         exe = path+"/"+exe
00046                         break
00047                     continue
00048                 pass
00049             source = exe + ' ' + ' '.join(hepevt_source.split(' ')[1:])
00050             if "%" in source:   # Fill in any placemarks
00051                 source = source%{'nevents':str(nevents),
00052                                  'seed':str(seed)}
00053                 pass
00054             pass
00055         
00056         
00057         #generator
00058         gen=GtHepEvtGenTool(name+'Gen',HepEvtDataSource = source)
00059         #gen.OutputLevel = 2
00060         gen.HepEvtDataSource = source
00061         
00062         # Set up positioner
00063         pos=GtPositionerTool(name+'Pos',Volume=volume)
00064         pos.Strategy = "FullVolume" # also "AvoidDaughters" and "Surface"
00065         pos.Mode = "Uniform"
00066         #pos.Mode = "Fixed"
00067         pos.Spread = 2.5*units.m
00068         pos.Position = [0,0,0.0*units.m]
00069         
00070         # Set up timerator
00071         tim=GtTimeratorTool(name+'Tim')
00072         tim.LifeTime = int(27*units.s)
00073         
00074         # transform
00075         tra=GtTransformTool(name+'Tra',Volume=volume)
00076         
00077         pass


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 09:55:05 for MDC09a by doxygen 1.7.4