Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4INCLDeltaProductionChannel.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
42#include "G4INCLRandom.hh"
43#include "G4INCLGlobals.hh"
44#include "G4INCLLogger.hh"
45
46namespace G4INCL {
47
49 Particle *p2,
50 Nucleus *n)
51 :theNucleus(n), particle1(p1), particle2(p2)
52 {}
53
55
56 G4double DeltaProductionChannel::sampleDeltaMass(G4double ecm) {
57 const G4double ramass = 0.0;
58 const G4int maxTries = 100000;
59 G4int nTries = 0;
60 deltaProd101: G4double rndm = Random::shoot();
61 nTries++;
62 G4double y = std::tan(Math::pi*(rndm-0.5));
63 G4double x = 1232.+0.5*130.*y+ramass;
64 if (x < ParticleTable::effectiveDeltaDecayThreshold && (nTries < maxTries))
65 goto deltaProd101;
66 if (ecm < x + ParticleTable::effectiveNucleonMass + 1.0 && (nTries < maxTries)) goto deltaProd101;
67
68 // generation of the delta mass with the penetration factor
69 // (see prc56(1997)2431)
70 y=ecm*ecm;
71 G4double q2=(y-1.157776E6)*(y-6.4E5)/y/4.0; // 1.157776E6 = 1076^2, 6.4E5 = 800^2
72 G4double q3=std::pow(std::sqrt(q2), 3.);
73 G4double f3max=q3/(q3+5.832E6); // 5.832E6 = 180^3
74 y=x*x;
75 q2=(y-1.157776E6)*(y-6.4E5)/y/4.0; // 1.157776E6 = 1076^2, 6.4E5 = 800^2
76 q3=std::pow(std::sqrt(q2), 3.);
77 G4double f3=q3/(q3+5.832E6); // 5.832E6 = 180^3
78 rndm = Random::shoot();
79 if (rndm > f3/f3max && (nTries < maxTries)) goto deltaProd101;
80 if(nTries >= maxTries) {
81 WARN("DeltaProductionChannel::sampleDeltaMass loop was stopped because maximum number of tries was reached. Delta mass " << x << " MeV with CM energy " << ecm << " MeV may be unphysical." << std::endl);
82 }
83 return x;
84 }
85
87 /**
88 * Delta production
89 *
90 * The production is not isotropic in this version it has the same
91 * exp(b*t) structure as the nn elastic scattering (formula 2.3 of
92 * j.cugnon et al, nucl phys a352(1981)505) parametrization of b
93 * taken from ref. prc56(1997)2431
94 */
95 // 100 IF (K4.NE.1) GO TO 101 // ThA K4 = 2 by default
96 // ParticleType p1TypeOld = particle1->getType();
97 // ParticleType p2TypeOld = particle2->getType();
98 G4double ecm = KinematicsUtils::totalEnergyInCM(particle1, particle2);
99
100 const G4int isospin = ParticleTable::getIsospin(particle1->getType()) +
102
103 // Calculate the outcome of the channel:
104 G4double pin = particle1->getMomentum().mag();
105 G4double rndm = 0.0, b = 0.0;
106
107 G4double xmdel = sampleDeltaMass(ecm);
108 // deltaProduction103: // This label is not used
110 if (pnorm <= 0.0) pnorm=0.000001;
111 G4int index=0;
112 G4int index2=0;
113 rndm = Random::shoot();
114 if (rndm < 0.5) index=1;
115 if (isospin == 0) { // pn case
116 rndm = Random::shoot();
117 if (rndm < 0.5) index2=1;
118 }
119
120 // G4double x=0.001*0.5*ecm*std::sqrt(ecm*ecm-4.*ParticleTable::effectiveNucleonMass2)
121 // / ParticleTable::effectiveNucleonMass;
123 if(x < 1.4) {
124 b=(5.287/(1.+std::exp((1.3-x)/0.05)))*1.e-6;
125 } else {
126 b=(4.65+0.706*(x-1.4))*1.e-6;
127 }
128 G4double xkh = 2.*b*pin*pnorm;
129 rndm = Random::shoot();
130 G4double ctet=1.0+std::log(1.-rndm*(1.-std::exp(-2.*xkh)))/xkh;
131 if(std::abs(ctet) > 1.0) ctet = Math::sign(ctet);
132 G4double stet = std::sqrt(1.-ctet*ctet);
133
134 rndm = Random::shoot();
135 G4double fi = Math::twoPi*rndm;
136 G4double cfi = std::cos(fi);
137 G4double sfi = std::sin(fi);
138 // delta production: correction of the angular distribution 02/09/02
139
140 G4double xx = particle1->getMomentum().perp2();
141 G4double zz = std::pow(particle1->getMomentum().getZ(), 2);
142 G4double xp1, xp2, xp3;
143 if (xx >= zz*1.e-8) {
144 G4double yn = std::sqrt(xx);
145 G4double zn = yn*pin;
146 G4double ex[3], ey[3], ez[3];
147 G4double p1 = particle1->getMomentum().getX();
148 G4double p2 = particle1->getMomentum().getY();
149 G4double p3 = particle1->getMomentum().getZ();
150 ez[0] = p1/pin;
151 ez[1] = p2/pin;
152 ez[2] = p3/pin;
153 ex[0] = p2/yn;
154 ex[1] = -p1/yn;
155 ex[2] = 0.0;
156 ey[0] = p1*p3/zn;
157 ey[1] = p2*p3/zn;
158 ey[2] = -xx/zn;
159 xp1 = (ex[0]*cfi*stet+ey[0]*sfi*stet+ez[0]*ctet)*pnorm;
160 xp2 = (ex[1]*cfi*stet+ey[1]*sfi*stet+ez[1]*ctet)*pnorm;
161 xp3 = (ex[2]*cfi*stet+ey[2]*sfi*stet+ez[2]*ctet)*pnorm;
162 }else {
163 xp1=pnorm*stet*cfi;
164 xp2=pnorm*stet*sfi;
165 xp3=pnorm*ctet;
166 }
167 // end of correction angular distribution of delta production
168 G4double e3 = std::sqrt(xp1*xp1+xp2*xp2+xp3*xp3
170 // if(k4.ne.0) go to 161
171
172 // long-lived delta
173 G4int m1 = 0;
174 G4int m2 = 0;
175 if (index != 1) {
176 ThreeVector mom(xp1, xp2, xp3);
177 particle1->setMomentum(mom);
178 // e1=ecm-eout1
179 m1=1;
180 } else {
181 ThreeVector mom(-xp1, -xp2, -xp3);
182 particle1->setMomentum(mom);
183 // e1=ecm-eout1
184 m1=1;
185 }
186
187 particle1->setEnergy(ecm - e3);
188 particle2->setEnergy(e3);
189 particle2->setMomentum(-particle1->getMomentum());
190
191 // SYMMETRIZATION OF CHARGES IN pn -> N DELTA
192 // THE TEST ON "INDEX" ABOVE SYMETRIZES THE EXCITATION OF ONE
193 // OF THE NUCLEONS WITH RESPECT TO THE DELTA EXCITATION
194 // (SEE NOTE 16/10/97)
195 G4int is1 = ParticleTable::getIsospin(particle1->getType());
196 G4int is2 = ParticleTable::getIsospin(particle2->getType());
197 if (isospin == 0) {
198 if(index2 == 1) {
199 G4int isi=is1;
200 is1=is2;
201 is2=isi;
202 }
203 particle1->setHelicity(0.0);
204 } else {
205 rndm = Random::shoot();
206 if (rndm >= 0.25) {
207 is1=3*is1*m1-(1-m1)*is1;
208 is2=3*is2*m2-(1-m2)*is2;
209 }
210 particle1->setHelicity(ctet*ctet);
211 }
212
213 if(is1 == ParticleTable::getIsospin(Proton) && m1 == 0) {
214 particle1->setType(Proton);
215 } else if(is1 == ParticleTable::getIsospin(Neutron) && m1 == 0) {
216 particle1->setType(Neutron);
217 } else if(is1 == ParticleTable::getIsospin(DeltaMinus) && m1 == 1) {
218 particle1->setType(DeltaMinus);
219 } else if(is1 == ParticleTable::getIsospin(DeltaZero) && m1 == 1) {
220 particle1->setType(DeltaZero);
221 } else if(is1 == ParticleTable::getIsospin(DeltaPlus) && m1 == 1) {
222 particle1->setType(DeltaPlus);
223 } else if(is1 == ParticleTable::getIsospin(DeltaPlusPlus) && m1 == 1) {
224 particle1->setType(DeltaPlusPlus);
225 }
226
227 if(is2 == ParticleTable::getIsospin(Proton) && m2 == 0) {
228 particle2->setType(Proton);
229 } else if(is2 == ParticleTable::getIsospin(Neutron) && m2 == 0) {
230 particle2->setType(Neutron);
231 } else if(is2 == ParticleTable::getIsospin(DeltaMinus) && m2 == 1) {
232 particle2->setType(DeltaMinus);
233 } else if(is2 == ParticleTable::getIsospin(DeltaZero) && m2 == 1) {
234 particle2->setType(DeltaZero);
235 } else if(is2 == ParticleTable::getIsospin(DeltaPlus) && m2 == 1) {
236 particle2->setType(DeltaPlus);
237 } else if(is2 == ParticleTable::getIsospin(DeltaPlusPlus) && m2 == 1) {
238 particle2->setType(DeltaPlusPlus);
239 }
240
241 if(particle1->isDelta()) particle1->setMass(xmdel);
242 if(particle2->isDelta()) particle2->setMass(xmdel);
243
244 FinalState *fs = new FinalState;
245 fs->addModifiedParticle(particle1);
246 fs->addModifiedParticle(particle2);
247 return fs;
248 }
249}
#define WARN(x)
double G4double
Definition: G4Types.hh:64
int G4int
Definition: G4Types.hh:66
DeltaProductionChannel(Particle *, Particle *, Nucleus *)
void addModifiedParticle(Particle *p)
static G4double totalEnergyInCM(Particle const *const p1, Particle const *const p2)
static G4double momentumInLab(Particle const *const p1, Particle const *const p2)
gives the momentum in the lab frame of two particles.
static G4double momentumInCM(Particle const *const p1, Particle const *const p2)
gives the momentum in the CM frame of two particles.
static const G4double effectiveDeltaDecayThreshold
static const G4double effectiveNucleonMass2
static G4int getIsospin(const ParticleType t)
Get the isospin of a particle.
static const G4double effectiveNucleonMass
void setMass(G4double mass)
void setHelicity(G4double h)
const G4INCL::ThreeVector & getMomentum() const
virtual void setMomentum(const G4INCL::ThreeVector &momentum)
G4INCL::ParticleType getType() const
void setEnergy(G4double energy)
void setType(ParticleType t)
G4bool isDelta() const
Is it a Delta?
static G4double shoot()
Definition: G4INCLRandom.hh:99
G4double getY() const
G4double getZ() const
G4double mag() const
G4double perp2() const
G4double getX() const
G4int sign(T t)
const G4double pi
const G4double twoPi