Skip to content

Consider storing SimInfo::gen as a GenId::enum_type rather than an int (also ProcessCode::enum_type for SimInfo::startCode and SimInfo::endCode) #248

@AndrewEdmonds11

Description

@AndrewEdmonds11

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    PyUtilThis is related to PyUtilsRooUtilThis is related to RooUtilenhancementNew feature or requestgood first issueGood for newcomersmore discussion neededMore discussion is needed on this issue

    Type

    No type

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions