Message: Re: G4DynamicParticle - Energy and momentum Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Feedback Re: G4DynamicParticle - Energy and momentum 

Forum: Processes Involving Optical Photons
Re: Question G4DynamicParticle - Energy and momentum (Beatrice Panico)
Date: 30 Jul, 2013
From: Gumplinger Peter <Gumplinger Peter>

Hello Beatrice,

> Hi, I'm simulating optical photons and I'm referring to them with
> G4DynamicParticle. When I use geant 4.9.4 I use the method
> GetTotalMomentum() to obtain the input energy of the photons and it
> works fine.
> Subsequently I move to geant 4.9.6 and it no longer works.
> GetTotalMomentum() returns values close to 2, but it seems no have
> reason.

Is this the code you have in your (presumably) SteppingAction:

  G4cout << "GetTotalMomentum: " << theTrack->GetDynamicParticle()->GetTotalMomentum()/eV << "eV" << G4endl;

It should now and has always returned the energy (momentum) of the optical photon. (you have to divide by eV if you want your units to be "eV").


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

1 None: Re: G4DynamicParticle - Energy and momentum   (Beatrice Panico - 31 Jul, 2013)
(_ Feedback: Re: G4DynamicParticle - Energy and momentum   (Gumplinger Peter - 31 Jul, 2013)
 Add Message Add Message
to: "Re: G4DynamicParticle - Energy and momentum"

 Subscribe Subscribe

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