Please fill out the following information to help in answering your question, and also see tips for posting code snippets. If you don’t provide this information it will take more time to help with your problem!
Geant4 Version: 11.0.4
_Operating System:_unix
Compiler/Version:
CMake Version:
Hi, I am fairly new to geant4. I am trying to run a scintillation simulation. But it takes a lot of time. i have never been able to go beyond run/beamOn 100.
My geometry structure is like this:
LAB LS inside a cylindrical stainless steel tank with acrylic plates at the top and bottom of the cylinder. (I have included reflection for primary photons, maybe they are increasing the run time, since the volume is small so there may be many reflections)
My PhysicsList :
G4VModularPhysicsList* physicsList = new FTFP_BERT;
physicsList->ReplacePhysics(new G4EmStandardPhysics_option4());
G4OpticalPhysics* opticalPhysics = new G4OpticalPhysics();
auto opticalParams = G4OpticalParameters::Instance();
// Add optical property
opticalParams->SetProcessActivation("Scintillation", true);
opticalParams->SetProcessActivation("Cerenkov", false);
opticalParams->SetScintTrackSecondariesFirst(true);
opticalParams->SetScintVerboseLevel(0);
physicsList->RegisterPhysics(opticalPhysics);
My primary generator is 2.6MeV gamma:
PrimaryGeneratorAction::PrimaryGeneratorAction()
: G4VUserPrimaryGeneratorAction()
, fParticleGun(nullptr)
{
G4int n_particle = 1;
fParticleGun = new G4ParticleGun(n_particle);
G4ParticleTable* particleTable = G4ParticleTable::GetParticleTable();
G4ParticleDefinition* particle = particleTable->FindParticle("gamma");
fParticleGun->SetParticleDefinition(particle);
fParticleGun->SetParticleEnergy(2.6*MeV);
fParticleGun->SetParticleMomentumDirection(G4ThreeVector(1., 1., 1.));
fParticleGun->SetParticlePosition(G4ThreeVector(0.*cm, 0.*cm, 0.*cm));
}
LS properties:
std::vector<G4double> energyls = {2.385*eV, 2.480*eV, 2.756*eV, 3.100*eV, 3.351*eV, 3.444*eV, 3.543*eV, 3.875*eV};
std::vector<G4double> rindexls = {1.497, 1.499, 1.504, 1.508, 1.514, 1.517, 1.520, 1.526};
std::vector<G4double> absorptionls = {21630*mm, 15965*mm, 15965*mm, 12875*mm, 6180*mm, 3562*mm, 2060*mm, 824*mm};
std::vector<G4double> scint = {0.0, 0.111, 0.278, 0.556, 0.889, 1.000, 0.833, 0.0};
G4MaterialPropertiesTable* LSMPT = new G4MaterialPropertiesTable();
LSMPT->AddProperty("RINDEX", energyls, rindexls);
LSMPT->AddProperty("ABSLENGTH", energyls, absorptionls);
LSMPT->AddProperty("SCINTILLATIONCOMPONENT1", energyls, scint);
LSMPT->AddConstProperty("SCINTILLATIONYIELD", 500. /MeV);
LSMPT->AddConstProperty("RESOLUTIONSCALE", 1);
LSMPT->AddConstProperty("SCINTILLATIONTIMECONSTANT1", 5.991 * ns);
LSMPT->AddConstProperty("SCINTILLATIONTIMECONSTANT2", 33.12 * ns);
LS->GetIonisation()->SetBirksConstant(0.15 * mm / MeV); //birk's constant
LS->SetMaterialPropertiesTable(LSMPT);
I want to check how many photons are produced in scintillation and how many of them are absorbed in the boundary. I need a good amount of runs to see how the pattern is. But it takes a long time to do that. My question is if optical photon simulations are supposed to take a very long time to run. I also tried to run LXe example, it has run/beamOn 10000. It was also very slow. I could not complete it and after 3 hours I terminated it. I am running it on my lab’s server.