Nice to meet u guys,
I used RE02 example to construct phantom with a repetitive structrue, and just pure tissue material inside it.
I tried to know how the neutron and photon flux are distributed inside this phantom hitting by 10keV neutron source, and also comparing it with result in MCNP with same geometry and same source.
However, I found that I need to use G4ThermalNeutrons library to get the answer that match with MCNP result.
But using this library made the whole simulation time much longer (about 2~3 times longer compute time)
Since I don’t need dose distribution by now, I tried to kill all the secondary(especially e-) except for neutron and photon with StackingAction(as below) to reduce the computational time:
StackingAction::ClassifyNewTrack(const G4Track* track)
if (track->GetParentID() == 0) return fUrgent; //Primaries
if (track->GetDefinition() == G4Neutron::Neutron()) return fUrgent;
if (track->GetDefinition() == G4Gamma::Gamma()) return fUrgent;
But this seems not having much help , total computational time didnt change much,
so i guess it’s because in this way we still have to check the table for sampling the energy and momentum of secondary electron, so what i want to know is: Can i just skip the step of sampling electron energy and tell Geant4 that whenever a electron producing process are encountered(such as Compton scatter or pair production), just directly dump that electron and don’t waste time on looking up the library?
My objective is to increase the computation efficiency and also maintain the correctness of simulation, so if there are any other ways to attain this, i’ll be also glad to know!
Hope someone can help me, thanks in advance!