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

In This Package:

DetSim::OpStack Namespace Reference


Functions

def configure
def run

Variables

string DATETIME_FORMAT = '%Y-%m-%dT%H:%M:%S'
 test = False
string ts = "(pdg!=20022)"
dictionary params
list stat

Function Documentation

def DetSim::OpStack::configure (   argv = []  ) 

script for fast neutron background study

Definition at line 16 of file OpStack.py.

00016                       :
00017     """ script for fast neutron background study"""
00018 
00019     site=argv[0]
00020     seed=argv[1]
00021 
00022     volume = "/dd/Structure/Pool/db-ows"
00023     musicsite = 'DYB'
00024     if 'far' == site:
00025         volume = "/dd/Structure/Pool/far-ows"
00026         musicsite = 'Far'
00027     if 'dayabay' == site:
00028         volume = "/dd/Structure/Pool/db-ows"
00029         musicsite = 'DYB'
00030     if 'lingao' == site:
00031         volume = "/dd/Structure/Pool/la-ows"
00032         musicsite = 'LA'
00033 
00034     import GaudiKernel.SystemOfUnits as units
00035     
00036     if test:
00037         import GenTools
00038         from GenTools.Helpers import Gun
00039         mygun = Gun()
00040         mygun.gun.ParticleName = 'mu-'
00041         mygun.gun.Momentum = 3.0*units.GeV
00042         mygun.setVolume(volume)
00043         mygun.positioner.Position = [300*units.cm, 300*units.cm, 0*units.cm]
00044         mygun.timerator.LifeTime = 1*units.second
00045         gtc = GenTools.Configure()
00046         gtc.register(mygun)
00047 
00048     else:
00049         MuonDataPath = os.getenv('MuonDataPath')
00050         if MuonDataPath is None :
00051             print "DetSim.OpStack Muon data path ($MuonDataPath) is not defined."
00052             print "Might need to get data file  from http://dayabay.ihep.ac.cn/svn/dybsvn/data/trunk/NewMuonGenerator/data/"
00053             sys.exit()
00054         else:
00055             print "Read muon data from ",MuonDataPath
00056 
00057 
00058         source = "Muon.exe -n 1000 -s %s -seed %s -r Yes -music_dir %s |"%(musicsite, seed, MuonDataPath)
00059 
00060         print " musicSite: %s, and RandomSeed: %s"%(musicsite,seed)
00061         
00062         from GenTools.Helpers import HepEVT
00063         hepevt = HepEVT(source)
00064         hepevt.positioner.Volume = volume
00065         hepevt.positioner.Mode = "Relative"
00066         hepevt.positioner.Position = [0,0,0]
00067         hepevt.timerator.LifeTime = 1*units.second
00068         hepevt.transformer.Volume = volume
00069         hepevt.transformer.Offset = [0., 0., (0.042)*units.meter]
00070 
00071         import GenTools
00072         gt = GenTools.Configure(helper=hepevt)
00073     
00074 
00075     ###Detsim Config
00076     
00077     import DetSim
00078     detsim = DetSim.Configure(site=site)
00079 
00080     from DetSim.DetSimConf import DsPhysConsOptical
00081     optical = DsPhysConsOptical("GiGa.GiGaPhysListModular.DsPhysConsOptical")
00082     optical.CerenPhotonScaleWeight = 3.0
00083     optical.ScintPhotonScaleWeight = 3.0
00084     optical.UseScintillation = False
00085 
00086 
00087     from DetSim.DetSimConf import DsOpStackAction
00088     opstack = DsOpStackAction("GiGa.DsOpStackAction")
00089     detsim.giga.StackingAction=opstack
00090     opstack.TightCut = False
00091     opstack.PhotonCut = False
00092     opstack.MaxPhoton = 1e6
00093 
00094     
### record all the muon and neutron track and vertices

def DetSim::OpStack::run (   app  ) 

Definition at line 181 of file OpStack.py.

00181             :
00182     pass
00183 
00184 
00185 #if '__main__' == __name__:
00186 #    pass
#    pass


Variable Documentation

string DetSim::OpStack::DATETIME_FORMAT = '%Y-%m-%dT%H:%M:%S' [static]

Definition at line 10 of file OpStack.py.

DetSim::OpStack::test = False [static]

Definition at line 14 of file OpStack.py.

string DetSim::OpStack::ts = "(pdg!=20022)" [static]

Definition at line 99 of file OpStack.py.

dictionary DetSim::OpStack::params [static]

Initial value:

{
        'ismuon':"(pdg==13 or pdg==-13)",
        'isneutron': "(pdg==2112)",
        'isstop': "(IsStopping>0)",
        'start' :"(start > 0)",
        'track1':"(id==1 and ProcessType==1)",
        'track2':"(id==2 and ProcessType==1)",
        'GD':    "MaterialName == '/dd/Materials/GdDopedLS'",
        'LS':    "MaterialName == '/dd/Materials/LiquidScintillator'",
        'Oil':   "MaterialName == '/dd/Materials/MineralOil'",
        'AV':   "MaterialName == '/dd/Materials/Acrylic'",
        'OW':   "MaterialName == '/dd/Materials/OwsWater'",
        'IW':   "MaterialName == '/dd/Materials/IwsWater'"
        }

Definition at line 107 of file OpStack.py.

list DetSim::OpStack::stat [static]

Definition at line 122 of file OpStack.py.

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

Generated on Mon Apr 11 20:53:29 2011 for DetSim by doxygen 1.4.7