/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 | Public Attributes
DetSimValidation::AD::UniformPositron Class Reference

List of all members.

Public Member Functions

def __init__

Public Attributes

 gun
 dumper
 detsim
 detsimvali

Detailed Description

Configure GenTools, DetSim and DetSimVali for running uniform
distribution of positrons in an AD.  Does not configure geometry.

Definition at line 7 of file AD.py.


Constructor & Destructor Documentation

def DetSimValidation::AD::UniformPositron::__init__ (   self,
  histogram_filename = 'elec_uni.root' 
)
Construct the default configuration.  A non-default
histogram_filename can be specified to hold the resulting
histograms.

Definition at line 12 of file AD.py.

00013                                                            :
00014         ''' Construct the default configuration.  A non-default
00015         histogram_filename can be specified to hold the resulting
00016         histograms.
00017         '''
00018         import GaudiKernel.SystemOfUnits as units
00019 
00020         volume="/dd/Structure/AD/far-lso2"
00021 
00022         # First GenTools
00023         from GenTools.Helpers import Gun
00024         from GenTools.GenToolsConf import GtGunGenTool, GtPositionerTool
00025         gun = Gun(volume,
00026                   gun = GtGunGenTool("gun",
00027                                      ParticlesPerEvent = 1,
00028                                      ParticleName = "e+",
00029                                      Momentum = 5*units.MeV,
00030                                      MomentumMode = "Uniform",
00031                                      MomentumSpread = 4*units.MeV,
00032                                      DirectionMode = "Uniform",
00033                                      Direction = [ 1, 0, 0 ],
00034                                      DirectionSpread = 3),
00035                   positioner = GtPositionerTool("pos",
00036                                                 Strategy = "FullVolume",
00037                                                 Mode = "Uniform",
00038                                                 Spread = 2.6*units.meter,
00039                                                 Position = [0,0,0*units.meter])
00040                   )
00041         gun.timerator.LifeTime = 1*units.second
00042         import GenTools
00043         GenTools.Configure().register(gun)
00044         self.gun = gun
00045 
00046         self.dumper = GenTools.Dumper()
00047 
00048         # Then DetSim, with smaller than default configuration:
00049         import DetSim
00050         detsim = DetSim.Configure(site="far",physlist=DetSim.physics_list_basic)
00051         params = {
00052             'start' :"(start > 0)",
00053             'track1':"(id==1)",
00054             'track2':"(id==2)",
00055             'GD':    "MaterialName == '/dd/Materials/GdDopedLS'",
00056             'LS':    "MaterialName == '/dd/Materials/LiquidScintillator'",
00057             'MO':   "MaterialName == '/dd/Materials/MineralOil'",
00058             'IAV':   "MaterialName == '/dd/Materials/Acrylic'",
00059             'OAV':   "MaterialName == '/dd/Materials/Acrylic'",
00060             'lastvtx': "IsStopping == 1",
00061             'firstvtx': "IsStarting == 1"
00062             }
00063         detsim.unobserver(stats=[
00064                 # track 1
00065                 ["pdgId_Trk1","pdg","%(track1)s and %(start)s"%params],
00066                 ["t_Trk1",    "t" , "%(track1)s and %(start)s"%params],
00067                 ["x_Trk1",    "x", "%(track1)s and %(start)s"%params],
00068                 ["y_Trk1",    "y", "%(track1)s and %(start)s"%params],
00069                 ["z_Trk1",    "z", "%(track1)s and %(start)s"%params],
00070                 ["tEnd_Trk1",    "t" , "%(track1)s and %(lastvtx)s"%params],
00071                 ["xEnd_Trk1",    "x", "%(track1)s and %(lastvtx)s"%params],
00072                 ["yEnd_Trk1",    "y", "%(track1)s and %(lastvtx)s"%params],
00073                 ["zEnd_Trk1",    "z", "%(track1)s and %(lastvtx)s"%params],
00074                 ["e_Trk1",    "E",  "%(track1)s and %(start)s"%params],
00075                 ["p_Trk1",    "p",  "%(track1)s and %(start)s"%params],
00076                 ["ke_Trk1",   "KE", "%(track1)s and %(start)s"%params],
00077                 ["vx_Trk1",   "lvx","%(track1)s and %(start)s"%params],
00078                 ["vy_Trk1",   "lvy","%(track1)s and %(start)s"%params],
00079                 ["vz_Trk1",   "lvz","%(track1)s and %(start)s"%params],
00080                 ["TrkLength_GD_Trk1",  "dx","%(track1)s and %(GD)s"%params],
00081                 ["TrkLength_iAV_Trk1", "dx","%(track1)s and %(IAV)s"%params],
00082                 ["TrkLength_LS_Trk1",  "dx","%(track1)s and %(LS)s"%params],
00083                 ["TrkLength_oAV_Trk1", "dx","%(track1)s and %(OAV)s"%params],
00084                 ["TrkLength_Oil_Trk1", "dx","%(track1)s and %(MO)s"%params],
00085                 # track 2
00086                 ["pdgId_Trk2","pdg","%(track2)s and %(start)s"%params],
00087                 ["t_Trk2",    "t" , "%(track2)s and %(start)s"%params],
00088                 ["x_Trk2",    "x", "%(track2)s and %(start)s"%params],
00089                 ["y_Trk2",    "y", "%(track2)s and %(start)s"%params],
00090                 ["z_Trk2",    "z", "%(track2)s and %(start)s"%params],
00091                 ["tEnd_Trk2",    "t" , "%(track2)s and %(lastvtx)s"%params],
00092                 ["xEnd_Trk2",    "x", "%(track2)s and %(lastvtx)s"%params],
00093                 ["yEnd_Trk2",    "y", "%(track2)s and %(lastvtx)s"%params],
00094                 ["zEnd_Trk2",    "z", "%(track2)s and %(lastvtx)s"%params],
00095                 ["e_Trk2",    "E",  "%(track2)s and %(start)s"%params],
00096                 ["p_Trk2",    "p",  "%(track2)s and %(start)s"%params],
00097                 ["ke_Trk2",   "KE", "%(track2)s and %(start)s"%params],
00098                 ["vx_Trk2",   "lvx","%(track2)s and %(start)s"%params],
00099                 ["vy_Trk2",   "lvy","%(track2)s and %(start)s"%params],
00100                 ["vz_Trk2",   "lvz","%(track2)s and %(start)s"%params],
00101                 ["TrkLength_GD_Trk2",  "dx","%(track2)s and %(GD)s"%params],
00102                 ["TrkLength_iAV_Trk2", "dx","%(track2)s and %(IAV)s"%params],
00103                 ["TrkLength_LS_Trk2",  "dx","%(track2)s and %(LS)s"%params],
00104                 ["TrkLength_oAV_Trk2", "dx","%(track2)s and %(OAV)s"%params],
00105                 ["TrkLength_Oil_Trk2", "dx","%(track2)s and %(MO)s"%params]
00106                 ])
00107                 
00108         self.detsim = detsim
00109 
00110         # Finally, DetSimVali itself
00111         from DetSimValidation.DetSimValidationConf import DetSimVali
00112         dsv = DetSimVali()
00113         dsv.Volume = volume
00114         self.detsimvali = dsv
00115         
00116         from Gaudi.Configuration import ApplicationMgr
00117         theApp = ApplicationMgr()
00118         theApp.TopAlg.append(dsv)
00119 
00120         from GaudiSvc.GaudiSvcConf import THistSvc
00121         histsvc = THistSvc()
00122         histsvc.Output =["file1 DATAFILE='%s' OPT='RECREATE' TYP='ROOT' "%histogram_filename]
        return

Member Data Documentation

Definition at line 15 of file AD.py.

Definition at line 15 of file AD.py.

Definition at line 15 of file AD.py.

Definition at line 15 of file AD.py.


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:12 for DetSimValidation by doxygen 1.7.4