Skip to content
Snippets Groups Projects
Commit 59db79b9 authored by Benoit's avatar Benoit
Browse files

GEF version list edited. Fragments set as the first two particles in InitialConditions.

parent cccc8b7f
No related branches found
No related tags found
1 merge request!27Draft: [Epic] Preparation of the environement for the new GaseousDetectorScorers...
...@@ -104,11 +104,11 @@ void EventGeneratorGEFReader::ReadConfiguration(NPL::InputParser parser){ ...@@ -104,11 +104,11 @@ void EventGeneratorGEFReader::ReadConfiguration(NPL::InputParser parser){
version_shift=0; version_shift=0;
version_ff_shift=0; version_ff_shift=0;
} }
else if(2023.31 <= it->m_GEFversion && it->m_GEFversion <= 2023.32) { else if(2023.31 <= it->m_GEFversion && it->m_GEFversion <= 2023.33) {
version_shift=1; version_shift=1;
version_ff_shift=0; version_ff_shift=0;
} }
else if(2023.33 <= it->m_GEFversion && it->m_GEFversion <= 2024.11){ else if(2024.11 <= it->m_GEFversion && it->m_GEFversion <= 2024.11){
version_shift=1; version_shift=1;
version_ff_shift=1; version_ff_shift=1;
} }
...@@ -500,33 +500,34 @@ void EventGeneratorGEFReader::GenerateEvent(G4Event*){ ...@@ -500,33 +500,34 @@ void EventGeneratorGEFReader::GenerateEvent(G4Event*){
z0 = RandGauss::shoot(par.m_z0,par.m_SigmaZ); z0 = RandGauss::shoot(par.m_z0,par.m_SigmaZ);
} }
for(int i_m=0;i_m<fileParticleMultiplicity;i_m++)
{
G4double theta = acos(CosThetaLab.at(i_m)) ;
G4double phi = PhiLab.at(i_m) ;
G4double particle_energy = ELab.at(i_m) ;
G4ParticleDefinition* GeneratedParticle = vParticle.at(i_m) ;
Momentum = ShootParticle(theta,phi,par.m_direction);
NPS::Particle particle(GeneratedParticle, theta,particle_energy,G4ThreeVector(Momentum.x(), Momentum.y(), Momentum.z()),G4ThreeVector(x0, y0, z0));
if(particle_energy<=20.0) // NeutronHP crashes for neutrons of higher energies. Need to use a different physics list.
m_ParticleStack->AddParticleToStack(particle);
}
if(AllowedParticles.size()==0 || std::find(AllowedParticles.begin(), AllowedParticles.end(), "fragments") != AllowedParticles.end()) if(AllowedParticles.size()==0 || std::find(AllowedParticles.begin(), AllowedParticles.end(), "fragments") != AllowedParticles.end())
for(int i_m=0;i_m<2;i_m++) for(int i_m=0;i_m<2;i_m++)
{
G4double theta = acos(cos_thetaFrag.at(i_m)) ;
G4double phi = PhiFrag.at(i_m) ;
G4double particle_energy = ELabFrag.at(i_m) ;
G4ParticleDefinition* GeneratedParticle = G4ParticleTable::GetParticleTable()->GetIonTable()->GetIon(ZFrag.at(i_m),AFrag.at(i_m),0.);
Momentum = ShootParticle(theta,phi,par.m_direction);
//cout << "particle_energy=" << particle_energy << endl;
NPS::Particle particle(GeneratedParticle, theta,particle_energy,G4ThreeVector(Momentum.x(), Momentum.y(), Momentum.z()),G4ThreeVector(x0, y0, z0));
m_ParticleStack->AddParticleToStack(particle);
}
for(int i_m=0;i_m<fileParticleMultiplicity;i_m++)
{ {
G4double theta = acos(cos_thetaFrag.at(i_m)) ; G4double theta = acos(CosThetaLab.at(i_m)) ;
G4double phi = PhiFrag.at(i_m) ; G4double phi = PhiLab.at(i_m) ;
G4double particle_energy = ELabFrag.at(i_m) ; G4double particle_energy = ELab.at(i_m) ;
G4ParticleDefinition* GeneratedParticle = G4ParticleTable::GetParticleTable()->GetIonTable()->GetIon(ZFrag.at(i_m),AFrag.at(i_m),0.); G4ParticleDefinition* GeneratedParticle = vParticle.at(i_m) ;
Momentum = ShootParticle(theta,phi,par.m_direction); Momentum = ShootParticle(theta,phi,par.m_direction);
//cout << "particle_energy=" << particle_energy << endl;
NPS::Particle particle(GeneratedParticle, theta,particle_energy,G4ThreeVector(Momentum.x(), Momentum.y(), Momentum.z()),G4ThreeVector(x0, y0, z0)); NPS::Particle particle(GeneratedParticle, theta,particle_energy,G4ThreeVector(Momentum.x(), Momentum.y(), Momentum.z()),G4ThreeVector(x0, y0, z0));
m_ParticleStack->AddParticleToStack(particle); if(particle_energy<=20.0) // NeutronHP crashes for neutrons of higher energies. Need to use a different physics list.
m_ParticleStack->AddParticleToStack(particle);
} }
if(m_isTwoBody){ if(m_isTwoBody){
G4double theta = Ejectile->GetImpulsion().Theta(); G4double theta = Ejectile->GetImpulsion().Theta();
G4double phi = Ejectile->GetImpulsion().Phi(); G4double phi = Ejectile->GetImpulsion().Phi();
......
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