Help modifying CRY physics list to work with Geant4 10.05

Hi All,

I am trying to use the Cosmic Ray Library (CRY) with Geant4 10.05, but the physics lists included uses now out of date classes for neutron processes.

I tried to modify this but I have some crashes, I am wondering if anyone has any advice on the correct way to do this.

Original CRY physics list :

else if (particleName == “neutron”) {
// elastic scattering
G4HadronElasticProcess* theElasticProcess =
new G4HadronElasticProcess;
G4LElastic* theElasticModel = new G4LElastic;
theElasticProcess->RegisterMe(theElasticModel);
pmanager->AddDiscreteProcess(theElasticProcess);
// inelastic scattering
G4NeutronInelasticProcess* theInelasticProcess =
new G4NeutronInelasticProcess(“inelastic”);
G4LENeutronInelastic* theInelasticModel = new G4LENeutronInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
// capture
G4HadronCaptureProcess* theCaptureProcess =
new G4HadronCaptureProcess;
G4LCapture* theCaptureModel = new G4LCapture;
theCaptureProcess->RegisterMe(theCaptureModel);
pmanager->AddDiscreteProcess(theCaptureProcess);
// fission
G4HadronFissionProcess* theFissionProcess =
new G4HadronFissionProcess;
G4LFission* theFissionModel = new G4LFission;
theFissionProcess->RegisterMe(theFissionModel);
pmanager->AddDiscreteProcess(theFissionProcess);
}

My Updated version :

else if (particleName == “neutron”) {
// elastic scattering
G4HadronElasticProcess* theElasticProcess =
new G4HadronElasticProcess;
G4HadronElastic* theElasticModel = new G4HadronElastic;
theElasticProcess->RegisterMe(theElasticModel);
pmanager->AddDiscreteProcess(theElasticProcess);
// inelastic scattering
G4NeutronInelasticProcess* theInelasticProcess =
new G4NeutronInelasticProcess(“inelastic”);
G4NeutronHPInelastic* theInelasticModel = new G4NeutronHPInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
// capture
G4HadronCaptureProcess* theCaptureProcess =
new G4HadronCaptureProcess;
G4NeutronRadCapture* theCaptureModel = new G4NeutronRadCapture;
theCaptureProcess->RegisterMe(theCaptureModel);
pmanager->AddDiscreteProcess(theCaptureProcess);
// fission
G4HadronFissionProcess* theFissionProcess =
new G4HadronFissionProcess;
G4LFission* theFissionModel = new G4LFission;
theFissionProcess->RegisterMe(theFissionModel);
pmanager->AddDiscreteProcess(theFissionProcess);
}

My crash :

Event=49 CRY generated nparticles=1
neutron charge=0 energy (MeV)=283.2 pos (m)(31.4,3.739,0) direction cosines (0.7121,0.3216,-0.6241)
G4EnergyRangeManager:GetHadronicInteraction: counter=1, Ek=283.214, Material = G4_AIR, Element = O
0 low=0, high=20
In /home/barn_sa/Geant4/geant4.10.05/source/processes/hadronic/management/src/G4EnergyRangeManager.cc, line 128:
===> GetHadronicInteraction: No Model found

Thanks :slight_smile:

Sarah