/search.css" rel="stylesheet" type="text/css"/> /search.js">
00001 #!/usr/bin/env python 00002 00003 from GaudiKernel import SystemOfUnits as units 00004 00005 def EvtGenerator(name='IBD_gds', 00006 seed = 42, 00007 finalstate = 'FullIbd', 00008 volume='/dd/Structure/AD/db-gds1', 00009 material = 'GdDopedLS', 00010 strategy = 'FullVolume', 00011 mode = 'Uniform', 00012 lifetime = 9*units.second, 00013 wallTime=0): 00014 ''' 00015 set up the kinematic generator in the given volume with chosen options 00016 using the InvBetaDecay generator. 00017 00018 Originally created by Qing. 00019 Modified from MDC09b/runIBD15 by Zhe Dec. 13, 2010 00020 ''' 00021 00022 print name+"'s strategy is: ", strategy 00023 print name+"'s seed is: ignored" 00024 print name+"'s volume is: ", volume 00025 print name+"'s Material is: ", material 00026 00027 # set up each tools 00028 from GaudiKernel import SystemOfUnits as units 00029 from InvBetaDecay.Helpers import Decay 00030 00031 decay=Decay(name=name) 00032 if finalstate == 'PositronOnly': 00033 decay.decay.PositronOnly = 1 00034 elif finalstate == 'NeutronOnly': 00035 decay.decay.NeutronOnly = 1 00036 decay.positioner.Volume = volume 00037 decay.positioner.Strategy = strategy 00038 if decay.positioner.Strategy == 'Material': 00039 # decay.positioner.Volume='/dd/Structure/AD/db-ade1' 00040 decay.positioner.FillMaterials = [material] 00041 decay.positioner.Mode = mode 00042 decay.positioner.Position = [0,0,0] 00043 decay.positioner.Spread = 10*units.m 00044 decay.timerator.LifeTime = lifetime 00045 decay.transformer.Volume = volume 00046 00047 # set up Gnrtr itself 00048 from Gnrtr.GnrtrConf import Gnrtr 00049 gnrtr = Gnrtr(name); 00050 gnrtr.TimeStamp = wallTime 00051 gnrtr.GenName = name 00052 00053 gnrtr.GenTools = decay.tools() 00054 00055 return gnrtr