From 8a75ba76dd316ea866537766592323b74c9fb10c Mon Sep 17 00:00:00 2001 From: adrien-matta <a.matta@surrey.ac.uk> Date: Sat, 13 Feb 2016 15:34:37 +0100 Subject: [PATCH] * Fixing issue when trying to decay a deuterium via particle decays --- NPSimulation/Core/EventGeneratorParticleDecay.cc | 3 +-- NPSimulation/Core/ParticleStack.cc | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/NPSimulation/Core/EventGeneratorParticleDecay.cc b/NPSimulation/Core/EventGeneratorParticleDecay.cc index 1c8991ade..e70080ef2 100644 --- a/NPSimulation/Core/EventGeneratorParticleDecay.cc +++ b/NPSimulation/Core/EventGeneratorParticleDecay.cc @@ -312,7 +312,6 @@ void EventGeneratorParticleDecay::GenerateEvent(G4Event*){ } } } - } @@ -352,7 +351,7 @@ void EventGeneratorParticleDecay::SetDecay(vector<string> DaughterName, vector<b int InitialMass = myNucleus->GetA() ; int FinalMass = 0 ; delete myNucleus; for (unsigned int i = 0 ; i< DaughterName.size(); i++) { - if(DaughterName[i] == "p" || DaughterName[i] == "proton" ){ + if(DaughterName[i] == "p" || DaughterName[i] == "proton" || DaughterName[i] == "1H"){ m_DaughterNuclei.push_back(G4ParticleTable::GetParticleTable()->FindParticle("proton")); FinalMass++;FinalCharge++; } diff --git a/NPSimulation/Core/ParticleStack.cc b/NPSimulation/Core/ParticleStack.cc index f2138e614..b93028c47 100644 --- a/NPSimulation/Core/ParticleStack.cc +++ b/NPSimulation/Core/ParticleStack.cc @@ -218,7 +218,7 @@ string ParticleStack::ChangeNameToG4Standard(string OriginalName){ // Special case for light particles string FinalName=Nucleid+NumberOfMass; if (FinalName=="H1") FinalName="proton"; - else if (FinalName=="H2") FinalName="deuteron"; +// else if (FinalName=="H2") FinalName="deuteron"; else if (FinalName=="H3") FinalName="triton"; else if (FinalName=="He4") FinalName="alpha"; else if (FinalName=="p") FinalName="proton"; -- GitLab