46 : index(idx), fParticle(p)
47{
49 if (index == 0) {
50 fNeutronNuclear =
51 dynamic_cast<G4NeutronInelasticXS*>(reg->GetCrossSectionDataSet("G4NeutronInelasticXS"));
52 if (nullptr == fNeutronNuclear) { fNeutronNuclear = new G4NeutronInelasticXS(); }
53 fNeutronNuclear->BuildPhysicsTable(*fParticle);
54 } else if (index > 0 && index < 6) {
55 const G4String pname[6] = {"neutron", "proton", "deuteron", "triton", "He3", "alpha"};
56 const G4String& ss = pname[index] + "ParticleXS";
57 fParticleNuclear =
58 dynamic_cast<G4ParticleInelasticXS*>(reg->GetCrossSectionDataSet(ss));
59 if (nullptr == fParticleNuclear) { fParticleNuclear = new G4ParticleInelasticXS(fParticle); }
60 fParticleNuclear->BuildPhysicsTable(*fParticle);
61 } else if (index == 6) {
62 fGammaNuclear =
63 dynamic_cast<G4GammaNuclearXS*>(reg->GetCrossSectionDataSet("GammaNuclearXS"));
64 if (nullptr == fGammaNuclear) { fGammaNuclear = new G4GammaNuclearXS(); }
65 fGammaNuclear->BuildPhysicsTable(*fParticle);
66 }
67}
static G4CrossSectionDataSetRegistry * Instance()