Message: Re: Particles with 3 different energies Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Feedback Re: Particles with 3 different energies 

Keywords: paricles energy
Forum: Particles
Re: None Particles with 3 different energies (Konstantinos Michael )
Date: 09 Jul, 2007
From: Gumplinger Peter <Gumplinger Peter>

So many people ask this, or similar questions, shouldn't we have an example code snippet in our 'Application Developers Guide'?

Except for details of your code, you need to change:

particleGun->SetParticleEnergy(E1);

particleGun->GeneratePrimaryVertex(anEvent);

particleGun->SetParticleEnergy(E2);

particleGun->GeneratePrimaryVertex(anEvent);

particleGun->SetParticleEnergy(E3)

particleGun->GeneratePrimaryVertex(anEvent);

i.e. set up the particle gun completely for each particle (but you don't need to setup things again that don't change for each particle) then call:

particleGun->GeneratePrimaryVertex(anEvent);

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: Particles with 3 different energies   (areg - 08 Nov, 2007)
(_ Feedback: Re: Particles with 3 different energies   (Peter Gumplinger - 09 Nov, 2007)
(_ None: Re: Particles with 3 different energies   (Areg - 09 Nov, 2007)
(_ More: Re: Particles with 3 different energies   (Peter Gumplinger - 12 Nov, 2007)
 Add Message Add Message
to: "Re: Particles with 3 different energies"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]