ATLAS Offline Software
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 # ----------------------------------------------------------------------
12 paramFile = "epos_crmc.param"
13 
14 inputFiles = "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 
24 os.system("mkdir tabs")
25 
26 # get files from InstallArea
27 os.system("get_files %s" % inputFiles)
28 for fin in inputFiles.split():
29  os.system("mv %s tabs/%s" % (fin, fin))
30 
31 
32 if not os.path.isfile( paramFile ):
33  print "\"", paramFile, "\""," is missing!. Force exit..."
34  # force exit
35  sys.exit()
36 else:
37  print "\"", paramFile, "\""," found!."
38 
39 # ----------------------------------------------------------------------
40 from AthenaCommon.AppMgr import ServiceMgr
41 
42 from AthenaCommon.AlgSequence import AlgSequence
43 job = AlgSequence()
44 
45 # ----------------------------------------------------------------------
46 # Epos initialization
47 # ----------------------------------------------------------------------
48 from Epos_i.Epos_iConf import Epos
49 
50 epos = Epos()
51 epos.BeamMomentum = -3500.0
52 epos.TargetMomentum = 3500.0
53 epos.PrimaryParticle = 1
54 epos.TargetParticle = 1
55 epos.Model = 0 # [0=EPOS_LHC (default), 1=EPOS_1.99, 2=QGSJET01, 6=Sibyll_2.1, 7=QGSJETII-04, 11=QGSJETII-03]
56 epos.ParamFile = paramFile # FIXME?
57 eps.LheOutput = 0 # yes=1 no-0
58 epos.LheFile = "epos.lhe"
59 epos.TabCreate = 0 # force tab creation yes-1 no-0
60 job += epos
61 
62 # Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL )
63 MessageSvc = Service( "MessageSvc" )
64 MessageSvc.OutputLevel = 3
65 
66 # Number of events to be processed (default is 10)
67 #theApp.EvtMax = 200
68 evgenConfig.minevents = 100
69 
70 # ----------------------------------------------------------------------
71 # Printing service
72 # ----------------------------------------------------------------------
73 from TruthExamples.TruthExamplesConf import DumpMC
74 #job += DumpMC()
75 
76 # ----------------------------------------------------------------------
77 # Ntuple service output
78 # ----------------------------------------------------------------------
79 import AthenaPoolCnvSvc.WriteAthenaPool
80 from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream
81 
82 stream1 = AthenaPoolOutputStream( "StreamEVGEN" )
83 stream1.WritingTool = "AthenaOutputStreamTool"
84 stream1.OutputFile = "epos_events.pool.root"
85 stream1.TakeItemsFromInput = True
86 stream1.ItemList += [ 'EventInfo#*', 'McEventCollection#*' ]
87 # ----------------------------------------------------------------------
88 
python.AlgSequence.AlgSequence
AlgSequence
Definition: PhysicsAnalysis/D3PDTools/AnaAlgorithm/python/AlgSequence.py:7
python.FakeAthena.Service
def Service(name)
Definition: FakeAthena.py:38
python.CreateOutputStreams.AthenaPoolOutputStream
def AthenaPoolOutputStream
backward compat
Definition: CreateOutputStreams.py:144