Message: Bad response using G4PrimaryParticle GetCharge() method. Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Warning Bad response using G4PrimaryParticle GetCharge() method. 

Keywords: Bug G4PrimaryParticle GetPDGcode
Forum: Particles
Date: 18 Jul, 2002
From: Paulo Mora de Freitas <Paulo Mora de Freitas>

 Hello folks,

 Trying to use the G4PrimaryParticle methods,
using geant4-04-01-ref-00 I find this bug:

aPrimaryParticle->GetTrackID() = 1, aPrimaryParticle->GetPDGcode() = 211, aPrimaryParticle->GetCharge() = 0, theParticleDefinition->GetPDGCharge() = 1
aPrimaryParticle->GetTrackID() = 2, aPrimaryParticle->GetPDGcode() = 211, aPrimaryParticle->GetCharge() = 0, theParticleDefinition->GetPDGCharge() = 1
aPrimaryParticle->GetTrackID() = 3, aPrimaryParticle->GetPDGcode() = 321, aPrimaryParticle->GetCharge() = 0, theParticleDefinition->GetPDGCharge() = 1
aPrimaryParticle->GetTrackID() = 4, aPrimaryParticle->GetPDGcode() = 211, aPrimaryParticle->GetCharge() = 0, theParticleDefinition->GetPDGCharge() = 1
aPrimaryParticle->GetTrackID() = 5, aPrimaryParticle->GetPDGcode() = -321, aPrimaryParticle->GetCharge() = 0, theParticleDefinition->GetPDGCharge() = -1
aPrimaryParticle->GetTrackID() = 6, aPrimaryParticle->GetPDGcode() = 321, aPrimaryParticle->GetCharge() = 0, theParticleDefinition->GetPDGCharge() = 1
aPrimaryParticle->GetTrackID() = 7, aPrimaryParticle->GetPDGcode() = -321, aPrimaryParticle->GetCharge() = 0, theParticleDefinition->GetPDGCharge() = -1
aPrimaryParticle->GetTrackID() = 8, aPrimaryParticle->GetPDGcode() = 211, aPrimaryParticle->GetCharge() = 0, theParticleDefinition->GetPDGCharge() = 1
aPrimaryParticle->GetTrackID() = 9, aPrimaryParticle->GetPDGcode() = -211, aPrimaryParticle->GetCharge() = 0, theParticleDefinition->GetPDGCharge() = -1
aPrimaryParticle->GetTrackID() = 10, aPrimaryParticle->GetPDGcode() = -211, aPrimaryParticle->GetCharge() = 0, theParticleDefinition->GetPDGCharge() = -1
aPrimaryParticle->GetTrackID() = 11, aPrimaryParticle->GetPDGcode() = 211, aPrimaryParticle->GetCharge() = 0, theParticleDefinition->GetPDGCharge() = 1

 The theParticleDefinition pointer is the aPrimaryParticle->GetG4code()
returned one, so it's fine. I think that the better should be
to delete the G4PrimaryParticle GetCharge() method because the
same information can be find using the GetG4code() and then GetPDGCharge()
methods.

 Or, at least, the bug above should be fixed.

 Thanks, Paulo Mora de Freitas.

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

1 None: Re: Bad response using G4PrimaryParticle GetCharge() method.   (Vladimir Ivantchenko - 18 Jul, 2002)
1 More: Re: Bad response using G4PrimaryParticle GetCharge() method.   (Peter Gumplinger - 23 Jul, 2002)
(_ Ok: Re: Bad response using G4PrimaryParticle GetCharge() method.   (Paulo Mora de Freitas - 02 Aug, 2002)
(_ More: Re: Bad response using G4PrimaryParticle GetCharge() method.   (Peter Gumplinger - 02 Aug, 2002)
2 None: Re: Bad response using G4PrimaryParticle GetCharge() method.   (Makoto Asai - 21 Aug, 2002)
 Add Message Add Message
to: "Bad response using G4PrimaryParticle GetCharge() method."

 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 ]