136void G4ParticleHPThermalScattering::clearCurrentFSData() {
138if ( incoherentFSs != NULL ) {
139 for ( std::map <
G4int , std::map <
G4double , std::vector < E_isoAng* >* >* >::iterator it = incoherentFSs->begin() ; it != incoherentFSs->end() ; it++ )
141 std::map < G4double , std::vector < E_isoAng* >* >::iterator itt;
142 for ( itt = it->second->begin() ; itt != it->second->end() ; itt++ )
144 std::vector< E_isoAng* >::iterator ittt;
145 for ( ittt = itt->second->begin(); ittt != itt->second->end() ; ittt++ )
155if ( coherentFSs != NULL ) {
156 for ( std::map <
G4int , std::map <
G4double , std::vector < std::pair< G4double , G4double >* >* >* >::iterator it = coherentFSs->begin() ; it != coherentFSs->end() ; it++ )
158 std::map < G4double , std::vector < std::pair< G4double , G4double >* >* >::iterator itt;
159 for ( itt = it->second->begin() ; itt != it->second->end() ; itt++ )
161 std::vector < std::pair< G4double , G4double >* >::iterator ittt;
162 for ( ittt = itt->second->begin(); ittt != itt->second->end() ; ittt++ )
172if ( inelasticFSs != NULL ) {
173 for ( std::map <
G4int , std::map <
G4double , std::vector < E_P_E_isoAng* >* >* >::iterator it = inelasticFSs->begin() ; it != inelasticFSs->end() ; it++ )
175 std::map < G4double , std::vector < E_P_E_isoAng* >* >::iterator itt;
176 for ( itt = it->second->begin() ; itt != it->second->end() ; itt++ )
178 std::vector < E_P_E_isoAng* >::iterator ittt;
179 for ( ittt = itt->second->begin(); ittt != itt->second->end() ; ittt++ )
181 std::vector < E_isoAng* >::iterator it4;
182 for ( it4 = (*ittt)->vE_isoAngle.begin() ; it4 != (*ittt)->vE_isoAngle.end() ; it4++ )
194 incoherentFSs = NULL;
209std::map < G4double , std::vector < std::pair< G4double , G4double >* >* >* G4ParticleHPThermalScattering::readACoherentFSDATA(
G4String name )
212 std::map < G4double , std::vector < std::pair< G4double , G4double >* >* >* aCoherentFSDATA =
new std::map < G4double , std::vector < std::pair< G4double , G4double >* >* >;
215 std::istringstream theChannel(std::ios::in);
218 std::vector< G4double > vBraggE;
221 while ( theChannel >> dummy )
226 std::vector < std::pair< G4double , G4double >* >* anBragE_P =
new std::vector < std::pair< G4double , G4double >* >;
230 for (
G4int i = 0 ; i < n ; i++ )
234 if ( aCoherentFSDATA->size() == 0 )
237 vBraggE.push_back( Ei );
244 anBragE_P->push_back (
new std::pair < G4double , G4double > ( Ei , Pi ) );
247 aCoherentFSDATA->insert ( std::pair <
G4double , std::vector < std::pair< G4double , G4double >* >* > ( temp , anBragE_P ) );
250 return aCoherentFSDATA;
255std::map < G4double , std::vector < E_P_E_isoAng* >* >* G4ParticleHPThermalScattering::readAnInelasticFSDATA (
G4String name )
257 std::map < G4double , std::vector < E_P_E_isoAng* >* >* anT_E_P_E_isoAng =
new std::map < G4double , std::vector < E_P_E_isoAng* >* >;
260 std::istringstream theChannel(std::ios::in);
264 while ( theChannel >> dummy )
269 std::vector < E_P_E_isoAng* >* vE_P_E_isoAng =
new std::vector < E_P_E_isoAng* >;
272 for (
G4int i = 0 ; i <
n ; i++ )
274 vE_P_E_isoAng->push_back ( readAnE_P_E_isoAng ( &theChannel ) );
276 anT_E_P_E_isoAng->insert ( std::pair <
G4double , std::vector < E_P_E_isoAng* >* > ( temp , vE_P_E_isoAng ) );
280 return anT_E_P_E_isoAng;
285E_P_E_isoAng* G4ParticleHPThermalScattering::readAnE_P_E_isoAng( std::istream* file )
300 for (
G4int i = 0 ; i < aData->
n ; i++ )
307 anE_isoAng->
n = nl - 2;
308 anE_isoAng->
isoAngle.resize( anE_isoAng->
n );
310 aData->
prob.push_back( prob );
312 for (
G4int j = 0 ; j < anE_isoAng->
n ; j++ )
323 for (
G4int i = 0 ; i < aData->
n - 1 ; i++ )
337std::map < G4double , std::vector < E_isoAng* >* >* G4ParticleHPThermalScattering::readAnIncoherentFSDATA (
G4String name )
339 std::map < G4double , std::vector < E_isoAng* >* >* T_E =
new std::map < G4double , std::vector < E_isoAng* >* >;
342 std::istringstream theChannel(std::ios::in);
346 while ( theChannel >> dummy )
351 std::vector < E_isoAng* >* vE_isoAng =
new std::vector < E_isoAng* >;
354 for (
G4int i = 0 ; i <
n ; i++ )
355 vE_isoAng->push_back ( readAnE_isoAng( &theChannel ) );
356 T_E->insert ( std::pair <
G4double , std::vector < E_isoAng* >* > ( temp , vE_isoAng ) );
365E_isoAng* G4ParticleHPThermalScattering::readAnE_isoAng( std::istream* file )
384 for (
G4int i = 0 ; i < aData->
n ; i++ )
410 G4bool findThermalElement =
false;
413 for (
G4int i = 0; i < n ; i++ )
420 if ( getTS_ID( NULL , theElement ) != -1 )
422 ielement = getTS_ID( NULL , theElement );
423 findThermalElement =
true;
426 else if ( getTS_ID( theMaterial , theElement ) != -1 )
428 ielement = getTS_ID( theMaterial , theElement );
429 findThermalElement =
true;
435 if ( findThermalElement ==
true )
447 if ( random <= inelastic/total )
452 std::map < G4double , std::vector< E_P_E_isoAng* >* >::iterator it;
453 std::vector<G4double> v_temp;
455 for ( it = inelasticFSs->find( ielement )->second->begin() ; it != inelasticFSs->find( ielement )->second->end() ; it++ )
457 v_temp.push_back( it->first );
461 std::pair < G4double , G4double > tempLH = find_LH ( aTemp , &v_temp );
465 std::vector< E_P_E_isoAng* >* vNEP_EPM_TL = 0;
466 std::vector< E_P_E_isoAng* >* vNEP_EPM_TH = 0;
468 if ( tempLH.first != 0.0 && tempLH.second != 0.0 )
470 vNEP_EPM_TL = inelasticFSs->find( ielement )->second->find ( tempLH.first/kelvin )->second;
471 vNEP_EPM_TH = inelasticFSs->find( ielement )->second->find ( tempLH.second/kelvin )->second;
473 else if ( tempLH.first == 0.0 )
475 std::map < G4double , std::vector< E_P_E_isoAng* >* >::iterator itm;
476 itm = inelasticFSs->find( ielement )->second->begin();
477 vNEP_EPM_TL = itm->second;
479 vNEP_EPM_TH = itm->second;
480 tempLH.first = tempLH.second;
481 tempLH.second = itm->first;
483 else if ( tempLH.second == 0.0 )
485 std::map < G4double , std::vector< E_P_E_isoAng* >* >::iterator itm;
486 itm = inelasticFSs->find( ielement )->second->end();
488 vNEP_EPM_TH = itm->second;
490 vNEP_EPM_TL = itm->second;
491 tempLH.second = tempLH.first;
492 tempLH.first = itm->first;
497 std::pair< G4double , E_isoAng > TL = create_sE_and_EPM_from_pE_and_vE_P_E_isoAng ( rand_for_sE , aTrack.
GetKineticEnergy() , vNEP_EPM_TL );
498 std::pair< G4double , E_isoAng > TH = create_sE_and_EPM_from_pE_and_vE_P_E_isoAng ( rand_for_sE , aTrack.
GetKineticEnergy() , vNEP_EPM_TH );
501 sE = get_linear_interpolated ( aTemp , std::pair < G4double , G4double > ( tempLH.first , TL.first ) , std::pair < G4double , G4double > ( tempLH.second , TH.first ) );
505 if ( TL.second.n == TH.second.n )
508 anE_isoAng.
n = TL.second.n;
509 for (
G4int i=0 ; i < anE_isoAng.
n ; i++ )
512 angle = get_linear_interpolated ( aTemp , std::pair< G4double , G4double > ( tempLH.first , TL.second.isoAngle[ i ] ) , std::pair< G4double , G4double > ( tempLH.second , TH.second.isoAngle[ i ] ) );
513 anE_isoAng.
isoAngle.push_back( angle );
515 mu = getMu( &anE_isoAng );
519 throw G4HadronicException(__FILE__, __LINE__,
"A problem is found in Thermal Scattering Data! Do not yet supported");
528 else if ( random <= ( inelastic + theXSection->
GetCoherentCrossSection( dp , theElement , theMaterial ) ) / total )
535 std::map < G4double , std::vector< std::pair< G4double , G4double >* >* >::iterator it;
536 std::vector<G4double> v_temp;
538 for ( it = coherentFSs->find( ielement )->second->begin() ; it != coherentFSs->find( ielement )->second->end() ; it++ )
540 v_temp.push_back( it->first );
544 std::pair < G4double , G4double > tempLH = find_LH ( aTemp , &v_temp );
549 std::vector< std::pair< G4double , G4double >* >* pvE_p_TL = NULL;
550 std::vector< std::pair< G4double , G4double >* >* pvE_p_TH = NULL;
552 if ( tempLH.first != 0.0 && tempLH.second != 0.0 )
554 pvE_p_TL = coherentFSs->find( ielement )->second->find ( tempLH.first/kelvin )->second;
555 pvE_p_TH = coherentFSs->find( ielement )->second->find ( tempLH.first/kelvin )->second;
557 else if ( tempLH.first == 0.0 )
559 pvE_p_TL = coherentFSs->find( ielement )->second->find ( v_temp[ 0 ] )->second;
560 pvE_p_TH = coherentFSs->find( ielement )->second->find ( v_temp[ 1 ] )->second;
561 tempLH.first = tempLH.second;
562 tempLH.second = v_temp[ 1 ];
564 else if ( tempLH.second == 0.0 )
566 pvE_p_TH = coherentFSs->find( ielement )->second->find ( v_temp.back() )->second;
567 std::vector< G4double >::iterator itv;
571 pvE_p_TL = coherentFSs->find( ielement )->second->find ( *itv )->second;
572 tempLH.second = tempLH.first;
578 throw G4HadronicException(__FILE__, __LINE__,
"A problem is found in Thermal Scattering Data! Unexpected temperature values in data");
581 std::vector< G4double > vE_T;
582 std::vector< G4double > vp_T;
584 G4int n1 = pvE_p_TL->size();
588 for (
G4int i=0 ; i < n1 ; i++ )
590 if ( (*pvE_p_TL)[i]->first != (*pvE_p_TH)[i]->first )
throw G4HadronicException(__FILE__, __LINE__,
"A problem is found in Thermal Scattering Data!");
591 vE_T.push_back ( (*pvE_p_TL)[i]->first );
592 vp_T.push_back ( get_linear_interpolated ( aTemp , std::pair< G4double , G4double > ( tempLH.first , (*pvE_p_TL)[i]->second ) , std::pair< G4double , G4double > ( tempLH.second , (*pvE_p_TL)[i]->second ) ) );
596 for (
G4int i = 1 ; i < n1 ; i++ )
598 if ( E/eV < vE_T[ i ] )
608 for (
G4int i = 0 ; i <= j ; i++ )
610 G4double Pi = vp_T[ i ] / vp_T[ j ];
611 if ( rand_for_mu < Pi )
622 if ( mu < -1.0 ) mu = -1.0;
634 std::map < G4double , std::vector < E_isoAng* >* >::iterator it;
635 std::vector<G4double> v_temp;
637 for ( it = incoherentFSs->find( ielement )->second->begin() ; it != incoherentFSs->find( ielement )->second->end() ; it++ )
639 v_temp.push_back( it->first );
643 std::pair < G4double , G4double > tempLH = find_LH ( aTemp , &v_temp );
652 if ( tempLH.first != 0.0 && tempLH.second != 0.0 ) {
654 anEPM_TL_E = create_E_isoAng_from_energy ( aTrack.
GetKineticEnergy() , incoherentFSs->find( ielement )->second->find ( tempLH.first/kelvin )->second );
655 anEPM_TH_E = create_E_isoAng_from_energy ( aTrack.
GetKineticEnergy() , incoherentFSs->find( ielement )->second->find ( tempLH.second/kelvin )->second );
656 }
else if ( tempLH.first == 0.0 ) {
658 anEPM_TL_E = create_E_isoAng_from_energy ( aTrack.
GetKineticEnergy() , incoherentFSs->find( ielement )->second->find ( v_temp[ 0 ] )->second );
659 anEPM_TH_E = create_E_isoAng_from_energy ( aTrack.
GetKineticEnergy() , incoherentFSs->find( ielement )->second->find ( v_temp[ 1 ] )->second );
660 tempLH.first = tempLH.second;
661 tempLH.second = v_temp[ 1 ];
662 }
else if ( tempLH.second == 0.0 ) {
664 anEPM_TH_E = create_E_isoAng_from_energy ( aTrack.
GetKineticEnergy() , incoherentFSs->find( ielement )->second->find ( v_temp.back() )->second );
665 std::vector< G4double >::iterator itv;
669 anEPM_TL_E = create_E_isoAng_from_energy ( aTrack.
GetKineticEnergy() , incoherentFSs->find( ielement )->second->find ( *itv )->second );
670 tempLH.second = tempLH.first;
678 if ( anEPM_TL_E.
n == anEPM_TH_E.
n )
680 anEPM_T_E.
n = anEPM_TL_E.
n;
681 for (
G4int i=0 ; i < anEPM_TL_E.
n ; i++ )
684 angle = get_linear_interpolated ( aTemp , std::pair< G4double , G4double > ( tempLH.first , anEPM_TL_E.
isoAngle[ i ] ) , std::pair< G4double , G4double > ( tempLH.second , anEPM_TH_E.
isoAngle[ i ] ) );
685 anEPM_T_E.
isoAngle.push_back( angle );
687 mu = getMu ( &anEPM_T_E );
691 throw G4HadronicException(__FILE__, __LINE__,
"A problem is found in Thermal Scattering Data! Do not yet supported");
721 G4int in = int ( random * ( (*anEPM).n ) );
725 G4double mu_l = (*anEPM).isoAngle[ in-1 ];
726 G4double mu_h = (*anEPM).isoAngle[ in ];
727 result = ( mu_h - mu_l ) * ( random * ( (*anEPM).n ) - in ) + mu_l;
738 G4double mu_h = (*anEPM).isoAngle[ 0 ];
739 result = ( mu_h - mu_l ) * xx + mu_l;
743 G4double mu_l = (*anEPM).isoAngle[ (*anEPM).n - 1 ];
745 result = ( mu_h - mu_l ) * xx + mu_l;
753std::pair < G4double , G4double > G4ParticleHPThermalScattering::find_LH (
G4double x , std::vector< G4double >* aVector )
759 if ( aVector->size() == 1 ) {
760 LL = aVector->front();
761 H = aVector->front();
766 for ( std::vector< G4double >::iterator
767 it = aVector->begin() ; it != aVector->end() ; it++ ) {
770 if ( it != aVector->begin() ) {
782 if ( H == 0.0 ) LL = aVector->back();
785 return std::pair < G4double , G4double > ( LL , H );
790G4double G4ParticleHPThermalScattering::get_linear_interpolated (
G4double x , std::pair< G4double , G4double > Low , std::pair< G4double , G4double > High )
793 if ( High.first - Low.first != 0 ) {
794 y = ( High.second - Low.second ) / ( High.first - Low.first ) * ( x - Low.first ) + Low.second;
796 if ( High.second == Low.second ) {
799 G4cout <<
"G4ParticleHPThermalScattering liner interpolation err!!" <<
G4endl;
809G4ParticleHPThermalScattering::create_E_isoAng_from_energy(
G4double energy,
810 std::vector<E_isoAng*>* vEPM)
813 std::vector<E_isoAng*>::iterator iv;
815 std::vector<G4double> v_e;
817 for (iv = vEPM->begin(); iv != vEPM->end(); iv++)
818 v_e.push_back( (*iv)->energy );
820 std::pair<G4double, G4double> energyLH = find_LH(energy, &v_e);
826 if (energyLH.first != 0.0 && energyLH.second != 0.0) {
827 for (iv = vEPM->begin(); iv != vEPM->end(); iv++) {
828 if (energyLH.first == (*iv)->energy) {
836 }
else if (energyLH.first == 0.0) {
837 panEPM_T_EL = (*vEPM)[0];
838 panEPM_T_EH = (*vEPM)[1];
840 }
else if (energyLH.second == 0.0) {
841 panEPM_T_EH = (*vEPM).back();
848 if (panEPM_T_EL != 0 && panEPM_T_EH != 0) {
851 if ( !(check_E_isoAng(panEPM_T_EL) ) ) panEPM_T_EL = panEPM_T_EH;
852 if ( !(check_E_isoAng(panEPM_T_EH) ) ) panEPM_T_EH = panEPM_T_EL;
854 if (panEPM_T_EL->
n == panEPM_T_EH->
n) {
856 anEPM_T_E.
n = panEPM_T_EL->
n;
858 for (
G4int i=0; i < panEPM_T_EL->
n; i++) {
860 angle = get_linear_interpolated(energy, std::pair<G4double,G4double>(energyLH.first, panEPM_T_EL->
isoAngle[i] ),
861 std::pair<G4double,G4double>(energyLH.second, panEPM_T_EH->
isoAngle[i] ) );
862 anEPM_T_E.
isoAngle.push_back(angle);
866 G4Exception(
"G4ParticleHPThermalScattering::create_E_isoAng_from_energy",
868 "G4ParticleHPThermalScattering does not support yet EL->n != EH->n.");
872 G4Exception(
"G4ParticleHPThermalScattering::create_E_isoAng_from_energy",
874 "Pointer panEPM_T_EL or panEPM_T_EH is zero");
907 for (
G4int i = 0 ; i <
n-1 ; i++ )
912 sum_p += ( ( anE_P_E_isoAng->
prob[i] ) * dE );
914 if ( random <= sum_p/total )
916 secondary_energy = get_linear_interpolated ( random , std::pair < G4double , G4double > ( sum_p_L/total , E_L ) , std::pair < G4double , G4double > ( sum_p/total , E_H ) );
917 secondary_energy = secondary_energy*eV;
923 return secondary_energy;
928std::pair< G4double , E_isoAng > G4ParticleHPThermalScattering::create_sE_and_EPM_from_pE_and_vE_P_E_isoAng (
G4double rand_for_sE ,
G4double pE , std::vector < E_P_E_isoAng* >* vNEP_EPM )
931 std::map< G4double , G4int > map_energy;
933 std::vector< G4double > v_energy;
935 std::vector< E_P_E_isoAng* >::iterator itv;
937 for ( itv = vNEP_EPM->begin(); itv != vNEP_EPM->end(); itv++ )
939 v_energy.push_back( (*itv)->energy );
940 map_energy.insert( std::pair < G4double , G4int > ( (*itv)->energy , i ) );
944 std::pair < G4double , G4double > energyLH = find_LH ( pE , &v_energy );
949 if ( energyLH.first != 0.0 && energyLH.second != 0.0 )
951 pE_P_E_isoAng_EL = (*vNEP_EPM)[ map_energy.find ( energyLH.first )->second ];
952 pE_P_E_isoAng_EH = (*vNEP_EPM)[ map_energy.find ( energyLH.second )->second ];
954 else if ( energyLH.first == 0.0 )
956 pE_P_E_isoAng_EL = (*vNEP_EPM)[ 0 ];
957 pE_P_E_isoAng_EH = (*vNEP_EPM)[ 1 ];
959 if ( energyLH.second == 0.0 )
961 pE_P_E_isoAng_EH = (*vNEP_EPM).back();
962 itv = vNEP_EPM->end();
965 pE_P_E_isoAng_EL = *itv;
974 sE_L = get_secondary_energy_from_E_P_E_isoAng ( rand_for_sE , pE_P_E_isoAng_EL );
975 sE_H = get_secondary_energy_from_E_P_E_isoAng ( rand_for_sE , pE_P_E_isoAng_EH );
977 sE = get_linear_interpolated ( pE , std::pair < G4double , G4double > ( energyLH.first , sE_L ) , std::pair < G4double , G4double > ( energyLH.second , sE_H ) );
980 E_isoAng E_isoAng_L = create_E_isoAng_from_energy ( sE , &(pE_P_E_isoAng_EL->
vE_isoAngle) );
981 E_isoAng E_isoAng_H = create_E_isoAng_from_energy ( sE , &(pE_P_E_isoAng_EH->
vE_isoAngle) );
987 if ( E_isoAng_L.
n == E_isoAng_H.
n )
989 anE_isoAng.
n = E_isoAng_L.
n;
990 for (
G4int j=0 ; j < anE_isoAng.
n ; j++ )
993 angle = get_linear_interpolated ( sE , std::pair< G4double , G4double > ( sE_L , E_isoAng_L.
isoAngle[ j ] ) , std::pair< G4double , G4double > ( sE_H , E_isoAng_H.
isoAngle[ j ] ) );
994 anE_isoAng.
isoAngle.push_back( angle );
1005 return std::pair< G4double , E_isoAng >( sE , anE_isoAng);
1008void G4ParticleHPThermalScattering::buildPhysicsTable()
1020 std::map < G4String , G4int > co_dic;
1025 for (
size_t i = 0 ; i < numberOfMaterials ; i++ )
1027 G4Material* material = (*theMaterialTable)[i];
1029 for (
size_t j = 0 ; j < numberOfElements ; j++ )
1034 G4int ts_ID_of_this_geometry;
1036 if ( co_dic.find ( ts_ndl_name ) != co_dic.end() )
1038 ts_ID_of_this_geometry = co_dic.find ( ts_ndl_name ) -> second;
1042 ts_ID_of_this_geometry = co_dic.size();
1043 co_dic.insert ( std::pair< G4String , G4int >( ts_ndl_name , ts_ID_of_this_geometry ) );
1050 dic.insert( std::pair < std::pair < G4Material* , const G4Element* > ,
G4int > ( std::pair < G4Material* , const G4Element* > ( material , element ) , ts_ID_of_this_geometry ) );
1059 for (
size_t i = 0 ; i < numberOfElements ; i++ )
1061 const G4Element* element = (*theElementTable)[i];
1066 G4int ts_ID_of_this_geometry;
1068 if ( co_dic.find ( ts_ndl_name ) != co_dic.end() )
1070 ts_ID_of_this_geometry = co_dic.find ( ts_ndl_name ) -> second;
1074 ts_ID_of_this_geometry = co_dic.size();
1075 co_dic.insert ( std::pair< G4String , G4int >( ts_ndl_name , ts_ID_of_this_geometry ) );
1082 dic.insert( std::pair < std::pair < const G4Material* , const G4Element* > ,
G4int > ( std::pair < const G4Material* , const G4Element* > ( (
G4Material*)NULL , element ) , ts_ID_of_this_geometry ) );
1088 G4cout <<
"Neutron HP Thermal Scattering: Following material-element pairs or elements are registered." <<
G4endl;
1089 for ( std::map < std::pair < const G4Material* , const G4Element* > ,
G4int >::iterator it = dic.begin() ; it != dic.end() ; it++ )
1091 if ( it->first.first != NULL )
1093 G4cout <<
"Material " << it->first.first->GetName() <<
" - Element " << it->first.second->GetName() <<
", internal thermal scattering id " << it->second <<
G4endl;
1097 G4cout <<
"Element " << it->first.second->GetName() <<
", internal thermal scattering id " << it->second <<
G4endl;
1111 clearCurrentFSData();
1113 if ( coherentFSs == NULL ) coherentFSs =
new std::map < G4int , std::map < G4double , std::vector < std::pair< G4double , G4double >* >* >* >;
1114 if ( incoherentFSs == NULL ) incoherentFSs =
new std::map < G4int , std::map < G4double , std::vector < E_isoAng* >* >* >;
1115 if ( inelasticFSs == NULL ) inelasticFSs =
new std::map < G4int , std::map < G4double , std::vector < E_P_E_isoAng* >* >* >;
1118 if ( !std::getenv(
"G4NEUTRONHPDATA" ) )
1119 throw G4HadronicException(__FILE__, __LINE__,
"Please setenv G4NEUTRONHPDATA to point to the neutron cross-section files.");
1120 dirName = std::getenv(
"G4NEUTRONHPDATA" );
1124 for ( std::map < G4String , G4int >::iterator it = co_dic.begin() ; it != co_dic.end() ; it++ )
1127 G4int ts_ID = it->second;
1130 G4String fsName =
"/ThermalScattering/Coherent/FS/";
1131 G4String fileName = dirName + fsName + tsndlName;
1132 coherentFSs->insert ( std::pair <
G4int , std::map <
G4double , std::vector < std::pair< G4double , G4double >* >* >* > ( ts_ID , readACoherentFSDATA( fileName ) ) );
1135 fsName =
"/ThermalScattering/Incoherent/FS/";
1136 fileName = dirName + fsName + tsndlName;
1137 incoherentFSs->insert ( std::pair <
G4int , std::map <
G4double , std::vector < E_isoAng* >* >* > ( ts_ID , readAnIncoherentFSDATA( fileName ) ) );
1140 fsName =
"/ThermalScattering/Inelastic/FS/";
1141 fileName = dirName + fsName + tsndlName;
1142 inelasticFSs->insert ( std::pair <
G4int , std::map <
G4double , std::vector < E_P_E_isoAng* >* >* > ( ts_ID , readAnInelasticFSDATA( fileName ) ) );
1157 if ( dic.find( std::pair < const G4Material* , const G4Element* > ( material , element ) ) != dic.end() )
1158 result = dic.find( std::pair < const G4Material* , const G4Element* > ( material , element ) )->second;
1165 return std::pair<G4double, G4double>(10*perCent,
DBL_MAX);
1172 buildPhysicsTable();
1176G4bool G4ParticleHPThermalScattering::check_E_isoAng(
E_isoAng* anE_IsoAng )
1182 for (
G4int i = 0 ; i < n ; i++ ) {
1185 if ( sum != 0.0 ) result =
true;
1192 outFile <<
"High Precision model based on thermal scattering data in\n"
1193 <<
"evaluated nuclear data libraries for neutrons below 5eV\n"
1194 <<
"on specific materials\n";
std::vector< G4Element * > G4ElementTable
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::vector< G4Material * > G4MaterialTable
G4GLOB_DLL std::ostream G4cout
static G4ElementTable * GetElementTable()
static size_t GetNumberOfElements()
const G4String & GetName() const
void SetEnergyChange(G4double anEnergy)
void SetMomentumChange(const G4ThreeVector &aV)
const G4Material * GetMaterial() const
const G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
const G4LorentzVector & Get4Momentum() const
G4HadFinalState theParticleChange
void SetMinEnergy(G4double anEnergy)
void SetMaxEnergy(const G4double anEnergy)
static size_t GetNumberOfMaterials()
G4double GetTemperature() const
const G4Element * GetElement(G4int iel) const
size_t GetNumberOfElements() const
static G4MaterialTable * GetMaterialTable()
const G4String & GetName() const
static G4Neutron * Neutron()
void BuildPhysicsTable(const G4ParticleDefinition &)
void RegisterThermalScatteringCoherentFinalStates(std::map< G4int, std::map< G4double, std::vector< std::pair< G4double, G4double > * > * > * > *val)
void RegisterThermalScatteringIncoherentFinalStates(std::map< G4int, std::map< G4double, std::vector< E_isoAng * > * > * > *val)
void RegisterThermalScatteringInelasticFinalStates(std::map< G4int, std::map< G4double, std::vector< E_P_E_isoAng * > * > * > *val)
std::map< G4int, std::map< G4double, std::vector< std::pair< G4double, G4double > * > * > * > * GetThermalScatteringCoherentFinalStates()
static G4ParticleHPManager * GetInstance()
std::map< G4int, std::map< G4double, std::vector< E_isoAng * > * > * > * GetThermalScatteringIncoherentFinalStates()
void GetDataStream(G4String, std::istringstream &iss)
std::map< G4int, std::map< G4double, std::vector< E_P_E_isoAng * > * > * > * GetThermalScatteringInelasticFinalStates()
G4double GetCrossSection(const G4DynamicParticle *, const G4Element *, const G4Material *)
void BuildPhysicsTable(const G4ParticleDefinition &)
void AddUserThermalScatteringFile(G4String, G4String)
G4double GetCoherentCrossSection(const G4DynamicParticle *, const G4Element *, const G4Material *)
G4double GetInelasticCrossSection(const G4DynamicParticle *, const G4Element *, const G4Material *)
void AddThermalElement(G4String, G4String)
G4bool IsThisThermalElement(G4String)
G4String GetTS_NDL_Name(G4String nameG4Element)
G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &aTargetNucleus)
void AddUserThermalScatteringFile(G4String, G4String)
G4ParticleHPThermalScattering()
virtual void ModelDescription(std::ostream &outFile) const
virtual const std::pair< G4double, G4double > GetFatalEnergyCheckLevels() const
~G4ParticleHPThermalScattering()
void BuildPhysicsTable(const G4ParticleDefinition &)
std::size_t first(char) const
G4double total(Particle const *const p1, Particle const *const p2)
G4double energy(const ThreeVector &p, const G4double m)
std::vector< G4double > prob
std::vector< E_isoAng * > vE_isoAngle
std::vector< G4double > isoAngle