Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
G4ComponentBarNucleonNucleusXsc Class Reference

#include <G4ComponentBarNucleonNucleusXsc.hh>

Inheritance diagram for G4ComponentBarNucleonNucleusXsc:
G4VComponentCrossSection

Public Member Functions

 G4ComponentBarNucleonNucleusXsc ()
 
virtual ~G4ComponentBarNucleonNucleusXsc ()
 
virtual G4double GetTotalIsotopeCrossSection (const G4ParticleDefinition *aParticle, G4double kinEnergy, G4int Z, G4int)
 
virtual G4double GetTotalElementCrossSection (const G4ParticleDefinition *aParticle, G4double kinEnergy, G4int Z, G4double)
 
virtual G4double GetInelasticIsotopeCrossSection (const G4ParticleDefinition *aParticle, G4double kinEnergy, G4int Z, G4int)
 
virtual G4double GetInelasticElementCrossSection (const G4ParticleDefinition *aParticle, G4double kinEnergy, G4int Z, G4double)
 
virtual G4double GetElasticElementCrossSection (const G4ParticleDefinition *aParticle, G4double kinEnergy, G4int Z, G4double)
 
virtual G4double GetElasticIsotopeCrossSection (const G4ParticleDefinition *aParticle, G4double kinEnergy, G4int Z, G4int)
 
G4bool IsElementApplicable (const G4DynamicParticle *aParticle, G4int Z)
 
G4double GetElementCrossSection (const G4DynamicParticle *aParticle, G4int Z)
 
void CrossSectionDescription (std::ostream &) const
 
G4double GetElasticCrossSection (const G4DynamicParticle *aParticle, G4int Z)
 
G4double GetTotalXsc ()
 
G4double GetElasticXsc ()
 
- Public Member Functions inherited from G4VComponentCrossSection
 G4VComponentCrossSection (const G4String &nam="")
 
virtual ~G4VComponentCrossSection ()
 
G4double GetTotalElementCrossSection (const G4ParticleDefinition *, G4double kinEnergy, const G4Element *)
 
G4double GetInelasticElementCrossSection (const G4ParticleDefinition *, G4double kinEnergy, const G4Element *)
 
G4double GetElasticElementCrossSection (const G4ParticleDefinition *, G4double kinEnergy, const G4Element *)
 
virtual G4double ComputeQuasiElasticRatio (const G4ParticleDefinition *, G4double kinEnergy, G4int, G4int)
 
virtual void BuildPhysicsTable (const G4ParticleDefinition &)
 
virtual void DumpPhysicsTable (const G4ParticleDefinition &)
 
virtual void Description () const
 
void SetVerboseLevel (G4int value)
 
G4int GetVerboseLevel () const
 
G4double GetMinKinEnergy () const
 
void SetMinKinEnergy (G4double value)
 
G4double GetMaxKinEnergy () const
 
void SetMaxKinEnergy (G4double value)
 
const G4StringGetName () const
 

Detailed Description

Definition at line 47 of file G4ComponentBarNucleonNucleusXsc.hh.

Constructor & Destructor Documentation

G4ComponentBarNucleonNucleusXsc::G4ComponentBarNucleonNucleusXsc ( )

Definition at line 450 of file G4ComponentBarNucleonNucleusXsc.cc.

References G4Neutron::Neutron(), and G4Proton::Proton().

451  : G4VComponentCrossSection("G4ComponentBarNucleonNucleusXsc"),
452  fTotalXsc(0.0), fInelasticXsc(0.0), fElasticXsc(0.0)
453 {
454  theNeutron = G4Neutron::Neutron();
455  theProton = G4Proton::Proton();
456 
457  // He, Be, C
458 
459  thePimData.push_back(new G4PiData(he_m_t, he_m_in, e1, 44));
460  thePipData.push_back(new G4PiData(he_m_t, he_p_in, e1, 44));
461 
462  thePimData.push_back(new G4PiData(be_m_t, be_m_in, e1, 44));
463  thePipData.push_back(new G4PiData(be_m_t, be_p_in, e1, 44));
464 
465  thePimData.push_back(new G4PiData(c_m_t, c_m_in, e1, 44));
466  thePipData.push_back(new G4PiData(c_m_t, c_p_in, e1, 44));
467 
468  // N, O, Na
469 
470  thePimData.push_back(new G4PiData(n_m_t, n_m_in, e2, 44));
471  thePipData.push_back(new G4PiData(n_m_t, n_p_in, e2, 44));
472 
473  thePimData.push_back(new G4PiData(o_m_t, o_m_in, e2, 44));
474  thePipData.push_back(new G4PiData(o_m_t, o_p_in, e2, 44));
475 
476  thePimData.push_back(new G4PiData(na_m_t, na_m_in, e2, 44));
477  thePipData.push_back(new G4PiData(na_m_t, na_p_in, e2, 44));
478 
479  // Al, Si, Ca
480 
481  thePimData.push_back(new G4PiData(al_m_t, al_m_in, e3, 45));
482  thePipData.push_back(new G4PiData(al_m_t, al_p_in, e3, 45));
483 
484  thePimData.push_back(new G4PiData(si_m_t, si_m_in, e3, 45));
485  thePipData.push_back(new G4PiData(si_m_t, si_p_in, e3, 45));
486 
487  thePimData.push_back(new G4PiData(ca_m_t, ca_m_in, e3, 45));
488  thePipData.push_back(new G4PiData(ca_m_t, ca_p_in, e3, 45));
489 
490  // Fe, Cu, Mo
491 
492  thePimData.push_back(new G4PiData(fe_m_t, fe_m_in, e4, 47));
493  thePipData.push_back(new G4PiData(fe_m_t, fe_p_in, e4, 47));
494 
495  thePimData.push_back(new G4PiData(cu_m_t, cu_m_in, e4, 47));
496  thePipData.push_back(new G4PiData(cu_m_t, cu_p_in, e4, 47));
497 
498  thePimData.push_back(new G4PiData(mo_m_t, mo_m_in, e4, 47));
499  thePipData.push_back(new G4PiData(mo_m_t, mo_p_in, e4, 47));
500 
501  // Cd, Sn, W
502 
503  thePimData.push_back(new G4PiData(cd_m_t, cd_m_in, e5, 48));
504  thePipData.push_back(new G4PiData(cd_m_t, cd_p_in, e5, 48));
505 
506  thePimData.push_back(new G4PiData(sn_m_t, sn_m_in, e5, 48));
507  thePipData.push_back(new G4PiData(sn_m_t, sn_p_in, e5, 48));
508 
509  thePimData.push_back(new G4PiData(w_m_t, w_m_in, e5, 48));
510  thePipData.push_back(new G4PiData(w_m_t, w_p_in, e5, 48));
511 
512  // Pb, U
513 
514  thePimData.push_back(new G4PiData(pb_m_t, pb_m_in, e6, 46));
515  thePipData.push_back(new G4PiData(pb_m_t, pb_p_in, e6, 46));
516 
517  thePimData.push_back(new G4PiData(u_m_t, u_m_in, e6, 46));
518  thePipData.push_back(new G4PiData(u_m_t, u_p_in, e6, 46));
519 
520  theZ.push_back(2); // He
521  theZ.push_back(4); // Be
522  theZ.push_back(6); // C
523  theZ.push_back(7); // N
524  theZ.push_back(8); // O
525  theZ.push_back(11); // Na
526  theZ.push_back(13); // Al
527  theZ.push_back(14); // Si
528  theZ.push_back(20); // Ca
529  theZ.push_back(26); // Fe
530  theZ.push_back(29); // Cu
531  theZ.push_back(42); // Mo
532  theZ.push_back(48); // Cd
533  theZ.push_back(50); // Sn
534  theZ.push_back(74); // W
535  theZ.push_back(82); // Pb
536  theZ.push_back(92); // U
537 
538 }
static G4Proton * Proton()
Definition: G4Proton.cc:93
static G4Neutron * Neutron()
Definition: G4Neutron.cc:104
G4VComponentCrossSection(const G4String &nam="")
G4ComponentBarNucleonNucleusXsc::~G4ComponentBarNucleonNucleusXsc ( )
virtual

Definition at line 543 of file G4ComponentBarNucleonNucleusXsc.cc.

544 {
545  std::for_each(thePimData.begin(), thePimData.end(), G4PiData::Delete());
546  std::for_each(thePipData.begin(), thePipData.end(), G4PiData::Delete());
547 }

Member Function Documentation

void G4ComponentBarNucleonNucleusXsc::CrossSectionDescription ( std::ostream &  outFile) const

Definition at line 751 of file G4ComponentBarNucleonNucleusXsc.cc.

