/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
Stage::gun::gun Class Reference

List of all members.

Public Member Functions

def __init__

Detailed Description

   configure gun generator

Definition at line 8 of file gun.py.


Constructor & Destructor Documentation

def Stage::gun::gun::__init__ (   self,
  stage = 'null',
  name = 'gun',
  volume = '/dd/Structure/DayaBay',
  start_time = 0 
)

Definition at line 13 of file gun.py.

00018                               :
00019 
00020         # set up Gnrtr itself
00021         from Gnrtr.GnrtrConf import Gnrtr
00022         gnrtr = Gnrtr(name);
00023 
00024         gnrtr.GenTools = [ "GtGunGenTool/"+name+"Gen",
00025                            "GtPositionerTool/"+name+"Pos",
00026                            "GtTimeratorTool/"+name+"Tim",
00027                            "GtTransformTool/"+name+"Tra"]
00028 
00029         gnrtr.ThisStageName = "Kinematic"
00030         gnrtr.TimeStamp = start_time
00031 
00032         if stage != 'null':
00033             stage.KinematicSequence.Members.append(gnrtr)
00034 
00035         # set up each tools
00036         from GaudiKernel import SystemOfUnits as units
00037         from GenTools.GenToolsConf import GtPositionerTool, GtTransformTool, GtTimeratorTool
00038 
00039         # generator
00040         from GenTools.GenToolsConf import GtGunGenTool
00041         gun = GtGunGenTool(name+"Gen")
00042         gun.ParticlesPerEvent = 1000
00043         gun.ParticleName = "opticalphoton"
00044         gun.Momentum = 2*units.eV
00045         gun.MomentumMode = "Fixed"
00046         gun.MomentumSpread = 0*units.eV
00047         gun.DirectionMode = "Fixed"
00048         gun.Direction = [ 2.52361587010091171,
00049                           -0.129228715901263058,
00050                           -3.46788066267345130 ]
00051         gun.DirectionSpread = 0
00052         
00053         # Set up positioner
00054         pos=GtPositionerTool(name+'Pos',Volume=volume)
00055         pos.Strategy = "FullVolume" # also "AvoidDaughters" and "Surface"
00056         #pos.Mode = "Uniform"
00057         #pos.Mode = "Fixed"
00058         pos.Mode = "Smeared"        
00059         pos.Spread = 5*units.mm
00060         pos.Position = [-411762.29689663457*units.mm,
00061                         817680.94560857571*units.mm,
00062                         -1890.6120407181961*units.mm]
00063         #pos.Position = [-411763.29689663457*units.mm,
00064         #                817680.94560857571*units.mm,
00065         #                -1889.6120407181961*units.mm]
00066         
00067         # Set up timerator
00068         tim=GtTimeratorTool(name+'Tim')
00069         tim.LifeTime = int(30000000*units.ns)
00070         
00071         # transform
00072         tra=GtTransformTool(name+'Tra',Volume=volume)
00073         
00074         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 10:07:33 for Stage by doxygen 1.7.4