/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
GenTools::Helpers::Gun Class Reference

List of all members.

Public Member Functions

def __init__
def setVolume
def tools

Public Attributes

 gun
 positioner
 timerator
 transformer

Detailed Description

Configure a particle gun based kinematics

Definition at line 23 of file Helpers.py.


Constructor & Destructor Documentation

def GenTools::Helpers::Gun::__init__ (   self,
  name = "gun",
  volume = '/dd/Structure/AD/far-oil1',
  gun = None,
  positioner = None,
  timerator = None,
  transformer = None 
)
Construct the configuration.  Coustom configured tools can
be passed in or customization can be done after construction
using the data members:

.gun
.positioner
.timerator
.transformer

They can be accessed for additional, direct configuration.

If the Volume property for the positioner and transformer is
not yet set, it will be set to the value of "volume"

Definition at line 28 of file Helpers.py.

00036                   :
00037 
00038         '''Construct the configuration.  Coustom configured tools can
00039         be passed in or customization can be done after construction
00040         using the data members:
00041 
00042         .gun
00043         .positioner
00044         .timerator
00045         .transformer
00046         
00047         They can be accessed for additional, direct configuration.
00048 
00049         If the Volume property for the positioner and transformer is
00050         not yet set, it will be set to the value of "volume"
00051         '''
00052 
00053         if gun == None:
00054             gun = GtGunGenTool(name,
00055                                ParticlesPerEvent = 1,
00056                                ParticleName = 'e+',
00057                                Momentum = 3*units.MeV,
00058                                MomentumMode = 'Fixed',
00059                                DirectionMode = 'Fixed',
00060                                Direction = [1,0,0])
00061         if positioner == None:
00062             positioner = GtPositionerTool(name+"Positioner",
00063                                           Mode = 'Fixed',
00064                                           Position = [0,0,0])
00065         if timerator == None:
00066             timerator = GtTimeratorTool(name+"Timerator",
00067                                         LifeTime = 1*units.second)
00068         if transformer == None:
00069             transformer = GtTransformTool(name+"Transformer")
00070 
00071         try: 
00072             v = positioner.Volume
00073         except AttributeError:
00074             positioner.Volume = volume
00075             
00076         try:
00077             v = transformer.Volume
00078         except AttributeError:
00079             transformer.Volume = volume
00080 
00081         self.gun = gun
00082         self.positioner = positioner
00083         self.timerator = timerator
00084         self.transformer = transformer
00085         return


Member Function Documentation

def GenTools::Helpers::Gun::setVolume (   self,
  volumename 
)

Definition at line 86 of file Helpers.py.

00087                                   :
00088         self.positioner.Volume = volumename
00089         self.transformer.Volume = volumename
00090         return

def GenTools::Helpers::Gun::tools (   self)

Definition at line 91 of file Helpers.py.

00092                    :
00093         return [self.gun,self.positioner,self.timerator,self.transformer]


Member Data Documentation

Definition at line 41 of file Helpers.py.

Definition at line 41 of file Helpers.py.

Definition at line 41 of file Helpers.py.

Definition at line 41 of file Helpers.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:18:51 for GenTools by doxygen 1.7.4