Exemplo n.º 1
0
#! -*- python -*-

# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration

include("GeneratorUtils/StdEvgenSetup.py")
theApp.EvtMax = 100

import ParticleGun as PG
pg = PG.ParticleGun()
pg.randomSeed = 123456
pg.sampler.pid = (2112, 22, 2112, 22)
pg.sampler.mom = PG.EThetaMPhiSampler(energy=(1360000, 500000, 1360000,
                                              500000),
                                      theta=(0, 0, PG.PI, PG.PI))
pg.sampler.pos = PG.PosSampler(x=[-120, -100], y=[-10, 10], z=203950)
topSeq += pg

include("GeneratorUtils/postJO.CopyWeights.py")
include("GeneratorUtils/postJO.PoolOutput.py")
include("GeneratorUtils/postJO.DumpMC.py")
Exemplo n.º 2
0
printfunc ('SINGLE PARTICLE GENERATOR')
## Run ParticleGenerator
# One neutron and one photon per side
import AthenaCommon.AtlasUnixGeneratorJob
from AthenaCommon.AlgSequence import AlgSequence
job = AlgSequence()
import ParticleGun as PG
pg = PG.ParticleGun(randomSvcName=simFlags.RandomSvc.get_Value(), randomStream="SINGLE")
pg.sampler.pid = PG.CyclicSeqSampler([2112, 22, 2112, 22])
esampler = PG.CyclicSeqSampler([1360000, 500000, 1360000, 500000])
thsampler = PG.CyclicSeqSampler([0, 0, PG.PI, PG.PI])
pg.sampler.mom = PG.EThetaMPhiSampler(energy=esampler, theta=thsampler)
job += pg

include("G4AtlasApps/fragment.SimCopyWeights.py")

printfunc ("As this is a single particle generator job turn off VertexPositioner")
simFlags.EventFilter.get_Value()['VertexPositioner'] = False
simFlags.EventFilter.get_Value()['BeamEffectTransformation'] = False
simFlags.EventFilter.get_Value()['PrimaryEventRotations'] = False
simFlags.VertexFromCondDB= False

try:
    include('ForwardTransportSvc/preInclude.ForwardTransportFlags_3.5TeV_0000.55m_nominal_v01.py')
except:
    printfunc ("forwardTransportFlags not available in this release.")

include('ForwardTransportSvc/ForwardTransportSvcConfig.ZDC.py')
evgenConfig.description = "Single geantino with flat eta-phi and E = 10 GeV"
evgenConfig.keywords = ["singleParticle"]

include("MC15JobOptions/ParticleGun_Common.py")

import ParticleGun as PG
genSeq.ParticleGun.sampler.pid = 999
genSeq.ParticleGun.sampler.mom = PG.EThetaMPhiSampler(energy=10000, theta=0)
genSeq.ParticleGun.sampler.pos = PG.PosSampler(x=[271.5, 272.5],
                                               y=0,
                                               z=0,
                                               t=0.0)