Changeset 1448 for trunk/WuerzburgSoft/Thomas/mphys/MElectron.cc
- Timestamp:
- 07/26/02 14:49:58 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WuerzburgSoft/Thomas/mphys/MElectron.cc
r1430 r1448 371 371 Bool_t MElectron::SetNewPositionB(Double_t B) 372 372 { 373 if (B==0) 374 return SetNewPosition(); 375 373 376 static TRandom rand(0); 374 377 Double_t x = rand.Exp(GetInteractionLength()); … … 456 459 p(0) = beta_p/beta*x; 457 460 p(1) = GetPType()==kEElectron?r*sin(rho):-r*sin(rho); 458 p(2) = r*(1 -cos(rho));461 p(2) = r*(1.-cos(rho)); 459 462 } 460 463 else … … 463 466 p(1) = beta_o/beta*x; 464 467 p(2) = 0; 468 cout << "------------- HEY! --------------" << endl; 465 469 } 466 470 … … 474 478 p *= N2; 475 479 p *= M2; 480 481 if (p(2)<x) // happens sometimes in case B==0 482 { 483 cout << "----- HA: " << B << " " << x << " " << p(2) << " " << x-p(2) << endl; 484 p(2)=x; 485 } 486 476 487 s -= p; 477 488 … … 479 490 fPhi = atan2(s(1), s(0)); 480 491 fZ = ZofR(&s(2)); 492 fX += x-p(2); 481 493 482 494 // -----------------------------
Note:
See TracChangeset
for help on using the changeset viewer.