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

Candidate Splitting module #442

Merged
merged 5 commits into from
Oct 16, 2023
Merged

Conversation

sophieaerdker
Copy link

This pull request adds a new module that splits candidates in a user-defined number of copies when energy boundaries are crossed. The candidates weights are lowered depending on the splitting number. Candidates can be split until a minimal weight is reached. To use, the CandidateSplitting module must be added to the ModuleList.

Originally, the module was developed to enhance statistics at high energies for diffusive shock acceleration. For that, only the expected spectral index, minimal energy and number of energy bins needs to be specified. The energy bins are then calculated so that the decrease of candidates over the specified energy range is compensated by always splitting into two copies. This way of splitting was used in the 2023 ICRC proceedings to model time-dependent diffusive shock acceleration. Simulations are significantly faster when the CandidateSplitting module is used instead of just increasing the number of candidates to reach sufficiently high statistics. It is also possible to define splitting number, energy bins, and minimal weights.

The Acceleration module already provides candidate splitting for acceleration at shocks, the new independent CandidateSplitting module is more flexible. It does not depend on the shock surface and can be used in other scenarios as well. The code that performs splitting is adapted from the Acceleration module.

The testCandidateSplitting test checks the correct calculation of energy bins and if weights are set accordingly depending on the number of energy bins that are crossed.

CMakeLists.txt Show resolved Hide resolved
include/crpropa/module/CandidateSplitting.h Outdated Show resolved Hide resolved
include/crpropa/module/CandidateSplitting.h Outdated Show resolved Hide resolved
include/crpropa/module/CandidateSplitting.h Outdated Show resolved Hide resolved
include/crpropa/module/CandidateSplitting.h Outdated Show resolved Hide resolved
test/testCandidateSplitting.cpp Outdated Show resolved Hide resolved
test/testCandidateSplitting.cpp Outdated Show resolved Hide resolved
test/testCandidateSplitting.cpp Outdated Show resolved Hide resolved
test/testCandidateSplitting.cpp Outdated Show resolved Hide resolved
test/testCandidateSplitting.cpp Outdated Show resolved Hide resolved
@JulienDoerner JulienDoerner merged commit 78331e7 into CRPropa:master Oct 16, 2023
1 of 3 checks passed
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.

3 participants