JeffersonLab / halld_sim

Simulation for the GlueX Experiment in Hall D
6 stars 10 forks source link

decay_evtgen segfault due to genr8 particle ID guidance for eta' #297

Open mashephe opened 1 year ago

mashephe commented 1 year ago

At the bottom of most template .input files for genr8 there is a block of lines that say:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% extra constants not defined by GEANT %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Rho0 = 57, % RhoPlus = 58, % RhoMinus = 59, % omega = 60, % EtaPrime = 61, % phiMeson = 62

However, if you use the id 61 for eta', then what gets written ultimately to the HDDM file after conversion is a Lithium-6 nucleus instead of an EtaPrime. This will cause a segfault in decay_evtgen if one tries to use it to decay the HDDM file.

The solution is to change the EtaPrime particle id to 35.

It would be helpful if decay_evtgen handled this a little more gracefully. That guidance posted above has likely proliferated everywhere.