Skip to content

Add Runtime Option to Ignore Air in Material Plots#386

Merged
starsdong merged 11 commits intostar-bnl:mainfrom
klendathu2k:agml-checker-ignore-air
Aug 26, 2022
Merged

Add Runtime Option to Ignore Air in Material Plots#386
starsdong merged 11 commits intostar-bnl:mainfrom
klendathu2k:agml-checker-ignore-air

Conversation

@klendathu2k
Copy link
Copy Markdown
Contributor

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.

klendathu2k and others added 10 commits March 11, 2022 12:29
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.
Copy link
Copy Markdown
Member

@plexoos plexoos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
}
}
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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


Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove if not intentional

Suggested change

Copy link
Copy Markdown
Contributor

@jdbrice jdbrice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I'll approve with the expectation that @plexoos 's comment is addressed

@starsdong starsdong merged commit 3f94c79 into star-bnl:main Aug 26, 2022
@plexoos plexoos added this to the SL22c milestone Aug 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants