00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #include "globals.hh"
00029 #include "G4ios.hh"
00030 #include "G4KineticTrack.hh"
00031 #include "G4XResonance.hh"
00032 #include "Randomize.hh"
00033 #include "G4Proton.hh"
00034
00035 G4XResonance::G4XResonance(const G4ParticleDefinition* in1,
00036 const G4ParticleDefinition* in2,
00037 G4int iIsospinOut1, G4double spinOut1, G4double massOut1,
00038 G4int iIsospinOut2, G4double spinOut2, G4double massOut2,
00039 G4String subType1, G4String subType2,
00040 const G4VXResonanceTable& sigmaTable) :
00041 isoOut1(iIsospinOut1), iSpinOut1(spinOut1), mOut1(massOut1),
00042 isoOut2(iIsospinOut2), iSpinOut2(spinOut2), mOut2(massOut2)
00043
00044 {
00045 table = sigmaTable.CrossSectionTable();
00046
00047 if (table == 0)
00048 throw G4HadronicException(__FILE__, __LINE__, "G4XResonance::G4XResonance - no cross section table available");
00049
00050 name = in1->GetParticleName() + in2->GetParticleName() + " -> " + subType1 + subType2;
00051 }
00052
00053
00054 G4XResonance::~G4XResonance()
00055 {
00056 delete table;
00057 table = 0;
00058 }
00059
00060
00061 G4bool G4XResonance::operator==(const G4XResonance &right) const
00062 {
00063 return (this == (G4XResonance *) &right);
00064 }
00065
00066
00067 G4bool G4XResonance::operator!=(const G4XResonance &right) const
00068 {
00069 return (this != (G4XResonance *) &right);
00070 }
00071
00072
00073 G4String G4XResonance::Name() const
00074 {
00075 return name;
00076 }
00077
00078 G4double G4XResonance::CrossSection(const G4KineticTrack& trk1, const G4KineticTrack& trk2) const
00079 {
00080 G4bool dummy = false;
00081 G4double sqrtS = (trk1.Get4Momentum() + trk2.Get4Momentum()).mag();
00082
00083
00084 G4double sigma = table->GetValue(sqrtS,dummy);
00085
00086
00087
00088
00089 sigma *= IsospinCorrection(trk1,trk2,isoOut1,isoOut2,iSpinOut1,iSpinOut2);
00090
00091
00092
00093 if (trk1.GetDefinition()->IsShortLived() || trk2.GetDefinition()->IsShortLived())
00094 {
00095 sigma *= DetailedBalance(trk1,trk2, isoOut1,isoOut2, iSpinOut1,iSpinOut2, mOut1,mOut2);
00096 }
00097
00098 return sigma;
00099
00100 }
00101