50 else if ( !(vElement[ anE->
GetIndex() ]) ) result =
false;
68 reactionName = reaction;
89 G4String baseName = getenv(
"G4NEUTRONHPDATA" );
90 G4String dirName = baseName+
"/JENDL_HE/"+particleName+
"/"+reactionName ;
106 vElement.resize( numberOfElements );
107 for (
size_t i = 0; i < numberOfElements; ++i )
110 G4Element* theElement = (*theElementTable)[i];
114 G4int nIso = (*theElementTable)[i]->GetNumberOfIsotopes();
115 G4int Z =
static_cast<G4int> ((*theElementTable)[i]->GetZ());
118 G4bool found_at_least_one =
false;
119 for (
G4int i1 = 0; i1 < nIso; i1++ )
123 if ( isThisNewIsotope( Z , A ) )
126 std::stringstream ss;
127 ss << dirName << aFSType << Z <<
"_" << A <<
"_" << theNames.
GetName( Z-1 );
137 found_at_least_one =
true;
144 registAPhysicsVector( Z , A , aPhysVec );
157 found_at_least_one =
TRUE;
161 if ( found_at_least_one ) vElement[i] =
true;
173 if ( isThisNewIsotope( Z , A ) )
176 std::stringstream ss;
177 ss << dirName << aFSType << Z <<
"_" << A <<
"_" << theNames.
GetName( Z-1 );
187 found_at_least_one =
TRUE;
193 registAPhysicsVector( Z , A , aPhysVec );
205 found_at_least_one =
TRUE;
209 if ( found_at_least_one ) vElement[i] =
true;
222 throw G4HadronicException(__FILE__, __LINE__,
"Attempt to use NeutronHP data for particles other than neutrons!!!");
247 for (
G4int i1 = 0; i1 < nIso; i1++ )
253 result += frac * getXSfromThisIsotope( Z , A , ek );
269 result += frac * getXSfromThisIsotope( Z , A , ek );
288 std::vector< G4double > v_e;
289 std::vector< G4double > v_xs;
299 v_e.push_back( e*
eV );
300 v_xs.push_back( xs*
barn );
307 aPhysVec->
PutValues( static_cast< size_t >( i ) , v_e[ i ] , v_xs[ i ] );
317 if ( mIsotope.find ( z ) == mIsotope.end() )
return false;
318 if ( mIsotope.find ( z ) ->
second->find ( a ) == mIsotope.find ( z ) ->
second->end() )
return false;
327 std::pair< G4int , G4PhysicsVector* > aPair = std::pair < G4int , G4PhysicsVector* > ( A , aPhysVec );
329 std::map < G4int , std::map< G4int , G4PhysicsVector* >* >::iterator itm;
330 itm = mIsotope.find ( Z );
331 if ( itm != mIsotope.end() )
333 itm->second->insert ( aPair );
337 std::map< G4int , G4PhysicsVector* >* aMap =
new std::map< G4int , G4PhysicsVector* >;
338 aMap->insert ( aPair );
339 mIsotope.insert( std::pair<
G4int , std::map< G4int , G4PhysicsVector* >* > ( Z , aMap ) );
353 if ( mIsotope.find ( Z )->second->find ( A ) != mIsotope.find ( Z )->second->end() )
356 aPhysVec = mIsotope.find ( Z )->second->find ( A )->second;
357 aXSection = aPhysVec->
GetValue( ek , outOfRange );
364 std::map < G4int , G4PhysicsVector* >::iterator it;
366 for ( it = mIsotope.find ( Z )->second->begin() ; it != mIsotope.find ( Z )->second->end() ; it++ )
368 G4int delta = std::abs( A - it->first );
369 if ( delta < delta0 ) delta0 = delta;
374 G4int A1 = A + delta0;
375 if ( mIsotope.find ( Z )->second->find ( A1 ) != mIsotope.find ( Z )->second->end() )
377 aPhysVec = mIsotope.find ( Z )->second->find ( A1 )->second;
382 aPhysVec = mIsotope.find ( Z )->second->find ( A1 )->second;
385 aXSection = aPhysVec->
GetValue( ek , outOfRange );
387 aXSection *= std::pow ( 1.0*A/ A1 , 2.0 / 3.0 );