TruthUtils: Improve SUSY::spin helper function. Add SUSY::spin2 helper function.
- Fixed
SUSY::spin
to return a double rather than a bool. - Added
SUSY::spin2
function to more easily deal with non-integer spins in testPID. (SUSY::spin
now returns1.0*spin2()/2.0
) - Updated testPID unit test to check
SUSY::spin2
rather thanSUSY::spin
. - Updated
SUSY::spin2()
to return the correct values (i.e. 2J) for fundamental SM particles, SM Hadrons, SUSY particles and other BSM particles. - Kept the output unchanged (i.e. 1) for nuclei - TODO fix this in a follow-up MR.
Currently unused, but, in the future, the primary usage of this function will be in calls to G4ParticleDefinition
when defining new particles in Geant4 for SUSY/Exotics simulation.
NB Although this function is currently in the SUSY namespace, we plan to simplify the code by dropping this intermediate namespace in a future MR.
Edited by John Derek Chapman