#include <G4INCLRecombinationChannel.hh>
Inheritance diagram for G4INCL::RecombinationChannel:
Public Member Functions | |
RecombinationChannel (Nucleus *n, Particle *p1, Particle *p2) | |
virtual | ~RecombinationChannel () |
FinalState * | getFinalState () |
Definition at line 53 of file G4INCLRecombinationChannel.hh.
Definition at line 55 of file G4INCLRecombinationChannel.cc.
References G4INCL::Particle::isDelta().
00056 :theNucleus(n) 00057 { 00058 if(p1->isDelta()) { 00059 // assert(p2->isNucleon()); 00060 theDelta = p1; 00061 theNucleon = p2; 00062 } else { 00063 // assert(p1->isNucleon()); 00064 theDelta = p2; 00065 theNucleon = p1; 00066 } 00067 }
G4INCL::RecombinationChannel::~RecombinationChannel | ( | ) | [virtual] |
FinalState * G4INCL::RecombinationChannel::getFinalState | ( | ) | [virtual] |
Implements G4INCL::IChannel.
Definition at line 73 of file G4INCLRecombinationChannel.cc.
References G4INCL::FinalState::addModifiedParticle(), G4INCL::Particle::adjustEnergyFromMomentum(), G4INCL::DeltaMinus, G4INCL::DeltaPlus, G4INCL::DeltaPlusPlus, G4INCL::DeltaZero, ERROR, G4INCL::Particle::getMass(), G4INCL::Particle::getType(), G4INCL::KinematicsUtils::momentumInCM(), G4INCL::Neutron, G4INCL::Random::normVector(), G4INCL::Proton, G4INCL::Particle::setMomentum(), G4INCL::Particle::setType(), and G4INCL::KinematicsUtils::totalEnergyInCM().
00074 { 00075 // Compute the total available energy in the CM 00076 const G4double sqrts = KinematicsUtils::totalEnergyInCM(theDelta, theNucleon); 00077 00078 // Assign the types of the final-state particles 00079 switch(theDelta->getType()) { 00080 case DeltaPlusPlus: 00081 // assert(theNucleon->getType()!=Proton); 00082 theDelta->setType(Proton); 00083 theNucleon->setType(Proton); 00084 break; 00085 case DeltaPlus: 00086 theDelta->setType(Proton); 00087 break; 00088 case DeltaZero: 00089 theDelta->setType(Neutron); 00090 break; 00091 case DeltaMinus: 00092 // assert(theNucleon->getType()!=Neutron); 00093 theDelta->setType(Neutron); 00094 theNucleon->setType(Neutron); 00095 break; 00096 default: 00097 ERROR("Unknown particle type in RecombinationChannel" << std::endl); 00098 break; 00099 } 00100 00101 // Calculate the momenta of the nucleons in the final state 00102 const G4double pCM = KinematicsUtils::momentumInCM(sqrts, theDelta->getMass(), theNucleon->getMass()); 00103 00104 // The angular distribution of final-state nucleons is isotropic 00105 ThreeVector momentum = Random::normVector(pCM); 00106 00107 // Assign the momenta 00108 theDelta->setMomentum(momentum); 00109 theNucleon->setMomentum(-momentum); 00110 00111 // Update the kinetic energies 00112 theDelta->adjustEnergyFromMomentum(); 00113 theNucleon->adjustEnergyFromMomentum(); 00114 00115 // Create the final state 00116 FinalState *fs = new FinalState(); 00117 fs->addModifiedParticle(theDelta); 00118 fs->addModifiedParticle(theNucleon); 00119 00120 return fs; 00121 00122 }