Region specific DNA physics for protons

_Geant4 Version:_11.4.2

Hi all,

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!