752 {
753  outFile << "G4ComponentBarNucleonNucleusXsc is a variant of the Barashenkov\n"
754  << "cross section parameterization to be used of protons and\n"
755  << "nucleons on targets heavier than hydrogen. It is intended for\n"
756  << "use as a cross section component and is currently used by\n"
757  << "G4BGGNucleonInelasticXS. It is valid for incident energies up\n"
758  << "to 1 TeV.\n";
759 }
std::ofstream outFile
Definition: GammaRayTel.cc:68
G4double G4ComponentBarNucleonNucleusXsc::GetElasticCrossSection ( const G4DynamicParticle aParticle,
G4int  Z 
)
inline

Definition at line 221 of file G4ComponentBarNucleonNucleusXsc.hh.

References GetElementCrossSection().

223 {
224  fInelasticXsc = GetElementCrossSection(dp, Z);
225  return fElasticXsc;
226 }
G4double GetElementCrossSection(const G4DynamicParticle *aParticle, G4int Z)
G4double G4ComponentBarNucleonNucleusXsc::GetElasticElementCrossSection ( const G4ParticleDefinition aParticle,
G4double  kinEnergy,
G4int  Z,
G4double   
)
virtual

Implements G4VComponentCrossSection.

Definition at line 607 of file G4ComponentBarNucleonNucleusXsc.cc.

References GetElementCrossSection().

610 {
611  G4DynamicParticle* aDP = new G4DynamicParticle(aParticle,G4ParticleMomentum(1.,0.,0.),
612  kinEnergy);
613  fInelasticXsc = GetElementCrossSection(aDP, Z);
614  delete aDP;
615 
616  return fElasticXsc;
617 }
G4double GetElementCrossSection(const G4DynamicParticle *aParticle, G4int Z)
G4ThreeVector G4ParticleMomentum
G4double G4ComponentBarNucleonNucleusXsc::GetElasticIsotopeCrossSection ( const G4ParticleDefinition aParticle,
G4double  kinEnergy,
G4int  Z,
G4int   
)
virtual

Implements G4VComponentCrossSection.

Definition at line 621 of file G4ComponentBarNucleonNucleusXsc.cc.

References GetElementCrossSection().

624 {
625  G4DynamicParticle* aDP = new G4DynamicParticle(aParticle,G4ParticleMomentum(1.,0.,0.),
626  kinEnergy);
627  fInelasticXsc = GetElementCrossSection(aDP, Z);
628  delete aDP;
629 
630  return fElasticXsc;
631 }
G4double GetElementCrossSection(const G4DynamicParticle *aParticle, G4int Z)
G4ThreeVector G4ParticleMomentum
G4double G4ComponentBarNucleonNucleusXsc::GetElasticXsc ( )
inline

Definition at line 106 of file G4ComponentBarNucleonNucleusXsc.hh.

106 { return fElasticXsc; };
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().

657 {
658  G4double kineticEnergy = aParticle->GetKineticEnergy();
659 
660  G4double result = 0;
661  // G4cout<<"Z = "<<Z<<G4endl;
662 
663  size_t it = 0;
664  size_t itmax = theZ.size() - 1;
665  for(; it <= itmax; ++it) { if(Z <= theZ[it]) { break; } }
666  if( it > itmax ) { it = itmax; }
667  G4int Z1, Z2;
668  G4double x1, x2, xt1, xt2;
669 
670  std::vector<G4PiData *> * theData = &thePimData;
671  if(aParticle->GetDefinition() == theProton) { theData = &thePipData; }
672 
673  if( theZ[it] == Z )
674  {
675  result = (*theData)[it]->ReactionXSection(kineticEnergy);
676  fTotalXsc = (*theData)[it]->TotalXSection(kineticEnergy);
677  }
678  else
679  {
680  if(0 == it) { it = 1; }
681  x1 = (*theData)[it-1]->ReactionXSection(kineticEnergy);
682  xt1 = (*theData)[it-1]->TotalXSection(kineticEnergy);
683  Z1 = theZ[it-1];
684  x2 = (*theData)[it]->ReactionXSection(kineticEnergy);
685  xt2 = (*theData)[it]->TotalXSection(kineticEnergy);
686  Z2 = theZ[it];
687 
688  result = Interpolate(Z1, Z2, Z, x1, x2);
689  fTotalXsc = Interpolate(Z1, Z2, Z, xt1, xt2);
690  }
691 
692  fElasticXsc = fTotalXsc - result;
693  if( fElasticXsc < 0.) { fElasticXsc = 0.; }
694 
695  return result;
696 }
G4double GetKineticEnergy() const
G4ParticleDefinition * GetDefinition() const
int G4int
Definition: G4Types.hh:78
double G4double
Definition: G4Types.hh:76
G4double G4ComponentBarNucleonNucleusXsc::GetInelasticElementCrossSection ( const G4ParticleDefinition aParticle,
G4double  kinEnergy,
G4int  Z,
G4double   
)
virtual

