Esempio n. 1
0
myPDG = 999  # 999 = Geantinos, 13 = Muons

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

import ParticleGun as PG
pg = PG.ParticleGun()
pg.sampler.pid = 999
pg.sampler.mom = PG.EEtaMPhiSampler(energy=10000, eta=[-6., 6.])
topSeq += pg

simFlags.RandomSeedOffset = myRandomOffset
simFlags.RandomSeedList.addSeed("SINGLE", myRandomSeed1, myRandomSeed2)

from RngComps.RngCompsConf import AtRndmGenSvc
myAtRndmGenSvc = AtRndmGenSvc()
myAtRndmGenSvc.Seeds = [
    "SINGLE " + str(myRandomSeed1) + " " + str(myRandomSeed2)
]
myAtRndmGenSvc.OutputLevel = VERBOSE
myAtRndmGenSvc.EventReseeding = False
ServiceMgr += myAtRndmGenSvc

## add the material step recording action
SimFlags.OptionalUserActionList.addAction('G4UA::MaterialStepRecorderTool',
                                          ['Run', 'Event', 'Step'])

############### The Material hit collection ##################

from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream
# --- check dictionary
Esempio n. 2
0
import ParticleGun as PG
pg = PG.ParticleGun(randomSvcName=simFlags.RandomSvc.get_Value(),
                    randomStream="SINGLE")
#pg.sampler.pid = PG.CyclicSeqSampler([-13,13])
pg.sampler.pid = myPDG
pg.sampler.mom = PG.EEtaMPhiSampler(energy=myMomentum,
                                    eta=[myMinEta, myMaxEta])
#pg.sampler.mom = PG.PtEtaMPhiSampler(pt=myMomentum, eta=[myMinEta,myMaxEta])
topSeq += pg

simFlags.RandomSeedOffset = myRandomOffset

simFlags.RandomSeedList.addSeed("SINGLE", myRandomSeed1, myRandomSeed2)

from RngComps.RngCompsConf import AtRndmGenSvc
myAtRndmGenSvc = AtRndmGenSvc()
myAtRndmGenSvc.Seeds = [
    "SINGLE " + str(myRandomSeed1) + " " + str(myRandomSeed2)
]
#myAtRndmGenSvc.OutputLevel          = VERBOSE
myAtRndmGenSvc.EventReseeding = False
ServiceMgr += myAtRndmGenSvc

# suppress the enormous amount of MC output
# from TruthExamples.TruthExamplesConf import PrintMC
# PrintMC.VerboseOutput = False

# ToolSvc setup
from AthenaCommon.AppMgr import ToolSvc

# Tracking Geometry