Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
nptool nptool
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • np
  • nptoolnptool
  • Issues
  • #46

Closed
Open
Created Oct 10, 2017 by Adrien Matta@matta☠Owner

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

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking