Message: Re: Energy of Primaries Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Energy of Primaries 

Forum: Particles
Re: None Energy of Primaries (Gregor Simmer)
Date: 25 Oct, 2006
From: Vladimir IVANTCHENKO <vnivanch@mail.cern.ch>

On Wed, 25 Oct 2006, Gregor Simmer wrote:

> *** Discussion title: Particles
> Email replies to PublicHyperNews@slac.stanford.edu must include:
>   In-Reply-To: <"/particles/292"@geant4-hn.slac.stanford.edu>
>   Subject: ...change this to be about your reply.
> 
> Hi folks
> 
> Maybe that's one of the simpler questions but I cannot find out how to
> receive the energy of my primary particles. I'm doing Simulation of
> Bonner-Spheres hit by Neutrons. I'm using the G4ParticleGun and I change
> the energy from the primary Neutrons in batch-mode with the
> "/gun/energy"-command in my JobFile. Obviously there is a
> "SetParticleEnergy"-Method in the G4ParticleGun-Class but I cannot find
> an appropriate "Get"-Method. I wrote such a "Get"-Method on my own, but
> I only receive always the same energy which is the first energy defined
> in my Programm (PrimaryGeneratorAction-File). So how can I receive the
> updated energy of my PrimaryParticles right after changing it through
> UI-Commands?
> 
> Thx for helping
> 
> Gregor
> 

Hello,

One of the methods (not necessary the best for you) is to use Tracking
Action: the G4Track with ID = 1 is the primary particle and you can save
its energy before tracking.

VI 

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

1 None: Re: Energy of Primaries   (Gregor Simmer - 25 Oct, 2006)
 Add Message Add Message
to: "Re: Energy of Primaries"

 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 ]