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

None Re: Bad response using G4PrimaryParticle GetCharge() method. 

Forum: Particles
Re: Warning Bad response using G4PrimaryParticle GetCharge() method. (Paulo Mora de Freitas)
Date: 18 Jul, 2002
From: Vladimir Ivanchenko <Vladimir Ivanchenko>

On Thu, 18 Jul 2002, Paulo Mora de Freitas wrote:

> *** Discussion title: Particles
> Email replies to PublicHyperNews@slac.stanford.edu must include:
>   In-Reply-To: <"/particles/10"@geant4-hn.slac.stanford.edu>
>   Subject: ...change this to be about your reply.
> 
>  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.
> 

Hi Paulo,

Thank you for the information. This mean that G4PrimaryParticle does not
properly initialised. GetCherge cannot be removed, because for recoil
nucleus charge may not be equal to PDGCharge.

VI

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

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)
 Add Message Add Message
to: "Re: 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 ]