Replacing dEdX tables : how to adapt code from 4.10.7 to 4.11.1

Hello,
I’m a beginner with Geant4, so I apologize if my question is trivial.
In my code, which works fine in Geant4.10.7, I replace the dEdX table by default (ICRU73) in the following way :

for the ionIoni G4VProcess :
G4VEmModel * enmod ;
while((enmod = pIon->EmModel(i)) != (G4VEmModel *)0)
{
G4cout << "\t\t MAIN()::EM interaction LE model: " << enmod->GetName() << G4endl;
if(enmod->GetName() == “ParamICRU73”)
{
G4IonParametrisedLossModel * icru = (G4IonParametrisedLossModel *)enmod ;
G4DataVector cuts ;
icru->Initialise(particle,cuts) ; //particle is a G4ParticleDefinition “GenericIon”
icru->RemoveDEDXTable(“ICRU73”) ;
icru->AddDEDXTable(“myTable”, new G4IonStoppingData(“ion_stopping_data/myTab”,false), new G4IonDEDXScalingICRU73(93,102)) ;
}
}

In the 4.11.1 version I saw that enmod->GetName() returns “LindhardSorensen”, so I replaced “ParamICRU73” with “LindhardSorensen”, which works fine. However, I get a segmentation fault when trying to remove the DEDX table (icru->RemoveDEDXTable(“ICRU73”) ; ). I thought the name “ICRU73” changed, but how can I get the new name? Also in the G4EMLOW8.2/ion_stopping_dat repository, the available data are icru73 and icru90 and I thought the LindhardSorensen model also used icru73. Did the name change?

If it’s needed : I use the G4EmStandardPhysics_option4 physics list.

Thank you in advance
Best regards
Paola

PS I’ve posted this question in the [Physics Processes, Models and Cross Sections] section, but maybe it’s not the right place for it. In this case I apologize

1 Like

Sorry, I reply to previous you mention. This one should be closed as duplicated.