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

In This Package:

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.


Member Function 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 6 of file FastMuon.py.

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