After #247, we now have this rather ugly line of code in RooUtil:
bool is_cosmic(MCParticle& particle) { // MCParticle is a cosmic. This uses the function GenId::isCosmic() from Offline
return mu2e::GenId(mu2e::GenId::enum_type(particle.mcsim->gen)).isCosmic();
}
where we have to create a mu2e::GenId but it does not have a constructor that takes an int so we have to then create a GenId::enum_type.
We should consider storing the SimInfo::gen as a GenId::enum_type rather than a bare int. This might have downstream effects on ROOT and python analyses so we should investigate more