diff --git a/SimG4Core/CustomPhysics/interface/CMSSIMPInelasticXS.h b/SimG4Core/CustomPhysics/interface/CMSSIMPInelasticXS.h index b979d0ced2700..9dfa38287b386 100644 --- a/SimG4Core/CustomPhysics/interface/CMSSIMPInelasticXS.h +++ b/SimG4Core/CustomPhysics/interface/CMSSIMPInelasticXS.h @@ -25,8 +25,6 @@ class CMSSIMPInelasticXS : public G4VCrossSectionDataSet { const G4Element* elm, const G4Material* mat) override; - G4Isotope* SelectIsotope(const G4Element*, G4double kinEnergy) override; - void BuildPhysicsTable(const G4ParticleDefinition&) override; private: diff --git a/SimG4Core/CustomPhysics/src/CMSSIMPInelasticProcess.cc b/SimG4Core/CustomPhysics/src/CMSSIMPInelasticProcess.cc index 769819b9c8b9a..37e473aa756c0 100644 --- a/SimG4Core/CustomPhysics/src/CMSSIMPInelasticProcess.cc +++ b/SimG4Core/CustomPhysics/src/CMSSIMPInelasticProcess.cc @@ -52,8 +52,8 @@ G4VParticleChange* CMSSIMPInelasticProcess::PostStepDoIt(const G4Track& aTrack, aParticle->SetDefinition(G4Neutron::Neutron()); G4Nucleus* target = GetTargetNucleusPointer(); - G4Material* aMaterial = aTrack.GetMaterial(); - G4Element* anElement = GetCrossSectionDataStore()->SampleZandA(aParticle, aMaterial, *target); + const G4Material* aMaterial = aTrack.GetMaterial(); + const G4Element* anElement = GetCrossSectionDataStore()->SampleZandA(aParticle, aMaterial, *target); // Next check for illegal track status // @@ -72,7 +72,7 @@ G4VParticleChange* CMSSIMPInelasticProcess::PostStepDoIt(const G4Track& aTrack, // Initialize the hadronic projectile from the track thePro.Initialise(aTrack); - G4HadronicInteraction* anInteraction = ChooseHadronicInteraction(thePro, *target, aMaterial, anElement); + G4HadronicInteraction* anInteraction = GetHadronicInteractionList()[0]; G4HadFinalState* result = nullptr; G4int reentryCount = 0; diff --git a/SimG4Core/CustomPhysics/src/CMSSIMPInelasticXS.cc b/SimG4Core/CustomPhysics/src/CMSSIMPInelasticXS.cc index 19296bfbb418a..6fccfdbb03603 100644 --- a/SimG4Core/CustomPhysics/src/CMSSIMPInelasticXS.cc +++ b/SimG4Core/CustomPhysics/src/CMSSIMPInelasticXS.cc @@ -39,10 +39,6 @@ G4double CMSSIMPInelasticXS::GetIsoCrossSection(const G4DynamicParticle* aPartic return nXsection->GetIsoCrossSection(aParticle, Z, A, iso, elm, mat); } -G4Isotope* CMSSIMPInelasticXS::SelectIsotope(const G4Element* anElement, G4double kinEnergy) { - return nXsection->SelectIsotope(anElement, kinEnergy); -} - void CMSSIMPInelasticXS::BuildPhysicsTable(const G4ParticleDefinition& p) { if (isInitialized) { return;