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

#include <G4INCLDeltaProductionChannel.hh>

Inheritance diagram for G4INCL::DeltaProductionChannel:

Public Member Functions

 DeltaProductionChannel (Particle *, Particle *, Nucleus *n=nullptr)
virtual ~DeltaProductionChannel ()
void fillFinalState (FinalState *fs)
Public Member Functions inherited from G4INCL::IChannel
 IChannel ()
virtual ~IChannel ()
FinalStategetFinalState ()

Detailed Description

Definition at line 49 of file G4INCLDeltaProductionChannel.hh.

Constructor & Destructor Documentation

◆ DeltaProductionChannel()

G4INCL::DeltaProductionChannel::DeltaProductionChannel ( Particle * p1,
Particle * p2,
Nucleus * n = nullptr )

Definition at line 48 of file G4INCLDeltaProductionChannel.cc.

50 : particle1(p1), particle2(p2), thenucleus(n) {}

◆ ~DeltaProductionChannel()

G4INCL::DeltaProductionChannel::~DeltaProductionChannel ( )
virtual

Definition at line 52 of file G4INCLDeltaProductionChannel.cc.

52{}

Member Function Documentation

◆ fillFinalState()

void G4INCL::DeltaProductionChannel::fillFinalState ( FinalState * fs)
virtual

Delta production

The production is not isotropic in this version it has the same exp(b*t) structure as the nn elastic scattering (formula 2.3 of j.cugnon et al, nucl phys a352(1981)505) parametrization of b taken from ref. prc56(1997)2431

Implements G4INCL::IChannel.

Definition at line 96 of file G4INCLDeltaProductionChannel.cc.

