Newer
Older
* (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
*
* This software is distributed under the terms of the GNU General Public
* Licence version 3 (GPL Version 3). See file LICENSE for a full version of
* the license.
*/
#include <corsika/logging/Logging.h>
#include <corsika/stack/history/EventType.hpp>
#include <corsika/stack/history/HistorySecondaryProducer.hpp>
#include <corsika/setup/SetupTrajectory.h>
/* see Issue 161, we need to include SetupStack only because we need
to globally define StackView. This is clearly not nice and should
be changed, when possible. It might be that StackView needs to be
templated in Cascade, but this would be even worse... so we don't
do that until it is really needed.
*/
#include <corsika/setup/SetupStack.h>
#include <cmath>
#include <boost/type_index.hpp>
using boost::typeindex::type_id_with_cvr;
#include <fstream>
#include <boost/histogram.hpp>
#include <boost/histogram/ostream.hpp>
#include <corsika/process/tracking_line/dump_bh.hpp>
using namespace boost::histogram;
/*static auto histL2 = make_histogram(axis::regular<>(100, 0, 60000, "L'"));
static auto histS2 = make_histogram(axis::regular<>(100, 0, 60000, "S"));
static auto histB2 = make_histogram(axis::regular<>(100, 0, 60000, "Bogenlnge"));*/
static auto histLlog2 = make_histogram(axis::regular<double, axis::transform::log>(100, 1e-3, 1e7, "Leap-Frog-length L'"));
static auto histLlog2int = make_histogram(axis::regular<double, axis::transform::log>(100, 1e-3, 1e7, "Leap-Frog-length L'"));
static auto histLlog2dec = make_histogram(axis::regular<double, axis::transform::log>(100, 1e-3, 1e7, "Leap-Frog-length L'"));
static auto histLlog2max = make_histogram(axis::regular<double, axis::transform::log>(100, 1e-3, 1e7, "Leap-Frog-length L'"));
static auto histLlog2geo = make_histogram(axis::regular<double, axis::transform::log>(100, 1e-3, 1e7, "Leap-Frog-length L'"));
static auto histLlog2mag = make_histogram(axis::regular<double, axis::transform::log>(100, 1e-3, 1e7, "Leap-Frog-length L'"));
/*static auto histSlog2 = make_histogram(axis::regular<double, axis::transform::log>(100, 1e-3, 1e7, "Direct Length S"));
static auto histBlog2 = make_histogram(axis::regular<double, axis::transform::log>(100, 1e-3, 1e7, "Arc Length B"));
static auto histLB2 = make_histogram(axis::regular<>(100, 0, 0.01, "L - B"));
static auto histLS2 = make_histogram(axis::regular<>(100, 0, 0.01, "L - S"));
static auto histLBrel2 = make_histogram(axis::regular<double, axis::transform::log> (20,1e-11,1e-6,"L/B -1"));
static auto histLSrel2 = make_histogram(axis::regular<double, axis::transform::log>(20,1e-11,1e-6, "L/S -1"));
static auto histELSrel2 = make_histogram(axis::regular<double, axis::transform::log>(20,1e-11,1e-6, "L/S -1"),axis::regular<double, axis::transform::log>(20, 0.1, 1e4, "E / GeV"));
static auto histBS2 = make_histogram(axis::regular<>(100, 0, 0.01, "B - S")); */
static auto histLp2 = make_histogram(axis::regular<double, axis::transform::log>(100, 1e-3, 1e7, "L' fr Protonen"));
static auto histLpi2 = make_histogram(axis::regular<double, axis::transform::log>(100, 1e-3, 1e7, "L' fr Pionen"));
static auto histLpi2int = make_histogram(axis::regular<double, axis::transform::log>(100, 1e-3, 1e7, "Leap-Frog-length L'"));
static auto histLpi2dec = make_histogram(axis::regular<double, axis::transform::log>(100, 1e-3, 1e7, "Leap-Frog-length L'"));
static auto histLpi2max = make_histogram(axis::regular<double, axis::transform::log>(100, 1e-3, 1e7, "Leap-Frog-length L'"));
static auto histLpi2geo = make_histogram(axis::regular<double, axis::transform::log>(100, 1e-3, 1e7, "Leap-Frog-length L'"));
static auto histLpi2mag = make_histogram(axis::regular<double, axis::transform::log>(100, 1e-3, 1e7, "Leap-Frog-length L'"));
static auto histLmu2 = make_histogram(axis::regular<double, axis::transform::log>(100, 1e-3, 1e7, "L' fr Myonen"));
static auto histLmu2int = make_histogram(axis::regular<double, axis::transform::log>(100, 1e-3, 1e7, "Leap-Frog-length L'"));
static auto histLmu2dec = make_histogram(axis::regular<double, axis::transform::log>(100, 1e-3, 1e7, "Leap-Frog-length L'"));
static auto histLmu2max = make_histogram(axis::regular<double, axis::transform::log>(100, 1e-3, 1e7, "Leap-Frog-length L'"));
static auto histLmu2geo = make_histogram(axis::regular<double, axis::transform::log>(100, 1e-3, 1e7, "Leap-Frog-length L'"));
static auto histLmu2mag = make_histogram(axis::regular<double, axis::transform::log>(100, 1e-3, 1e7, "Leap-Frog-length L'"));
static auto histLe2 = make_histogram(axis::regular<double, axis::transform::log>(100, 1e-3, 1e7, "L' fr Elektronen"));
static auto histLy2 = make_histogram(axis::regular<double, axis::transform::log>(100, 1e-3, 1e7, "L' fr Photonen"));
static double stepradius = 0;
static int N = 0;
static double stepradiusp = 0;
static int Np = 0;
static double stepradiuspi = 0;
static int Npi = 0;
static double stepradiusmu = 0;
static int Nmu = 0;
/**
* The cascade namespace assembles all objects needed to simulate full particles cascades.
*/
* The Cascade class is constructed from template arguments making
* it very versatile. Via the template arguments physics models are
* plugged into the cascade simulation.
*
* <code>auto GetTrack(Particle const& p)</auto>,
* with the return type <code>geometry::Trajectory<corsika::geometry::Line>
* </code>
* <b>Stack</b> is the storage object for particle data, i.e. with
* Particle class type <code>Stack::ParticleType</code>
*
*
*/
template <typename TTracking, typename TProcessList, typename TStack,
/*
TStackView is needed as explicit template parameter because
of issue 161 and the
inability of clang to understand "stack::MakeView" so far.
*/
typename TStackView = corsika::setup::StackView>
using VolumeTreeNode =
std::remove_pointer_t<decltype(((Particle*)nullptr)->GetNode())>;
using MediumInterface = typename VolumeTreeNode::IModelProperties;
ralfulrich
committed
corsika::environment::Environment<MediumInterface> const& environment_;
TTracking& tracking_;
TProcessList& process_sequence_;
TStack& stack_;
corsika::random::RNG& rng_ =
corsika::random::RNGManager::GetInstance().GetRandomStream("cascade");
unsigned int count_ = 0;
private:
// we only want fully configured objects
ralfulrich
committed
Cascade() = delete;
/**
* Cascade class cannot be default constructed, but needs a valid
* list of physics processes for configuration at construct time.
*/
Cascade(corsika::environment::Environment<MediumInterface> const& env, TTracking& tr,
TProcessList& pl, TStack& stack)
ralfulrich
committed
: environment_(env)
, tracking_(tr)
, process_sequence_(pl)
, stack_(stack)
ralfulrich
committed
if constexpr (TStackView::has_event) {
C8LOG_INFO(" - With full cascade HISTORY.");
}
~Cascade(){
/*std::ofstream myfile;
myfile.open ("stepradius.txt");
myfile << "All charged particles " << stepradius/N << std::endl;
myfile << "Protons " << stepradiusp/Np << std::endl;
myfile << "Pions " << stepradiuspi/Npi << std::endl;
myfile << "Muons " << stepradiusmu/Nmu << std::endl;
myfile.close();
/*std::cout << histLBrel << std::endl;
std::cout << histLSrel << std::endl;*/
/*std::ofstream file1("histL2.json");
dump_bh(file1, histL2);
file1.close();
std::ofstream file2("histS2.json");
dump_bh(file2, histS2);
file2.close();
std::ofstream file3("histB2.json");
dump_bh(file3, histB2);
file3.close();
std::ofstream file4("histLB.json");
dump_bh(file4, histLB);
file4.close();
std::ofstream file5("histLS.json");
dump_bh(file5, histLS);
file5.close();
std::ofstream file6("histBS.json");
dump_bh(file6, histBS);
file6.close();
std::ofstream file7("histLBrel.json");
dump_bh(file7, histLBrel);
file7.close();
std::ofstream file8("histLSrel.json");
dump_bh(file8, histLSrel);
file8.close();
std::ofstream file10("histELSrel.json");
dump_bh(file10, histELSrel);
std::ofstream file19("histLy2.json");
dump_bh(file19, histLy2);
file19.close();
std::ofstream file10("histLe2.json");
dump_bh(file10, histLe2);
file10.close();
std::ofstream file11("histLmu2.json");
dump_bh(file11, histLmu2);
file11.close();
std::ofstream file12("histLpi2.json");
dump_bh(file12, histLpi2);
file12.close();
std::ofstream file13("histLp2.json");
dump_bh(file13, histLp2);
file13.close();
std::ofstream file14("histLlog2.json");
dump_bh(file14, histLlog2);
file14.close();
/*std::ofstream file15("histBlog2.json");
dump_bh(file15, histBlog2);
file15.close();
std::ofstream file16("histSlog2.json");
dump_bh(file16, histSlog2);
std::ofstream file17("histLlog2int.json");
dump_bh(file17, histLlog2int);
file17.close();
std::ofstream file18("histLlog2dec.json");
dump_bh(file18, histLlog2dec);
file18.close();
std::ofstream file20("histLlog2mag.json");
dump_bh(file20, histLlog2mag);
file20.close();
std::ofstream file21("histLlog2geo.json");
dump_bh(file21, histLlog2geo);
file21.close();
std::ofstream file22("histLlog2max.json");
dump_bh(file22, histLlog2max);
file22.close();
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
std::ofstream filepi1("histLpi2int.json");
dump_bh(filepi1, histLpi2int);
filepi1.close();
std::ofstream filepi2("histLpi2dec.json");
dump_bh(filepi2, histLpi2dec);
filepi2.close();
std::ofstream filepi3("histLpi2mag.json");
dump_bh(filepi3, histLpi2mag);
filepi3.close();
std::ofstream filepi4("histLpi2geo.json");
dump_bh(filepi4, histLpi2geo);
filepi4.close();
std::ofstream filepi5("histLpi2max.json");
dump_bh(filepi5, histLpi2max);
filepi5.close();
std::ofstream filemu1("histLmu2int.json");
dump_bh(filemu1, histLmu2int);
filemu1.close();
std::ofstream filemu2("histLmu2dec.json");
dump_bh(filemu2, histLmu2dec);
filemu2.close();
std::ofstream filemu3("histLmu2mag.json");
dump_bh(filemu3, histLmu2mag);
filemu3.close();
std::ofstream filemu4("histLmu2geo.json");
dump_bh(filemu4, histLmu2geo);
filemu4.close();
std::ofstream filemu5("histLmu2max.json");
dump_bh(filemu5, histLmu2max);
};
/**
* set the nodes for all particles on the stack according to their numerical
* position
*/
void SetNodes() {
std::for_each(fStack.begin(), fStack.end(), [&](auto& p) {
auto const* numericalNode =
fEnvironment.GetUniverse()->GetContainingNode(p.GetPosition());
p.SetNode(numericalNode);
});
}
/**
* The Run function is the main simulation loop, which processes
* particles from the Stack until the Stack is empty.
*/
ralfulrich
committed
while (!stack_.IsEmpty()) {
while (!stack_.IsEmpty()) {
C8LOG_TRACE("Stack: {}", stack_.as_string());
count_++;
ralfulrich
committed
auto pNext = stack_.GetNextParticle();
C8LOG_DEBUG(
"============== next particle : count={}, pid={}, "
", stack entries={}"
", stack deleted={}",
ralfulrich
committed
count_, pNext.GetPID(), stack_.getEntries(), stack_.getDeleted());
ralfulrich
committed
Step(pNext);
ralfulrich
committed
process_sequence_.DoStack(stack_);
}
// do cascade equations, which can put new particles on Stack,
// thus, the double loop
/**
* Force an interaction of the top particle of the stack at its current position.
* Note that SetNodes() or an equivalent procedure needs to be called first if you
* want to call forceInteraction() for the primary interaction.
*/
void forceInteraction() {
ralfulrich
committed
auto vParticle = stack_.GetNextParticle();
TStackView secondaries(vParticle);
ralfulrich
committed
interaction(secondaries);
process_sequence_.DoSecondaries(secondaries);
vParticle.Delete(); // primary particle has interacted and is gone
/**
* The Step function is executed for each particle from the
* stack. It will calcualte geometric transport of the particles,
* and apply continuous and stochastic processes to it, which may
* lead to energy losses, scattering, absorption, decays and the
* production of secondary particles.
*
* New particles produced in one step are subject to further
* processing, e.g. thinning, etc.
*/
ralfulrich
committed
auto [step, geomMaxLength, nextVol] = tracking_.GetTrack(vParticle);
[[maybe_unused]] auto const& dummy_nextVol = nextVol;
// determine combined total interaction length (inverse)
ralfulrich
committed
process_sequence_.GetInverseInteractionLength(vParticle);
corsika::random::ExponentialDistribution expDist(1 / total_inv_lambda);
ralfulrich
committed
GrammageType const next_interact = expDist(rng_);
C8LOG_DEBUG(
"total_lambda={} g/cm2, "
", next_interact={} g/cm2",
double((1. / total_inv_lambda) / 1_g * 1_cm * 1_cm),
double(next_interact / 1_g * 1_cm * 1_cm));
auto const* currentLogicalNode = vParticle.GetNode();
// assert that particle stays outside void Universe if it has no
// model properties set
ralfulrich
committed
assert(currentLogicalNode != &*environment_.GetUniverse() ||
environment_.GetUniverse()->HasModelProperties());
// determine combined total inverse decay time
ralfulrich
committed
process_sequence_.GetInverseLifetime(vParticle);
corsika::random::ExponentialDistribution expDistDecay(1 / total_inv_lifetime);
ralfulrich
committed
TimeType const next_decay = expDistDecay(rng_);
C8LOG_DEBUG(
"total_lifetime={} s"
", next_decay={} s",
(1 / total_inv_lifetime) / 1_s, next_decay / 1_s);
// convert next_decay from time to length [m]
LengthType const distance_decay = next_decay * vParticle.GetMomentum().norm() /
vParticle.GetEnergy() * units::constants::c;
auto [step, geomMaxLength, magMaxLength, nextVol] = fTracking.GetTrack(vParticle);
// convert next_step from grammage to length
LengthType const distance_interact =
currentLogicalNode->GetModelProperties().ArclengthFromGrammage(step,
LengthType const distance_max = fProcessSequence.MaxStepLength(vParticle, stepWithoutB);
C8LOG_DEBUG("distance_max={} m", distance_max / 1_m);
{distance_interact, distance_decay, distance_max, geomMaxLength, magMaxLength});
C8LOG_DEBUG("transport particle by : {} m "
"Max Displacement after: {} m "
"Medium transition after: {} m "
"Decay after: {} m "
"Interaction after: {} m",
min_distance/1_m, magMaxLength/1_m, geomMaxLength/1_m, distance_decay/1_m, distance_interact/1_m);
// determine steplength for the magnetic field
// because Steplength should not be min_distance
/*
int chargeNumber;
if (corsika::particles::IsNucleus(vParticle.GetPID())) {
chargeNumber = vParticle.GetNuclearZ();
} else {
chargeNumber = corsika::particles::GetChargeNumber(vParticle.GetPID());
}
auto const* currentLogicalVolumeNode = vParticle.GetNode();
auto magneticfield = currentLogicalVolumeNode->GetModelProperties().GetMagneticField(vParticle.GetPosition());
geometry::Vector<dimensionless_d> const directionBefore = vParticle.GetMomentum().normalized();
auto c = directionBefore.cross(magneticfield) * chargeNumber * corsika::units::constants::c * 1_eV /
(vParticle.GetMomentum().norm() * 1_V)
LengthType Steplength = min_distance;
if (chargeNumber != 0) {
Steplength = sqrt(2 / c.squaredNorm() * (sqrt(c.squaredNorm() * min_distance * min_distance + 1) -1));
std::cout << "Steplength " << Steplength << std::endl;
auto [position, direction, L2] = fTracking.MagneticStep(vParticle, min_distance);
int pdg = static_cast<int>(particles::GetPDG(vParticle.GetPID()));
if (min_distance == distance_interact){
if (abs(pdg) == 13)
histLmu2int(L2);
if (abs(pdg) == 211 || abs(pdg) == 111)
histLpi2int(L2);
}
if (min_distance == distance_decay) {
if (abs(pdg) == 13)
histLmu2dec(L2);
if (abs(pdg) == 211 || abs(pdg) == 111)
histLpi2dec(L2);
}
if (min_distance == distance_max) {
if (abs(pdg) == 13)
histLmu2max(L2);
if (abs(pdg) == 211 || abs(pdg) == 111)
histLpi2max(L2);
}
if (min_distance == geomMaxLength) {
if (abs(pdg) == 13)
histLmu2geo(L2);
if (abs(pdg) == 211 || abs(pdg) == 111)
histLpi2geo(L2);
}
if (min_distance == magMaxLength) {
histLlog2mag(L2);
if (abs(pdg) == 13)
histLmu2mag(L2);
if (abs(pdg) == 211 || abs(pdg) == 111)
histLpi2mag(L2);
if (abs(pdg) == 11)
histLe2(L2);
if (abs(pdg) == 22)
histLy2(L2);
if (abs(pdg) == 211 || abs(pdg) == 111)
histLpi2(L2);
if (abs(pdg) == 2212 || abs(pdg) == 2112)
histLp2(L2);
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
int chargeNumber = 0;
if (corsika::particles::IsNucleus(vParticle.GetPID())) {
chargeNumber = vParticle.GetNuclearZ();
} else {
chargeNumber = corsika::particles::GetChargeNumber(vParticle.GetPID());
}
if(chargeNumber != 0) {
auto const* currentLogicalVolumeNode = vParticle.GetNode();
auto magneticfield = currentLogicalVolumeNode->GetModelProperties().GetMagneticField(vParticle.GetPosition());
geometry::Vector<SpeedType::dimension_type> velocity =
vParticle.GetMomentum() / vParticle.GetEnergy() * corsika::units::constants::c;
geometry::Vector<SpeedType::dimension_type> const velocityVerticalMag = velocity -
velocity.parallelProjectionOnto(magneticfield);
LengthType const gyroradius = vParticle.GetEnergy() * velocityVerticalMag.GetNorm() * 1_V /
(corsika::units::constants::cSquared * abs(chargeNumber) *
magneticfield.GetNorm() * 1_eV);
stepradius = stepradius + min_distance/gyroradius;
N ++;
if (abs(pdg) == 13) {
stepradiusmu += min_distance/gyroradius;
Nmu ++;
}
if (abs(pdg) == 211 || abs(pdg) == 111) {
stepradiuspi += min_distance/gyroradius;
Npi ++;
}
if (abs(pdg) == 2212 || abs(pdg) == 2112) {
stepradiusp += min_distance/gyroradius;
Np ++;
}
}
auto distance = position - vParticle.GetPosition();
//could also be done in MagneticStep
geometry::Vector<SpeedType::dimension_type> velocity =
vParticle.GetMomentum() / vParticle.GetEnergy() * corsika::units::constants::c;
if (distance.norm() != 0_m) {
velocity = distance.normalized() * velocity.norm();
}
geometry::Line line(vParticle.GetPosition(), velocity);
geometry::Trajectory<geometry::Line> stepNew(line, distance.norm() / line.GetV0().norm());
// here the particle is actually moved along the trajectory to new position:
// std::visit(setup::ParticleUpdate<Particle>{vParticle}, step);
vParticle.SetMomentum(direction * vParticle.GetMomentum().norm());
vParticle.SetTime(vParticle.GetTime() + distance.norm() / velocity.norm());
std::cout << "New Position: " << vParticle.GetPosition().GetCoordinates() << std::endl;
// apply all continuous processes on particle + track
process::EProcessReturn status = fProcessSequence.DoContinuous(vParticle, stepNew);
if (status == process::EProcessReturn::eParticleAbsorbed) {
C8LOG_DEBUG("Cascade: delete absorbed particle PID={} E={} GeV",
vParticle.GetPID(), vParticle.GetEnergy() / 1_GeV);
if (!vParticle.isDeleted()) vParticle.Delete();
C8LOG_DEBUG("sth. happening before geometric limit ? {}",
((min_distance < geomMaxLength) ? "yes" : "no"));
if (min_distance < geomMaxLength) { // interaction to happen within geometric limit
// check whether decay or interaction limits this step the
// outcome of decay or interaction MAY be a) new particles in
// secondaries, b) the projectile particle deleted (or
// changed)
TStackView secondaries(vParticle);
if (min_distance != distance_max && min_distance != magMaxLength) {
/*
Create SecondaryView object on Stack. The data container
remains untouched and identical, and 'projectil' is identical
to 'vParticle' above this line. However,
projectil.AddSecondaries populate the SecondaryView, which can
then be used afterwards for further processing. Thus: it is
important to use projectle/view (and not vParticle) for Interaction,
and Decay!
*/
[[maybe_unused]] auto projectile = secondaries.GetProjectile();
if (min_distance == distance_interact) {
ralfulrich
committed
interaction(secondaries);
} else {
assert(min_distance == distance_decay);
ralfulrich
committed
decay(secondaries);
// make sure particle actually did decay if it should have done so
if (secondaries.getSize() == 1 &&
throw std::runtime_error(
fmt::format("Cascade: {} decayed into itself!",
particles::GetName(projectile.GetPID())));
ralfulrich
committed
process_sequence_.DoSecondaries(secondaries);
// no extra physics happens here. just proceed to next step.
[[maybe_unused]] auto const assertion = [&] {
auto const* numericalNodeAfterStep =
ralfulrich
committed
environment_.GetUniverse()->GetContainingNode(vParticle.GetPosition());
C8LOG_TRACE("Geometry check: numericalNodeAfterStep={} currentLogicalNode={}",
fmt::ptr(numericalNodeAfterStep), fmt::ptr(currentLogicalNode));
return numericalNodeAfterStep == currentLogicalNode;
};
assert(assertion()); // numerical and logical nodes don't match
} else { // boundary crossing, step is limited by volume boundary
vParticle.SetNode(nextVol);
/*
DoBoundary may delete the particle (or not)
ralfulrich
committed
caveat: any changes to vParticle, or even the production
of new secondaries is currently not passed to ParticleCut,
thus, particles outside the desired phase space may be produced.
ralfulrich
committed
todo: this must be fixed.
*/
ralfulrich
committed
process_sequence_.DoBoundaryCrossing(vParticle, *currentLogicalNode, *nextVol);
ralfulrich
committed
process::EProcessReturn decay(TStackView& view) {
units::si::InverseTimeType const actual_decay_time =
ralfulrich
committed
process_sequence_.GetInverseLifetime(view.parent());
random::UniformRealDistribution<units::si::InverseTimeType> uniDist(
actual_decay_time);
ralfulrich
committed
const auto sample_process = uniDist(rng_);
auto const returnCode = process_sequence_.SelectDecay(view, sample_process);
if (returnCode != process::EProcessReturn::eDecayed) {
C8LOG_WARN("Particle did not decay!");
}
SetEventType(view, history::EventType::Decay);
ralfulrich
committed
process::EProcessReturn interaction(TStackView& view) {
units::si::InverseGrammageType const current_inv_length =
ralfulrich
committed
process_sequence_.GetInverseInteractionLength(view.parent());
random::UniformRealDistribution<units::si::InverseGrammageType> uniDist(
current_inv_length);
ralfulrich
committed
const auto sample_process = uniDist(rng_);
auto const returnCode = process_sequence_.SelectInteraction(view, sample_process);
if (returnCode != process::EProcessReturn::eInteracted) {
C8LOG_WARN("Particle did not interace!");
}
SetEventType(view, history::EventType::Interaction);
return returnCode;
}
/**
* set the nodes for all particles on the stack according to their numerical
* position
*/
void setNodes() {
std::for_each(stack_.begin(), stack_.end(), [&](auto& p) {
auto const* numericalNode =
environment_.GetUniverse()->GetContainingNode(p.GetPosition());
p.SetNode(numericalNode);
});
}
void SetEventType(TStackView& view, [[maybe_unused]] history::EventType eventType) {
if constexpr (TStackView::has_event) {
for (auto&& sec : view) { sec.GetEvent()->setEventType(eventType); }
// but this here temporarily. Should go into dedicated file later:
const char* c8_ascii_ =
R"V0G0N(
,ad8888ba, ,ad8888ba, 88888888ba ad88888ba 88 88 a8P db ad88888ba
d8"' `"8b d8"' `"8b 88 "8b d8" "8b 88 88 ,88' d88b d8" "8b
d8' d8' `8b 88 ,8P Y8, 88 88 ,88" d8'`8b Y8a a8P
88 88 88 88aaaaaa8P' `Y8aaaaa, 88 88,d88' d8' `8b "Y8aaa8P"
88 88 88 88""""88' `"""""8b, 88 8888"88, d8YaaaaY8b ,d8"""8b,
Y8, Y8, ,8P 88 `8b `8b 88 88P Y8b d8""""""""8b d8" "8b
Y8a. .a8P Y8a. .a8P 88 `8b Y8a a8P 88 88 "88, d8' `8b Y8a a8P
`"Y8888Y"' `"Y8888Y"' 88 `8b "Y88888P" 88 88 Y8b d8' `8b "Y88888P"
)V0G0N";
} // namespace corsika::cascade