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 #include "globals.hh"
00028 #include "G4XAnnihilationChannel.hh"
00029 #include "G4ConcreteMesonBaryonToResonance.hh"
00030
00031 G4BaryonWidth & G4ConcreteMesonBaryonToResonance::theBaryonWidth()
00032 {
00033 static G4BaryonWidth theWidth;
00034 return theWidth;
00035 }
00036
00037 G4BaryonPartialWidth & G4ConcreteMesonBaryonToResonance::theBaryonPartialWidth()
00038 {
00039 static G4BaryonPartialWidth theWidth;
00040 return theWidth;
00041 }
00042
00043 G4ParticleTypeConverter & G4ConcreteMesonBaryonToResonance::myConv()
00044 {
00045 static G4ParticleTypeConverter theConv;
00046 return theConv;
00047 }
00048
00049 G4ConcreteMesonBaryonToResonance::G4ConcreteMesonBaryonToResonance(const G4ParticleDefinition* aPrimary,
00050 const G4ParticleDefinition* bPrimary,
00051 const G4ParticleDefinition* aSecondary,
00052 const G4String& partWidthLabel)
00053 : thePrimary1(aPrimary), thePrimary2(bPrimary), theSecondary(aSecondary)
00054 {
00055 crossSectionSource = new G4XAnnihilationChannel(aSecondary,
00056 theBaryonWidth(),
00057 theBaryonPartialWidth(),
00058 partWidthLabel);
00059 }
00060
00061
00062 G4ConcreteMesonBaryonToResonance::~G4ConcreteMesonBaryonToResonance()
00063 {
00064 delete crossSectionSource;
00065 }
00066
00067
00068 G4bool G4ConcreteMesonBaryonToResonance::IsInCharge(const G4KineticTrack& trk1,
00069 const G4KineticTrack& trk2) const
00070 {
00071 if (myConv().GetGenericType(trk1)==myConv().GetGenericType(thePrimary1) &&
00072 myConv().GetGenericType(trk2)==myConv().GetGenericType(thePrimary2)) return true;
00073 if (myConv().GetGenericType(trk1)==myConv().GetGenericType(thePrimary2) &&
00074 myConv().GetGenericType(trk2)==myConv().GetGenericType(thePrimary1)) return true;
00075 return false;
00076 }
00077
00078 const G4ParticleDefinition* G4ConcreteMesonBaryonToResonance::GetOutgoingParticle(const G4KineticTrack& trk1,
00079 const G4KineticTrack& trk2) const
00080 {
00081 G4int secondaryIso3 = trk1.GetDefinition()->GetPDGiIsospin3() + trk2.GetDefinition()->GetPDGiIsospin3();
00082 const G4ParticleDefinition* state;
00083 if ( (state = myConv().FindIso3State(myConv().GetGenericType(theSecondary), secondaryIso3)) == NULL)
00084 {
00085 G4cerr << "for "<<static_cast<G4int>(myConv().GetGenericType(theSecondary))<<" "<<secondaryIso3<<G4endl;
00086 throw G4HadronicException(__FILE__, __LINE__, "G4ConcreteMesonBaryonToResonance: Can't find iso3 state!");
00087 }
00088 return state;
00089 }