Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4INCL::RecombinationChannel Class Reference

#include <G4INCLRecombinationChannel.hh>

+ Inheritance diagram for G4INCL::RecombinationChannel:

Public Member Functions

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

Detailed Description

Definition at line 55 of file G4INCLRecombinationChannel.hh.

Constructor & Destructor Documentation

◆ RecombinationChannel()

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

Definition at line 57 of file G4INCLRecombinationChannel.cc.

58 :theNucleus(n)
59 {
60 if(p1->isDelta()) {
61// assert(p2->isNucleon());
62 theDelta = p1;
63 theNucleon = p2;
64 } else {
65// assert(p1->isNucleon());
66 theDelta = p2;
67 theNucleon = p1;
68 }
69 }

◆ ~RecombinationChannel()

G4INCL::RecombinationChannel::~RecombinationChannel ( )
virtual

Definition at line 71 of file G4INCLRecombinationChannel.cc.

72 {
73 }

Member Function Documentation

◆ getFinalState()

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

Implements G4INCL::IChannel.

Definition at line 75 of file G4INCLRecombinationChannel.cc.

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

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