78 {
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
106
108 sampleAngles(&ctet, &stet, &fi);
109
113
116 if (beta >= 1.0e-10)
117 sal = incidentDirection.
perp()/beta;
118 if (sal >= 1.0e-6) {
123 G4double t1 = ctet+cal*stet*sfi/sal;
125 q1=(b1*t1+b2*t2*cfi)/beta;
126 q2=(b2*t1-b1*t2*cfi)/beta;
127 q3=(b3*t1/beta-t2*sfi);
128 } else {
129 q1 = stet*cfi;
130 q2 = stet*sfi;
131 q3 = ctet;
132 }
134
136#ifdef INCLXX_IN_GEANT4_MODE
137 G4int deltaPDGCode = 0;
138#endif
139 switch(theParticle->
getType()) {
143#ifdef INCLXX_IN_GEANT4_MODE
144 deltaPDGCode = 2224;
145#endif
146 break;
151 } else {
154 }
155#ifdef INCLXX_IN_GEANT4_MODE
156 deltaPDGCode = 2214;
157#endif
158 break;
163 } else {
166 }
167#ifdef INCLXX_IN_GEANT4_MODE
168 deltaPDGCode = 2114;
169#endif
170 break;
174#ifdef INCLXX_IN_GEANT4_MODE
175 deltaPDGCode = 1114;
176#endif
177 break;
178 default:
181 break;
182 }
183
187
188 q1 *= xq;
189 q2 *= xq;
190 q3 *= xq;
191
192 ThreeVector pionMomentum(q1, q2, q3);
193 ThreeVector pionPosition(theParticle->
getPosition());
194 Particle *
pion =
new Particle(pionType, pionMomentum, pionPosition);
197
198#ifdef INCLXX_IN_GEANT4_MODE
199
200
201 G4int parentResonanceID =
static_cast<G4int>(round(deltaMass/CLHEP::keV));
202 pion->setParentResonancePDGCode(deltaPDGCode);
203 pion->setParentResonanceID(parentResonanceID);
206#endif
207
208 fs->addModifiedParticle(theParticle);
209 fs->addCreatedParticle(pion);
210
211
212
213
214
215
216
217
218
219 }
void setParentResonancePDGCode(const G4int parentPDGCode)
void setHelicity(G4double h)
const G4INCL::ThreeVector & getPosition() const
void setParentResonanceID(const G4int parentID)
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.
G4double getINCLMass(const G4int A, const G4int Z, const G4int S)
Get INCL nuclear mass (in MeV/c^2)