-
Notifications
You must be signed in to change notification settings - Fork 45
Add optical SD check and output in post boundary step #2077
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
base: develop
Are you sure you want to change the base?
Add optical SD check and output in post boundary step #2077
Conversation
…vector of volume IDs
…nd adds SDParams construction to setup/model
…s construction in global test base
…ed geometry params in global test when constructing sd params
…try and inp::detectors (empty if no detectors) and fix geant setup to load SDs properly
Test summary 499 files 810 suites 27s ⏱️ For more details on these failures, see this check. Results for commit 4953dad. ♻️ This comment has been updated with latest results. |
…r killing particles in SD regions now
…onstructor still storing vector of detector structs, even if empty
| { | ||
| auto energy = track.particle().energy(); | ||
| // TODO print energy when killing at SD | ||
| std::cout << "Detector hit in volume " << iv_id.get() |
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.
Can't have a cout in a CELER_FUNCTION.
| { | ||
| // Re-entrant into the pre-volume | ||
| auto geo = track.geometry(); | ||
| // auto geo = track.geometry(); |
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.
Trailing commented line
|
|
||
| namespace celeritas | ||
| { | ||
| //---------------------------------------------------------------------------// |
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.
| //---------------------------------------------------------------------------// |
|
|
||
| //! Number of detectors | ||
| DetectorId::size_type size() const { return volume_ids_.size(); } | ||
| DetectorId::size_type size() const { return detectors_.detectors.size(); } |
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.
detectors.detectors sounds silly, even though I know what's going on. Just wondering if there is a better naming for the vector in inp::Detectors...
| for (size_type det_num = 0; det_num < detectors_.detectors.size(); | ||
| ++det_num) |
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.
| for (size_type det_num = 0; det_num < detectors_.detectors.size(); | |
| ++det_num) | |
| for (auto det_num : range(detectors_.detectors.size())) |
| surface_ = std::make_shared<SurfaceParams>(mi.surfaces, *volume_); | ||
|
|
||
| detector_ = std::make_shared<SDParams>(*core_geo, mi.detectors); | ||
| std::cout << "Detector size " << mi.detectors.detectors.size() << std::endl; |
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.
| std::cout << "Detector size " << mi.detectors.detectors.size() << std::endl; |
| { | ||
| namespace optical | ||
| { | ||
|
|
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.
Missing documentation throughout the file.
|
@lebuller If this is ready for review (it sounded like it was based on your coments?) please merge in the latest upstream, fix the failing CI tests, and mark as ready for review. @stognini will take a first crack at it (maybe leave all your comments in a single review rather than indivually?) and then I will take a look too |
Description
This MR adds a query for checking if the new volume entered in the
postBoundaryExecutoris a sensitive detector and outputs the track energy, id, and new volume to screen. To enable this, the SD params are constructed in the core params and passed through to the optical core params. TheSDparamsdata was added to the core track data and a sensitive detector view was added to the core track view to query theSDParamsin thepostBoundaryExecutor. In addition, theSDParamsclass was updated to accept aninput::detectorsat construction instead of a volume id vector