Geant4 Cross Reference |
1 // 1 // 2 // ******************************************* 2 // ******************************************************************** 3 // * License and Disclaimer 3 // * License and Disclaimer * 4 // * 4 // * * 5 // * The Geant4 software is copyright of th 5 // * The Geant4 software is copyright of the Copyright Holders of * 6 // * the Geant4 Collaboration. It is provided 6 // * the Geant4 Collaboration. It is provided under the terms and * 7 // * conditions of the Geant4 Software License 7 // * conditions of the Geant4 Software License, included in the file * 8 // * LICENSE and available at http://cern.ch/ 8 // * LICENSE and available at http://cern.ch/geant4/license . These * 9 // * include a list of copyright holders. 9 // * include a list of copyright holders. * 10 // * 10 // * * 11 // * Neither the authors of this software syst 11 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing fin 12 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warran 13 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assum 14 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file 15 // * use. Please see the license in the file LICENSE and URL above * 16 // * for the full disclaimer and the limitatio 16 // * for the full disclaimer and the limitation of liability. * 17 // * 17 // * * 18 // * This code implementation is the result 18 // * This code implementation is the result of the scientific and * 19 // * technical work of the GEANT4 collaboratio 19 // * technical work of the GEANT4 collaboration. * 20 // * By using, copying, modifying or distri 20 // * By using, copying, modifying or distributing the software (or * 21 // * any work based on the software) you ag 21 // * any work based on the software) you agree to acknowledge its * 22 // * use in resulting scientific publicati 22 // * use in resulting scientific publications, and indicate your * 23 // * acceptance of all terms of the Geant4 Sof 23 // * acceptance of all terms of the Geant4 Software license. * 24 // ******************************************* 24 // ******************************************************************** 25 // 25 // 26 // Class Description 26 // Class Description 27 // Cross Section for LEND (Low Energy Nuclear 27 // Cross Section for LEND (Low Energy Nuclear Data) 28 // LEND is Geant4 interface for GIDI (General 28 // LEND is Geant4 interface for GIDI (General Interaction Data Interface) 29 // which gives a discription of nuclear and at 29 // which gives a discription of nuclear and atomic reactions, such as 30 // Binary collision cross sections 30 // Binary collision cross sections 31 // Particle number multiplicity distributio 31 // Particle number multiplicity distributions of reaction products 32 // Energy and angular distributions of reac 32 // Energy and angular distributions of reaction products 33 // Derived calculational constants 33 // Derived calculational constants 34 // GIDI is developped at Lawrence Livermore Na 34 // GIDI is developped at Lawrence Livermore National Laboratory 35 // Class Description - End 35 // Class Description - End 36 36 37 // 071025 First implementation done by T. Koi 37 // 071025 First implementation done by T. Koi (SLAC/SCCS) 38 // 101118 Name modifications for release T. Ko 38 // 101118 Name modifications for release T. Koi (SLAC/PPA) 39 39 40 #include "G4LENDCrossSection.hh" 40 #include "G4LENDCrossSection.hh" 41 #include "G4Pow.hh" << 42 #include "G4SystemOfUnits.hh" 41 #include "G4SystemOfUnits.hh" 43 #include "G4ElementTable.hh" 42 #include "G4ElementTable.hh" 44 #include "G4HadronicException.hh" 43 #include "G4HadronicException.hh" 45 44 46 G4bool G4LENDCrossSection::IsIsoApplicable( co << 45 //TK110811 47 co << 46 G4bool G4LENDCrossSection::IsIsoApplicable( const G4DynamicParticle* dp, G4int /*iZ*/ , G4int /*aA*/ , >> 47 const G4Element* /*element*/ , const G4Material* /*material*/ ) 48 { 48 { 49 G4double eKin = dp->GetKineticEnergy(); 49 G4double eKin = dp->GetKineticEnergy(); 50 if ( dp->GetDefinition() != proj ) return f 50 if ( dp->GetDefinition() != proj ) return false; 51 if ( eKin > GetMaxKinEnergy() || eKin < Get 51 if ( eKin > GetMaxKinEnergy() || eKin < GetMinKinEnergy() ) return false; 52 52 53 //G4cout << "G4LENDCrossSection::GetIsoIsIs << 53 return true; 54 //Check existence of target data << 55 if ( element != NULL ) { << 56 if ( element->GetNumberOfIsotopes() != 0 << 57 std::vector< const G4Isotope*> vIsoto << 58 for ( G4int i = 0 ; i != (G4int)eleme << 59 if ( element->GetIsotope( i )->Get << 60 } << 61 for ( std::size_t i = 0 ; i != vIsoto << 62 G4int iM = vIsotope[i]->Getm(); << 63 if ( get_target_from_map( lend_man << 64 } << 65 //No isomer has data << 66 //Check natural aboundance data for t << 67 if ( get_target_from_map( lend_manage << 68 } else { << 69 //Check for iZ and iA under assuming << 70 if ( get_target_from_map( lend_manage << 71 //Check natural aboundance data for t << 72 if ( get_target_from_map( lend_manage << 73 } << 74 } else { << 75 //Check for iZ and iA under assuming iM << 76 if ( get_target_from_map( lend_manager-> << 77 //Check natural aboundance data for iZ << 78 if ( get_target_from_map( lend_manager-> << 79 } << 80 return false; << 81 } 54 } 82 55 83 G4double G4LENDCrossSection::GetIsoCrossSectio 56 G4double G4LENDCrossSection::GetIsoCrossSection( const G4DynamicParticle* dp , G4int iZ , G4int iA , 84 << 57 const G4Isotope* /*isotope*/ , const G4Element* /*elment*/ , const G4Material* material ) 85 { 58 { 86 59 87 G4double xs = 0.0; 60 G4double xs = 0.0; 88 G4double ke = dp->GetKineticEnergy(); 61 G4double ke = dp->GetKineticEnergy(); 89 G4double temp = material->GetTemperature(); 62 G4double temp = material->GetTemperature(); 90 G4int iM = 0; << 63 91 if ( isotope != NULL ) iM = isotope->Getm() << 64 G4GIDI_target* aTarget = usedTarget_map.find( lend_manager->GetNucleusEncoding( iZ , iA ) )->second->GetTarget(); 92 << 65 93 G4GIDI_target* aTarget = get_target_from_ma << 94 if ( aTarget == NULL ) { << 95 G4String message; << 96 message = this->GetName(); << 97 message += " is unexpectedly called."; << 98 //G4Exception( "G4LEND::GetIsoCrossSecti << 99 G4Exception( "G4LEND::GetIsoCrossSection << 100 message ); << 101 } << 102 xs = getLENDCrossSection ( aTarget , ke , t 66 xs = getLENDCrossSection ( aTarget , ke , temp ); 103 67 104 return xs; 68 return xs; 105 } 69 } 106 70 107 71 108 /* 72 /* 109 G4bool G4LENDCrossSection::IsApplicable(const 73 G4bool G4LENDCrossSection::IsApplicable(const G4DynamicParticle*aP, const G4Element*) 110 { 74 { 111 G4bool result = true; 75 G4bool result = true; 112 G4double eKin = aP->GetKineticEnergy(); 76 G4double eKin = aP->GetKineticEnergy(); 113 if( eKin > GetMaxKinEnergy() || aP->GetDefi 77 if( eKin > GetMaxKinEnergy() || aP->GetDefinition() != proj ) result = false; 114 return result; 78 return result; 115 } 79 } 116 */ 80 */ 117 81 118 G4LENDCrossSection::G4LENDCrossSection( const 82 G4LENDCrossSection::G4LENDCrossSection( const G4String nam ) 119 :G4VCrossSectionDataSet( nam ) 83 :G4VCrossSectionDataSet( nam ) 120 { 84 { 121 85 122 proj = NULL; //will be set in an inherited << 86 default_evaluation = "endl99"; 123 //default_evaluation = "endl99"; << 124 //default_evaluation = "ENDF.B-VII.0"; << 125 default_evaluation = "ENDF/BVII.1"; << 126 << 127 allow_nat = false; 87 allow_nat = false; 128 allow_any = false; 88 allow_any = false; 129 89 130 SetMinKinEnergy( 0*MeV ); 90 SetMinKinEnergy( 0*MeV ); 131 SetMaxKinEnergy( 20*MeV ); 91 SetMaxKinEnergy( 20*MeV ); 132 92 133 lend_manager = G4LENDManager::GetInstance() 93 lend_manager = G4LENDManager::GetInstance(); 134 94 135 } 95 } 136 96 137 G4LENDCrossSection::~G4LENDCrossSection() 97 G4LENDCrossSection::~G4LENDCrossSection() 138 { 98 { 139 99 140 for ( std::map< G4int , G4LENDUsedTarget* > 100 for ( std::map< G4int , G4LENDUsedTarget* >::iterator 141 it = usedTarget_map.begin() ; it != u 101 it = usedTarget_map.begin() ; it != usedTarget_map.end() ; it ++ ) 142 { 102 { 143 delete it->second; 103 delete it->second; 144 } 104 } 145 105 146 } 106 } 147 107 148 void G4LENDCrossSection::BuildPhysicsTable( co 108 void G4LENDCrossSection::BuildPhysicsTable( const G4ParticleDefinition& ) 149 { 109 { 150 create_used_target_map(); 110 create_used_target_map(); 151 } 111 } 152 112 153 void G4LENDCrossSection::DumpPhysicsTable(cons 113 void G4LENDCrossSection::DumpPhysicsTable(const G4ParticleDefinition& aP) 154 { 114 { 155 115 156 if ( &aP != proj ) 116 if ( &aP != proj ) 157 throw G4HadronicException(__FILE__, __LIN 117 throw G4HadronicException(__FILE__, __LINE__, "Attempt to use LEND data for particles other than neutrons!!!"); 158 118 159 G4cout << G4endl; 119 G4cout << G4endl; 160 G4cout << "Dump Cross Sections of " << GetN 120 G4cout << "Dump Cross Sections of " << GetName() << G4endl; 161 G4cout << "(Pointwise cross-section at 300 121 G4cout << "(Pointwise cross-section at 300 Kelvin.)" << G4endl; 162 G4cout << G4endl; 122 G4cout << G4endl; 163 123 164 G4cout << "Target informaiton " << G4endl; 124 G4cout << "Target informaiton " << G4endl; 165 125 166 for ( std::map< G4int , G4LENDUsedTarget* > 126 for ( std::map< G4int , G4LENDUsedTarget* >::iterator 167 it = usedTarget_map.begin() ; it != u 127 it = usedTarget_map.begin() ; it != usedTarget_map.end() ; it ++ ) 168 { 128 { 169 G4cout 129 G4cout 170 << "Wanted " << it->second->GetWanted 130 << "Wanted " << it->second->GetWantedEvaluation() 171 << ", Z= " << it->second->GetWantedZ( 131 << ", Z= " << it->second->GetWantedZ() 172 << ", A= " << it->second->GetWantedA( 132 << ", A= " << it->second->GetWantedA() 173 << "; Actual " << it->second->GetActu 133 << "; Actual " << it->second->GetActualEvaluation() 174 << ", Z= " << it->second->GetActualZ( 134 << ", Z= " << it->second->GetActualZ() 175 << ", A= " << it->second->GetActualA( 135 << ", A= " << it->second->GetActualA() 176 << ", " << it->second->GetTarget() 136 << ", " << it->second->GetTarget() 177 << G4endl; 137 << G4endl; 178 138 179 G4int ie = 0; 139 G4int ie = 0; 180 140 181 G4GIDI_target* aTarget = it->second->Get 141 G4GIDI_target* aTarget = it->second->GetTarget(); 182 G4double aT = 300; 142 G4double aT = 300; 183 for ( ie = 0 ; ie < 130 ; ie++ ) 143 for ( ie = 0 ; ie < 130 ; ie++ ) 184 { 144 { 185 G4double ke = 1.0e-5 * G4Pow::GetInst << 145 G4double ke = 1.0e-5 * std::pow ( 10.0 , ie/10.0 ) *eV; 186 146 187 if ( ke < 20*MeV ) 147 if ( ke < 20*MeV ) 188 { 148 { 189 G4cout << " " << GetName() << ", 149 G4cout << " " << GetName() << ", cross section at " << ke/eV << " [eV] = " << getLENDCrossSection ( aTarget , ke , aT )/barn << " [barn] " << G4endl; 190 } 150 } 191 } 151 } 192 G4cout << G4endl; 152 G4cout << G4endl; 193 153 194 } 154 } 195 155 196 } 156 } 197 157 198 158 199 /* 159 /* 200 //110810 160 //110810 201 //G4double G4LENDCrossSection::GetCrossSection 161 //G4double G4LENDCrossSection::GetCrossSection(const G4DynamicParticle* aP , const G4Element* anElement , G4double aT) 202 G4double G4LENDCrossSection::GetCrossSection(c 162 G4double G4LENDCrossSection::GetCrossSection(const G4DynamicParticle* aP , int iZ , const G4Material* aMat) 203 { 163 { 204 164 205 //110810 165 //110810 206 G4double aT = aMat->GetTemperature(); 166 G4double aT = aMat->GetTemperature(); 207 G4Element* anElement = lend_manager->GetNis 167 G4Element* anElement = lend_manager->GetNistElementBuilder()->FindOrBuildElement( iZ ); 208 168 209 G4double ke = aP->GetKineticEnergy(); 169 G4double ke = aP->GetKineticEnergy(); 210 G4double XS = 0.0; 170 G4double XS = 0.0; 211 171 212 G4int numberOfIsotope = anElement->GetNumbe 172 G4int numberOfIsotope = anElement->GetNumberOfIsotopes(); 213 173 214 if ( numberOfIsotope > 0 ) 174 if ( numberOfIsotope > 0 ) 215 { 175 { 216 // User Defined Abundances 176 // User Defined Abundances 217 for ( G4int i_iso = 0 ; i_iso < numberOf 177 for ( G4int i_iso = 0 ; i_iso < numberOfIsotope ; i_iso++ ) 218 { 178 { 219 179 220 G4int iZ = anElement->GetIsotope( i_i 180 G4int iZ = anElement->GetIsotope( i_iso )->GetZ(); 221 G4int iA = anElement->GetIsotope( i_i 181 G4int iA = anElement->GetIsotope( i_iso )->GetN(); 222 G4double ratio = anElement->GetRelati 182 G4double ratio = anElement->GetRelativeAbundanceVector()[i_iso]; 223 183 224 G4GIDI_target* aTarget = usedTarget_m 184 G4GIDI_target* aTarget = usedTarget_map.find( lend_manager->GetNucleusEncoding( iZ , iA ) )->second->GetTarget(); 225 XS += ratio*getLENDCrossSection ( aTa 185 XS += ratio*getLENDCrossSection ( aTarget , ke , aT ); 226 186 227 } 187 } 228 } 188 } 229 else 189 else 230 { 190 { 231 // Natural Abundances 191 // Natural Abundances 232 G4NistElementBuilder* nistElementBuild = 192 G4NistElementBuilder* nistElementBuild = lend_manager->GetNistElementBuilder(); 233 G4int iZ = int ( anElement->GetZ() ); 193 G4int iZ = int ( anElement->GetZ() ); 234 G4int numberOfNistIso = nistElementBuild 194 G4int numberOfNistIso = nistElementBuild->GetNumberOfNistIsotopes( int ( anElement->GetZ() ) ); 235 195 236 G4int Nfirst = nistElementBuild->GetNis 196 G4int Nfirst = nistElementBuild->GetNistFirstIsotopeN( iZ ); 237 for ( G4int i = 0 ; i < numberOfNistIso 197 for ( G4int i = 0 ; i < numberOfNistIso ; i++ ) 238 { 198 { 239 G4int iA = Nfirst + i; 199 G4int iA = Nfirst + i; 240 G4double ratio = nistElementBuild->Ge 200 G4double ratio = nistElementBuild->GetIsotopeAbundance( iZ , iA ); 241 if ( ratio > 0.0 ) 201 if ( ratio > 0.0 ) 242 { 202 { 243 G4GIDI_target* aTarget = usedTarge 203 G4GIDI_target* aTarget = usedTarget_map.find( lend_manager->GetNucleusEncoding( iZ , iA ) )->second->GetTarget(); 244 XS += ratio*getLENDCrossSection ( 204 XS += ratio*getLENDCrossSection ( aTarget , ke , aT ); 245 //G4cout << ke/eV << " " << iZ << 205 //G4cout << ke/eV << " " << iZ << " " << iMass << " " << aTarget << " " << getLENDCrossSection ( aTarget , ke , aT ) << G4endl; 246 } 206 } 247 } 207 } 248 } 208 } 249 209 250 //G4cout << "XS= " << XS << G4endl; 210 //G4cout << "XS= " << XS << G4endl; 251 return XS; 211 return XS; 252 } 212 } 253 213 254 214 255 215 256 //110810 216 //110810 257 //G4double G4LENDCrossSection::GetIsoCrossSect 217 //G4double G4LENDCrossSection::GetIsoCrossSection(const G4DynamicParticle* dp, const G4Isotope* isotope, G4double aT ) 258 G4double G4LENDCrossSection::GetIsoCrossSectio 218 G4double G4LENDCrossSection::GetIsoCrossSection(const G4DynamicParticle* dp, const G4Isotope* isotope, const G4Material* aMat) 259 { 219 { 260 220 261 //110810 221 //110810 262 G4double aT = aMat->GetTemperature(); 222 G4double aT = aMat->GetTemperature(); 263 223 264 G4double ke = dp->GetKineticEnergy(); 224 G4double ke = dp->GetKineticEnergy(); 265 225 266 G4int iZ = isotope->GetZ(); 226 G4int iZ = isotope->GetZ(); 267 G4int iA = isotope->GetN(); 227 G4int iA = isotope->GetN(); 268 228 269 G4GIDI_target* aTarget = usedTarget_map.fin 229 G4GIDI_target* aTarget = usedTarget_map.find( lend_manager->GetNucleusEncoding( iZ , iA ) )->second->GetTarget(); 270 230 271 return getLENDCrossSection ( aTarget , ke , 231 return getLENDCrossSection ( aTarget , ke , aT ); 272 232 273 } 233 } 274 234 275 235 276 236 277 //110810 237 //110810 278 //G4double G4LENDCrossSection::GetZandACrossSe 238 //G4double G4LENDCrossSection::GetZandACrossSection(const G4DynamicParticle* dp, G4int iZ, G4int iA, G4double aT) 279 G4double G4LENDCrossSection::GetZandACrossSect 239 G4double G4LENDCrossSection::GetZandACrossSection(const G4DynamicParticle* dp, G4int iZ, G4int iA, const G4Material* aMat) 280 { 240 { 281 241 282 //110810 242 //110810 283 G4double aT = aMat->GetTemperature(); 243 G4double aT = aMat->GetTemperature(); 284 244 285 G4double ke = dp->GetKineticEnergy(); 245 G4double ke = dp->GetKineticEnergy(); 286 246 287 G4GIDI_target* aTarget = usedTarget_map.fin 247 G4GIDI_target* aTarget = usedTarget_map.find( lend_manager->GetNucleusEncoding( iZ , iA ) )->second->GetTarget(); 288 248 289 return getLENDCrossSection ( aTarget , ke , 249 return getLENDCrossSection ( aTarget , ke , aT ); 290 250 291 } 251 } 292 */ 252 */ 293 253 294 254 295 255 296 void G4LENDCrossSection::recreate_used_target_ 256 void G4LENDCrossSection::recreate_used_target_map() 297 { 257 { 298 for ( std::map< G4int , G4LENDUsedTarget* > 258 for ( std::map< G4int , G4LENDUsedTarget* >::iterator 299 it = usedTarget_map.begin() ; it != u 259 it = usedTarget_map.begin() ; it != usedTarget_map.end() ; it ++ ) 300 { 260 { 301 delete it->second; 261 delete it->second; 302 } 262 } 303 usedTarget_map.clear(); 263 usedTarget_map.clear(); 304 264 305 create_used_target_map(); 265 create_used_target_map(); 306 } 266 } 307 267 308 268 309 269 310 void G4LENDCrossSection::create_used_target_ma 270 void G4LENDCrossSection::create_used_target_map() 311 { 271 { 312 272 313 lend_manager->RequestChangeOfVerboseLevel( 273 lend_manager->RequestChangeOfVerboseLevel( verboseLevel ); 314 274 315 std::size_t numberOfElements = G4Element::G << 275 size_t numberOfElements = G4Element::GetNumberOfElements(); 316 static const G4ElementTable* theElementTabl 276 static const G4ElementTable* theElementTable = G4Element::GetElementTable(); 317 277 318 for ( std::size_t i = 0 ; i < numberOfEleme << 278 for ( size_t i = 0 ; i < numberOfElements ; ++i ) 319 { 279 { 320 280 321 const G4Element* anElement = (*theElemen 281 const G4Element* anElement = (*theElementTable)[i]; 322 G4int numberOfIsotope = (G4int)anElement << 282 G4int numberOfIsotope = anElement->GetNumberOfIsotopes(); 323 283 324 if ( numberOfIsotope > 0 ) 284 if ( numberOfIsotope > 0 ) 325 { 285 { 326 // User Defined Abundances 286 // User Defined Abundances 327 for ( G4int i_iso = 0 ; i_iso < numbe 287 for ( G4int i_iso = 0 ; i_iso < numberOfIsotope ; i_iso++ ) 328 { 288 { 329 G4int iZ = anElement->GetIsotope( 289 G4int iZ = anElement->GetIsotope( i_iso )->GetZ(); 330 G4int iA = anElement->GetIsotope( 290 G4int iA = anElement->GetIsotope( i_iso )->GetN(); 331 G4int iIsomer = anElement->GetIsot << 332 291 333 //G4LENDUsedTarget* aTarget = new 292 //G4LENDUsedTarget* aTarget = new G4LENDUsedTarget ( G4Neutron::Neutron() , default_evaluation , iZ , iA ); 334 G4LENDUsedTarget* aTarget = new G4 << 293 G4LENDUsedTarget* aTarget = new G4LENDUsedTarget ( proj , default_evaluation , iZ , iA ); 335 if ( allow_nat == true ) aTarget-> 294 if ( allow_nat == true ) aTarget->AllowNat(); 336 if ( allow_any == true ) aTarget-> 295 if ( allow_any == true ) aTarget->AllowAny(); 337 usedTarget_map.insert( std::pair< << 296 usedTarget_map.insert( std::pair< G4int , G4LENDUsedTarget* > ( lend_manager->GetNucleusEncoding( iZ , iA ) , aTarget ) ); 338 } 297 } 339 } 298 } 340 else 299 else 341 { 300 { 342 // Natural Abundances 301 // Natural Abundances 343 G4NistElementBuilder* nistElementBuil 302 G4NistElementBuilder* nistElementBuild = lend_manager->GetNistElementBuilder(); 344 G4int iZ = int ( anElement->GetZ() ); 303 G4int iZ = int ( anElement->GetZ() ); 345 //G4cout << nistElementBuild->GetNumb 304 //G4cout << nistElementBuild->GetNumberOfNistIsotopes( int ( anElement->GetZ() ) ) << G4endl; 346 G4int numberOfNistIso = nistElementBu 305 G4int numberOfNistIso = nistElementBuild->GetNumberOfNistIsotopes( int ( anElement->GetZ() ) ); 347 306 348 for ( G4int ii = 0 ; ii < numberOfNis 307 for ( G4int ii = 0 ; ii < numberOfNistIso ; ii++ ) 349 { 308 { 350 //G4cout << nistElementBuild->GetI 309 //G4cout << nistElementBuild->GetIsotopeAbundance( iZ , nistElementBuild->GetNistFirstIsotopeN( iZ ) + i ) << G4endl; 351 if ( nistElementBuild->GetIsotopeA 310 if ( nistElementBuild->GetIsotopeAbundance( iZ , nistElementBuild->GetNistFirstIsotopeN( iZ ) + ii ) > 0 ) 352 { 311 { 353 G4int iMass = nistElementBuild- 312 G4int iMass = nistElementBuild->GetNistFirstIsotopeN( iZ ) + ii; 354 //G4cout << iZ << " " << nistEl 313 //G4cout << iZ << " " << nistElementBuild->GetNistFirstIsotopeN( iZ ) + i << " " << nistElementBuild->GetIsotopeAbundance ( iZ , iMass ) << G4endl; 355 G4int iIsomer = 0; << 356 314 357 G4LENDUsedTarget* aTarget = new 315 G4LENDUsedTarget* aTarget = new G4LENDUsedTarget ( proj , default_evaluation , iZ , iMass ); 358 if ( allow_nat == true ) aTarge 316 if ( allow_nat == true ) aTarget->AllowNat(); 359 if ( allow_any == true ) aTarge 317 if ( allow_any == true ) aTarget->AllowAny(); 360 usedTarget_map.insert( std::pai << 318 usedTarget_map.insert( std::pair< G4int , G4LENDUsedTarget* > ( lend_manager->GetNucleusEncoding( iZ , iMass ) , aTarget ) ); 361 319 362 } 320 } 363 321 364 } 322 } 365 } 323 } 366 } 324 } 367 DumpLENDTargetInfo(); << 325 >> 326 G4cout << "Dump UsedTarget for " << GetName() << G4endl; >> 327 G4cout << "Requested Evaluation, Z , A -> Actual Evaluation, Z , A(0=Nat) , Pointer of Target" << G4endl; >> 328 for ( std::map< G4int , G4LENDUsedTarget* >::iterator >> 329 it = usedTarget_map.begin() ; it != usedTarget_map.end() ; it ++ ) >> 330 { >> 331 G4cout >> 332 << " " << it->second->GetWantedEvaluation() >> 333 << ", " << it->second->GetWantedZ() >> 334 << ", " << it->second->GetWantedA() >> 335 << " -> " << it->second->GetActualEvaluation() >> 336 << ", " << it->second->GetActualZ() >> 337 << ", " << it->second->GetActualA() >> 338 << ", " << it->second->GetTarget() >> 339 << G4endl; >> 340 } >> 341 368 } 342 } 369 343 370 344 // elow ehigh xs_elow xs_ehigh ke (ke < elow) 371 G4double G4LENDCrossSection::GetUltraLowEnergy 345 G4double G4LENDCrossSection::GetUltraLowEnergyExtrapolatedXS( G4double x1, G4double x2, G4double y1, G4double y2 , G4double ke ) 372 { 346 { 373 //XS propotinal to 1/v at low energy -> 1/r 347 //XS propotinal to 1/v at low energy -> 1/root(E) 374 //XS = a * 1/root(E) + b 348 //XS = a * 1/root(E) + b 375 G4double a = ( y2 - y1 ) / ( 1/std::sqrt(x2 349 G4double a = ( y2 - y1 ) / ( 1/std::sqrt(x2) - 1/std::sqrt(x1) ); 376 G4double b = y1 - a * 1/std::sqrt(x1); 350 G4double b = y1 - a * 1/std::sqrt(x1); 377 G4double result = a * 1/std::sqrt(ke) + b; 351 G4double result = a * 1/std::sqrt(ke) + b; 378 return result; 352 return result; 379 } 353 } 380 << 381 G4GIDI_target* G4LENDCrossSection::get_target_ << 382 G4GIDI_target* target = NULL; << 383 if ( usedTarget_map.find( nuclear_code ) != << 384 target = usedTarget_map.find( nuclear_co << 385 } << 386 return target; << 387 } << 388 << 389 void G4LENDCrossSection::DumpLENDTargetInfo( G << 390 << 391 if ( lend_manager->GetVerboseLevel() >= 1 | << 392 if ( usedTarget_map.size() == 0 ) create << 393 G4cout << "Dumping UsedTarget of " << Ge << 394 G4cout << "Requested Evaluation, Z , A - << 395 for ( std::map< G4int , G4LENDUsedTarget << 396 it = usedTarget_map.begin() ; it != u << 397 G4cout << 398 << " " << it->second->GetWantedEvalua << 399 << ", " << it->second->GetWantedZ() << 400 << ", " << it->second->GetWantedA() << 401 << " -> " << it->second->GetActualEva << 402 << ", " << it->second->GetActualZ() << 403 << ", " << it->second->GetActualA() << 404 << G4endl; << 405 } << 406 } << 407 } << 408 << 409 354