/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
SimHistsExample::Configure Class Reference

List of all members.

Public Member Functions

def __init__

Detailed Description

Do default configuration for SimHistsExample package

Definition at line 8 of file __init__.py.


Constructor & Destructor Documentation

def SimHistsExample::Configure::__init__ (   self,
  do_detsim = True,
  volume = '/dd/Structure/AD/far-oil1',
  particle = 'e+' 
)

Definition at line 13 of file __init__.py.

00014                                                                                               :
00015 
00016         print "Configuring GenTools..."
00017         import GenTools
00018         from GenTools.Helpers import Gun
00019         gtc = GenTools.Configure()
00020         gunner = Gun()
00021         gtc.register(gunner)
00022 
00023         # Non-default values for the gen tools:
00024 
00025         gunner.timerator.LifeTime = 1*units.microsecond
00026 
00027         gunner.positioner.Strategy = "FullVolume"
00028         gunner.positioner.Volume = volume
00029         gunner.positioner.Mode = "Smeared"
00030         gunner.positioner.Spread = 1*units.meter
00031         gunner.positioner.Position = [0,0,0]
00032 
00033         gunner.gun.ParticlesPerEvent = 1
00034         gunner.gun.ParticleName = particle
00035         gunner.gun.Momentum = 4*units.MeV
00036         gunner.gun.MomentumMode = "Smeared"
00037         gunner.gun.MomentumSpread = 1*units.MeV
00038         gunner.gun.DirectionMode = "Uniform"
00039         gunner.gun.DirectionSpread = 180*units.degree
00040         gunner.gun.PolarizeMode = "Random"
00041 
00042         # Add the dumper to see log output of kinematics
00043         dump = GenTools.Dumper()
00044         print "... GenTools done."
00045 
00046         print 'Configure the THistSvc...'
00047         from GaudiSvc.GaudiSvcConf import THistSvc
00048         histsvc = THistSvc()
00049         histsvc.Output = [
00050             "file1 DATAFILE='simhists.root' OPT='RECREATE' TYP='ROOT' "
00051             ]
00052         print '... THistSvc config done.'
00053 
00054         # Get the app so we can add to TopAlg
00055         from Gaudi.Configuration import ApplicationMgr
00056         theApp = ApplicationMgr()
00057 
00058         print 'Configure the GenHists alg...'
00059         from SimHistsExample.SimHistsExampleConf import GenHists
00060         gh = GenHists()
00061         theApp.TopAlg.append(gh)
00062         gh.Location = "/Event/Gen/GenHeader"
00063         gh.Volume = volume
00064         gh.FilePath = "/file1/gen"
00065         gh.MaxEnergy = 5
00066         gh.EnergyUnits = units.MeV
00067         print '... GenHists alg configured.'
00068 
00069         if not do_detsim:
00070             print "Not doing DetSim configuration, only GenTools level."
00071             return
00072 
00073         print "Configuring DetSim with only basic physics list..."
00074         import DetSim
00075         from DetSim.Default import physics_list_basic
00076         detsim = DetSim.Configure(physlist = physics_list_basic)
00077         print '... done.'
00078 
00079         print 'Configure the SimHists alg...'
00080         from SimHistsExample.SimHistsExampleConf import SimHists
00081         sh = SimHists()
00082         theApp.TopAlg.append(sh)
00083         sh.Location = "/Event/Sim/SimHeader"
00084         sh.FilePath = "/file1/sim"
00085         print '... SimHists alg configured.'
00086 
00087 
        return

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:19:50 for SimHistsExample by doxygen 1.7.4