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

#include <G4INCLRecombinationChannel.hh>

Inheritance diagram for G4INCL::RecombinationChannel:
G4INCL::IChannel

Public Member Functions

 RecombinationChannel (Particle *p1, Particle *p2)
 
virtual ~RecombinationChannel ()
 
FinalStategetFinalState ()
 
- Public Member Functions inherited from G4INCL::IChannel
 IChannel ()
 
virtual ~IChannel ()
 

Detailed Description

Definition at line 53 of file G4INCLRecombinationChannel.hh.

Constructor & Destructor Documentation

G4INCL::RecombinationChannel::RecombinationChannel ( Particle p1,
Particle p2 
)

Definition at line 55 of file G4INCLRecombinationChannel.cc.

References G4INCL::Particle::isDelta().

56  {
57  if(p1->isDelta()) {
58 // assert(p2->isNucleon());
59  theDelta = p1;
60  theNucleon = p2;
61  } else {
62 // assert(p1->isNucleon());
63  theDelta = p2;
64  theNucleon = p1;
65  }
66  }
G4INCL::RecombinationChannel::~RecombinationChannel ( )
virtual

Definition at line 68 of file G4INCLRecombinationChannel.cc.

69  {
70  }

Member Function Documentation

FinalState * G4INCL::RecombinationChannel::getFinalState ( )
virtual

Implements G4INCL::IChannel.

Definition at line 72 of file G4INCLRecombinationChannel.cc.

References G4INCL::FinalState::addModifiedParticle(), G4INCL::Particle::adjustEnergyFromMomentum(), G4INCL::DeltaMinus, G4INCL::DeltaPlus, G4INCL::DeltaPlusPlus, G4INCL::DeltaZero, G4INCL::Particle::getMass(), G4INCL::Particle::getType(), INCL_ERROR, G4INCL::KinematicsUtils::momentumInCM(), G4INCL::Neutron, G4INCL::Random::normVector(), G4INCL::Proton, G4INCL::Particle::setMomentum(), G4INCL::Particle::setType(), and G4INCL::KinematicsUtils::totalEnergyInCM().

73  {
74  // Compute the total available energy in the CM
75  const G4double sqrts = KinematicsUtils::totalEnergyInCM(theDelta, theNucleon);
76 
77  // Assign the types of the final-state particles
78  switch(theDelta->getType()) {
79  case DeltaPlusPlus:
80 // assert(theNucleon->getType()!=Proton);
81  theDelta->setType(Proton);
82  theNucleon->setType(Proton);
83  break;
84  case DeltaPlus:
85  theDelta->setType(Proton);
86  break;
87  case DeltaZero:
88  theDelta->setType(Neutron);
89  break;
90  case DeltaMinus:
91 // assert(theNucleon->getType()!=Neutron);
92  theDelta->setType(Neutron);
93  theNucleon->setType(Neutron);
94  break;
95  default:
96  INCL_ERROR("Unknown particle type in RecombinationChannel" << std::endl);
97  break;
98  }
99 
100  // Calculate the momenta of the nucleons in the final state
101  const G4double pCM = KinematicsUtils::momentumInCM(sqrts, theDelta->getMass(), theNucleon->getMass());
102 
103  // The angular distribution of final-state nucleons is isotropic
104  ThreeVector momentum = Random::normVector(pCM);
105 
106  // Assign the momenta
107  theDelta->setMomentum(momentum);
108  theNucleon->setMomentum(-momentum);
109 
110  // Update the kinetic energies
111  theDelta->adjustEnergyFromMomentum();
112  theNucleon->adjustEnergyFromMomentum();
113 
114  // Create the final state
115  FinalState *fs = new FinalState();
116  fs->addModifiedParticle(theDelta);
117  fs->addModifiedParticle(theNucleon);
118 
119  return fs;
120 
121  }
G4double getMass() const
Get the cached particle mass.
#define INCL_ERROR(x)
G4double adjustEnergyFromMomentum()
Recompute the energy to match the momentum.
G4double momentumInCM(Particle const *const p1, Particle const *const p2)
gives the momentum in the CM frame of two particles.
ThreeVector normVector(G4double norm=1.)
G4INCL::ParticleType getType() const
void setType(ParticleType t)
double G4double
Definition: G4Types.hh:76
G4double totalEnergyInCM(Particle const *const p1, Particle const *const p2)
virtual void setMomentum(const G4INCL::ThreeVector &momentum)

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