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

Tests for DistanceToSurface #223

Closed
EricMEsch opened this issue Jan 9, 2025 · 2 comments · Fixed by #224
Closed

Tests for DistanceToSurface #223

EricMEsch opened this issue Jan 9, 2025 · 2 comments · Fixed by #224
Labels
validation Validation and tests

Comments

@EricMEsch
Copy link
Collaborator

I just read through the tests toby added in #220 to see how i could add a test checking the Geant4 distance output. I realized that I could just use the output tobys tests already produce (namely the test-confine.lh5 file created by the confinement/gen-output test) to read in and check if the Geant4 produced distance equals the one predicted by legendhpges.

I am unsure now however, if i should just add this test to those tests (as they are under the folder confinement, and this is not really confinement). But on the other hand it seems unnecessary to recreate the same output. And i am not sure how i can add the fixture dependency if they are not part of the same CMakeLists (as in if i would put them in a new folder)?

@tdixon97
Copy link
Collaborator

tdixon97 commented Jan 9, 2025

This sounds a really good idea! I am not sure what @gipert thinks but I think its better to make a different folder for this tests, since already there is quite a lot in confinement, even if it means reproducing some outputs.
For checking the distance you don't really need the so many HPGes as I used. So you could make a simpler GDML with just a single detector.

@gipert gipert added the validation Validation and tests label Jan 12, 2025
@gipert
Copy link
Member

gipert commented Jan 12, 2025

I think it's ok to re-run confinement/gen-output, since it's rather inexpensive. But in general I agree that we should use fixtures, especially if simulations are costly. Having things defined in multiple CMakeLists.txt should not be a problem, what matters is that they are included in the right orded.

@gipert gipert linked a pull request Jan 15, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
validation Validation and tests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants