/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
adgun::MyGenToolsConfig Class Reference

List of all members.

Public Member Functions

def __init__

Detailed Description

Definition at line 3 of file adgun.py.


Constructor & Destructor Documentation

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

Definition at line 4 of file adgun.py.

00005                              :
00006         from  GaudiPython import AppMgr
00007         from GaudiKernel import SystemOfUnits as units
00008 
00009         app = AppMgr()
00010         app.TopAlg = []
00011 
00012         # Set up timerator
00013         import GaudiKernel.SystemOfUnits as units
00014         tim = app.property("ToolSvc.GtTimeratorTool")
00015         tim.LifeTime = int(1*units.second)
00016 
00017         # Set up positioner
00018         poser = app.property("ToolSvc.GtPositionerTool")
00019         poser.Volume = volume
00020         poser.Mode = "Fixed"
00021         poser.Position = [0,0,5.0/16.0*units.meter]
00022         poser.OutputLevel = 7
00023 
00024         # Set up gun
00025         gun = app.property("ToolSvc.GtGunGenTool")
00026         gun.OutputLevel = 7
00027         gun.Volume = volume
00028         gun.ParticlesPerEvent = 1
00029         gun.ParticleName = "opticalphoton"
00030         gun.Momentum = 2.5*units.eV
00031         #gun.ParticleName = "mu+"
00032         #gun.Momentum = 10*units.GeV
00033         gun.MomentumMode = "Fixed"
00034         gun.DirectionMode = "Fixed"
00035         from math import sin, cos, pi
00036         pmt_column_number = 9
00037         angle = (2*pmt_column_number - 1)*pi/24.0;
00038         gun.Direction = [ cos(angle),sin(angle),0 ] # aim for PMT 
00039         print 'gun.Direction=',gun.Direction
00040 
00041         app.TopAlg += [ "GaudiSequencer/GenSeq" ]
00042         genseq = app.algorithm("GenSeq")
00043         genseq.Members = [ "GtGenerator/GenAlg", "GtHepMCDumper/GenDump" ]
00044 
00045 
00046         gen = app.algorithm("GenAlg")
00047         gen.OutputLevel = 7
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         gendump = app.algorithm("GenDump")
00054         gendump.Location = "/Event/Gen/HepMCEvents"  # this is default anyways.
00055 
00056 
00057         #######################################################################
00058         app.ExtSvc += ["GiGa"]
00059 
00060         modularPL = app.property("GiGa.GiGaPhysListModular")
00061         modularPL.OutputLevel = 0
00062         modularPL.CutForElectron = 100*units.micrometer
00063         modularPL.CutForPositron = 100*units.micrometer
00064         modularPL.CutForGamma = 1*units.millimeter
00065         modularPL.PhysicsConstructors = [ 
00066             "DsPhysConsGeneral", 
00067             "DsPhysConsOptical" 
00068             ]
00069 
00070         giga = app.service("GiGa")
00071         giga.OutputLevel = 0
00072         giga.PhysicsList = "GiGaPhysListModular"
00073 
00074         gggeo = app.service("GiGaGeo")
00075         gggeo.OutputLevel = 0
00076         gggeo.XsizeOfWorldVolume = 2.4*units.kilometer
00077         gggeo.YsizeOfWorldVolume = 2.4*units.kilometer
00078         gggeo.ZsizeOfWorldVolume = 2.4*units.kilometer
00079 
00080         # Make Geant4 sing!
00081         ggrm = app.property("GiGa.GiGaMgr")
00082         ggrm.Verbosity = 0
00083         event_ac_cmds = app.property("GiGa.GiGaEventActionCommand")
00084         event_ac_cmds.BeginOfEventCommands = [
00085             "/control/verbose 0",
00086             "/run/verbose 0",
00087             "/event/verbose 0",
00088             "/tracking/verbose 0",
00089             "/geometry/navigator/verbose 0"
00090             ]
00091         giga.EventAction = "GiGaEventActionCommand"
00092 
00093 
00094         app.TopAlg += [ "GaudiSequencer/SimSeq" ]
00095         simseq = app.algorithm("SimSeq")
00096         simseq.Members = [ "GiGaInputStream/GGInStream" ]
00097 
00098         ggin = app.algorithm("GGInStream")
00099         ggin.OutputLevel = 0
00100         ggin.ExecuteOnce = True
00101         ggin.ConversionSvcName = "GiGaGeo"
00102         ggin.DataProviderSvcName = "DetectorDataSvc"
00103         ggin.StreamItems = [
00104             "/dd/Structure/Sites/la-rock",
00105             #"/dd/Structure/AD/far-ade3",
00106             ]
00107 
00108         simseq.Members += [ "DetSimProc/DetSim" ]
00109         ds = app.algorithm("DetSim")
00110         ds.OutputLevel = 1
00111         ds.Converter = "HepMCtoG4"
00112 
00113         # Class name to use is set in DetDesc xml's "sensdet" attribute.
00114         pmtsd = app.property("GiGaGeo.DsPmtSensDet")
00115         pmtsd.OutputLevel = 0
00116 
00117         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:22:12 for DetSimProc by doxygen 1.7.4