Implements G4VComponentCrossSection.

Definition at line 593 of file G4ComponentBarNucleonNucleusXsc.cc.

References GetElementCrossSection().

596 {
597  G4DynamicParticle* aDP = new G4DynamicParticle(aParticle,G4ParticleMomentum(1.,0.,0.),
598  kinEnergy);
599  fInelasticXsc = GetElementCrossSection(aDP, Z);
600  delete aDP;
601 
602  return fInelasticXsc;
603 }
G4double GetElementCrossSection(const G4DynamicParticle *aParticle, G4int Z)
G4ThreeVector G4ParticleMomentum
G4double G4ComponentBarNucleonNucleusXsc::GetInelasticIsotopeCrossSection ( const G4ParticleDefinition aParticle,
G4double  kinEnergy,
G4int  Z,
G4int   
)
virtual

Implements G4VComponentCrossSection.

Definition at line 579 of file G4ComponentBarNucleonNucleusXsc.cc.

References GetElementCrossSection().

582 {
583  G4DynamicParticle* aDP = new G4DynamicParticle(aParticle,G4ParticleMomentum(1.,0.,0.),
584  kinEnergy);
585  fInelasticXsc = GetElementCrossSection(aDP, Z);
586  delete aDP;
587 
588  return fInelasticXsc;
589 }
G4double GetElementCrossSection(const G4DynamicParticle *aParticle, G4int Z)
G4ThreeVector G4ParticleMomentum
G4double G4ComponentBarNucleonNucleusXsc::GetTotalElementCrossSection ( const G4ParticleDefinition aParticle,
G4double  kinEnergy,
G4int  Z,
G4double   
)
virtual

Implements G4VComponentCrossSection.

Definition at line 565 of file G4ComponentBarNucleonNucleusXsc.cc.

References GetElementCrossSection().

568 {
569  G4DynamicParticle* aDP = new G4DynamicParticle(aParticle,G4ParticleMomentum(1.,0.,0.),
570  kinEnergy);
571  fInelasticXsc = GetElementCrossSection(aDP, Z);
572  delete aDP;
573 
574  return fTotalXsc;
575 }
G4double GetElementCrossSection(const G4DynamicParticle *aParticle, G4int Z)
G4ThreeVector G4ParticleMomentum
G4double G4ComponentBarNucleonNucleusXsc::GetTotalIsotopeCrossSection ( const G4ParticleDefinition aParticle,
G4double  kinEnergy,
G4int  Z,
G4int   
)
virtual

Implements G4VComponentCrossSection.

Definition at line 551 of file G4ComponentBarNucleonNucleusXsc.cc.

References GetElementCrossSection().

554 {
555  G4DynamicParticle* aDP = new G4DynamicParticle(aParticle,G4ParticleMomentum(1.,0.,0.),
556  kinEnergy);
557  fInelasticXsc = GetElementCrossSection(aDP, Z);
558  delete aDP;
559 
560  return fTotalXsc;
561 }
G4double GetElementCrossSection(const G4DynamicParticle *aParticle, G4int Z)
G4ThreeVector G4ParticleMomentum
G4double G4ComponentBarNucleonNucleusXsc::GetTotalXsc ( )
inline

Definition at line 105 of file G4ComponentBarNucleonNucleusXsc.hh.

105 { return fTotalXsc; };
G4bool G4ComponentBarNucleonNucleusXsc::IsElementApplicable ( const G4DynamicParticle aParticle,
G4int  Z 
)

Definition at line 639 of file G4ComponentBarNucleonNucleusXsc.cc.

References G4DynamicParticle::GetDefinition(), G4DynamicParticle::GetKineticEnergy(), and python.hepunit::GeV.

641 {
642  G4bool result = false;
643  if(aParticle->GetDefinition() == theNeutron ) result = true;
644  if(aParticle->GetDefinition() == theProton) result = true;
645  if(Z < 2) result = false;
646  if(aParticle->GetKineticEnergy() > 999.9*GeV) result = false;
647  return result;
648 }
G4double GetKineticEnergy() const
G4ParticleDefinition * GetDefinition() const
bool G4bool
Definition: G4Types.hh:79

The documentation for this class was generated from the following files: