10 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
11 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
12 from AthenaConfiguration.ComponentFactory
import CompFactory
13 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
14 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
24 import ParticleGun
as PG
26 pg = PG.ParticleGun(randomStream =
"SINGLE", randomSeed = flags.Random.SeedOffset)
30 pg.sampler.mom = PG.EEtaMPhiSampler(energy=params[
'pg_E'], eta=params[
'pg_eta'])
31 pg.sampler.pos = PG.PosSampler(x=params[
'pg_x'], y=params[
'pg_y'], z=params[
'pg_z'], t=params[
'pg_z'])
39 from LArGeoAlgsNV.LArGMConfig
import LArGMCfg
41 acc.addEventAlgo(CompFactory.LArFCalSamplingFraction(name=name, **kwargs))
50 fcal1_z, fcal2_z, fcal3_z = 4713.5, 5173.3, 5647.8
56 'pg_x': [212.5, 277.5],
63 if module.lower() ==
"fcal1":
64 params[
'pg_z'] = fcal1_z
65 params[
'pg_eta'] = [3.5, 3.8]
66 elif module.lower() ==
"fcal2":
67 params[
'pg_z'] = fcal2_z
68 params[
'pg_eta'] = [3.5, 3.8]
69 elif module.lower() ==
"fcal3":
70 params[
'pg_z'] = fcal3_z
71 params[
'pg_eta'] = [3.5, 3.8]
74 flags.Sim.WorldRRange = 15000.
75 flags.Sim.WorldZRange = 27000.
76 flags.IOVDb.GlobalTag =
"OFLCOND-MC16-SDR-16"
77 flags.GeoModel.AtlasVersion =
'ATLAS-R2-2016-01-00-01'
78 flags.Output.HITSFileName =
"atlasG4.hits.pool.root"
81 flags.Detector.GeometryCalo =
True
82 flags.Detector.EnableCalo =
True
83 flags.Detector.GeometryID =
False
84 flags.Detector.EnableID =
False
85 flags.Detector.GeometryID =
False
86 flags.Detector.EnableID =
False
87 flags.Detector.GeometryLucid =
False
88 flags.Detector.EnableLucid =
False
91 flags.Input.Files = []
109 acc.addService(CompFactory.THistSvc(name=
"THistSvc", Output=[
"AANT DATAFILE='LArFCalSamplingFraction.{}.{:g}GeV.aan.root' OPT='RECREATE'".
format(module, params[
'pg_E']/1000) ]))
112 acc.printConfig(withDetails=
True)
116 sys.exit( acc.run().isFailure() )