Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
G4INCLRecombinationChannel.cc
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26// INCL++ intra-nuclear cascade model
27// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
28// Davide Mancusi, CEA
29// Alain Boudard, CEA
30// Sylvie Leray, CEA
31// Joseph Cugnon, University of Liege
32//
33// INCL++ revision: v5.1.8
34//
35#define INCLXX_IN_GEANT4_MODE 1
36
37#include "globals.hh"
38
39/** \file G4INCLRecombinationChannel.cc
40 * \brief Delta-nucleon recombination channel.
41 *
42 * \date 25 March 2011
43 * \author Davide Mancusi
44 */
45
47#include "G4INCLRandom.hh"
51#include "G4INCLGlobals.hh"
52
53// #include <cassert>
54
55namespace G4INCL {
56
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 }
70
72 {
73 }
74
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 }
125
126}
#define ERROR(x)
Delta-nucleon recombination channel.
double G4double
Definition: G4Types.hh:64
void addModifiedParticle(Particle *p)
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.
G4bool isDelta() const
Is it a Delta?
static ThreeVector normVector(G4double norm=1.)
Definition: G4INCLRandom.cc:73
RecombinationChannel(Nucleus *n, Particle *p1, Particle *p2)