HEAVYION with source_newgen.f

Dear Experts,
My beam is Carbon ion (defined in BEAM card with HEAVYION) and its energy spectrum is defined in source_newgen.f along with source_hist.dat.
in source_hist.dat, unit of energy is taken as “GeV/n”

in source_newgen.f, there is command
momentum_energy = sample_histogram_momentum_energy(“source_hist.dat”, “GeV”)

here should we change “GeV” to “GeV/n” or for HEAVYION it will be taken into account automatically?

Waiting for your suggestion.

Thanking you in advance.

Dear @ArghyaC,

you can keep is as “GeV”. It only applies a conversion factor between different energy units.

The conversation from energy per unit mass to total energy is done automatically.

Cheers,
David

Thank you very much for your reply.

That means if I select HEAVYION as beam particle, then in source.f, energy unit will be automatically taken as GeV/n. Am I right ?

Dear @ArghyaC,

in source_newgen.f yes, the energy will taken as GeV/n (as it written in the comments). However, in source.f the total energy specified, even for heavy ions.

Cheers,
David

Thank you very much for clarification.

Yes, I have seen the comments in source_newgen.f as below

! 3.1. Momentum & Energy
! ----------------------
! Set the momentum [GeV/c] or the kinetic energy [GeV] of the primary particle
! For heavy ions values are per nuclear mass unit.
! Default:
! Momentum calculated from values set on the BEAM card (if present), 200 GeV/c otherwise