#include <G4VCrossSectionSource.hh>
Inheritance diagram for G4VCrossSectionSource:
Definition at line 38 of file G4VCrossSectionSource.hh.
G4VCrossSectionSource::G4VCrossSectionSource | ( | ) |
G4VCrossSectionSource::~G4VCrossSectionSource | ( | ) | [virtual] |
virtual G4double G4VCrossSectionSource::CrossSection | ( | const G4KineticTrack & | trk1, | |
const G4KineticTrack & | trk2 | |||
) | const [pure virtual] |
Implemented in G4CrossSectionComposite, G4CrossSectionPatch, G4XAnnihilationChannel, G4XAqmElastic, G4XAqmTotal, G4XMesonBaryonElastic, G4XNNElasticLowE, G4XNNTotalLowE, G4XnpElasticLowE, G4XnpTotalLowE, G4XPDGElastic, G4XPDGTotal, G4XpimNTotal, G4XpipNTotal, and G4XResonance.
Referenced by G4VCollision::CrossSection(), G4CrossSectionPatch::CrossSection(), G4CrossSectionComposite::CrossSection(), G4CollisionNN::CrossSection(), G4CollisionComposite::CrossSection(), PrintAll(), and G4CrossSectionPatch::Transition().
G4double G4VCrossSectionSource::FcrossX | ( | G4double | e, | |
G4double | e0, | |||
G4double | sigma, | |||
G4double | eParam, | |||
G4double | power | |||
) | const [protected] |
Definition at line 174 of file G4VCrossSectionSource.cc.
00176 { 00177 G4double result = 0.; 00178 00179 G4double denom = eParam*eParam + (e-e0)*(e-e0); 00180 if (denom > 0.) 00181 { 00182 G4double value = (2.* eParam * sigma * (e-e0) / denom) * std::pow(((e0 + eParam) / e), power); 00183 result = std::max(0., value); 00184 } 00185 return result; 00186 }
G4ParticleDefinition * G4VCrossSectionSource::FindKeyParticle | ( | const G4KineticTrack & | trk1, | |
const G4KineticTrack & | trk2 | |||
) | const [protected] |
Definition at line 50 of file G4VCrossSectionSource.cc.
References G4KineticTrack::GetDefinition(), G4Neutron::Neutron(), and G4Proton::Proton().
Referenced by G4XNNTotalLowE::CrossSection(), and G4XNNElasticLowE::CrossSection().
00051 { 00052 G4ParticleDefinition * result; 00053 00054 G4ParticleDefinition * p1 = trk1.GetDefinition(); 00055 G4ParticleDefinition * p2 = trk2.GetDefinition(); 00056 00057 if( (p1==G4Proton::Proton() && p2==G4Proton::Proton() ) || 00058 (p1==G4Neutron::Neutron() && p2==G4Neutron::Neutron()) ) 00059 { 00060 result = G4Proton::Proton(); 00061 } 00062 else if( (p1==G4Neutron::Neutron() && p2==G4Proton::Proton()) || 00063 (p2==G4Neutron::Neutron() && p1==G4Proton::Proton()) ) 00064 { 00065 result = G4Neutron::Neutron(); 00066 } 00067 else 00068 { 00069 throw G4HadronicException(__FILE__, __LINE__, "G4VCrossSectionSource: unklnown particles in FindKeyParticle"); 00070 } 00071 return result; 00072 }
const G4ParticleDefinition * G4VCrossSectionSource::FindLightParticle | ( | const G4KineticTrack & | trk1, | |
const G4KineticTrack & | trk2 | |||
) | const [protected] |
Definition at line 158 of file G4VCrossSectionSource.cc.
References G4KineticTrack::GetDefinition(), and G4ParticleDefinition::GetPDGMass().
Referenced by G4XMesonBaryonElastic::CrossSection().
00160 { 00161 G4double mass1 = trk1.GetDefinition()->GetPDGMass(); 00162 G4double mass2 = trk2.GetDefinition()->GetPDGMass(); 00163 if (mass1 < mass2) 00164 { 00165 return trk1.GetDefinition(); 00166 } 00167 else 00168 { 00169 return trk2.GetDefinition(); 00170 } 00171 }
virtual const G4CrossSectionVector* G4VCrossSectionSource::GetComponents | ( | ) | const [pure virtual] |
Implemented in G4CrossSectionComposite, G4CrossSectionPatch, G4XAnnihilationChannel, G4XAqmElastic, G4XAqmTotal, G4XMesonBaryonElastic, G4XNNElastic, G4XNNElasticLowE, G4XNNTotal, G4XNNTotalLowE, G4XnpElastic, G4XnpElasticLowE, G4XnpTotal, G4XnpTotalLowE, G4XPDGElastic, G4XPDGTotal, G4XpimNTotal, G4XpipNTotal, and G4XResonance.
Referenced by Print(), and PrintAll().
G4double G4VCrossSectionSource::GetMinStringMass | ( | ) | const [protected] |
Definition at line 196 of file G4VCrossSectionSource.cc.
00197 { 00198 // Parameter from UrQMD 00199 const G4double minStringMass = 0.52 * GeV; 00200 return minStringMass; 00201 }
G4double G4VCrossSectionSource::GetTransversePionMass | ( | ) | const [protected] |
Definition at line 188 of file G4VCrossSectionSource.cc.
00189 { 00190 // Parameter from UrQMD 00191 const G4double transversePionMass = 0.3 * GeV; 00192 return transversePionMass; 00193 }
G4double G4VCrossSectionSource::HighLimit | ( | ) | const [virtual] |
Reimplemented in G4XNNElasticLowE, G4XNNTotalLowE, G4XnpElasticLowE, and G4XnpTotalLowE.
Definition at line 146 of file G4VCrossSectionSource.cc.
References DBL_MAX.
Referenced by G4CrossSectionPatch::CrossSection(), IsValid(), and G4CrossSectionPatch::Transition().
00147 { 00148 return DBL_MAX; 00149 }
G4bool G4VCrossSectionSource::InLimits | ( | G4double | e, | |
G4double | eLow, | |||
G4double | eHigh | |||
) | const [protected] |
Definition at line 133 of file G4VCrossSectionSource.cc.
Referenced by G4XPDGTotal::IsValid(), G4XPDGElastic::IsValid(), G4XnpTotalLowE::IsValid(), G4XnpElasticLowE::IsValid(), G4XNNElasticLowE::IsValid(), G4XMesonBaryonElastic::IsValid(), G4XAqmTotal::IsValid(), G4XAqmElastic::IsValid(), and G4XAnnihilationChannel::IsValid().
00134 { 00135 G4bool answer = false; 00136 if (e >= eLow && e <= eHigh) answer = true; 00137 return answer; 00138 }
Reimplemented in G4CrossSectionComposite, G4CrossSectionPatch, G4XAnnihilationChannel, G4XAqmElastic, G4XAqmTotal, G4XMesonBaryonElastic, G4XNNElasticLowE, G4XNNTotalLowE, G4XnpElasticLowE, G4XnpTotalLowE, G4XPDGElastic, and G4XPDGTotal.
Definition at line 151 of file G4VCrossSectionSource.cc.
References HighLimit(), and LowLimit().
Referenced by G4CrossSectionPatch::CrossSection(), G4CrossSectionComposite::CrossSection(), G4CrossSectionPatch::IsValid(), and G4CrossSectionComposite::IsValid().
00152 { 00153 G4bool answer = false; 00154 if (e >= LowLimit() && e <= HighLimit()) answer = true; 00155 return answer; 00156 }
G4double G4VCrossSectionSource::LowLimit | ( | ) | const [virtual] |
Reimplemented in G4XPDGElastic, and G4XPDGTotal.
Definition at line 140 of file G4VCrossSectionSource.cc.
Referenced by G4CrossSectionPatch::CrossSection(), IsValid(), and G4CrossSectionPatch::Transition().
virtual G4String G4VCrossSectionSource::Name | ( | ) | const [pure virtual] |
Implemented in G4XAnnihilationChannel, G4XAqmElastic, G4XAqmTotal, G4XMesonBaryonElastic, G4XNNElastic, G4XNNElasticLowE, G4XNNTotal, G4XNNTotalLowE, G4XnpElastic, G4XnpElasticLowE, G4XnpTotal, G4XnpTotalLowE, G4XPDGElastic, G4XPDGTotal, G4XpimNTotal, G4XpipNTotal, and G4XResonance.
Referenced by Print(), and PrintAll().
G4bool G4VCrossSectionSource::operator!= | ( | const G4VCrossSectionSource & | right | ) | const |
Definition at line 80 of file G4VCrossSectionSource.cc.
00081 { 00082 return (this != (G4VCrossSectionSource *) &right); 00083 }
G4bool G4VCrossSectionSource::operator== | ( | const G4VCrossSectionSource & | right | ) | const |
Definition at line 74 of file G4VCrossSectionSource.cc.
00075 { 00076 return (this == (G4VCrossSectionSource *) &right); 00077 }
void G4VCrossSectionSource::Print | ( | ) | const [virtual] |
Reimplemented in G4XNNElasticLowE, G4XnpElasticLowE, and G4XnpTotalLowE.
Definition at line 86 of file G4VCrossSectionSource.cc.
References G4cout, G4endl, GetComponents(), Name(), and Print().
Referenced by G4XnpTotalLowE::Print(), G4XnpElasticLowE::Print(), G4XNNElasticLowE::Print(), Print(), and G4VCollision::Print().
00087 { 00088 G4int nComponents = 0; 00089 const G4CrossSectionVector* components = GetComponents(); 00090 if (components) 00091 { 00092 nComponents = components->size(); 00093 } 00094 G4cout << "---- " << this->Name() << " ---- has " << nComponents << " components" <<G4endl; 00095 G4int i; 00096 for (i=0; i<nComponents; i++) 00097 { 00098 G4cout << "-" << this->Name() << " - Component " << i << ": " <<G4endl; 00099 00100 G4CrossSectionSourcePtr componentPtr = (*components)[i]; 00101 G4VCrossSectionSource* component = componentPtr(); 00102 component->Print(); 00103 } 00104 }
void G4VCrossSectionSource::PrintAll | ( | const G4KineticTrack & | trk1, | |
const G4KineticTrack & | trk2 | |||
) | const [virtual] |
Definition at line 107 of file G4VCrossSectionSource.cc.
References CrossSection(), G4cout, G4endl, G4KineticTrack::Get4Momentum(), GetComponents(), Name(), and PrintAll().
Referenced by PrintAll().
00108 { 00109 G4double sqrtS = (trk1.Get4Momentum() + trk2.Get4Momentum()).mag(); 00110 G4double sigma = CrossSection(trk1,trk2) / millibarn; 00111 G4cout << "---- " << Name() << ": " 00112 << "Ecm = " << sqrtS / GeV << " GeV - " 00113 << " Cross section = " << sigma << " mb " 00114 << G4endl; 00115 00116 G4int nComponents = 0; 00117 const G4CrossSectionVector* components = GetComponents(); 00118 if (components != 0) 00119 { 00120 nComponents = components->size(); 00121 } 00122 G4int i; 00123 for (i=0; i<nComponents; i++) 00124 { 00125 G4cout << "* Component " << i << ": "; 00126 G4CrossSectionSourcePtr componentPtr = (*components)[i]; 00127 G4VCrossSectionSource* component = componentPtr(); 00128 component->PrintAll(trk1,trk2); 00129 } 00130 }