{"action":"opened","issue":{"url":"https://api.github.com/repos/adrien-matta/nptool/issues/46","repository_url":"https://api.github.com/repos/adrien-matta/nptool","labels_url":"https://api.github.com/repos/adrien-matta/nptool/issues/46/labels{/name}","comments_url":"https://api.github.com/repos/adrien-matta/nptool/issues/46/comments","events_url":"https://api.github.com/repos/adrien-matta/nptool/issues/46/events","html_url":"https://github.com/adrien-matta/nptool/issues/46","id":264305015,"number":46,"title":"Possible bug in beam stack, quick check ","user":{"login":"moukaddam","id":5272621,"avatar_url":"https://avatars1.githubusercontent.com/u/5272621?v=4","gravatar_id":"","url":"https://api.github.com/users/moukaddam","html_url":"https://github.com/moukaddam","followers_url":"https://api.github.com/users/moukaddam/followers","following_url":"https://api.github.com/users/moukaddam/following{/other_user}","gists_url":"https://api.github.com/users/moukaddam/gists{/gist_id}","starred_url":"https://api.github.com/users/moukaddam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moukaddam/subscriptions","organizations_url":"https://api.github.com/users/moukaddam/orgs","repos_url":"https://api.github.com/users/moukaddam/repos","events_url":"https://api.github.com/users/moukaddam/events{/privacy}","received_events_url":"https://api.github.com/users/moukaddam/received_events","type":"User","site_admin":false},"labels":[{"id":59046741,"url":"https://api.github.com/repos/adrien-matta/nptool/labels/bug","name":"bug","color":"fc2929","default":true},{"id":59046745,"url":"https://api.github.com/repos/adrien-matta/nptool/labels/question","name":"question","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-10-10T17:06:07Z","updated_at":"2017-10-10T17:06:07Z","closed_at":null,"author_association":"COLLABORATOR","body":"In the case of the **beam**, the corresponding \"Particle\" class object members are set differently:\r\n1-  Particle::m_ThetaCM is indeed the initial energy before entering the target\r\n2-  Particle::m_T is the final energy just before interaction in the target\r\nHowever I have found the following snippet the ParticleStack Class\r\n```\r\nvoid ParticleStack::AddBeamParticleToStack(Particle& particle){\r\n    // If the particle is the first one to be added, then the IC are cleared\r\n    if(m_First)\r\n        m_InitialConditions->Clear();\r\n    \r\n    m_ParticleStack.push_back(particle);\r\n    // Incident beam parameter\r\n    m_InitialConditions-> SetIncidentParticleName   (particle.GetParticleDefinition()->GetParticleName());\r\n    //m_InitialConditions-> SetIncidentInitialKineticEnergy  (particle. GetParticleThetaCM());\r\n    m_InitialConditions-> SetIncidentInitialKineticEnergy  (particle. GetParticleKineticEnergy());\r\n```\r\n\r\nHence, if I want to fix the code above I would use:\r\n```\r\nvoid ParticleStack::AddBeamParticleToStack(Particle& particle){\r\n(...)\r\n    // Incident beam parameter\r\n    (idem)\r\n    m_InitialConditions-> SetIncidentInitialKineticEnergy  (particle. GetParticleThetaCM());  //<<<<<<\r\n    (idem) \r\n```\r\n Is this done on purpose?\r\nThis is now fixed and pushed, please advise in case I need to retract  \r\n"}}
{"actor":{"display_login":"moukaddam"}}