-
Notifications
You must be signed in to change notification settings - Fork 35
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
Add volume-to-material mapping and change import data #1378
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks @sethrj!
|
||
Input input; | ||
input.resolution_scale.resize(num_optmats); | ||
if (data.optical_params.scintillation_by_particle) | ||
{ | ||
// Collect ScintillationParticleIds | ||
input.pid_to_scintpid.resize(data.particles.size()); | ||
ScintillationParticleId scintpid{0}; | ||
for (auto const& [matid, iom] : data.optical) | ||
ScintillationParticleId::size_type scintpid{0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just so I am in the same page, let me know if this statement is correct: the plan is to keep the scintillation by particle import code, but we're not implementing that yet in our generator. So we keep per-particle data on the import side (and ScintillationData
, though will be empty), but do not enable it in our ScintillationParams
, leaving the stepping loop to be material-only. And if/when we do add scintillation by particle type, all the backend and data storage is already in place, since the current extra bits shouldn't make any real difference in the stepping loop.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that's about the sum of it. Since I don't think we've yet found any sincillation-by-particle detector we could probably delete it and restore it later if needed... 🤔
This adds to the
OpticalMaterial
a mapping of volume ID to optical material ID; it is allowable to have no ID assigned (so that another part of the code can kill the track etc.) I've also changed the import material data so that the optical material ID is associated with the physical material ID, since it's conceivable we'd want to turn on/off optical physics in different regions of the problem.A few changes are:
Currently