| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

pmtbox::MyGenToolsConfig Class Reference

List of all members.

Public Member Functions

def __init__

Detailed Description

Definition at line 3 of file pmtbox.py.


Member Function Documentation

def pmtbox::MyGenToolsConfig::__init__ (   self,
  volume 
)

Definition at line 4 of file pmtbox.py.

00004                              :
00005         import GaudiPython as gm
00006         app = gm.AppMgr()
00007         app.TopAlg = []
00008 
00009 
00010         ########### KINEMATICS ##########
00011 
00012 
00013         # Set up timerator
00014         import GaudiKernel.SystemOfUnits as units
00015         tim = app.property("ToolSvc.GtTimeratorTool")
00016         tim.LifeTime = int(1*units.second)
00017 
00018         # Set up positioner
00019         poser = app.property("ToolSvc.GtPositionerTool")
00020         poser.Volume = volume
00021         #poser.Strategy = "AvoidDaughters"
00022         poser.Strategy = "FullVolume"
00023         poser.Mode = "Smeared"
00024         poser.Spread = 1.0*units.cm
00025         poser.Position = [0.0,0.0,0.0];
00026         poser.OutputLevel = 1
00027 
00028         # Set up gun
00029         gun = app.property("ToolSvc.GtGunGenTool")
00030         gun.ParticlesPerEvent = 100
00031         gun.ParticleName = "opticalphoton"
00032         gun.Momentum = 2.5*units.eV
00033         #gun.ParticleName = "mu+"
00034         #gun.Momentum = 10*units.GeV
00035         gun.MomentumMode = "Fixed"
00036         gun.DirectionMode = "Fixed"
00037         gun.Direction = [ 0.243,0.0,-0.970 ]
00038         #gun.OutputLevel = 1
00039 
00040 
00041         ### Now initi algs
00042 
00043         app.TopAlg += [ "GtGenerator/Generator", "GtHepMCDumper/Dumper" ]
00044 
00045 
00046         gen = app.algorithm("Generator")
00047         gen.OutputLevel = 1
00048         gen.GenTools = [ "GtGunGenTool", "GtPositionerTool", "GtTimeratorTool" ]
00049         gen.GenName = "Bang Bang"
00050         gen.Location = "/Event/Gen/HepMCEvents" # this is default anyways
00051 
00052         #print " GtDumper"
00053         dump = app.algorithm("Dumper")
00054         dump.Location = "/Event/Gen/HepMCEvents"  # this is default anyways.
00055 
00056         ########### SIMULATION ##########
00057 
00058         from GaudiKernel import SystemOfUnits as units
00059         app.ExtSvc += ["GiGa"]
00060 
00061         modularPL = app.property("GiGa.GiGaPhysListModular")
00062         modularPL.OutputLevel = 1
00063         modularPL.CutForElectron = 100*units.micrometer
00064         modularPL.CutForPositron = 100*units.micrometer
00065         modularPL.CutForGamma = 1*units.millimeter
00066         modularPL.PhysicsConstructors = [ 
00067             "DsPhysConsGeneral", 
00068             "DsPhysConsOptical" 
00069             ]
00070 
00071         giga = app.service("GiGa")
00072         giga.OutputLevel = 1
00073         giga.PhysicsList = "GiGaPhysListModular"
00074 
00075         gggeo = app.service("GiGaGeo")
00076         gggeo.OutputLevel = 1
00077 
00078         # Make Geant4 sing!
00079         ggrm = app.property("GiGa.GiGaMgr")
00080         ggrm.Verbosity = 9
00081         event_ac_cmds = app.property("GiGa.GiGaEventActionCommand")
00082         event_ac_cmds.BeginOfEventCommands = [
00083             "/control/verbose 2",
00084             "/run/verbose 1",
00085             "/event/verbose 2",
00086             "/tracking/verbose 2",
00087             "/geometry/navigator/verbose 2"
00088             ]
00089         giga.EventAction = "GiGaEventActionCommand"
00090 
00091 
00092         app.TopAlg += [ "GaudiSequencer/Simulation" ]
00093         seq = app.algorithm("Simulation")
00094         seq.Members = []
00095 
00096         #seq.Members = [ "GiGaInputStream/GGInStream" ]
00097         ggin = app.algorithm("GGInStream")
00098         ggin.OutputLevel = 1
00099         ggin.ExecuteOnce = True
00100         ggin.ConversionSvcName = "GiGaGeo"
00101         ggin.DataProviderSvcName = "DetectorDataSvc"
00102         ggin.StreamItems = [
00103             "/dd/Structure/world",
00104             "/dd/Geometry/PmtBox/PmtBoxSurfaces",
00105             ]
00106 
00107         seq.Members = [ "GiGaInputStream/GGInStream", "DsPushKine/PushKine", "DsPullEvent/PullEvent" ]
00108         push = app.algorithm("PushKine")
00109         push.Converter = "HepMCtoG4"
00110 
00111 
00112         return
00113 
if '__main__' == __name__:


The documentation for this class was generated from the following file:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:53:29 2011 for DetSim by doxygen 1.4.7