コード例 #1
0
athenaCommonFlags.PoolEvgenInput.set_Off()
athenaCommonFlags.SkipEvents.set_Off()
from G4AtlasApps.SimFlags import simFlags
simFlags.load_atlas_flags()
simFlags.SimLayout.set_On()
simFlags.SimLayout = 'ATLAS-R2-2015-03-01-00_VALIDATION'

## Enable the EtaPhi, VertexSpread and VertexRange checks
simFlags.EventFilter.set_On()

## Use single particle generator
import AthenaCommon.AtlasUnixGeneratorJob
import ParticleGun as PG
pg = PG.ParticleGun(randomSvcName=simFlags.RandomSvc.get_Value(),
                    randomStream="SINGLE")
pg.sampler.pid = PG.CyclicSeqSampler([-11, 11])
pg.sampler.mom = PG.PtEtaMPhiSampler(pt=10000, eta=[-3, 3])
job += pg

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

## Release GeoModel memory once sim is configured
simFlags.ReleaseGeoModel = False

include("G4AtlasApps/G4Atlas.flat.configuration.py")

## Add the G4 sim to the alg sequence after the generator
from AthenaCommon.CfgGetter import getAlgorithm
job += getAlgorithm("G4AtlasAlg", tryDefaultConfigurable=True)

## User algorithms
コード例 #2
0
print 'SINGLE PARTICLE GENERATOR'

## Run ParticleGun
import AthenaCommon.AtlasUnixGeneratorJob

from AthenaCommon.AlgSequence import AlgSequence
topSeq = AlgSequence()

import ParticleGun as PG
from G4AtlasApps.SimFlags import simFlags
pg = PG.ParticleGun(randomSvcName=simFlags.RandomSvc.get_Value(),
                    randomStream="SINGLE")
pg.sampler.pid = PG.CyclicSeqSampler([-13, 13])
#pg.sampler.mom = PG.PtEtaMPhiSampler(pt=[5000000,7000000] , eta=[-2.9,2.9])
pg.sampler.mom = PG.PtEtaMPhiSampler(pt=[5000000, 7000000], eta=[1.0, 1.3])
topSeq += pg

try:
    from GeneratorModules.GeneratorModulesConf import CopyEventWeight
    topSeq += CopyEventWeight(TruthCollKey="GEN_EVENT")
except:
    include("G4AtlasApps/fragment.SimCopyWeights.py")
コード例 #3
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')
コード例 #4
0
athenaCommonFlags.PoolEvgenInput.set_Off()
athenaCommonFlags.SkipEvents.set_Off()
from G4AtlasApps.SimFlags import simFlags
simFlags.load_atlas_flags()
simFlags.SimLayout.set_On()
simFlags.SimLayout = 'ATLAS-R2-2015-03-01-00_VALIDATION'

## Enable the EtaPhi, VertexSpread and VertexRange checks
simFlags.EventFilter.set_On()

## Use single particle generator
import AthenaCommon.AtlasUnixGeneratorJob
import ParticleGun as PG
pg = PG.ParticleGun(randomSvcName=simFlags.RandomSvc.get_Value(),
                    randomStream="SINGLE")
pg.sampler.pid = PG.CyclicSeqSampler([-211, 211])
pg.sampler.mom = PG.PtEtaMPhiSampler(pt=50000, eta=[-4, 4])
job += pg

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

## Release GeoModel memory once sim is configured
simFlags.ReleaseGeoModel = False

include("G4AtlasApps/G4Atlas.flat.configuration.py")

## Add the G4 sim to the alg sequence after the generator
from AthenaCommon.CfgGetter import getAlgorithm
job += getAlgorithm("G4AtlasAlg", tryDefaultConfigurable=True)

## User algorithms