Possible bug in beam stack, quick check
Created by: moukaddam
In the case of the beam, the corresponding "Particle" class object members are set differently: 1- Particle::m_ThetaCM is indeed the initial energy before entering the target 2- Particle::m_T is the final energy just before interaction in the target However I have found the following snippet the ParticleStack Class
void ParticleStack::AddBeamParticleToStack(Particle& particle){
// If the particle is the first one to be added, then the IC are cleared
if(m_First)
m_InitialConditions->Clear();
m_ParticleStack.push_back(particle);
// Incident beam parameter
m_InitialConditions-> SetIncidentParticleName (particle.GetParticleDefinition()->GetParticleName());
//m_InitialConditions-> SetIncidentInitialKineticEnergy (particle. GetParticleThetaCM());
m_InitialConditions-> SetIncidentInitialKineticEnergy (particle. GetParticleKineticEnergy());
Hence, if I want to fix the code above I would use:
void ParticleStack::AddBeamParticleToStack(Particle& particle){
(...)
// Incident beam parameter
(idem)
m_InitialConditions-> SetIncidentInitialKineticEnergy (particle. GetParticleThetaCM()); //<<<<<<
(idem)
Is this done on purpose? This is now fixed and pushed, please advise in case I need to retract