ATLAS Offline Software
jobOptions_MarsBeamHalo.py
Go to the documentation of this file.
1 import AthenaCommon.AtlasUnixGeneratorJob
2 
3 
4 from AthenaCommon.AlgSequence import AlgSequence
5 topSequence = AlgSequence()
6 
7 
8 from AthenaCommon.AppMgr import ServiceMgr
9 
10 
11 from AthenaCommon.AppMgr import theApp
12 
13 theApp.EvtMax = 150000
14 
15 
16 
17 ServiceMgr.MessageSvc.OutputLevel = INFO
18 
19 from BeamHaloGenerator.BeamHaloGeneratorConf import BeamHaloGeneratorAlg
20 BeamHaloGenerator = BeamHaloGeneratorAlg()
21 BeamHaloGenerator.inputType="MARS-NM"
22 BeamHaloGenerator.inputFile="bgi-b2l1.1"
23 BeamHaloGenerator.generateShowers = False;
24 BeamHaloGenerator.interfacePlane = -20850.0
25 BeamHaloGenerator.flipProbability = 0.0
26 BeamHaloGenerator.randomStream = "BeamHalo"
27 
28 BeamHaloGenerator.doMonitoringPlots = True;
29 
30 # The generator settings determine if the event is accepted.
31 # * If the allowedPdgId list is not given all particles are accepted.
32 # * Limits are in the form of (lower limit, upper limit)
33 # * If a limit is not given it is disabled.
34 # * If a limit value is -1 then it is disabled.
35 # * All limits are checked against |value|
36 # * r = sqrt(x^2 + y^2)
37 BeamHaloGenerator.generatorSettings = [#
38  "shape cylinder", # require trajectory to pass through shape
39 # "allowedPdgId 2212 -2212 2112 -2112", # Just p and n
40 # "pxLimits 0. 0.", # lower and upper limits. The upper limit is optional
41 # "pyLimits 0. 0.", # lower and upper limits. The upper limit is optional
42  "pzLimits 50000.0", # above 50 GeV
43 # "energyLimits 0. 0.", # lower and upper limits. The upper limit is optional
44 # "xLimits 0. 0.", # lower and upper limits. The upper limit is optional
45 # "yLimits 0. 0.", # lower and upper limits. The upper limit is optional
46  "zLimits -4000. 4000.", # required for shape=cylinder
47 # "ptLimits 0. 0.", # lower and upper limits. The upper limit is optional
48 # "phiLimits 0. 0.", # lower and upper limits. The upper limit is optional
49 # "etaLimits 0. 0.", # lower and upper limits. The upper limit is optional
50  "rLimits 650. 1950."] # required for shape=cylinder
51 # "weightLimits 0. 0."] # lower and upper limits. The upper limit is optional
52 
53 topSequence += BeamHaloGenerator
54 print BeamHaloGenerator
55 
56 # Required when monitoring plots are enabled.
57 theApp.HistogramPersistency = "ROOT"
58 
59 if not hasattr(ServiceMgr, 'THistSvc'):
60  from GaudiSvc.GaudiSvcConf import THistSvc
61  ServiceMgr += THistSvc()
62 
63 ServiceMgr.THistSvc.Output += [ "BeamHalo DATAFILE='BeamHalo.root' OPT='RECREATE'"]
64 
65 # For debugging
66 from TruthExamples.TruthExamplesConf import DumpMC
67 topSequence += DumpMC()
68 
69 from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream
70 Stream1 = AthenaPoolOutputStream( "StreamEVGEN" )
71 Stream1.OutputFile = "evgen.pool.root"
72 Stream1.ItemList += [ 'EventInfo#*', 'McEventCollection#*' ]
73 
74 
python.AlgSequence.AlgSequence
AlgSequence
Definition: PhysicsAnalysis/D3PDTools/AnaAlgorithm/python/AlgSequence.py:7
Lb2Lll.THistSvc
THistSvc
Definition: Lb2Lll.py:216
python.CreateOutputStreams.AthenaPoolOutputStream
def AthenaPoolOutputStream
backward compat
Definition: CreateOutputStreams.py:144