IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 159d6fae authored by Jean-Marco Alameddine's avatar Jean-Marco Alameddine
Browse files

add switch between BetheBloch and PROPOSAL for continuous processes in corsika and mars example

parent c41b83c3
No related branches found
No related tags found
1 merge request!470Wrong configuration of electromagnetic models in examples
Pipeline #9648 passed with warnings
......@@ -322,9 +322,16 @@ int main(int argc, char** argv) {
HEPEnergyType heHadronModelThreshold = 63.1_GeV;
corsika::proposal::Interaction emCascade(env, sibyll.getHadronInteractionModel(),
heHadronModelThreshold);
// NOT available for PROPOSAL due to interface trouble:
// InteractionCounter emCascadeCounted(emCascade);
corsika::proposal::ContinuousProcess<SubWriter<decltype(dEdX)>> emContinuous(env, dEdX);
// use BetheBlochPDG for hadronic continuous losses, and proposal otherwise
corsika::proposal::ContinuousProcess<SubWriter<decltype(dEdX)>> emContinuousProposal(env, dEdX);
BetheBlochPDG<SubWriter<decltype(dEdX)>> emContinuousBethe{dEdX};
struct EMHadronSwitch {
EMHadronSwitch() = default;
bool operator()(const Particle& p) const { return is_hadron(p.getPID()); }
};
auto emContinuous =
make_select(EMHadronSwitch(), emContinuousBethe, emContinuousProposal);
LongitudinalWriter profile{showerAxis, 200, 10_g / square(1_cm)};
output.add("profile", profile);
......
......@@ -356,11 +356,16 @@ int main(int argc, char** argv) {
corsika::proposal::Interaction emCascade(env, sibyll.getHadronInteractionModel(),
heHadronModelThreshold);
// NOT possible right now, due to interface difference for PROPOSAL:
// InteractionCounter emCascadeCounted(emCascade);
// corsika::proposal::ContinuousProcess<SubWriter<decltype(dEdX)>>
corsika::proposal::ContinuousProcess<SubWriter<decltype(dEdX)>> emContinuous(env, dEdX);
// BetheBlochPDG<SubWriter<decltype(dEdX)>> emContinuous{dEdX};
// use BetheBlochPDG for hadronic continuous losses, and proposal otherwise
corsika::proposal::ContinuousProcess<SubWriter<decltype(dEdX)>> emContinuousProposal(env, dEdX);
BetheBlochPDG<SubWriter<decltype(dEdX)>> emContinuousBethe{dEdX};
struct EMHadronSwitch {
EMHadronSwitch() = default;
bool operator()(const Particle& p) const { return is_hadron(p.getPID()); }
};
auto emContinuous =
make_select(EMHadronSwitch(), emContinuousBethe, emContinuousProposal);
LongitudinalWriter longprof{showerAxis};
output.add("profile", longprof);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment