62 for ( std::map<
G4int , std::map< G4int , G4PhysicsVector* >* >::iterator itZ =
mIsotope.begin();
64 std::map< G4int , G4PhysicsVector* >* pointer_map = itZ->second;
66 for ( std::map< G4int , G4PhysicsVector* >::iterator itA = pointer_map->begin();
67 itA != pointer_map->end() ; ++itA ) {
69 if ( pointerPhysicsVector ) {
70 delete pointerPhysicsVector;
107 G4String baseName = getenv(
"G4NEUTRONHPDATA" );
109 G4String aFSType =
"/CrossSection/";
124 vElement.resize( numberOfElements );
125 for (
size_t i = 0; i < numberOfElements; ++i )
128 G4Element* theElement = (*theElementTable)[i];
132 G4int nIso = (*theElementTable)[i]->GetNumberOfIsotopes();
133 G4int Z =
static_cast<G4int> ((*theElementTable)[i]->GetZ());
136 G4bool found_at_least_one =
false;
144 std::stringstream
ss;
145 ss << dirName << aFSType << Z <<
"_" << A <<
"_" << theNames.
GetName( Z-1 );
155 found_at_least_one =
true;
175 found_at_least_one =
TRUE;
179 if ( found_at_least_one )
vElement[i] =
true;
194 std::stringstream
ss;
195 ss << dirName << aFSType << Z <<
"_" << A <<
"_" << theNames.
GetName( Z-1 );
205 found_at_least_one =
TRUE;
223 found_at_least_one =
TRUE;
227 if ( found_at_least_one )
vElement[i] =
true;
240 throw G4HadronicException(__FILE__, __LINE__,
"Attempt to use NeutronHP data for particles other than neutrons!!!");
306 std::vector< G4double > v_e;
307 std::vector< G4double > v_xs;
317 v_e.push_back( e*
eV );
318 v_xs.push_back( xs*
barn );
325 aPhysVec->
PutValues( static_cast< size_t >( i ) , v_e[ i ] , v_xs[ i ] );
345 std::pair< G4int , G4PhysicsVector* > aPair = std::pair < G4int , G4PhysicsVector* > (
A , aPhysVec );
347 std::map < G4int , std::map< G4int , G4PhysicsVector* >* >::iterator itm;
351 itm->second->insert ( aPair );
355 std::map< G4int , G4PhysicsVector* >* aMap =
new std::map< G4int , G4PhysicsVector* >;
356 aMap->insert ( aPair );
357 mIsotope.insert( std::pair<
G4int , std::map< G4int , G4PhysicsVector* >* > ( Z , aMap ) );
371 if (
mIsotope.find ( Z )->second->find ( A ) !=
mIsotope.find ( Z )->second->end() )
374 aPhysVec =
mIsotope.find ( Z )->second->find ( A )->second;
375 aXSection = aPhysVec->
GetValue( ek , outOfRange );
382 std::map < G4int , G4PhysicsVector* >::iterator it;
384 for ( it =
mIsotope.find ( Z )->second->begin() ; it !=
mIsotope.find ( Z )->second->end() ; it++ )
386 G4int delta = std::abs( A - it->first );
387 if ( delta < delta0 ) delta0 = delta;
392 G4int A1 = A + delta0;
393 if (
mIsotope.find ( Z )->second->find ( A1 ) !=
mIsotope.find ( Z )->second->end() )
395 aPhysVec =
mIsotope.find ( Z )->second->find ( A1 )->second;
400 aPhysVec =
mIsotope.find ( Z )->second->find ( A1 )->second;
403 aXSection = aPhysVec->
GetValue( ek , outOfRange );
std::vector< ExP01TrackerHit * > a
std::vector< G4bool > vElement
G4double * GetRelativeAbundanceVector() const
static constexpr double MeV
G4bool isThisNewIsotope(G4int z, G4int a)
G4int GetNumberOfIsotopes(G4int Z)
static constexpr double perCent
G4double A23(G4double A) const
const G4String & GetParticleName() const
G4double getXSfromThisIsotope(G4int, G4int, G4double)
static constexpr double second
G4ParticleHPJENDLHEData()
G4double GetValue(G4double theEnergy, G4bool &isOutRange) const
void BuildPhysicsTable(const G4ParticleDefinition &)
void PutValues(size_t index, G4double e, G4double dataValue)
~G4ParticleHPJENDLHEData()
void DumpPhysicsTable(const G4ParticleDefinition &)
G4double GetCrossSection(const G4DynamicParticle *, const G4Element *, G4double aT)
static G4Pow * GetInstance()
G4bool isThisInMap(G4int, G4int)
std::map< G4int, std::map< G4int, G4PhysicsVector * > * > mIsotope
G4bool IsApplicable(const G4DynamicParticle *, const G4Element *)
std::vector< G4Element * > G4ElementTable
double A(double temperature)
static constexpr double eV
void registAPhysicsVector(G4int, G4int, G4PhysicsVector *)
G4ParticleHPDataUsed GetName(G4int A, G4int Z, G4String base, G4String rest, G4bool &active)
G4double GetAbundance(G4int number)
G4double G4ParticleHPJENDLHEData::G4double result
static G4Neutron * Neutron()
static constexpr double barn
G4double GetKineticEnergy() const
const G4Isotope * GetIsotope(G4int iso) const
static size_t GetNumberOfElements()
G4int GetFirstIsotope(G4int Z)
G4PhysicsVector * readAFile(std::fstream *)
G4int GetIsotopeNucleonCount(G4int number)
static G4ElementTable * GetElementTable()
size_t GetNumberOfIsotopes() const