Use float d = 0; RNDM(d) idiom, instead of float d; RNDM(d); which triggers compiler warnings.
Fix out-of-bounds-array access in a function that we currently do not use, but compile.
(The code that generates an AMSmceventg for BeamTest, containing the beam parameters encoded in AMSmceventg).

../CC/event.C: In member function 'void AMSEvent::_regnevent()':
../CC/event.C:793:22: error: array subscript is below array bounds [-Werror=array-bounds]
      if(ArrayB[chint].RunTag%32768 != getruntype()%32768){

chint may be negative. There was already a warning printed when that happened, but chint was not set to zero.
Better set it to zero, to avoid accessing undefined memory, thus triggering undefined behaviour.