Add Runtime Option to Ignore Air in Material Plots#386
Merged
starsdong merged 11 commits intostar-bnl:mainfrom Aug 26, 2022
Merged
Add Runtime Option to Ignore Air in Material Plots#386starsdong merged 11 commits intostar-bnl:mainfrom
starsdong merged 11 commits intostar-bnl:mainfrom
Conversation
Before submitting PR#315 some code cleanup was performed (see note below). The fast jet directory was moved from StarGenerator/FastJetFilt to StarGenerator/FILT/FastJetFilt, to conform with the standard source tree layout for filters. 4f27034 625bbdd Conscript-standard directory rules allow one to specify include paths based on the module (StarGenerator) and package. The package is one directory beneath the module... before code cleanup this was the FastJetFilter directory. After cleanup, we have to apply the fast jet include path to all filters in the StarGenerator/FILT directory. ---- Note on the pp 200 HF filtered jet production. The production commenced with fast jet filter code built before code cleanup, based on the original location of the fast jet filter in the source tree.
…d HALL) histograms
plexoos
approved these changes
Aug 25, 2022
Member
plexoos
left a comment
There was a problem hiding this comment.
The code appears to deliver what is promised in the description
Comment on lines
+149
to
+155
| if ( nm.Contains("air") ) { // use the name of the material to select air... | ||
| if ( false == mScoreAir ) { // user option to ignore air in detector volumes | ||
| if ( !name.Contains("CAVE") && !name.Contains("HALL") ) { // will still count air in the cave and hall histograms | ||
| matprop = 0; // property will not be scored | ||
| } | ||
| } | ||
| } |
Member
There was a problem hiding this comment.
For better readability please consider replacing the nested 'if' statements with a single one such as:
bool condition = conditionA && !conditionB && conditionC && !conditionD;
matprop = 0;
if (condition) {
matprop = material->GetRadLen();
}
Comment on lines
+110
to
+111
|
|
||
|
|
Member
There was a problem hiding this comment.
Remove if not intentional
Suggested change
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implement an option so that Air is only scored at the CAVE and HALL levels of the geometries.
When an envelope volume (aka assembly volume) contains significant empty space and/or very lightweight daughters, the air in the envelope can contribute a relatively large amount to the material budget plots. This commit adds an option so that users can ignore air w/in the material budget calculations (and get at only the physical detector itself).
Air will still count towards the HALL and CAVE histograms when this option is used.
This option is off by default.