Beispiel #1
0
# adding beam measured Y
yreco = 1.04 * jobproperties.SimFlags.LArTB_H1TableYPos.get_Value()
yreco = 30967.3 * yreco / 30000.
if jobproperties.SimFlags.LArTB_H1YSmear.get_Value() != 0.:
    ParticleGeneratorOrdersList += [
        "targety: flat " +
        str(yreco - jobproperties.SimFlags.LArTB_H1YSmear.get_Value()) + "  " +
        str(yreco + jobproperties.SimFlags.LArTB_H1YSmear.get_Value())
    ]
    ParticleGeneratorOrdersList += ["verty: targety - " + str(yreco)]
else:
    ParticleGeneratorOrdersList += ["targety: constant " + str(yreco)]
    ParticleGeneratorOrdersList += ["verty: constant 0."]

#ParticleGeneratorOrdersList.sort()
print ParticleGeneratorOrdersList
#jobproperties.SimFlags.ParticleGeneratorOrders = ParticleGeneratorOrdersList
import AthenaCommon.AtlasUnixGeneratorJob
#from ParticleGenerator.ParticleGeneratorConf import ParticleGenerator
#topSeq += ParticleGenerator()
#topSeq.ParticleGenerator.orders = sorted(ParticleGeneratorOrdersList)
pg = PG.ParticleGun()
ps = PG.ConstEnergySampler(pid=particl,
                           energy=energy,
                           eta=PG.UniformSampler(-2.0, 2.0))
pg.samplers.append(ps)
topSeq += pg
from TruthExamples.TruthExamplesConf import WriteHepMC
topSeq += WriteHepMC()
#=======================================================================
Beispiel #2
0
G4Svc.FADSMacro = "env.mac:H6G4LArCal.mac:PhysicsList.mac:Filters.mac"
# ParticleGun
# -----------------
import AthenaCommon.AtlasUnixGeneratorJob

include("GeneratorUtils/StdEvgenSetup.py")
import ParticleGun as PG
try:
    ParticleGeneratorPDG = ' constant ' + ParticlePDG
    particl = int(ParticlePDG)
except:
    log.warning('tbH6Generator: You are running geantino')
    ParticleGeneratorPDG = ' constant 999'
    particl = 999
# - Energy
try:
    ParticleGeneratorEnergy = ' constant ' + repr(Energy)
    energy = float(Energy)
except:
    log.warning('Unknown energy. Set 200 GeV')
    ParticleGeneratorEnergy = ' constant 200000'
    energy = 200000.

pg = PG.ParticleGun()
ps = PG.ConstEnergySampler(pid=particl,
                           energy=energy,
                           eta=PG.UniformSampler(-6.0, 6.0))
pg.samplers.append(ps)
topSeq += pg
#--------------------------------------------------------------
Beispiel #3
0
else:
    if(abs(particl) != 11 or energy < 120000):
        yreco = 1.04 * jobproperties.SimFlags.LArTB_H1TableYPos.get_Value()
    else:
        yreco = 1.07 * jobproperties.SimFlags.LArTB_H1TableYPos.get_Value()
yreco =  30967.3 * yreco / 30000.   
if jobproperties.SimFlags.LArTB_H1YSmear.get_Value() != 0.:
   if energy == 40000:
      ParticleGeneratorOrdersList += ["targety: gaussian "+str(yreco)+"  "+str(jobproperties.SimFlags.LArTB_H1YSmear.get_Value())]
   else:
      ParticleGeneratorOrdersList += ["targety: flat "+str(yreco - jobproperties.SimFlags.LArTB_H1YSmear.get_Value())+"  "+str(yreco + jobproperties.SimFlags.LArTB_H1YSmear.get_Value())]
   ParticleGeneratorOrdersList += ["verty: targety - "+str(yreco)]
else:
   ParticleGeneratorOrdersList += ["targety: constant "+str(yreco)]
   ParticleGeneratorOrdersList += ["verty: constant 0."]
      
#ParticleGeneratorOrdersList.sort()
print ParticleGeneratorOrdersList
#jobproperties.SimFlags.ParticleGeneratorOrders = ParticleGeneratorOrdersList
import AthenaCommon.AtlasUnixGeneratorJob
#from ParticleGenerator.ParticleGeneratorConf import ParticleGenerator
#topSeq += ParticleGenerator()
#topSeq.ParticleGenerator.orders = sorted(ParticleGeneratorOrdersList)
pg = PG.ParticleGun()
ps = PG.ConstEnergySampler(pid=particl, energy=energy, eta=PG.UniformSampler(-2.0, 2.0))
pg.samplers.append(ps)
topSeq += pg
from TruthExamples.TruthExamplesConf import WriteHepMC
topSeq += WriteHepMC()
#=======================================================================