ATLAS Offline Software
jobOptions_CavernBackground.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 = 500000 # All of the events
14 
15 
16 
17 ServiceMgr.MessageSvc.OutputLevel = INFO
18 
19 from BeamHaloGenerator.BeamHaloGeneratorConf import BeamHaloGeneratorAlg
20 BeamHaloGenerator = BeamHaloGeneratorAlg()
21 BeamHaloGenerator.inputType="FLUKA-VT"
22 BeamHaloGenerator.inputFile="/localdisk/wbell/data/cavern-background/4vector_7TeV_R203_205_Z428_610.dat"
23 BeamHaloGenerator.interfacePlane = 0.0
24 BeamHaloGenerator.flipProbability = 0.0
25 BeamHaloGenerator.randomStream = "BeamHalo"
26 BeamHaloGenerator.doMonitoringPlots = True
27 
28 # The generator settings determine if the event is accepted.
29 # * If the allowedPdgId list is not given all particles are accepted.
30 # * Limits are in the form of (lower limit, upper limit)
31 # * If a limit is not given it is disabled.
32 # * If a limit value is -1 then it is disabled.
33 # * All limits are checked against |value|
34 # * r = sqrt(x^2 + y^2)
35 BeamHaloGenerator.generatorSettings = [#
36 # "allowedPdgId 2212 -2212 2112 -2112", # Just p and n
37  "pxLimits -1 -1",
38  "pyLimits -1 -1",
39  "pzLimits -1 -1",
40  "energyLimits -1 -1",
41  "xLimits -1 -1",
42  "yLimits -1 -1",
43  "ptLimits -1 -1",
44  "phiLimits -1 -1",
45  "etaLimits -1 -1",
46  "rLimits -1 -1",
47  "weightLimits -1 -1"]
48 
49 topSequence += BeamHaloGenerator
50 print BeamHaloGenerator
51 
52 # Required when monitoring plots are enabled.
53 theApp.HistogramPersistency = "ROOT"
54 
55 if not hasattr(ServiceMgr, 'THistSvc'):
56  from GaudiSvc.GaudiSvcConf import THistSvc
57  ServiceMgr += THistSvc()
58 
59 ServiceMgr.THistSvc.Output += [ "BeamHalo DATAFILE='BeamHalo.root' OPT='RECREATE'"]
60 
61 # For debugging
62 from TruthExamples.TruthExamplesConf import DumpMC
63 topSequence += DumpMC()
64 
65 from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream
66 Stream1 = AthenaPoolOutputStream( "StreamEVGEN" )
67 Stream1.OutputFile = "evgen.pool.root"
68 Stream1.ItemList += [ 'EventInfo#*', 'McEventCollection#*' ]
69 
70 
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