IAP GITLAB

Skip to content
Snippets Groups Projects
Commit f8e82c66 authored by Felix Riehn's avatar Felix Riehn
Browse files

use nucleon mass for center-of-mass energy calculation

parent 8616e037
No related branches found
No related tags found
No related merge requests found
......@@ -226,7 +226,7 @@ int main() {
// setup particle stack, and add primary particle
setup::Stack stack;
stack.Clear();
const hep::EnergyType E0 = 1_TeV;
const hep::EnergyType E0 = 100_GeV;
{
auto particle = stack.NewParticle();
particle.SetPID(Code::Proton);
......
......@@ -64,8 +64,8 @@ namespace corsika::process::sibyll {
// FOR NOW: assume target is oxygen
const int kTarget = corsika::particles::Oxygen::GetNucleusA();
hep::EnergyType Etot =
p.GetEnergy() + kTarget * corsika::particles::Proton::GetMass();
const hep::MassType nucleon_mass = 0.5*(corsika::particles::Proton::GetMass()+corsika::particles::Neutron::GetMass());
hep::EnergyType Etot = p.GetEnergy() + nucleon_mass;
MomentumVector Ptot(rootCS, {0.0_GeV, 0.0_GeV, 0.0_GeV});
// FOR NOW: assume target is at rest
MomentumVector pTarget(rootCS, {0.0_GeV, 0.0_GeV, 0.0_GeV});
......@@ -146,7 +146,8 @@ namespace corsika::process::sibyll {
GetNucleusA(); // env.GetTargetParticle().GetPID();
// FOR NOW: target is always at rest
const EnergyType Etarget = 0_GeV + corsika::particles::Proton::GetMass();
const hep::MassType nucleon_mass = 0.5*(corsika::particles::Proton::GetMass()+corsika::particles::Neutron::GetMass());
const EnergyType Etarget = 0_GeV + nucleon_mass;
const auto pTarget = MomentumVector(rootCS, 0_GeV, 0_GeV, 0_GeV);
cout << "target momentum (GeV/c): " << pTarget.GetComponents() / 1_GeV << endl;
cout << "beam momentum (GeV/c): " << p.GetMomentum().GetComponents() / 1_GeV
......
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