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

Introduce SurfaceStep #1300

Merged
merged 6 commits into from
Jul 9, 2024
Merged

Introduce SurfaceStep #1300

merged 6 commits into from
Jul 9, 2024

Conversation

brownd1978
Copy link
Collaborator

@brownd1978 brownd1978 commented Jul 5, 2024

SurfaceStep is a new MC truth class that functions like StrawGasStep, CaloShowerStep, etc, but for passive materials and virtual detectors. It uses the SurfaceId class to define the surfaces, and summarizes the information contained in contiguous StepPointMC objects. This greatly reduced the payload and renders the output information more useful for physics studies, and insulates the results from the details of the G4 stepping parameters. This PR introduces the class itself plus producer, diag module, printer, and default production configuration.

Note that SurfaceId was moved to DataProducts (from RecoDataProducts and KinKalGeom) to allow this to work. It's fine, as the surface concept isn't specific to reco or mc.

@FNALbuild
Copy link
Collaborator

Hi @brownd1978,
You have proposed changes to files in these packages:

  • CommonMC
  • RecoDataProducts
  • Print
  • DataProducts
  • MCDataProducts
  • TrackerMC
  • Mu2eKinKal
  • KinKalGeom
  • Validation

which require these tests: build.

@Mu2e/write, @Mu2e/fnalbuild-users have access to CI actions on main.

⌛ The following tests have been triggered for 680a6ef: build (Build queue has 1 jobs)

About FNALbuild. Code review on Mu2e/Offline.

@FNALbuild
Copy link
Collaborator

☀️ The build tests passed at 680a6ef.

Test Result Details
test with Command did not list any other PRs to include
merge Merged 680a6ef at cecf5be
build (prof) Log file. Build time: 08 min 24 sec
ceSimReco Log file.
g4test_03MT Log file.
transportOnly Log file.
POT Log file.
g4study Log file.
cosmicSimReco Log file.
cosmicOffSpill Log file.
ceSteps Log file.
ceDigi Log file.
muDauSteps Log file.
ceMix Log file.
rootOverlaps Log file.
g4surfaceCheck Log file.
FIXME, TODO 🔶 TODO (21) FIXME (2) in 15 files
clang-tidy 🔶 0 errors 580 warnings
whitespace check no whitespace errors found

N.B. These results were obtained from a build of this Pull Request at 680a6ef after being merged into the base branch at cecf5be.

For more information, please check the job page here.
Build artifacts are deleted after 5 days. If this is not desired, select Keep this build forever on the job page.

Copy link
Collaborator

@rlcee rlcee left a comment

Choose a reason for hiding this comment

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

  • "surface" would be more clear as "material" or "volume"
  • split SurfaceId from enum
  • SurfaceId::index could be named more clearly and commented
  • fix include guards in SurfaceId
  • print looks fine

@brownd1978
Copy link
Collaborator Author

  • "surface" would be more clear as "material" or "volume"
    Surface is explicit in the downstream use cases, particularly reconstruction. 'volume' or 'material' are less accurate.
  • split SurfaceId from enum
    These classes don't make sense as independent objects, just like the detail of the enum class it is clearer to keep them in 1 file
  • SurfaceId::index could be named more clearly and commented
    I added some comments. The name must be general.
  • fix include guards in SurfaceId
    done
  • print looks fine

Note too SurfaceId pre-exists this PR by over a year, this PR simply moves it.

Copy link
Collaborator

@kutschke kutschke left a comment

Choose a reason for hiding this comment

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

I saw comment a comment in the conversation (or an issue?) that explains that index class distinguishes items with multiple placements, such as the target foils. I don't see it explained in any of the code files. Did I miss it? If not, please add a comment to SurfaceId.hh . Also, are there other entities that have multiple indices?

CommonMC/fcl/prolog.fcl Show resolved Hide resolved
typedef std::vector<SurfaceStep> SurfaceStepCollection;
typedef art::Assns<SurfaceStep,StepPointMC> SurfaceStepAssns;

