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

Lab generator #69

Closed
wants to merge 16 commits into from
Closed

Lab generator #69

wants to merge 16 commits into from

Conversation

andLaing
Copy link
Contributor

Improves the way muons are generated using the angular correlations expected in a lab.

Introduces ProjectToRegion methods in the geometries (NEW, NEXT100 and NEXT100Shielding and LSCHallA for now) and GetIntersect to the BoxPointSampler and CylinderPointSampler2020.

Tests added to nexus-test

Replaces #54 which was closed in the transition to a public repository.

auto sampler = nexus::CylinderPointSampler2020(minRad, maxRad, halfLen,
0., CLHEP::twopi,
rotation, origin);
auto point = G4ThreeVector(minRad * G4UniformRand(),
Copy link
Contributor

Choose a reason for hiding this comment

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

If this point is meant to be inside the cylinder, shouldn't the displacement and rotation also be taken into account? And the z coordinate be related to halfLen?

auto sampler = nexus::BoxPointSampler(inner_dim, inner_dim, inner_dim, thickness,
origin, rotation);

auto point = G4ThreeVector(inner_dim * G4UniformRand(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Same comment as with the CylinderPointSampler2020.

@paolafer
Copy link
Contributor

As a general comment, I find the procedure of projection quite complicated to follow. I would add some more explicit documentation in the MuonAngleGenerator class to explain what is being done.

@andLaing
Copy link
Contributor Author

Think that makes things a bit more consistent and adds to the explanation.

I've rebased on the recent merges to master too so that the tests are ran on the PR.

Copy link
Contributor

@pnovella pnovella left a comment

Choose a reason for hiding this comment

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

This branch has been validated with a dedicated muon simulation. The proper angular distribution of the muons is kept. It enhances the efficiency of the simulation: the fraction of simulated muons inducing interactions in the active volume is increased by a factor ~100

@paolafer
Copy link
Contributor

I'm closing this PR, because it is superseded by #228.

@paolafer paolafer closed this Nov 30, 2023
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.

3 participants