57 {
63 } else {
66 }
67
69
70 if (iso == 1) {
72 }
73 else if (iso == -1) {
75 }
77#ifdef INCLXX_IN_GEANT4_MODE
78
79 nucleon->setParentResonancePDGCode(0);
80 nucleon->setParentResonanceID(0);
81 pion->setParentResonancePDGCode(0);
82 pion->setParentResonanceID(0);
83#endif
87 G4double en=(sh*sh+mn*mn-me*me)/(2*sh);
89 G4double ee=std::sqrt(en*en-mn*mn+me*me);
92
93
94
96
103
104 if (ECM < 1650.) {
105
106
107 G4double f1= -0.0000288627*ECM*ECM+0.09155289*ECM-72.25436;
108 G4double b1=(f1-(f1/(1.5-0.5*std::pow((ECM-1580.)/95.,2))))/2.;
111
113
115 while (passe1==0) {
116
119
120
122 fteta=(a1*x1*x1+b1*x1+c1)/interg1;
123
124 if (u1*f1/interg1 < fteta) {
125 teta=std::acos(x1);
126 passe1=1;
127 }
128 }
129 }
130 else {
131
132
138
139 G4double interg2=0.1716182902205207;
141
143 while (passe2==0) {
144
147
148
150 fteta=((a2*x1*x1+b2*x1+c2)*(0.5+(std::atan(10*(x1+dev)))/pi) + vert)/interg2;
151
152 if (u1*f2 < fteta) {
153 teta=std::acos(x1);
154 passe2=1;
155 }
156 }
157 }
158
160
161 ThreeVector mom_nucleon(
162 pn*std::sin(teta)*std::cos(fi),
163 pn*std::sin(teta)*std::sin(fi),
164 pn*std::cos(teta)
165 );
166
167
168 nucleon->setMomentum(-mom_nucleon);
169 pion->setMomentum(mom_nucleon);
170
171 fs->addModifiedParticle(nucleon);
172 fs->addModifiedParticle(pion);
173 }
G4double totalEnergyInCM(Particle const *const p1, Particle const *const p2)
G4int getIsospin(const ParticleType t)
Get the isospin of a particle.
G4bool nucleon(G4int ityp)