20 #include "Randomize.hh" 54 ANGAV =
new G4double[8];
55 ANGAR =
new G4double[8];
57 for(G4int i = 0;i<8;i++){
108 const G4double U = 931.49401;
109 const G4double TK = 0.0174532925;
111 G4double EMI = -ENI/U;
114 G4double Z1 = S1+EMI;
117 G4double ET = Z1+S2+W;
118 G4double P12 = W*(Z1+Z1+W);
119 G4double BETA2 = P12/(ET*ET);
120 G4double BETA = sqrt(BETA2);
121 G4double GA2 = 1./(1.- BETA2);
122 G4double GA = sqrt(GA2);
123 G4double PSA = (Z1+S2+S3+Z4+W)*(Q+W+EMI-EM)-P12;
124 G4double PSB = (Z1+S2-S3+Z4+W)*(Z1+S2+S3-Z4+W)-P12;
125 G4double SM2 = ET*ET-P12;
126 G4double PS2 = PSA*PSB/(SM2*4.);
142 G4cout <<
" !! ERROR. NO SOLUTION IN CINE::RelativisticKinematics() PS2 < 0. Returning " << G4endl;
147 G4double PS = sqrt(PS2);
148 G4double CT = cos(TH*TK);
149 G4double ST = sin(TH*TK);
150 G4double E3S = sqrt(S3*S3+PS2);
151 G4double A = CT*CT+GA2*ST*ST;
152 G4double B = E3S*CT*GA*BETA;
153 G4double DELTA = GA2*(PS2-GA2*BETA2*ST*ST*S3*S3);
166 G4cout <<
" !! ERROR. NO SOLUTION IN CINE::RelativisticKinematics() DELTA < 0. Returning " << G4endl;
170 G4double P3=(B+sqrt(DELTA))/A;
174 G4bool secondIter = 0;
180 G4double P32 = P3*P3;
182 G4double ET3 = sqrt(S3*S3+P32);
183 G4double W3 = P32/(S3+ET3);
184 G4double CSTE = 1E-8;
187 G4cout <<
" !! ERROR. NO SOLUTION IN CINE::RelativisticKinematics() W3-CSTE < 0. Returning " << G4endl;
203 CCHI = (P3*CT-GA*BETA*E3S)/(GA*PS);
205 G4double ACX = fabs(CCHI);
208 else if(180.-TH-CSTE < 0.) ;
225 G4double TGCX = SCHI/CCHI;
226 CX = (atan(TGCX))/TK;
227 if(CX < 0.) CX = 180.+CX;
236 XJ = GA*PS2*(PS+BETA*CCHI*E3S)/(P32*P3);
238 if(AJ-1000. >= 0.) XJ = 999.9999;
245 G4double ANUM = GA*BETA*P32*ST*(E3S+P3*CT*GA*BETA);
246 G4double DENO = (S3+W3)*(GA*BETA*E3S*CT-P3);
250 if(DENO == 0.) DX = 9999.9;
251 else DX = 1000.*U*TK*(ANUM/DENO);
254 G4double E4S = sqrt(Z4*Z4+PS2);
256 G4double DENOM = GA*(BETA*E4S-PS*CCHI);
260 if(DENOM == 0.) TR = 90.;
262 TGTR = PS*SCHI/DENOM;
263 TR = (atan(TGTR))/TK;
264 if(TR < 0.) TR = 180.+TR;
268 G4double P42 = DENOM*DENOM+PS2*SCHI*SCHI;
269 G4double P4 = sqrt(P42);
270 G4double ER = U*P42/(Z4+sqrt(Z4*Z4+P42));
274 if(P4 > 0.) RJ = 999.9999;
276 RJ = GA*PS2*(PS-BETA*CCHI*E4S)/(P42*P4);
278 if(AJ-1000. >= 0.) RJ = 999.9999;
291 P3=(B-sqrt(DELTA))/A;
313 }
while(secondIter == 1);
321 G4cout << G4endl <<
"ActarSimCinePrimGenerator::Dump()" << G4endl;
322 G4cout <<
"Incident Mass: " << S1 <<
" " 323 <<
"Target Mass: " << S2 << G4endl;
324 G4cout <<
"Scattered Mass: " << S3 <<
" " 325 <<
"Recoil Mass: " << S4 << G4endl;
326 G4cout <<
"Reaction Q: " << QM <<
" " 327 <<
"Theta Lab Angle: " << TH <<
" " 328 <<
"LAB energy :" << EI << G4endl;
329 G4cout <<
"Target excitation energy:" << EN <<
" " 330 <<
"Projectile excitation energy:" << ENI << G4endl;
331 G4cout << G4endl<<
"ANGAV:" << ANGAV <<
" ";
332 for(G4int i=0;i<8;i++) G4cout << ANGAV[i] <<
", ";
333 G4cout << G4endl <<
"ANGAR:" << ANGAR <<
" ";
334 for(G4int i=0;i<8;i++) G4cout << ANGAR[i] <<
", ";
340 G4int prec = G4cout.precision(6);
342 G4cout << G4endl <<
" ActarSimCinePrimGenerator::printResult(" << sel <<
")" << G4endl;
344 G4cout <<
" CINE result: Scattered Particle Angle: " << GetThetaLabAngle()
345 <<
" deg, Scattered Particle Energy: " << ANGAV[1] <<
" MeV" << G4endl;
346 G4cout <<
" CINE result: Recoil Particle Angle: " << ANGAV[4]
347 <<
" deg, Recoil Particle Energy: " << ANGAV[5] <<
" MeV" << G4endl;
350 G4cout <<
" Second solution in CINE ... " << G4endl;
351 G4cout <<
" CINE result: Scattered Particle Angle: " << GetThetaLabAngle()
352 <<
" deg, Scattered Particle Energy: " << ANGAR[1] <<
" MeV" << G4endl;
353 G4cout <<
" CINE result: Recoil Particle Angle: " << ANGAR[4]
354 <<
" deg, Recoil Particle Energy: " << ANGAR[5] <<
" MeV" << G4endl;
356 G4cout.precision(prec);
void Dump()
Dump the status of the variables.
~ActarSimCinePrimGenerator()
Destructor.
ActarSimCinePrimGenerator()
void printResults(G4int sel)
Print the results for each solution.
void RelativisticKinematics()