IAP GITLAB

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

add ecut which is neccessary for proposal

parent 9d824303
No related branches found
No related tags found
No related merge requests found
...@@ -26,7 +26,8 @@ namespace corsika::process { ...@@ -26,7 +26,8 @@ namespace corsika::process {
unsigned int fInvCount = 0; unsigned int fInvCount = 0;
public: public:
ParticleCut(const units::si::HEPEnergyType vCut); ParticleCut(const units::si::HEPEnergyType eCut)
: fECut(eCut) {}
bool ParticleIsInvisible(particles::Code) const; bool ParticleIsInvisible(particles::Code) const;
EProcessReturn DoSecondaries(corsika::setup::StackView&); EProcessReturn DoSecondaries(corsika::setup::StackView&);
...@@ -38,6 +39,7 @@ namespace corsika::process { ...@@ -38,6 +39,7 @@ namespace corsika::process {
void ShowResults(); void ShowResults();
units::si::HEPEnergyType GetECut() const { return fECut; }
units::si::HEPEnergyType GetInvEnergy() const { return fInvEnergy; } units::si::HEPEnergyType GetInvEnergy() const { return fInvEnergy; }
units::si::HEPEnergyType GetCutEnergy() const { return fEnergy; } units::si::HEPEnergyType GetCutEnergy() const { return fEnergy; }
units::si::HEPEnergyType GetEmEnergy() const { return fEmEnergy; } units::si::HEPEnergyType GetEmEnergy() const { return fEmEnergy; }
......
...@@ -37,8 +37,10 @@ namespace corsika::process::proposal { ...@@ -37,8 +37,10 @@ namespace corsika::process::proposal {
template <> template <>
Interaction::Interaction(SetupEnvironment const& _env, CORSIKA_ParticleCut const& _cut) Interaction::Interaction(SetupEnvironment const& _env, CORSIKA_ParticleCut const& _cut)
: cut(make_shared<const PROPOSAL::EnergyCutSettings>(_cut.GetCutEnergy() / 1_GeV, 1, : cut(make_shared<const PROPOSAL::EnergyCutSettings>(_cut.GetECut() / 1_MeV, 1,
false)) { false)) {
std::cout << "corsika set cut to " << _cut.GetECut() / 1_GeV << " [GeV]" << std::endl;
std::cout << "proposal set ecut to " << cut->GetEcut() << " [MeV]" << std::endl;
auto all_compositions = std::vector<const NuclearComposition*>(); auto all_compositions = std::vector<const NuclearComposition*>();
_env.GetUniverse()->walk([&](auto& vtn) { _env.GetUniverse()->walk([&](auto& vtn) {
if (vtn.HasModelProperties()) { if (vtn.HasModelProperties()) {
......
...@@ -55,6 +55,7 @@ namespace corsika::process::proposal { ...@@ -55,6 +55,7 @@ namespace corsika::process::proposal {
auto BuildCalculator(particles::Code corsika_code, NuclearComposition const& comp) { auto BuildCalculator(particles::Code corsika_code, NuclearComposition const& comp) {
auto medium = media.at(&comp); auto medium = media.at(&comp);
if (corsika_code == particles::Code::Gamma) { if (corsika_code == particles::Code::Gamma) {
std::cout << "Build gamma tables" << std::endl;
auto cross = auto cross =
GetStdCrossSections(PROPOSAL::GammaDef(), media.at(&comp), cut, true); GetStdCrossSections(PROPOSAL::GammaDef(), media.at(&comp), cut, true);
auto inter_types = PROPOSAL::CrossSectionVector::GetInteractionTypes(cross); auto inter_types = PROPOSAL::CrossSectionVector::GetInteractionTypes(cross);
...@@ -66,6 +67,7 @@ namespace corsika::process::proposal { ...@@ -66,6 +67,7 @@ namespace corsika::process::proposal {
return insert_it; return insert_it;
} }
if (corsika_code == particles::Code::Electron) { if (corsika_code == particles::Code::Electron) {
std::cout << "Build electron tables" << std::endl;
auto cross = auto cross =
GetStdCrossSections(PROPOSAL::EMinusDef(), media.at(&comp), cut, true); GetStdCrossSections(PROPOSAL::EMinusDef(), media.at(&comp), cut, true);
auto inter_types = PROPOSAL::CrossSectionVector::GetInteractionTypes(cross); auto inter_types = PROPOSAL::CrossSectionVector::GetInteractionTypes(cross);
...@@ -77,6 +79,7 @@ namespace corsika::process::proposal { ...@@ -77,6 +79,7 @@ namespace corsika::process::proposal {
return insert_it; return insert_it;
} }
if (corsika_code == particles::Code::Positron) { if (corsika_code == particles::Code::Positron) {
std::cout << "Build positron tables" << std::endl;
auto cross = auto cross =
GetStdCrossSections(PROPOSAL::EPlusDef(), media.at(&comp), cut, true); GetStdCrossSections(PROPOSAL::EPlusDef(), media.at(&comp), cut, true);
auto inter_types = PROPOSAL::CrossSectionVector::GetInteractionTypes(cross); auto inter_types = PROPOSAL::CrossSectionVector::GetInteractionTypes(cross);
......
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