/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Helpers.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 
00003 import GaudiKernel.SystemOfUnits as units
00004 from GenTools.GenToolsConf import GtPositionerTool
00005 from GenTools.GenToolsConf import GtTimeratorTool
00006 from GenTools.GenToolsConf import GtTransformTool
00007 from InvBetaDecay.InvBetaDecayConf import GtInverseBeta
00008 
00009 class Decay:
00010     
00011     '''
00012     A "helper" module for inverse beta decay
00013     '''
00014     
00015     def __init__(self,
00016                  name = "decay",
00017                  volume = '/dd/Structure/AD/far-oil1',
00018                  decay = None,
00019                  positioner = None,
00020                  timerator = None,
00021                  transformer = None
00022                  ):
00023         '''
00024         Construct a Decay helper.
00025 
00026         Coustom configured tools can
00027         be passed in or customization can be done after construction
00028         using the data members:
00029 
00030         .decay
00031         .positioner
00032         .timerator
00033         .transformer
00034         
00035         If the Volume property for the positioner and transformer is
00036         not yet set, it will be set to the value of "volume"
00037         '''
00038         if decay == None:
00039             decay = GtInverseBeta(name,
00040                                   NeutrinoAngle = 0)
00041         if positioner == None:
00042             positioner = GtPositionerTool(name+"Positioner",
00043                                           Strategy = 'FullVolume',
00044                                           Mode = 'Uniform')
00045         if timerator == None:
00046             timerator = GtTimeratorTool(name+"Timerator",
00047                                         LifeTime = 1.*units.second)
00048         if transformer == None:
00049             transformer = GtTransformTool(name+"Transformer")
00050 
00051         try: 
00052             v = positioner.Volume
00053         except AttributeError:
00054             positioner.Volume = volume
00055             
00056         try:
00057             v = transformer.Volume
00058         except AttributeError:
00059             transformer.Volume = volume
00060 
00061         self.decay = decay
00062         self.positioner = positioner
00063         self.timerator = timerator
00064         self.transformer = transformer
00065         return
00066 
00067     def setVolume(self,volumename):
00068         self.positioner.Volume = volumename
00069         self.transformer.Volume = volumename
00070         return
00071 
00072     def tools(self):
00073         return [self.decay,self.positioner,self.timerator,self.transformer]
00074 
00075     pass # end Decay
00076 
00077 
00078 def configure(argv=[]):
00079     '''
00080     Configure for use as a Job Option Module
00081     '''
00082 
00083     import GenTools
00084     helper = Decay()
00085     helper.decay.NeutrinoAngle = 0
00086 
00087     gtc = GenTools.Configure(genname="InverseBeta",helper=helper)
00088 
00089     #GenTools.Dumper()
00090 
00091     return
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 10:22:51 for InvBetaDecay by doxygen 1.7.4