Message: Re: GetCharge() from G4StepPoint returns strange values..... Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: GetCharge() from G4StepPoint returns strange values..... 

Forum: Event and Track Management
Re: Question GetCharge() from G4StepPoint returns strange values..... (Alain Ferragut)
Date: 14 Oct, 2003
From: Vladimir Ivanchenko <Vladimir Ivanchenko>

On Tue, 14 Oct 2003, Alain FERRAGUT wrote:

> *** Discussion title: Event and Track Management
> Email replies to PublicHyperNews@slac.stanford.edu must include:
>   In-Reply-To: <"/eventtrackmanage/112"@geant4-hn.slac.stanford.edu>
>   Subject: ...change this to be about your reply.
> 
> Hi, I have strange results while trying to get charge information from
> charge retrieval method used in G4StepPoint. On the other hand,
> PDGCharge from particle definition is OK. Here is the portion of code in
> UserSteppingAction(G4Step* currentStep):
> 
> G4double Q = currentStep->GetTrack()->GetDefinition()->GetPDGCharge();
> G4double q = currentStep->GetPostStepPoint()->GetCharge();
> G4cout<<"particule :"<<currentStep->GetTrack()->GetDefinition()->GetParticleName()<<G4endl
>       <<"charge q = "<<q<<G4endl
>       <<"charge Q = "<<Q<<G4endl;
> 
> Then, I just run 1 event with a thermal neutron and look at my terminal
> screen :
> 
> particule : neutron q = 0 Q = 0
> 
> particule : neutron q = 0 Q = 0
> 
> .....
> 
> particule : gamma q = 0 Q = 0
> 
> particule : gamma q = 0 Q = 0
> 
> .....
> 
> particule : e- q = -1 Q = -1
> 
> particule : e- q = -1 Q = -1
> 
> ......
> 
> particule : gamma q = -1 Q = 0
> 
> Why is q value locked to -1 for the gamma????
> 
> Thanks for any explanation !!!
> 
>                  Alain
> 
> 

Hi Alain,

It seems to be a bug. To be sure one have to know how this gamma have been 
produced - in EM interactions or from excited nucleus, or? What version of 
G4 is used. At the end may be a bug report should be issued.

VI

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

1 More: Re: GetCharge() from G4StepPoint returns strange values.....   (Alain FERRAGUT - 15 Oct, 2003)
(_ More: Re: GetCharge() from G4StepPoint returns strange values.....   (Alain FERRAGUT - 16 Oct, 2003)
 Add Message Add Message
to: "Re: GetCharge() from G4StepPoint returns strange values....."

 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 ]