Changeset 1371 for trunk/WuerzburgSoft/Thomas
- Timestamp:
- 06/20/02 10:22:48 (22 years ago)
- Location:
- trunk/WuerzburgSoft/Thomas/mphys
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WuerzburgSoft/Thomas/mphys/MElectron.cc
r1370 r1371 262 262 *ep = e; 263 263 264 const Double_t omega = e*E/E0/E0;264 const Double_t omega = (e/E0)*(E/E0); 265 265 const Double_t Gamma = 4.*omega; 266 266 … … 297 297 // e: photon energy after interaction, lab 298 298 299 const Double_t gamma = fEnergy/E0; 300 const Double_t beta = sqrt(1.-1./(gamma*gamma)); 299 const Double_t gamma = fEnergy/E0; 300 // const Double_t beta = sqrt(1.-1./(gamma*gamma)); 301 const Double_t gammabeta = sqrt(gamma*gamma-1); 301 302 302 303 const Double_t f = fEnergy/e; … … 308 309 if (t>0) 309 310 cout << "~" << flush; 310 t = rand.Uniform(TMath::Pi() /2)+TMath::Pi()*3/4;311 Double_t er = gamma*epsilon*(1.-beta*cos(t)); // photon energy rest frame312 arg = (f - E0/er - 1)/( f*beta+1);311 t = rand.Uniform(TMath::Pi())+TMath::Pi()/2; 312 Double_t er = epsilon*(gamma-gammabeta*cos(t)); // photon energy rest frame 313 arg = (f - E0/er - 1)/(sqrt(fEnergy*fEnergy-E0*E0)/e+1); 313 314 314 315 } while (arg<-1 || arg>1); 315 316 316 317 const Double_t theta1s = acos(arg); 317 const Double_t thetas = atan(sin(t)/(gamma* (cos(t)-beta)));318 const Double_t thetas = atan(sin(t)/(gamma*cos(t)-gammabeta)); 318 319 319 320 const Double_t thetastar = thetas-theta1s; 320 321 321 const Double_t theta1 = atan(sin(thetastar)/(gamma* (cos(thetastar)+beta)));322 const Double_t theta1 = atan(sin(thetastar)/(gamma*cos(thetastar)+gammabeta)); 322 323 323 324 fEnergy -= e; … … 433 434 TVectorD p(3); 434 435 435 Double_t rho = TMath::Pi()/2; // [2pi]436 Double_t rho = 0; 436 437 if (B>0) 437 438 { -
trunk/WuerzburgSoft/Thomas/mphys/MParticle.cc
r1370 r1371 109 109 void MParticle::InitRandom() 110 110 { 111 TRandom rnd(0);111 static TRandom rnd(0); 112 112 fPhi = rnd.Uniform(TMath::Pi()*2); 113 113 fPsi = rnd.Uniform(TMath::Pi()*2);
Note:
See TracChangeset
for help on using the changeset viewer.