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 = std::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;
137 for (
G4int i1 = 0; i1 < nIso; i1++ )
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!!!");
265 for (
G4int i1 = 0; i1 < nIso; i1++ )
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++ )
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 );