I’m trying to write a physics list to use DNA-processes in specific regions similar to the AuNP example.
examples/extended/medical/dna/AuNP
AuNP provided a working example for the electrons, however when I try to extend it to protons I get the following error
-------- EEEE ------- G4Exception-START -------- EEEE -------
*** G4Exception : glob03
issued by : G4PhysicsLogVector::G4PhysicsLogVector()
G4PhysicsLogVector with wrong parameters: theNbin= 2 Emin= 1000 Emax= 1000Nbins should be > 1 and Emax > Emin > 0
*** Fatal Exception *** core dump ***
**** Track information is not available at this moment
**** Step information is not available at this moment
-------- EEEE -------- G4Exception-END --------- EEEE -------
*** G4Exception: Aborting execution ***
Aborted
and I’ve traced it down to attempting to register a DummyModel() to G4hIonisation:
// --- --- Global dummy model registration --- ---
const auto hIoni = new G4hIonisation("proton_G4LivermoreIoni");
hIoni->SetEmModel(new G4DummyModel(), 1);
pm->AddDiscreteProcess(hIoni);
The corresponding section for electrons (G4eIonisation) works fine, and is used in the example. From looking at the source code, my initial guess is the hioni process hardcodes two models and that is causing an issue somewhere, but I cant seem to identify where or why that would cause a crash.
I’m hoping someone can help suggest some ways to either debug or circumvent this. Thank you!
At this time I’ve been able to get around the issue by globally registering the standard em processes and assigning global dummy models to the DNA processes and then inactivating the standard em and activating the DNA models in a specific region (whereas the example does this vice-versa) and initial runs finish uninterrupted and seem to show the correct, region-specific processes. I’d be happy to learn if this is a viable method. Thank you!
This scheme is intended for assigning different physics models to different regions. However, I assume that G4hIonisation is used in all regions, correct? In that case, there is no need for region-specific registration. You can simply register the model in the usual way in a standard Geant4 physics list.
Thank you for taking the time to respond, @dsakata. I am not including G4hIonisation in all regions. My justification comes from looking at G4EMDNAPhysics_option2 where I believe it is only active for protons above 300MeV (emaxIonDNA from G4EmDNAPhysics_option2.cc).
I’m trying to extend AuNP to include DNA processes for protons, alphas, and generic ions in the vicinity of a nanoparticle. To speed up computational time, I only want DNA processes active in a thin layer, and standard EM physics elsewhere. This requires region specific models for G4hIonisation and G4hMultipleScattering.
It is a bit hard for me to imagine what you would like to simulate. If you would irradiate the protons from the surface of the NP and just transport inside of the NP, you can define the G4hIonisation everywhere and kill the protons when they are leaving from the NP. You can see how to do it in the SteppingAction class in the example.
Sorry, I should’ve been more specific. I’m trying to build a simulation to provide the dose enhancement in the vicinity of the nanoparticle from various beam types. I wanted to use track structure models for all charged particles near the nanoparticle and standard (livermore) inside the NP, as well as far away from the NP. I was using AuNP for the region specific physics, not necessarily to run the same simulation.
I’ve attached a version that results in the exception (PhysicsList_hIoniCrash.cc) and one one where I resolved the issue by assigning global dummy models to the dna processes, rather than the standard processes (PhysicsList_NoCrash.cc).
I think you also modified the header file. Could you send it?
I suggest you, that modify the file little by little. For instance, please try to modify for DNA-elastic and msc only. Otherwise it is hard to find the problem.
Apologies, here is an edited version of the existing AuNP/src/PhysicsList.cc. This should be able to be compiled and ran with the existing example. The only change is to the proton processes and include files.