Skip to content

Conversation

@veprbl
Copy link

@veprbl veprbl commented Jun 22, 2024

This fixes a following bug:

Idle> /particle/select lambda
Idle> /particle/property/dump

--- G4ParticleDefinition ---
 Particle Name : lambda
 PDG particle code : 3122 [PDG anti-particle code: -3122]
 Mass [GeV/c2] : 1.11568     Width : 2.501e-15
 Lifetime [nsec] : 0.2631
 Charge [e]: 0
 Spin : 1/2
 Parity : 1
 Charge conjugation : 0
 Isospin : (I,Iz): (0/2 , 0/2 ) 
 GParity : 0
 MagneticMoment [MeV/T] : -1.93245e-14
 Quark contents     (d,u,s,c,b,t) : 1, 1, 1, 0, 0, 0
 AntiQuark contents               : 0, 0, 0, 0, 0, 0
 Lepton number : 0 Baryon number : 1
 Particle type : baryon [lambda]
G4DecayTable:  lambda
0:  BR:  0.639  [Phase Space]   :   proton pi-
1:  BR:  0.358  [Phase Space]   :   neutron pi0

Idle> /particle/property/decay/dump
Particle is not selected yet !! Command ignored.

The issue is that currentParticle is always nullptr, so when G4DecayTableMessenger tries to use GetCurrentStringValue with reGet=true default, it can never get a non-null particle pointer.

@drbenmorgan
Copy link
Member

Many thanks for the patch, this is now integrated in the upstream development, and will be in the upcoming 11.3 release and patches to earlier versions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants