DirectAccess-like to carbon ions de/dx with Geant4-DNA physics

Greetings everyone,

I’m struggling with following lines:

  G4DNAGenericIonsManager* genericIonsManager
      = G4DNAGenericIonsManager::Instance();
  auto *part = genericIonsManager->GetIon("carbon");
  G4ParticleTable* partTable = G4ParticleTable::GetParticleTable();
  partTable->SetReadiness();
  auto mod = new G4DNARuddIonisationExtendedModel();
  mod->SelectStationary(true);
  mod->SetHighEnergyLimit(10 * GeV);
  mod->Initialise(part, cuts);
  G4cout << mod->ComputeDEDXPerVolume(material, part, 567 * MeV, 10 * 76 * eV) / (keV / um);

within TestEm0 DirectAcess.cc example, it falls with the following Fatal

-------- EEEE ------- G4Exception-START -------- EEEE -------

*** ExceptionHandler is not defined ***
*** G4Exception : G4DNAMolecularMaterial_WRONG_STATE_APPLICATION
      issued by : G4DNAMolecularMaterial::GetNumMolPerVolTableFor
The geant4 application is at the wrong state. State must be : G4State_Init.

*** Fatal Exception ***
-------- EEEE ------- G4Exception-END -------- EEEE -------


*** G4Exception: Aborting execution ***

Any suggestions how to used DNA models directly without invoking the whole other Geant4 initialization stuff?

Dear,

You can copy this model to your application and comment all G4DNAMolecularMaterial instance dependencies.

Hello,

DNA models are discrete - condense history approach is not applicable. So, no dEdx and not multiple scattering in DNA physics. All what you can do is to access to DNA cross section and perform numerical integration inside your application.

VI