47 if (eKin < 20 * MeV || 3 * GeV < eKin || aP->GetDefinition() !=
G4Neutron::Neutron()) {
51 else if (!(vElement[anE->
GetIndex()]))
59 for (
auto& itZ : mIsotope) {
60 std::map<G4int, G4PhysicsVector*>* pointer_map = itZ.second;
61 if (pointer_map !=
nullptr) {
62 for (
auto& itA : *pointer_map) {
64 if (pointerPhysicsVector !=
nullptr) {
65 delete pointerPhysicsVector;
79 reactionName = reaction;
90 G4String dirName = baseName +
"/JENDL_HE/" + particleName +
"/" + reactionName;
105 vElement.resize(numberOfElements);
106 for (std::size_t i = 0; i < numberOfElements; ++i) {
107 G4Element* theElement = (*theElementTable)[i];
111 auto nIso = (
G4int)(*theElementTable)[i]->GetNumberOfIsotopes();
112 auto Z = (
G4int)(*theElementTable)[i]->GetZ();
113 for (
G4int i1 = 0; i1 < nIso; ++i1) {
116 if (isThisNewIsotope(Z,
A)) {
117 std::stringstream ss;
118 ss << dirName << aFSType << Z <<
"_" <<
A <<
"_" << theNames.
GetName(Z - 1);
121 file.open(filename, std::fstream::in);
129 registAPhysicsVector(Z,
A, aPhysVec);
153 for (
G4int i1 = 0; i1 < nIso; ++i1) {
157 result += frac * getXSfromThisIsotope(Z,
A, ek);
169 std::vector<G4double> v_e;
170 std::vector<G4double> v_xs;
172 for (
G4int i = 0; i < len; ++i) {
179 v_e.push_back(e * eV);
180 v_xs.push_back(xs * barn);
183 auto aPhysVec =
new G4PhysicsFreeVector(
static_cast<std::size_t
>(len), v_e.front(), v_e.back());
185 for (
G4int i = 0; i < len; ++i) {
186 aPhysVec->PutValues(
static_cast<std::size_t
>(i), v_e[i], v_xs[i]);
194 if (mIsotope.find(z) == mIsotope.end())
return false;
195 if (mIsotope.find(z)->second->find(a) == mIsotope.find(z)->second->end())
return false;
201 std::pair<G4int, G4PhysicsVector*> aPair = std::pair<G4int, G4PhysicsVector*>(
A, aPhysVec);
202 auto itm = mIsotope.find(Z);
203 if (itm != mIsotope.cend()) {
204 itm->second->insert(aPair);
207 auto aMap =
new std::map<G4int, G4PhysicsVector*>;
209 mIsotope.insert(std::pair<
G4int, std::map<G4int, G4PhysicsVector*>*>(Z, aMap));
218 if (mIsotope.find(Z)->second->find(
A) != mIsotope.find(Z)->second->end()) {
219 aPhysVec = mIsotope.find(Z)->second->find(
A)->second;
220 aXSection = aPhysVec->
Value(ek);
225 for (
auto it = mIsotope.find(Z)->second->cbegin(); it != mIsotope.find(Z)->second->cend(); ++it)
227 G4int delta = std::abs(
A - it->first);
228 if (delta < delta0) delta0 = delta;
234 if (mIsotope.find(Z)->second->find(A1) != mIsotope.find(Z)->second->cend()) {
235 aPhysVec = mIsotope.find(Z)->second->find(A1)->second;
239 aPhysVec = mIsotope.find(Z)->second->find(A1)->second;
242 aXSection = aPhysVec->
Value(ek);
const char * G4FindDataDir(const char *)
G4double GetKineticEnergy() const
static G4ElementTable * GetElementTable()
G4double * GetRelativeAbundanceVector() const
static size_t GetNumberOfElements()
const G4Isotope * GetIsotope(G4int iso) const
size_t GetNumberOfIsotopes() const
static G4Neutron * Neutron()
const G4String & GetParticleName() const
G4double GetCrossSection(const G4DynamicParticle *, const G4Element *, G4double aT)
G4ParticleHPJENDLHEData()
void BuildPhysicsTable(const G4ParticleDefinition &) override
G4bool IsApplicable(const G4DynamicParticle *, const G4Element *)
void DumpPhysicsTable(const G4ParticleDefinition &) override
~G4ParticleHPJENDLHEData() override
G4ParticleHPDataUsed GetName(G4int A, G4int Z, const G4String &base, const G4String &rest, G4bool &active)
G4double Value(const G4double energy, std::size_t &lastidx) const
static G4Pow * GetInstance()
G4double A23(G4double A) const