Skip to content
Snippets Groups Projects
Commit c33e3df6 authored by Robert  Shearman's avatar Robert Shearman
Browse files

*Adding support for beam excitation energy

 - optional token, keeping retrocompatibility
 - allow to use "beam" at rest as source for gamma cascade
parent 96ab2bcd
No related branches found
No related tags found
No related merge requests found
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Beam Beam
Particle= 24Na Particle= 24Na
ExcitationEnergy= 0
Energy= 192 Energy= 192
SigmaEnergy= 1 SigmaEnergy= 1
SigmaThetaX= 0.01 SigmaThetaX= 0.01
......
...@@ -82,6 +82,7 @@ Beam::Beam(){ ...@@ -82,6 +82,7 @@ Beam::Beam(){
Beam::Beam(string isotope){ Beam::Beam(string isotope){
SetUp(isotope); SetUp(isotope);
fEnergy = 0; fEnergy = 0;
fExcitationEnergy = 0;
fSigmaEnergy = -1 ; fSigmaEnergy = -1 ;
fMeanX = 0 ; fMeanX = 0 ;
fMeanY = 0 ; fMeanY = 0 ;
...@@ -183,6 +184,12 @@ void Beam::ReadConfigurationFile(string Path){ ...@@ -183,6 +184,12 @@ void Beam::ReadConfigurationFile(string Path){
if(fVerboseLevel==1) cout << "Beam Particle: " << GetName() << endl; if(fVerboseLevel==1) cout << "Beam Particle: " << GetName() << endl;
} }
else if (DataBuffer == "ExcitationEnergy=") {
ReactionFile >> DataBuffer;
fExcitationEnergy = atof(DataBuffer.c_str()) * MeV;
if(fVerboseLevel==1) cout << "Excitation Energy: " << fExcitationEnergy << " MeV" << endl;
}
else if (DataBuffer == "Energy=") { else if (DataBuffer == "Energy=") {
check_Energy = true ; check_Energy = true ;
ReactionFile >> DataBuffer; ReactionFile >> DataBuffer;
......
...@@ -57,6 +57,7 @@ namespace NPL{ ...@@ -57,6 +57,7 @@ namespace NPL{
private: private:
//Nucleus* fBeamNucleus; //Nucleus* fBeamNucleus;
double fEnergy; double fEnergy;
double fExcitationEnergy;
double fSigmaEnergy; double fSigmaEnergy;
double fMeanX; double fMeanX;
double fMeanY; double fMeanY;
...@@ -94,6 +95,7 @@ namespace NPL{ ...@@ -94,6 +95,7 @@ namespace NPL{
// Get // Get
// Nucleus* GetNucleus () const {return fBeamNucleus;} // Nucleus* GetNucleus () const {return fBeamNucleus;}
double GetEnergy () const {return fEnergy;} double GetEnergy () const {return fEnergy;}
double GetExcitationEnergy() const {return fExcitationEnergy;}
double GetSigmaEnergy () const {return fSigmaEnergy;} double GetSigmaEnergy () const {return fSigmaEnergy;}
double GetMeanX () const {return fMeanX;} double GetMeanX () const {return fMeanX;}
double GetMeanY () const {return fMeanY;} double GetMeanY () const {return fMeanY;}
......
...@@ -75,7 +75,7 @@ void EventGeneratorBeam::GenerateEvent(G4Event* anEvent){ ...@@ -75,7 +75,7 @@ void EventGeneratorBeam::GenerateEvent(G4Event* anEvent){
if( anEvent->GetEventID()==0){ if( anEvent->GetEventID()==0){
// Define the particle to be shoot // Define the particle to be shoot
m_particle = G4ParticleTable::GetParticleTable()->GetIon(m_Beam->GetZ(), m_Beam->GetA() , 0.); m_particle = G4ParticleTable::GetParticleTable()->GetIon(m_Beam->GetZ(), m_Beam->GetA() ,m_Beam->GetExcitationEnergy());
} }
/////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////
......
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