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

In This Package:

diffuser_ball.py

Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 
00003 '''
00004 usage example:
00005 
00006   nuwa.py -n 10 diffuser_ball.py 
00007 
00008 '''
00009 
00010 ### GenTools
00011 import GenTools
00012 from GenTools.Helpers import DiffuserBall
00013 import GaudiKernel.SystemOfUnits as units
00014 ball = DiffuserBall()
00015 ball.setPosition( [0.0*units.cm, 0.0*units.cm, 0.0*units.cm] )
00016 #ball.ball.Anisotropy = False
00017 ball.ball.BrightSpotTheta = 180*units.degree
00018 ball.ball.BrightSpotPhi = 0
00019 GenTools.Configure().register(ball)
00020 
00021 #dumper = GenTools.Dumper()
00022 
00023 ### DetSim
00024 import DetSim
00025 detsim = DetSim.Configure(physlist=DetSim.physics_list_basic)
00026 params = {
00027     'start' :"(start > 0)",
00028     'track1':"(id==1 and ProcessType==1)",
00029     'track2':"(id==2 and ProcessType==1)",
00030     'GD':    "MaterialName == '/dd/Materials/GdDopedLS'",
00031     'LS':    "MaterialName == '/dd/Materials/LiquidScintillator'",
00032     'oil':   "MaterialName == '/dd/Materials/MineralOil'",
00033     'iAV':   "MaterialName == '/dd/Materials/Acrylic'",
00034     'oAV':   "MaterialName == '/dd/Materials/Acrylic'"
00035     }
00036 detsim.unobserver(stats=[
00037     # for track 1
00038     ["pdgId_Trk1","pdg","%(track1)s and %(start)s"%params],
00039     ["t_Trk1",    "t" , "%(track1)s and %(start)s"%params],
00040     ["x_Trk1",    "x", "%(track1)s and %(start)s"%params],
00041     ["y_Trk1",    "y", "%(track1)s and %(start)s"%params],
00042     ["z_Trk1",    "z", "%(track1)s and %(start)s"%params],
00043     ["e_Trk1",    "E",  "%(track1)s and %(start)s"%params],
00044     ["p_Trk1",    "p",  "%(track1)s and %(start)s"%params],
00045     ["ke_Trk1",   "KE", "%(track1)s and %(start)s"%params],
00046     ["vx_Trk1",   "lvx","%(track1)s and %(start)s"%params],
00047     ["vy_Trk1",   "lvy","%(track1)s and %(start)s"%params],
00048     ["vz_Trk1",   "lvz","%(track1)s and %(start)s"%params],
00049     ["TrkLength_GD_Trk1",  "dx","%(track1)s and %(GD)s"%params],
00050     ["TrkLength_iAV_Trk1", "dx","%(track1)s and %(iAV)s"%params],
00051     ["TrkLength_LS_Trk1",  "dx","%(track1)s and %(LS)s"%params],
00052     ["TrkLength_oAV_Trk1", "dx","%(track1)s and %(oAV)s"%params],
00053     ["TrkLength_Oil_Trk1", "dx","%(track1)s and %(oil)s"%params],
00054     # for track 2 now
00055     ["pdgId_Trk2","pdg","%(track2)s and %(start)s"%params],
00056     ["t_Trk2",    "t" , "%(track2)s and %(start)s"%params],
00057     ["x_Trk2",    "x", "%(track2)s and %(start)s"%params],
00058     ["y_Trk2",    "y", "%(track2)s and %(start)s"%params],
00059     ["z_Trk2",    "z", "%(track2)s and %(start)s"%params],
00060     ["e_Trk2",    "E",  "%(track2)s and %(start)s"%params],
00061     ["p_Trk2",    "p",  "%(track2)s and %(start)s"%params],
00062     ["ke_Trk2",   "KE", "%(track2)s and %(start)s"%params],
00063     ["vx_Trk2",   "lvx","%(track2)s and %(start)s"%params],
00064     ["vy_Trk2",   "lvy","%(track2)s and %(start)s"%params],
00065     ["vz_Trk2",   "lvz","%(track2)s and %(start)s"%params],
00066     ["TrkLength_GD_Trk2",  "dx","%(track2)s and %(GD)s"%params],
00067     ["TrkLength_iAV_Trk2", "dx","%(track2)s and %(iAV)s"%params],
00068     ["TrkLength_LS_Trk2",  "dx","%(track2)s and %(LS)s"%params],
00069     ["TrkLength_oAV_Trk2", "dx","%(track2)s and %(oAV)s"%params],
00070     ["TrkLength_Oil_Trk2", "dx","%(track2)s and %(oil)s"%params]
00071     ])
00072 
00073 ## DetSimVali
00074 from DetSimValidation.DetSimValidationConf import DetSimVali
00075 dsv = DetSimVali()
00076 dsv.Volume = '/dd/Structure/AD/far-oil1'
00077 
00078 from Gaudi.Configuration import ApplicationMgr
00079 app = ApplicationMgr()
00080 app.TopAlg.append(dsv)
00081 
00082 from GaudiSvc.GaudiSvcConf import THistSvc
00083 histsvc = THistSvc()
00084 histsvc.Output =["file1 DATAFILE='../mc_ntuple/diffuser.root' OPT='RECREATE' TYP='ROOT' "]
00085 
00086 ### ElecSim
00087 import ElecSim
00088 elecsim = ElecSim.Configure()
00089 
00090 ### TrigSim
00091 import TrigSim
00092 trigsim = TrigSim.Configure()
00093 
00094 ### ReadoutSim
00095 import ReadoutSim
00096 rosim = ReadoutSim.Configure()
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:56:26 2011 for DetSimValidation by doxygen 1.4.7