IAP GITLAB

Skip to content
Snippets Groups Projects
Commit e0208d7c authored by Maximilian Sackel's avatar Maximilian Sackel Committed by Ralf Ulrich
Browse files

try to make proposal example run

parent eea8b1f0
No related branches found
No related tags found
No related merge requests found
...@@ -14,73 +14,26 @@ target_link_libraries (stack_example SuperStupidStack CORSIKAunits) ...@@ -14,73 +14,26 @@ target_link_libraries (stack_example SuperStupidStack CORSIKAunits)
# address sanitizer is making this example too slow, so we only do "undefined" # address sanitizer is making this example too slow, so we only do "undefined"
CORSIKA_ADD_EXAMPLE (boundary_example) CORSIKA_ADD_EXAMPLE (boundary_example)
target_link_libraries (boundary_example target_link_libraries (boundary_example
SuperStupidStack
CORSIKAunits
CORSIKAlogging
CORSIKArandom
ProcessSibyll
ProcessProposal
CORSIKAcascade
ProcessTrackWriter
ProcessParticleCut
ProcessTrackingLine
CORSIKAprocesses
CORSIKAparticles
CORSIKAgeometry
CORSIKAenvironment
CORSIKAprocesssequence
)
CORSIKA_ADD_EXAMPLE (cascade_example)
target_link_libraries (cascade_example
SuperStupidStack
CORSIKAunits
CORSIKAlogging
CORSIKArandom
ProcessSibyll
CORSIKAcascade
ProcessEnergyLoss
ProcessTrackWriter
ProcessStackInspector
ProcessTrackingLine
ProcessParticleCut
ProcessHadronicElasticModel
ProcessStackInspector
CORSIKAprocesses
CORSIKAcascade
CORSIKAparticles
CORSIKAgeometry
CORSIKAenvironment
CORSIKAprocesssequence
)
if (Pythia8_FOUND)
CORSIKA_ADD_EXAMPLE (cascade_proton_example)
target_link_libraries (cascade_proton_example
SuperStupidStack SuperStupidStack
CORSIKAunits CORSIKAunits
CORSIKAlogging CORSIKAlogging
CORSIKArandom CORSIKArandom
ProcessSibyll ProcessSibyll
ProcessPythia8 ProcessPythia8
ProcessProposal
CORSIKAcascade CORSIKAcascade
ProcessEnergyLoss
ProcessTrackWriter ProcessTrackWriter
ProcessStackInspector
ProcessTrackingLine
ProcessParticleCut ProcessParticleCut
ProcessHadronicElasticModel ProcessTrackingLine
ProcessStackInspector
CORSIKAprocesses CORSIKAprocesses
CORSIKAcascade
CORSIKAparticles CORSIKAparticles
CORSIKAgeometry CORSIKAgeometry
CORSIKAenvironment CORSIKAenvironment
CORSIKAprocesssequence CORSIKAprocesssequence
) )
CORSIKA_ADD_EXAMPLE (vertical_EAS RUN_OPTIONS 4 2 10000.) CORSIKA_ADD_EXAMPLE (cascade_example)
target_link_libraries (vertical_EAS target_link_libraries (cascade_example
SuperStupidStack SuperStupidStack
CORSIKAunits CORSIKAunits
CORSIKAlogging CORSIKAlogging
...@@ -92,14 +45,14 @@ if (Pythia8_FOUND) ...@@ -92,14 +45,14 @@ if (Pythia8_FOUND)
CORSIKAcascade CORSIKAcascade
ProcessCONEXSourceCut ProcessCONEXSourceCut
ProcessEnergyLoss ProcessEnergyLoss
ProcessObservationPlane
ProcessInteractionCounter
ProcessTrackWriter ProcessTrackWriter
ProcessStackInspector
ProcessTrackingLine ProcessTrackingLine
ProcessProposal
ProcessParticleCut ProcessParticleCut
ProcessOnShellCheck ProcessOnShellCheck
ProcessHadronicElasticModel
ProcessStackInspector ProcessStackInspector
ProcessLongitudinalProfile
CORSIKAprocesses CORSIKAprocesses
CORSIKAcascade CORSIKAcascade
CORSIKAparticles CORSIKAparticles
...@@ -107,27 +60,79 @@ if (Pythia8_FOUND) ...@@ -107,27 +60,79 @@ if (Pythia8_FOUND)
CORSIKAenvironment CORSIKAenvironment
CORSIKAprocesssequence CORSIKAprocesssequence
) )
if (Pythia8_FOUND)
CORSIKA_ADD_EXAMPLE (cascade_proton_example)
target_link_libraries (cascade_proton_example
SuperStupidStack
CORSIKAunits
CORSIKAlogging
CORSIKArandom
ProcessSibyll
ProcessPythia
CORSIKAcascade
ProcessEnergyLoss
ProcessTrackWriter
ProcessStackInspector
ProcessTrackingLine
ProcessParticleCut
ProcessHadronicElasticModel
ProcessStackInspector
CORSIKAprocesses
CORSIKAcascade
CORSIKAparticles
CORSIKAgeometry
CORSIKAenvironment
CORSIKAprocesssequence
)
CORSIKA_ADD_EXAMPLE (vertical_EAS RUN_OPTIONS 4 2 10000.)
target_link_libraries (vertical_EAS
SuperStupidStack
CORSIKAunits
CORSIKAlogging
CORSIKArandom
ProcessSibyll
ProcessPythia
ProcessUrQMD
ProcessSwitch
CORSIKAcascade
ProcessEnergyLoss
ProcessObservationPlane
ProcessInteractionCounter
ProcessTrackWriter
ProcessTrackingLine
ProcessParticleCut
ProcessStackInspector
ProcessLongitudinalProfile
CORSIKAprocesses
CORSIKAcascade
CORSIKAparticles
CORSIKAgeometry
CORSIKAenvironment
CORSIKAprocesssequence
)
endif() endif()
CORSIKA_ADD_EXAMPLE (stopping_power stopping_power) CORSIKA_ADD_EXAMPLE (stopping_power stopping_power)
target_link_libraries (stopping_power target_link_libraries (stopping_power
SuperStupidStack SuperStupidStack
CORSIKAunits CORSIKAunits
ProcessEnergyLoss ProcessEnergyLoss
CORSIKAparticles CORSIKAparticles
CORSIKAgeometry CORSIKAgeometry
CORSIKAenvironment CORSIKAenvironment
) )
CORSIKA_ADD_EXAMPLE (staticsequence_example) CORSIKA_ADD_EXAMPLE (staticsequence_example)
target_link_libraries (staticsequence_example target_link_libraries (staticsequence_example
CORSIKAprocesssequence CORSIKAprocesssequence
CORSIKAunits CORSIKAunits
CORSIKAgeometry CORSIKAgeometry
CORSIKAlogging) CORSIKAlogging)
CORSIKA_ADD_EXAMPLE (proposal_example RUN_OPTIONS 100.) CORSIKA_ADD_EXAMPLE (proposal_example RUN_OPTIONS 100.)
target_link_libraries (proposal_example target_link_libraries (proposal_example
SuperStupidStack SuperStupidStack
CORSIKAunits CORSIKAunits
CORSIKAlogging CORSIKAlogging
...@@ -136,6 +141,7 @@ CORSIKA_ADD_EXAMPLE (proposal_example RUN_OPTIONS 100.) ...@@ -136,6 +141,7 @@ CORSIKA_ADD_EXAMPLE (proposal_example RUN_OPTIONS 100.)
ProcessObservationPlane ProcessObservationPlane
ProcessInteractionCounter ProcessInteractionCounter
ProcessTrackWriter ProcessTrackWriter
ProcessProposal
ProcessTrackingLine ProcessTrackingLine
ProcessParticleCut ProcessParticleCut
ProcessStackInspector ProcessStackInspector
...@@ -146,4 +152,4 @@ CORSIKA_ADD_EXAMPLE (proposal_example RUN_OPTIONS 100.) ...@@ -146,4 +152,4 @@ CORSIKA_ADD_EXAMPLE (proposal_example RUN_OPTIONS 100.)
CORSIKAgeometry CORSIKAgeometry
CORSIKAenvironment CORSIKAenvironment
CORSIKAprocesssequence CORSIKAprocesssequence
) )
...@@ -28,6 +28,8 @@ ...@@ -28,6 +28,8 @@
#include <corsika/units/PhysicalUnits.h> #include <corsika/units/PhysicalUnits.h>
#include <corsika/utl/CorsikaFenv.h> #include <corsika/utl/CorsikaFenv.h>
#include <corsika/process/proposal/Interaction.h>
#include <iomanip> #include <iomanip>
#include <iostream> #include <iostream>
#include <limits> #include <limits>
...@@ -48,6 +50,7 @@ using namespace corsika::units::si; ...@@ -48,6 +50,7 @@ using namespace corsika::units::si;
void registerRandomStreams() { void registerRandomStreams() {
random::RNGManager::GetInstance().RegisterRandomStream("cascade"); random::RNGManager::GetInstance().RegisterRandomStream("cascade");
random::RNGManager::GetInstance().RegisterRandomStream("proposal");
// add PROPOSAL here (?) // add PROPOSAL here (?)
random::RNGManager::GetInstance().SeedAll(); random::RNGManager::GetInstance().SeedAll();
} }
...@@ -129,10 +132,12 @@ int main(int argc, char** argv) { ...@@ -129,10 +132,12 @@ int main(int argc, char** argv) {
// setup processes, decays and interactions // setup processes, decays and interactions
// PROPOSAL processs proposal{...}; // PROPOSAL processs proposal{...};
process::particle_cut::ParticleCut cut(10_GeV);
process::proposal::Interaction proposal(env, cut);
process::interaction_counter::InteractionCounter proposalCounted(proposal); process::interaction_counter::InteractionCounter proposalCounted(proposal);
// energy cut; n.b. ParticleCut needs to be modified not to discard EM particles! // energy cut; n.b. ParticleCut needs to be modified not to discard EM particles!
process::particle_cut::ParticleCut cut{60_GeV}; /* process::particle_cut::ParticleCut cut{60_GeV}; */
// long. profile; columns for gamma, e+, e- still need to be added // long. profile; columns for gamma, e+, e- still need to be added
process::longitudinal_profile::LongitudinalProfile longprof{showerAxis}; process::longitudinal_profile::LongitudinalProfile longprof{showerAxis};
...@@ -141,7 +146,7 @@ int main(int argc, char** argv) { ...@@ -141,7 +146,7 @@ int main(int argc, char** argv) {
process::observation_plane::ObservationPlane observationLevel(obsPlane, process::observation_plane::ObservationPlane observationLevel(obsPlane,
"particles.dat"); "particles.dat");
auto sequence = proposalCounted << longprof << cut << observationLevel; auto sequence = proposalCounted << longprof << proposal << cut << observationLevel;
// define air shower object, run simulation // define air shower object, run simulation
tracking_line::TrackingLine tracking; tracking_line::TrackingLine tracking;
......
...@@ -105,7 +105,7 @@ namespace corsika::process::proposal { ...@@ -105,7 +105,7 @@ namespace corsika::process::proposal {
template <> template <>
corsika::units::si::GrammageType Interaction::GetInteractionLength( corsika::units::si::GrammageType Interaction::GetInteractionLength(
setup::Stack::StackIterator& vP) { setup::Stack::StackIterator const& vP) {
if (CanInteract(vP.GetPID())) { if (CanInteract(vP.GetPID())) {
auto calc = GetCalculator(vP); // [CrossSections] auto calc = GetCalculator(vP); // [CrossSections]
std::uniform_real_distribution<double> distr(0., 1.); std::uniform_real_distribution<double> distr(0., 1.);
......
...@@ -70,7 +70,7 @@ namespace corsika::process::proposal { ...@@ -70,7 +70,7 @@ namespace corsika::process::proposal {
corsika::process::EProcessReturn DoInteraction(Particle&); corsika::process::EProcessReturn DoInteraction(Particle&);
template <typename TParticle> template <typename TParticle>
corsika::units::si::GrammageType GetInteractionLength(TParticle& p); corsika::units::si::GrammageType GetInteractionLength(TParticle const& p);
}; };
} // namespace corsika::process::proposal } // namespace corsika::process::proposal
#endif #endif
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