ATLAS Offline Software
Loading...
Searching...
No Matches
jobOptions.crmc.py
Go to the documentation of this file.
1# ----------------------------------------------------------------------
2# Example Epos JO file, adapted for Epos-1.99.crmc.r2790.
3# Author: Sebastian Piec
4#
5# ! IMPORTANT !
6# External config file crmc.param is automatically installed to Epos_i/run folder.
7# ----------------------------------------------------------------------
8
9# ----------------------------------------------------------------------
10# Check existance of input files
11# ----------------------------------------------------------------------
12paramFile = "epos_crmc.param"
13
14inputFiles = "qgsjet.dat \
15 qgsjet.ncs \
16 sectnu-II-03 \
17 epos.initl \
18 epos.iniev \
19 epos.inirj \
20 epos.inics \
21 epos.inirj.lhc \
22 epos.inics.lhc "
23
24os.system("mkdir tabs")
25
26# get files from InstallArea
27os.system("get_files %s" % inputFiles)
28for fin in inputFiles.split():
29 os.system("mv %s tabs/%s" % (fin, fin))
30
31
32if not os.path.isfile( paramFile ):
33 print "\"", paramFile, "\""," is missing!. Force exit..."
34 # force exit
35 sys.exit()
36else:
37 print "\"", paramFile, "\""," found!."
38
39# ----------------------------------------------------------------------
40from AthenaCommon.AppMgr import ServiceMgr
41
42from AthenaCommon.AlgSequence import AlgSequence
43job = AlgSequence()
44
45# ----------------------------------------------------------------------
46# Epos initialization
47# ----------------------------------------------------------------------
48from Epos_i.Epos_iConf import Epos
49
50epos = Epos()
51epos.BeamMomentum = -3500.0
52epos.TargetMomentum = 3500.0
53epos.PrimaryParticle = 1
54epos.TargetParticle = 1
55epos.Model = 0 # [0=EPOS_LHC (default), 1=EPOS_1.99, 2=QGSJET01, 6=Sibyll_2.1, 7=QGSJETII-04, 11=QGSJETII-03]
56epos.ParamFile = paramFile # FIXME?
57eps.LheOutput = 0 # yes=1 no-0
58epos.LheFile = "epos.lhe"
59epos.TabCreate = 0 # force tab creation yes-1 no-0
60job += epos
61
62# Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL )
63MessageSvc = Service( "MessageSvc" )
64MessageSvc.OutputLevel = 3
65
66# Number of events to be processed (default is 10)
67#theApp.EvtMax = 200
68evgenConfig.minevents = 100
69
70# ----------------------------------------------------------------------
71# Printing service
72# ----------------------------------------------------------------------
73from TruthExamples.TruthExamplesConf import DumpMC
74#job += DumpMC()
75
76# ----------------------------------------------------------------------
77# Ntuple service output
78# ----------------------------------------------------------------------
79import AthenaPoolCnvSvc.WriteAthenaPool
80from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream
81
82stream1 = AthenaPoolOutputStream( "StreamEVGEN" )
83stream1.WritingTool = "AthenaOutputStreamTool"
84stream1.OutputFile = "epos_events.pool.root"
85stream1.TakeItemsFromInput = True
86stream1.ItemList += [ 'EventInfo#*', 'McEventCollection#*' ]
87# ----------------------------------------------------------------------
88
This code is used to get an Epos Monte Carlo event.
Definition Epos.h:28