#include <G4ComponentBarNucleonNucleusXsc.hh>
Inheritance diagram for G4ComponentBarNucleonNucleusXsc:
Definition at line 47 of file G4ComponentBarNucleonNucleusXsc.hh.
G4ComponentBarNucleonNucleusXsc::G4ComponentBarNucleonNucleusXsc | ( | ) |
Definition at line 450 of file G4ComponentBarNucleonNucleusXsc.cc.
References G4Neutron::Neutron(), and G4Proton::Proton().
00451 : G4VComponentCrossSection("G4ComponentBarNucleonNucleusXsc"), 00452 fTotalXsc(0.0), fInelasticXsc(0.0), fElasticXsc(0.0) 00453 { 00454 theNeutron = G4Neutron::Neutron(); 00455 theProton = G4Proton::Proton(); 00456 00457 // He, Be, C 00458 00459 thePimData.push_back(new G4PiData(he_m_t, he_m_in, e1, 44)); 00460 thePipData.push_back(new G4PiData(he_m_t, he_p_in, e1, 44)); 00461 00462 thePimData.push_back(new G4PiData(be_m_t, be_m_in, e1, 44)); 00463 thePipData.push_back(new G4PiData(be_m_t, be_p_in, e1, 44)); 00464 00465 thePimData.push_back(new G4PiData(c_m_t, c_m_in, e1, 44)); 00466 thePipData.push_back(new G4PiData(c_m_t, c_p_in, e1, 44)); 00467 00468 // N, O, Na 00469 00470 thePimData.push_back(new G4PiData(n_m_t, n_m_in, e2, 44)); 00471 thePipData.push_back(new G4PiData(n_m_t, n_p_in, e2, 44)); 00472 00473 thePimData.push_back(new G4PiData(o_m_t, o_m_in, e2, 44)); 00474 thePipData.push_back(new G4PiData(o_m_t, o_p_in, e2, 44)); 00475 00476 thePimData.push_back(new G4PiData(na_m_t, na_m_in, e2, 44)); 00477 thePipData.push_back(new G4PiData(na_m_t, na_p_in, e2, 44)); 00478 00479 // Al, Si, Ca 00480 00481 thePimData.push_back(new G4PiData(al_m_t, al_m_in, e3, 45)); 00482 thePipData.push_back(new G4PiData(al_m_t, al_p_in, e3, 45)); 00483 00484 thePimData.push_back(new G4PiData(si_m_t, si_m_in, e3, 45)); 00485 thePipData.push_back(new G4PiData(si_m_t, si_p_in, e3, 45)); 00486 00487 thePimData.push_back(new G4PiData(ca_m_t, ca_m_in, e3, 45)); 00488 thePipData.push_back(new G4PiData(ca_m_t, ca_p_in, e3, 45)); 00489 00490 // Fe, Cu, Mo 00491 00492 thePimData.push_back(new G4PiData(fe_m_t, fe_m_in, e4, 47)); 00493 thePipData.push_back(new G4PiData(fe_m_t, fe_p_in, e4, 47)); 00494 00495 thePimData.push_back(new G4PiData(cu_m_t, cu_m_in, e4, 47)); 00496 thePipData.push_back(new G4PiData(cu_m_t, cu_p_in, e4, 47)); 00497 00498 thePimData.push_back(new G4PiData(mo_m_t, mo_m_in, e4, 47)); 00499 thePipData.push_back(new G4PiData(mo_m_t, mo_p_in, e4, 47)); 00500 00501 // Cd, Sn, W 00502 00503 thePimData.push_back(new G4PiData(cd_m_t, cd_m_in, e5, 48)); 00504 thePipData.push_back(new G4PiData(cd_m_t, cd_p_in, e5, 48)); 00505 00506 thePimData.push_back(new G4PiData(sn_m_t, sn_m_in, e5, 48)); 00507 thePipData.push_back(new G4PiData(sn_m_t, sn_p_in, e5, 48)); 00508 00509 thePimData.push_back(new G4PiData(w_m_t, w_m_in, e5, 48)); 00510 thePipData.push_back(new G4PiData(w_m_t, w_p_in, e5, 48)); 00511 00512 // Pb, U 00513 00514 thePimData.push_back(new G4PiData(pb_m_t, pb_m_in, e6, 46)); 00515 thePipData.push_back(new G4PiData(pb_m_t, pb_p_in, e6, 46)); 00516 00517 thePimData.push_back(new G4PiData(u_m_t, u_m_in, e6, 46)); 00518 thePipData.push_back(new G4PiData(u_m_t, u_p_in, e6, 46)); 00519 00520 theZ.push_back(2); // He 00521 theZ.push_back(4); // Be 00522 theZ.push_back(6); // C 00523 theZ.push_back(7); // N 00524 theZ.push_back(8); // O 00525 theZ.push_back(11); // Na 00526 theZ.push_back(13); // Al 00527 theZ.push_back(14); // Si 00528 theZ.push_back(20); // Ca 00529 theZ.push_back(26); // Fe 00530 theZ.push_back(29); // Cu 00531 theZ.push_back(42); // Mo 00532 theZ.push_back(48); // Cd 00533 theZ.push_back(50); // Sn 00534 theZ.push_back(74); // W 00535 theZ.push_back(82); // Pb 00536 theZ.push_back(92); // U 00537 00538 }
G4ComponentBarNucleonNucleusXsc::~G4ComponentBarNucleonNucleusXsc | ( | ) | [virtual] |
Definition at line 543 of file G4ComponentBarNucleonNucleusXsc.cc.
00544 { 00545 std::for_each(thePimData.begin(), thePimData.end(), G4PiData::Delete()); 00546 std::for_each(thePipData.begin(), thePipData.end(), G4PiData::Delete()); 00547 }
void G4ComponentBarNucleonNucleusXsc::CrossSectionDescription | ( | std::ostream & | ) | const |
Definition at line 751 of file G4ComponentBarNucleonNucleusXsc.cc.
00752 { 00753 outFile << "G4ComponentBarNucleonNucleusXsc is a variant of the Barashenkov\n" 00754 << "cross section parameterization to be used of protons and\n" 00755 << "nucleons on targets heavier than hydrogen. It is intended for\n" 00756 << "use as a cross section component and is currently used by\n" 00757 << "G4BGGNucleonInelasticXS. It is valid for incident energies up\n" 00758 << "to 1 TeV.\n"; 00759 }
G4double G4ComponentBarNucleonNucleusXsc::GetElasticCrossSection | ( | const G4DynamicParticle * | aParticle, | |
G4int | Z | |||
) | [inline] |
Definition at line 221 of file G4ComponentBarNucleonNucleusXsc.hh.
References GetElementCrossSection().
00223 { 00224 fInelasticXsc = GetElementCrossSection(dp, Z); 00225 return fElasticXsc; 00226 }
G4double G4ComponentBarNucleonNucleusXsc::GetElasticElementCrossSection | ( | const G4ParticleDefinition * | aParticle, | |
G4double | kinEnergy, | |||
G4int | Z, | |||
G4double | ||||
) | [virtual] |
Implements G4VComponentCrossSection.
Definition at line 607 of file G4ComponentBarNucleonNucleusXsc.cc.
References GetElementCrossSection().
00610 { 00611 G4DynamicParticle* aDP = new G4DynamicParticle(aParticle,G4ParticleMomentum(1.,0.,0.), 00612 kinEnergy); 00613 fInelasticXsc = GetElementCrossSection(aDP, Z); 00614 delete aDP; 00615 00616 return fElasticXsc; 00617 }
G4double G4ComponentBarNucleonNucleusXsc::GetElasticIsotopeCrossSection | ( | const G4ParticleDefinition * | aParticle, | |
G4double | kinEnergy, | |||
G4int | Z, | |||
G4int | ||||
) | [virtual] |
Implements G4VComponentCrossSection.
Definition at line 621 of file G4ComponentBarNucleonNucleusXsc.cc.
References GetElementCrossSection().
00624 { 00625 G4DynamicParticle* aDP = new G4DynamicParticle(aParticle,G4ParticleMomentum(1.,0.,0.), 00626 kinEnergy); 00627 fInelasticXsc = GetElementCrossSection(aDP, Z); 00628 delete aDP; 00629 00630 return fElasticXsc; 00631 }
G4double G4ComponentBarNucleonNucleusXsc::GetElasticXsc | ( | ) | [inline] |
G4double G4ComponentBarNucleonNucleusXsc::GetElementCrossSection | ( | const G4DynamicParticle * | aParticle, | |
G4int | Z | |||
) |
Definition at line 655 of file G4ComponentBarNucleonNucleusXsc.cc.
References G4DynamicParticle::GetDefinition(), and G4DynamicParticle::GetKineticEnergy().
Referenced by GetElasticCrossSection(), GetElasticElementCrossSection(), GetElasticIsotopeCrossSection(), GetInelasticElementCrossSection(), GetInelasticIsotopeCrossSection(), GetTotalElementCrossSection(), and GetTotalIsotopeCrossSection().
00657 { 00658 G4double kineticEnergy = aParticle->GetKineticEnergy(); 00659 00660 G4double result = 0; 00661 // G4cout<<"Z = "<<Z<<G4endl; 00662 00663 size_t it = 0; 00664 size_t itmax = theZ.size() - 1; 00665 for(; it <= itmax; ++it) { if(Z <= theZ[it]) { break; } } 00666 if( it > itmax ) { it = itmax; } 00667 G4int Z1, Z2; 00668 G4double x1, x2, xt1, xt2; 00669 00670 std::vector<G4PiData *> * theData = &thePimData; 00671 if(aParticle->GetDefinition() == theProton) { theData = &thePipData; } 00672 00673 if( theZ[it] == Z ) 00674 { 00675 result = (*theData)[it]->ReactionXSection(kineticEnergy); 00676 fTotalXsc = (*theData)[it]->TotalXSection(kineticEnergy); 00677 } 00678 else 00679 { 00680 if(0 == it) { it = 1; } 00681 x1 = (*theData)[it-1]->ReactionXSection(kineticEnergy); 00682 xt1 = (*theData)[it-1]->TotalXSection(kineticEnergy); 00683 Z1 = theZ[it-1]; 00684 x2 = (*theData)[it]->ReactionXSection(kineticEnergy); 00685 xt2 = (*theData)[it]->TotalXSection(kineticEnergy); 00686 Z2 = theZ[it]; 00687 00688 result = Interpolate(Z1, Z2, Z, x1, x2); 00689 fTotalXsc = Interpolate(Z1, Z2, Z, xt1, xt2); 00690 } 00691 00692 fElasticXsc = fTotalXsc - result; 00693 if( fElasticXsc < 0.) { fElasticXsc = 0.; } 00694 00695 return result; 00696 }
G4double G4ComponentBarNucleonNucleusXsc::GetInelasticElementCrossSection | ( | const G4ParticleDefinition * | aParticle, | |
G4double | kinEnergy, | |||
G4int | Z, | |||
G4double | ||||
) | [virtual] |
Implements G4VComponentCrossSection.
Definition at line 593 of file G4ComponentBarNucleonNucleusXsc.cc.
References GetElementCrossSection().
00596 { 00597 G4DynamicParticle* aDP = new G4DynamicParticle(aParticle,G4ParticleMomentum(1.,0.,0.), 00598 kinEnergy); 00599 fInelasticXsc = GetElementCrossSection(aDP, Z); 00600 delete aDP; 00601 00602 return fInelasticXsc; 00603 }
G4double G4ComponentBarNucleonNucleusXsc::GetInelasticIsotopeCrossSection | ( | const G4ParticleDefinition * | aParticle, | |
G4double | kinEnergy, | |||
G4int | Z, | |||
G4int | ||||
) | [virtual] |
Implements G4VComponentCrossSection.
Definition at line 579 of file G4ComponentBarNucleonNucleusXsc.cc.
References GetElementCrossSection().
00582 { 00583 G4DynamicParticle* aDP = new G4DynamicParticle(aParticle,G4ParticleMomentum(1.,0.,0.), 00584 kinEnergy); 00585 fInelasticXsc = GetElementCrossSection(aDP, Z); 00586 delete aDP; 00587 00588 return fInelasticXsc; 00589 }
G4double G4ComponentBarNucleonNucleusXsc::GetTotalElementCrossSection | ( | const G4ParticleDefinition * | aParticle, | |
G4double | kinEnergy, | |||
G4int | Z, | |||
G4double | ||||
) | [virtual] |
Implements G4VComponentCrossSection.
Definition at line 565 of file G4ComponentBarNucleonNucleusXsc.cc.
References GetElementCrossSection().
00568 { 00569 G4DynamicParticle* aDP = new G4DynamicParticle(aParticle,G4ParticleMomentum(1.,0.,0.), 00570 kinEnergy); 00571 fInelasticXsc = GetElementCrossSection(aDP, Z); 00572 delete aDP; 00573 00574 return fTotalXsc; 00575 }
G4double G4ComponentBarNucleonNucleusXsc::GetTotalIsotopeCrossSection | ( | const G4ParticleDefinition * | aParticle, | |
G4double | kinEnergy, | |||
G4int | Z, | |||
G4int | ||||
) | [virtual] |
Implements G4VComponentCrossSection.
Definition at line 551 of file G4ComponentBarNucleonNucleusXsc.cc.
References GetElementCrossSection().
00554 { 00555 G4DynamicParticle* aDP = new G4DynamicParticle(aParticle,G4ParticleMomentum(1.,0.,0.), 00556 kinEnergy); 00557 fInelasticXsc = GetElementCrossSection(aDP, Z); 00558 delete aDP; 00559 00560 return fTotalXsc; 00561 }
G4double G4ComponentBarNucleonNucleusXsc::GetTotalXsc | ( | ) | [inline] |
G4bool G4ComponentBarNucleonNucleusXsc::IsElementApplicable | ( | const G4DynamicParticle * | aParticle, | |
G4int | Z | |||
) |
Definition at line 639 of file G4ComponentBarNucleonNucleusXsc.cc.
References G4DynamicParticle::GetDefinition(), and G4DynamicParticle::GetKineticEnergy().
00641 { 00642 G4bool result = false; 00643 if(aParticle->GetDefinition() == theNeutron ) result = true; 00644 if(aParticle->GetDefinition() == theProton) result = true; 00645 if(Z < 2) result = false; 00646 if(aParticle->GetKineticEnergy() > 999.9*GeV) result = false; 00647 return result; 00648 }