inline std::ostream& operator<<( std::ostream& ost, SurfaceStep const& ss){
Copy link
Collaborator

Choose a reason for hiding this comment

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

I know that I started this incorrectly a long time ago. I recommend that the declartion go here and the implementation in the .cc file.

Copy link
Collaborator

@kutschke kutschke left a comment

Choose a reason for hiding this comment

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

Thanks for making the changes.

CommonMC/fcl/prolog.fcl Show resolved Hide resolved
@kutschke
Copy link
Collaborator

kutschke commented Jul 9, 2024

@sdifalco a gentle reminder that this PR is on your to-review list.

@kutschke
Copy link
Collaborator

kutschke commented Jul 9, 2024

@FNALbuild run build test

@FNALbuild
Copy link
Collaborator

⌛ The following tests have been triggered for 491ff6c: build (Build queue has 1 jobs)

@FNALbuild
Copy link
Collaborator

☔ The build tests failed for 491ff6c.

Test Result Details
test with Command did not list any other PRs to include
merge Merged 491ff6c at 616f60b
build (prof) Log file. Build time: 04 min 10 sec
ceSimReco Log file. Return Code 90.
g4test_03MT Log file.
transportOnly Log file.
POT Log file.
g4study Log file.
cosmicSimReco Log file. Return Code 90.
cosmicOffSpill Log file. Return Code 90.
ceSteps Log file. Return Code 90.
ceDigi Log file. Return Code 90.
muDauSteps Log file. Return Code 90.
ceMix Log file. Return Code 90.
rootOverlaps Log file.
g4surfaceCheck Log file.
FIXME, TODO 🔶 TODO (21) FIXME (2) in 15 files
clang-tidy 🔶 0 errors 614 warnings
whitespace check no whitespace errors found

N.B. These results were obtained from a build of this Pull Request at 491ff6c after being merged into the base branch at 616f60b.

For more information, please check the job page here.
Build artifacts are deleted after 5 days. If this is not desired, select Keep this build forever on the job page.

@kutschke
Copy link
Collaborator

kutschke commented Jul 9, 2024

Needs to test with a Production PR

@FNALbuild run build test with Mu2e/Production#329

@FNALbuild
Copy link
Collaborator

⌛ The following tests have been triggered for 491ff6c: build (Build queue has 1 jobs)

@FNALbuild
Copy link
Collaborator

☀️ The build tests passed at 491ff6c.

Test Result Details
test with Included Mu2e/Production#329 @ 5287648aedc1c528dafe514365f75b6a1a4f8e83 by merge
merge Merged 491ff6c at 616f60b
build (prof) Log file. Build time: 08 min 22 sec
ceSimReco Log file.
g4test_03MT Log file.
transportOnly Log file.
POT Log file.
g4study Log file.
cosmicSimReco Log file.
cosmicOffSpill Log file.
ceSteps Log file.
ceDigi Log file.
muDauSteps Log file.
ceMix Log file.
rootOverlaps Log file.
g4surfaceCheck Log file.
FIXME, TODO 🔶 TODO (21) FIXME (2) in 15 files
clang-tidy 🔶 0 errors 614 warnings
whitespace check no whitespace errors found

N.B. These results were obtained from a build of this Pull Request at 491ff6c after being merged into the base branch at 616f60b.

For more information, please check the job page here.
Build artifacts are deleted after 5 days. If this is not desired, select Keep this build forever on the job page.

@brownd1978
Copy link
Collaborator Author

AFAIK I've addressed all comments and have no further plans to work on this. Stefano was added as reviewer just to keep him in the loop.

@FNALbuild
Copy link
Collaborator

📝 The HEAD of main has changed to 183a498. Tests are now out of date.

@sdifalco
Copy link
Contributor

sdifalco commented Jul 9, 2024

@sdifalco a gentle reminder that this PR is on your to-review list.

Sorry but I am been (and still am) very busy with funding requests to INFN in these days. Thanks for taking me in the loop. I will approve what you have already commented. Thanks Ed for the nice job!

@kutschke
Copy link
Collaborator

kutschke commented Jul 9, 2024

AFAIK I've addressed all comments and have no further plans to work on this. Stefano was added as reviewer just to keep him in the loop.

In that case it's ready to merge. Do you expect this to have impact on the nightly validation? The STM PR that I merged earlier does modify the G4 geometry but only in the STM region.

@kutschke
Copy link
Collaborator

kutschke commented Jul 9, 2024

I will go ahead and merge now under the assumption that if there are issues to sort out with the nightly, we can do it tomoorow

@kutschke kutschke merged commit 00eabab into Mu2e:main Jul 9, 2024
13 of 14 checks passed
@brownd1978 brownd1978 deleted the surfacestep branch August 1, 2024 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants