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

Question GetCharge() from G4StepPoint returns strange values..... 

Keywords: StepPoint GetCharge()
Forum: Event and Track Management
Date: 14 Oct, 2003
From: Alain Ferragut <Alain Ferragut>

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

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

1 None: Re: GetCharge() from G4StepPoint returns strange values.....   (Vladimir IVANTCHENKO - 14 Oct, 2003)
(_ 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: "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 ]