IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 293c168c authored by ralfulrich's avatar ralfulrich
Browse files

vertical shower

parent 69caa383
No related branches found
No related tags found
1 merge request!42Resolve "missing rotation between corsika stack and sibyll stack"
Pipeline #133 failed
...@@ -238,15 +238,15 @@ int main() { ...@@ -238,15 +238,15 @@ int main() {
setup::Stack stack; setup::Stack stack;
stack.Clear(); stack.Clear();
const hep::EnergyType E0 = 10_TeV; const hep::EnergyType E0 = 10_TeV;
double theta = 45.; double theta = 0.;
double phi = 20.; double phi = 0.;
{ {
auto particle = stack.NewParticle(); auto particle = stack.NewParticle();
particle.SetPID(Code::Proton); particle.SetPID(Code::Proton);
hep::MomentumType P0 = sqrt(E0 * E0 - Proton::GetMass() * Proton::GetMass()); hep::MomentumType P0 = sqrt(E0 * E0 - Proton::GetMass() * Proton::GetMass());
auto momentumComponents = [](double theta, double phi, MomentumType& ptot) { auto momentumComponents = [](double theta, double phi, MomentumType& ptot) {
return std::make_tuple(ptot * sin(theta) * cos(phi), ptot * sin(theta) * sin(phi), return std::make_tuple(ptot * sin(theta) * cos(phi), ptot * sin(theta) * sin(phi),
ptot * cos(theta)); -ptot * cos(theta));
}; };
auto const [px, py, pz] = auto const [px, py, pz] =
momentumComponents(theta / 180. * M_PI, phi / 180. * M_PI, P0); momentumComponents(theta / 180. * M_PI, phi / 180. * M_PI, P0);
...@@ -258,7 +258,6 @@ int main() { ...@@ -258,7 +258,6 @@ int main() {
particle.SetTime(0_ns); particle.SetTime(0_ns);
Point p(rootCS, 0_m, 0_m, 0_m); Point p(rootCS, 0_m, 0_m, 0_m);
particle.SetPosition(p); particle.SetPosition(p);
cout << particle.GetEnergy() / 1_GeV << endl;
} }
// define air shower object, run simulation // define air shower object, run simulation
......
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