/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
Stage::Muon::Muon Class Reference

List of all members.

Public Member Functions

def __init__

Detailed Description

   configure Muon generator

Definition at line 3 of file Muon.py.


Constructor & Destructor Documentation

def Stage::Muon::Muon::__init__ (   self,
  stage = 'null',
  name = 'Muon',
  volume = '/dd/Structure/AD/db-ade1',
  start_time = 0,
  seed = 1234567 
)

Definition at line 8 of file Muon.py.

00014                               :
00015 
00016         # set up Gnrtr itself
00017         from Gnrtr.GnrtrConf import Gnrtr
00018         gnrtr = Gnrtr(name);
00019 
00020         gnrtr.GenTools = [ "GtHepEvtGenTool/"+name+"Gen",
00021                            "GtPositionerTool/"+name+"Pos",
00022                            "GtTimeratorTool/"+name+"Tim",
00023                            "GtTransformTool/"+name+"Tra"]
00024 
00025         gnrtr.ThisStageName = "Kinematic"
00026         gnrtr.TimeStamp = start_time
00027 
00028         if stage != 'null':
00029             stage.KinematicSequence.Members.append(gnrtr)
00030 
00031         # set up each tools
00032         from GaudiKernel import SystemOfUnits as units
00033         from GenTools.GenToolsConf import GtPositionerTool, GtTransformTool, GtTimeratorTool, GtHepEvtGenTool
00034         # Set up Gen
00035 
00036         musicsite = 'DYB'
00037                 
00038         nevents=5000
00039 
00040         hepEvtDataSource = "Muon.exe -n 1000 -s %s -v ADE -seed %s -r Yes -music_dir /mnt/sda3/wangzhe/dybinst/data/trunk/NewMuonGenerator/data|"%(musicsite,seed)
00041         
00042         exe = hepEvtDataSource.split(' ')[0]
00043         NAME = exe[exe.rfind('/')+1:]
00044         dot = NAME.rfind('.')
00045         baseNAME = NAME
00046         if dot > 0: baseNAME = NAME[:dot]
00047         sanitized = baseNAME.replace('.','_')
00048         
00049         # If we got an executable and it is relative, look for it in the path
00050         if hepEvtDataSource[-1] == '|' and hepEvtDataSource[0] != '/':
00051             import os, os.path
00052             path = os.getenv('PATH')
00053             for p in path:
00054                 if (os.path.isfile(path+'/'+exe)):
00055                     hepEvtDataSource = path+'/'+exe + ' ' + ' '.join(hepEvtDataSource.split(' ')[1:])
00056                     break
00057                 continue
00058             pass
00059         
00060         #generator
00061         gen=GtHepEvtGenTool(name+'Gen',HepEvtDataSource = hepEvtDataSource)
00062         #gen.OutputLevel = 2
00063         gen.HepEvtDataSource = hepEvtDataSource
00064         
00065         # Set up positioner
00066         pos=GtPositionerTool(name+'Pos',Volume=volume)
00067         pos.Mode = "Relative"
00068         pos.Position = [0,0,0]
00069         
00070         # Set up timerator
00071         tim=GtTimeratorTool(name+'Tim')
00072         tim.LifeTime = 0.001123*units.s
00073         
00074         # transform
00075         tra=GtTransformTool(name+'Tra',Volume=volume)
00076         tra.Offset = [0., 0., 0.]
00077         
00078         pass


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:07:33 for Stage by doxygen 1.7.4