Skip to content

Commit

Permalink
avoid using methods changed between G4 releases
Browse files Browse the repository at this point in the history
  • Loading branch information
civanch committed Jan 29, 2020
1 parent 6e52c6b commit 3c87f42
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
2 changes: 0 additions & 2 deletions SimG4Core/CustomPhysics/interface/CMSSIMPInelasticXS.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions SimG4Core/CustomPhysics/src/CMSSIMPInelasticProcess.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
//
Expand All @@ -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;
Expand Down
4 changes: 0 additions & 4 deletions SimG4Core/CustomPhysics/src/CMSSIMPInelasticXS.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 3c87f42

Please sign in to comment.