Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider storing SimInfo::gen as a GenId::enum_type rather than an int #248

Open
AndrewEdmonds11 opened this issue Jan 28, 2025 · 0 comments
Labels
enhancement New feature or request more discussion needed More discussion is needed on this issue PyUtil This is related to PyUtils RooUtil This is related to RooUtil

Comments

@AndrewEdmonds11
Copy link
Collaborator

After #247, we now have this rather ugly line of code:

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

@AndrewEdmonds11 AndrewEdmonds11 added enhancement New feature or request more discussion needed More discussion is needed on this issue PyUtil This is related to PyUtils RooUtil This is related to RooUtil labels Jan 28, 2025
@AndrewEdmonds11 AndrewEdmonds11 added this to the Future release milestone Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request more discussion needed More discussion is needed on this issue PyUtil This is related to PyUtils RooUtil This is related to RooUtil
Projects
Status: No status
Development

No branches or pull requests

1 participant