Esempio n. 1
0
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.EEtaMPhiSampler(energy=10000, eta=0)
genSeq.ParticleGun.sampler.pos = PG.PosSampler(x=0.0,
                                               y=0.0,
                                               z=[2943.06, 2957.1],
                                               t=0.0)
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)
Esempio n. 3
0
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.EEtaMPhiSampler(energy=10000, eta=0)
genSeq.ParticleGun.sampler.pos = PG.PosSampler(x=0.0,
                                               y=0.0,
                                               z=[491.68, 505.728],
                                               t=0.0)
Esempio n. 4
0
## Use single particle generator
from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
athenaCommonFlags.PoolEvgenInput.set_Off()
athenaCommonFlags.SkipEvents.set_Off()

## Use single particle generator
import AthenaCommon.AtlasUnixGeneratorJob
import ParticleGun as PG
pg = PG.ParticleGun(randomSvcName=simFlags.RandomSvc.get_Value(), randomStream="SINGLE")

if not 'PID' in dir():
    PID=211
if not 'E' in dir():
    E=100000
pg.sampler.pid = PID
pg.sampler.pos = PG.PosSampler(x=0, y=0, z=0, t=0)
pg.sampler.mom = PG.EEtaMPhiSampler(energy=E, eta=[-1.8,1.8], phi=[0,6.28318])

topSeq += pg

#--- Final step -----------------------------------------------

# This should only be used when evgen is run in the simulation step
include('G4AtlasApps/fragment.SimCopyWeights.py')

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

#from TruthExamples.TruthExamplesConf import DumpMC
#topSeq += DumpMC()

from AthenaCommon.CfgGetter import getAlgorithm
Esempio n. 5
0
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=[37.5, 38.5], y=0, z=0, t=0.0)
Esempio n. 6
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")
Esempio n. 7
0
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.EEtaMPhiSampler(energy=10000, eta=[-6.,6.])
genSeq.ParticleGun.sampler.pos = PG.PosSampler(x=0.0,y=0.0,z=0,t=0.0)
Esempio n. 8
0
## Use single particle generator
from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
athenaCommonFlags.PoolEvgenInput.set_Off()
athenaCommonFlags.SkipEvents.set_Off()

## Set particle gun parameters
import AthenaCommon.AtlasUnixGeneratorJob
import ParticleGun as PG
pg = PG.ParticleGun(randomSvcName=simFlags.RandomSvc.get_Value(),
                    randomStream="SINGLE")
pg.sampler.pid = 11
pg.sampler.mom = PG.EEtaMPhiSampler(energy=params['pg_E'],
                                    eta=params['pg_eta'])
pg.sampler.pos = PG.PosSampler(x=params['pg_x'],
                               y=params['pg_y'],
                               z=params['pg_z'],
                               t=params['pg_z'])
topSeq += pg

## Dump truth information
# from TruthExamples.TruthExamplesConf import DumpMC
# topSeq += DumpMC()

StoreGateSvc = Service("StoreGateSvc")
StoreGateSvc.Dump = True

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

## Use GeoCheckAction
## If using GeoCheckAction, make sure the particle type id is set to 999 (geantinos)
# def add_GeoCheckAction():
Esempio n. 9
0
#pg.sampler.mom = PG.EEtaMPhiSampler(energy=100000, eta=0, phi=0)

if not 'PID' in dir():
    PID = 11
if not 'E' in dir():
    E = 100000
if not 'Xbeam' in dir():
    Xbeam = -27500
if not 'Ybeam' in dir():
    Ybeam = [-20, 20]
if not 'Zbeam' in dir():
    Zbeam = [-20, 20]
if not 'Tbeam' in dir():
    Tbeam = [-31250, -23750]
pg.sampler.pid = PID
pg.sampler.pos = PG.PosSampler(x=Xbeam, y=Ybeam, z=Zbeam, t=Tbeam)
pg.sampler.mom = PG.EEtaMPhiSampler(energy=E, eta=0, phi=0)

topSeq += pg

try:
    include("G4AtlasApps/fragment.SimCopyWeights.py")
except:
    try:
        from GeneratorModules.GeneratorModulesConf import CopyEventWeight
        topSeq += CopyEventWeight(TruthCollKey="GEN_EVENT")
    except:
        from EvgenProdTools.EvgenProdToolsConf import CopyEventWeight
        topSeq += CopyEventWeight()

try:
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=[213.5,214.5],y=0,z=0,t=0.0)
Esempio n. 11
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 = 13
pg.sampler.pos = PG.PosSampler(x=3140.0,
                               y=[-154.134, 154.134],
                               z=[4938.76, 5121.29],
                               t=5929.7)
pg.sampler.mom = PG.EEtaMPhiSampler(energy=100000, eta=1.25, phi=0.0)
topSeq += pg

include("GeneratorUtils/postJO.CopyWeights.py")
include("GeneratorUtils/postJO.PoolOutput.py")
include("GeneratorUtils/postJO.DumpMC.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.EEtaMPhiSampler(energy=10000, eta=0)
genSeq.ParticleGun.sampler.pos = PG.PosSampler(x=0.0,y=0.0,z=[2015.89,2029.94],t=0.0)
Esempio n. 13
0
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=[154.5, 155.5],
                                               y=0,
                                               z=0,
                                               t=0.0)
Esempio n. 14
0
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.EEtaMPhiSampler(energy=10000, eta=0)
genSeq.ParticleGun.sampler.pos = PG.PosSampler(x=0.0,y=0.0,z=[1411.82,1425.87],t=0.0)
Esempio n. 15
0
athenaCommonFlags.PoolHitsOutput = 'HITS.pool.root'
athenaCommonFlags.EvtMax = 100000

from AthenaCommon.AlgSequence import AlgSequence
topSeq = AlgSequence()

simFlags.EventFilter.set_Off()
simFlags.MagneticField.set_Off()

athenaCommonFlags.PoolEvgenInput.set_Off()
import AthenaCommon.AtlasUnixGeneratorJob
import ParticleGun as PG
pg = PG.ParticleGun(randomSvcName=simFlags.RandomSvc.get_Value(),
                    randomStream="SINGLE")
pg.sampler.pid = 999
pg.sampler.pos = PG.PosSampler(x=0.0, y=0.0, z=[0.0, 0.0], t=0.0)
import math
pg.sampler.mom = PG.EEtaMPhiSampler(energy=50000,
                                    eta=[-5., 5.],
                                    phi=[0., 2 * math.pi])
topSeq += pg

MessageSvc.Format = "% F%40W%S%7W%R%T %0W%M"
MessageSvc.defaultLimit = 500

from AthenaCommon.AppMgr import ServiceMgr

if not hasattr(ServiceMgr, 'THistSvc'):
    from GaudiSvc.GaudiSvcConf import THistSvc
    ServiceMgr += THistSvc()
ServiceMgr.THistSvc.Output += ["xx0 DATAFILE='xx0.root' OPT='RECREATE'"]
Esempio n. 16
0
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=[75.5, 76.5], y=0, z=0, t=0.0)
Esempio n. 17
0
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.EEtaMPhiSampler(energy=10000, eta=0)
genSeq.ParticleGun.sampler.pos = PG.PosSampler(x=0.0,
                                               y=0.0,
                                               z=[2528.64, 2542.69],
                                               t=0.0)
Esempio n. 18
0
    # 100 GeV electrons - use for sampling faction calculation
    #pg.sampler.pid = 11
    #pg.sampler.pos = PG.PosSampler(x=-27500, y=[-20,20], z=[-15,15], t=-27500)
    #pg.sampler.mom = PG.EEtaMPhiSampler(energy=100000, eta=0, phi=0)

    if not 'PID' in dir():
        PID = 11
    if not 'E' in dir():
        E = 100000
    if not 'Ybeam' in dir():
        Ybeam = [-20, 20]
    if not 'Zbeam' in dir():
        Zbeam = [-15, 15]
    pg.sampler.pid = PID
    pg.sampler.pos = PG.PosSampler(x=-27500, y=Ybeam, z=Zbeam, t=-27500)
    pg.sampler.mom = PG.EEtaMPhiSampler(energy=E, eta=0, phi=0)

    topSeq += pg

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

from AthenaCommon.CfgGetter import getAlgorithm

topSeq += getAlgorithm("BeamEffectsAlg")

try:
    from RecAlgs.RecAlgsConf import TimingAlg
    topSeq += TimingAlg("SimTimerBegin",
                        TimingObjOutputName="EVNTtoHITS_timings")
except:
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.EEtaMPhiSampler(energy=10000, eta=0)
genSeq.ParticleGun.sampler.pos = PG.PosSampler(x=0.0,y=0.0,z=[997.408,1011.46],t=0.0)
Esempio n. 20
0
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.EEtaMPhiSampler(energy=10000, eta=0)
genSeq.ParticleGun.sampler.pos = PG.PosSampler(x=0.0,
                                               y=0.0,
                                               z=[-7.024, 7.024],
                                               t=0.0)