Message: Re: Easy way to suppress G4ParticleGun messages on event-by-event changes? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Feedback Re: Easy way to suppress G4ParticleGun messages on event-by-event changes? 

Forum: Event and Track Management
Re: Question Easy way to suppress G4ParticleGun messages on event-by-event changes? (Michael H. Kelsey)
Date: 03 Jun, 2011
From: Gumplinger Peter <Gumplinger Peter>

Michael,

I have run into this before and probably for the exact same reason. SetParticleMomentum expects you to provide the momentum vector. This vector is not a unity vector but has norm p = |p_vect|. Don't know what G4LorentzVector::vect() returns but looking at your code snippet likely the unit vector direction. This is not what you want to do because the norm of the latter is used to (re)caclulate the energy of the particle, hence the unprotected warming!

Peter

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

1 None: Re: Easy way to suppress G4ParticleGun messages on event-by-event changes?   (Mike Kelsey - 03 Jun, 2011)
(_ None: Re: Easy way to suppress G4ParticleGun messages on event-by-event changes?   (tntakahashi - 03 Dec, 2011)
(_ None: Re: Easy way to suppress G4ParticleGun messages on event-by-event changes?   (Mike Kelsey - 04 Dec, 2011)
 Add Message Add Message
to: "Re: Easy way to suppress G4ParticleGun messages on event-by-event changes?"

 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 ]