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

List of all members.

Public Member Functions

def __init__

Detailed Description

   configure Muon generator

Definition at line 3 of file FastMuon.py.


Constructor & Destructor Documentation

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

Definition at line 8 of file FastMuon.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                            "MuonProphet/"+name+"Prophet",
00024                            "GtTransformTool/"+name+"Tra"
00025                            ]
00026 
00027         gnrtr.ThisStageName = "Kinematic"
00028         gnrtr.TimeStamp = start_time
00029 
00030         if stage != 'null':
00031             stage.KinematicSequence.Members.append(gnrtr)
00032 
00033         # set up each tools
00034         from GaudiKernel import SystemOfUnits as units
00035         from GenTools.GenToolsConf import GtPositionerTool, GtTransformTool, GtTimeratorTool, GtHepEvtGenTool
00036         from MuonProphet.MuonProphetConf import MuonProphet
00037         # Set up Gen
00038 
00039         musicsite = 'DYB'
00040                 
00041         nevents=5000
00042 
00043         hepEvtDataSource = "Muon.exe -n 1000 -s %s -v RPC -seed %s -r Yes -music_dir /mnt/sda3/wangzhe/dybinst/data/trunk/NewMuonGenerator/data|"%(musicsite,seed)
00044         
00045         exe = hepEvtDataSource.split(' ')[0]
00046         NAME = exe[exe.rfind('/')+1:]
00047         dot = NAME.rfind('.')
00048         baseNAME = NAME
00049         if dot > 0: baseNAME = NAME[:dot]
00050         sanitized = baseNAME.replace('.','_')
00051         
00052         # If we got an executable and it is relative, look for it in the path
00053         if hepEvtDataSource[-1] == '|' and hepEvtDataSource[0] != '/':
00054             import os, os.path
00055             path = os.getenv('PATH')
00056             for p in path:
00057                 if (os.path.isfile(path+'/'+exe)):
00058                     hepEvtDataSource = path+'/'+exe + ' ' + ' '.join(hepEvtDataSource.split(' ')[1:])
00059                     break
00060                 continue
00061             pass
00062         
00063         #generator
00064         gen=GtHepEvtGenTool(name+'Gen',HepEvtDataSource = hepEvtDataSource)
00065         #gen.OutputLevel = 2
00066         gen.HepEvtDataSource = hepEvtDataSource
00067         
00068         # Set up positioner
00069         pos=GtPositionerTool(name+'Pos',Volume=volume)
00070         pos.Mode = "Relative"
00071         pos.Position = [0,0,0]
00072         
00073         # Set up timerator
00074         tim=GtTimeratorTool(name+'Tim')
00075         tim.LifeTime = 0.001123*units.s
00076         
00077         # muon prophet
00078         prophet=MuonProphet();
00079         #prophet.Active=False;        
00080         prophet.Site = "DayaBay"
00081         prophet.GenTools     = [ "Li9He8Decayerator/Li9He8" ]
00082         prophet.GenYields    = [ 0.5 ]
00083         prophet.GenLifetimes = [ 0.002*units.s ]
00084 
00085         # trigger related configuration
00086         prophet.TrkLengthInWaterThres = 20*units.cm
00087         prophet.WaterPoolTriggerEff = 0.9999
00088 
00089         # transform
00090         tra=GtTransformTool(name+'Tra',Volume=volume)
00091         tra.Offset = [0., 0., (0.042)*units.meter]
00092 
00093 
00094         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