ATLAS Offline Software
Loading...
Searching...
No Matches
starlight.example.joboption.py
Go to the documentation of this file.
7include( "AthenaPoolCnvSvc/WriteAthenaPool_jobOptions.py" )
8from AthenaCommon.Configurable import Configurable
9from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream
10
11# configuring the Athena application for a 'generator' job
12import AthenaCommon.AtlasUnixGeneratorJob
13
14# make sure we are loading the ParticleProperty service
15from PartPropSvc.PartPropSvcConf import PartPropSvc
16svcMgr += PartPropSvc()
17
18#--------------------------------------------------------------
19# Private Application Configuration options
20#--------------------------------------------------------------
21
22from AthenaCommon.AlgSequence import AlgSequence
23topAlg = AlgSequence()
24
25from Starlight_i.Starlight_iConf import Starlight_i
26topAlg += Starlight_i()
27
28StoreGateSvc = svcMgr.StoreGateSvc
29StoreGateSvc.Dump = TRUE
30
31# Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL )
32svcMgr.MessageSvc.OutputLevel = 3
33svcMgr.MessageSvc.defaultLimit = 100000
34
35#--------------------------------------------------------------
36# Event related parameters
37#--------------------------------------------------------------
38# Number of events to be processed (default is 10)
39theApp.EvtMax = 10
40
41# Set run number (default 0 causes problems)
42svcMgr.EventSelector.RunNumber = 1
43svcMgr.EventSelector.FirstEvent = 1
44
45#--------------------------------------------------------------
46# Algorithms Private Options
47#--------------------------------------------------------------
48
49# Use fixed seeds for reproducibility
50seed1 = int(os.popen2("date +%s")[1].read())
51seed1 &= 0xfffffffe
52
53Starlight_i = Algorithm( "Starlight_i" )
54Starlight_i.McEventKey = "GEN_EVENT"
55# define parameters either via config file
56#Starlight_i.ConfigFileName = "slight.in"
57# define parameters in python for:
58# --------------------------------
59# gamma-gamma continuum:
60# "productionMode 1", "prodParticleId 13" (muons) or 11 (electrons),
61# ------------------------------------------------------------------
62# J/Psi in gamma-Pomeron:
63# "productionMode 2", "prodParticleId 443013" (muons) or 443011 (electrons),
64# --------------------------------------------------------------------------
65# Upsilon in gamma-Pomeron:
66# "productionMode 2", "prodParticleId 553013" (muons) or 553011 (electrons),
67# --------------------------------------------------------------------------
68Starlight_i.Initialize = [
69 "beam1Z 82", "beam1A 208", #Z,A of projectile
70 "beam2Z 82", "beam2A 208", #Z,A of target
71 "beamLorentzGamma 1482", #Gamma of the colliding ions, for sqrt(nn)=2.76 TeV
72 "maxW 10", #Max value of w
73 "minW 2", #Min value of w
74 "nmbWBins 400", #Bins n w
75 "maxRapidity 8.", #max y
76 "nmbRapidityBins 1000", #Bins n y
77 "accCutPt 0", #Cut in pT? 0 = (no, 1 = yes)
78 "minPt 1.0", #Minimum pT in GeV
79 "maxPt 3.0", #Maximum pT in GeV
80 "accCutEta 0", #Cut in pseudorapidity? (0 = no, 1 = yes)
81 "minEta -10", #Minimum pseudorapidity
82 "maxEta 10", #Maximum pseudorapidity
83 "productionMode 1", #(1=2-phot,2=vmeson(narrow),3=vmeson(wide))
84 "nmbEventsTot 1", #Number of events
85 "prodParticleId 13", #Channel of interest
86 "randomSeed "+str(seed1), #Random number seed
87 "outputFormat 2", #Form of the output
88 "beamBreakupMode 5", #Controls the nuclear breakup
89 "interferenceEnabled 0", #Interference (0 = off, 1 = on)
90 "interferenceStrength 1.", #% of intefernce (0.0 - 0.1)
91 "coherentProduction 1", #Coherent=1,Incoherent=0
92 "incoherentFactor 1.", #percentage of incoherence
93 "bford 9.5",
94 "maxPtInterference 0.24", #Maximum pt considered, when interference is turned on
95 "nmbPtBinsInterference 120" #Number of pt bins when interference is turned on
96 ]
97
98#---------------------------------------------------------------
99# Pool Persistency
100#---------------------------------------------------------------
101from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream
102Stream1 = AthenaPoolOutputStream( "StreamEVGEN" )
103
104theApp.Dlls += [ "GeneratorObjectsAthenaPoolPoolCnv" ]
105PoolSvc = Service( "PoolSvc" )
106
107# Name of the output file
108Stream1.OutputFile = "starlight.test.pool.root"
109
110# 2101 == EventInfo
111# 133273 == MCTruth (HepMC)
112Stream1.ItemList += [ "2101#*" ]
113Stream1.ItemList += [ "133273#*" ]
114
115#==============================================================
116#
117# End of job options file
118#
119
IovVectorMap_t read(const Folder &theFolder, const SelectionCriterion &choice, const unsigned int limit=10)