96 {
97 /**
98 * Delta production
99 *
100 * The production is not isotropic in this version it has the same
101 * exp(b*t) structure as the nn elastic scattering (formula 2.3 of
102 * j.cugnon et al, nucl phys a352(1981)505) parametrization of b
103 * taken from ref. prc56(1997)2431
104 */
105 // 100 IF (K4.NE.1) GO TO 101 // ThA K4 = 2 by default
106 // ParticleType p1TypeOld = particle1->getType();
107 // ParticleType p2TypeOld = particle2->getType();
108 G4double ecm = KinematicsUtils::totalEnergyInCM(particle1, particle2);
109
110 // For SRC
111 ParticleType p1TypeOld = particle1->getType();
112 ParticleType p2TypeOld = particle2->getType();
113
114 // INCL_INFO( particle1->print() << '\n');
115 // INCL_INFO( particle2->print() << '\n');
116
117 const G4int isospin = ParticleTable::getIsospin(particle1->getType()) +
118 ParticleTable::getIsospin(particle2->getType());
119
120 // Calculate the outcome of the channel:
121 const ThreeVector &particle1Momentum = particle1->getMomentum();
122 G4double pin = particle1Momentum.mag();
123 G4double rndm = 0.0, b = 0.0;
124
125 G4double xmdel = sampleDeltaMass(ecm);
126 // deltaProduction103: // This label is not used
128 if (pnorm <= 0.0) pnorm=0.000001;
129 G4int index=0;
130 G4int index2=0;
131 rndm = Random::shoot();
132 if (rndm < 0.5) index=1;
133 if (isospin == 0) { // pn case
134 rndm = Random::shoot();
135 if (rndm < 0.5) index2=1;
136 }
137
138 // G4double x=0.001*0.5*ecm*std::sqrt(ecm*ecm-4.*ParticleTable::effectiveNucleonMass2)
139 // / ParticleTable::effectiveNucleonMass;
141 if(x < 1.4) {
142 b=(5.287/(1.+std::exp((1.3-x)/0.05)))*1.e-6;
143 } else {
144 b=(4.65+0.706*(x-1.4))*1.e-6;
145 }
146 G4double xkh = 2.*b*pin*pnorm;
147 rndm = Random::shoot();
148 G4double ctet=1.0+std::log(1.-rndm*(1.-std::exp(-2.*xkh)))/xkh;
149 if(std::abs(ctet) > 1.0) ctet = Math::sign(ctet);
150 G4double stet = std::sqrt(1.-ctet*ctet);
151
152 rndm = Random::shoot();
153 G4double fi = Math::twoPi*rndm;
154 G4double cfi = std::cos(fi);
155 G4double sfi = std::sin(fi);
156 // delta production: correction of the angular distribution 02/09/02
157
158 G4double xx = particle1Momentum.perp2();
159 const G4double particle1MomentumZ = particle1Momentum.getZ();
160 G4double zz = std::pow(particle1MomentumZ, 2);
161 G4double xp1, xp2, xp3;
162 if (xx >= zz*1.e-8) {
163 G4double yn = std::sqrt(xx);
164 G4double zn = yn*pin;
165 G4double ex[3], ey[3], ez[3];
166 G4double p1 = particle1Momentum.getX();
167 G4double p2 = particle1Momentum.getY();
168 G4double p3 = particle1MomentumZ;
169 ez[0] = p1/pin;
170 ez[1] = p2/pin;
171 ez[2] = p3/pin;
172 ex[0] = p2/yn;
173 ex[1] = -p1/yn;
174 ex[2] = 0.0;
175 ey[0] = p1*p3/zn;
176 ey[1] = p2*p3/zn;
177 ey[2] = -xx/zn;
178 xp1 = (ex[0]*cfi*stet+ey[0]*sfi*stet+ez[0]*ctet)*pnorm;
179 xp2 = (ex[1]*cfi*stet+ey[1]*sfi*stet+ez[1]*ctet)*pnorm;
180 xp3 = (ex[2]*cfi*stet+ey[2]*sfi*stet+ez[2]*ctet)*pnorm;
181 }else {
182 xp1=pnorm*stet*cfi;
183 xp2=pnorm*stet*sfi;
184 xp3=pnorm*ctet;
185 }
186 // end of correction angular distribution of delta production
187 G4double e3 = std::sqrt(xp1*xp1+xp2*xp2+xp3*xp3
189 // if(k4.ne.0) go to 161
190
191 // long-lived delta
192 if (index != 1) {
193 ThreeVector mom(xp1, xp2, xp3);
194 particle1->setMomentum(mom);
195 // e1=ecm-eout1
196 } else {
197 ThreeVector mom(-xp1, -xp2, -xp3);
198 particle1->setMomentum(mom);
199 // e1=ecm-eout1
200 }
201
202 particle1->setEnergy(ecm - e3);
203 particle2->setEnergy(e3);
204 particle2->setMomentum(-particle1->getMomentum());
205
206 // SYMMETRIZATION OF CHARGES IN pn -> N DELTA
207 // THE TEST ON "INDEX" ABOVE SYMETRIZES THE EXCITATION OF ONE
208 // OF THE NUCLEONS WITH RESPECT TO THE DELTA EXCITATION
209 // (SEE NOTE 16/10/97)
210 G4int is1 = ParticleTable::getIsospin(particle1->getType());
211 G4int is2 = ParticleTable::getIsospin(particle2->getType());
212 if (isospin == 0) {
213 if(index2 == 1) {
214 G4int isi=is1;
215 is1=is2;
216 is2=isi;
217 }
218 particle1->setHelicity(0.0);
219 } else {
220 rndm = Random::shoot();
221 if (rndm >= 0.25) {
222 is1=3*is1;
223 is2=-is2;
224 }
225 particle1->setHelicity(ctet*ctet);
226 }
227
229 particle1->setType(DeltaMinus);
230 } else if(is1 == ParticleTable::getIsospin(DeltaZero)) {
231 particle1->setType(DeltaZero);
232 } else if(is1 == ParticleTable::getIsospin(DeltaPlus)) {
233 particle1->setType(DeltaPlus);
234 } else if(is1 == ParticleTable::getIsospin(DeltaPlusPlus)) {
235 particle1->setType(DeltaPlusPlus);
236 }
237
239 particle2->setType(Proton);
240 } else if(is2 == ParticleTable::getIsospin(Neutron)) {
241 particle2->setType(Neutron);
242 }
243
244 if (particle1->isDelta())
245 particle1->setMass(xmdel);
246 if (particle2->isDelta())
247 particle2->setMass(xmdel);
248
249 if (thenucleus) {
250 // std::cout<< "entrando" <<std::endl;
251 // std::cout<< particle1->print() <<std::endl;
252 // std::cout<< particle2->print() <<std::endl;
253 srcChannel = new SrcChannel(particle1, particle2, thenucleus);
254 srcChannel->fillFinalState(fs, p1TypeOld, p2TypeOld);
255 delete srcChannel;
256 } else {
257 fs->addModifiedParticle(particle1);
258 fs->addModifiedParticle(particle2);
259 }
260 }
double G4double
Definition G4Types.hh:83
int G4int
Definition G4Types.hh:85
G4double totalEnergyInCM(Particle const *const p1, Particle const *const p2)
G4double momentumInLab(Particle const *const p1, Particle const *const p2)
gives the momentum in the lab frame of two particles.
G4double momentumInCM(Particle const *const p1, Particle const *const p2)
gives the momentum in the CM frame of two particles.
const G4double twoPi
G4int sign(const T t)
const G4double effectiveNucleonMass2
G4int getIsospin(const ParticleType t)
Get the isospin of a particle.
const G4double effectiveNucleonMass
G4double shoot()

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