Changeset 1369 for trunk/WuerzburgSoft


Ignore:
Timestamp:
06/17/02 13:55:42 (23 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/WuerzburgSoft/Thomas/mphys
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WuerzburgSoft/Thomas/mphys/Changelog

    r1367 r1369  
    11                                                                  -*-*- END -*-*-
     2 2002/06/17: Thomas Bretz
     3
     4   * MElectron.cc:
     5     - Added SetNewDirection for the electron itself
     6
     7   * MParticle.cc:
     8     - changed sqrt() to asin(sqrt()) - no effect (but correct)
     9
     10
     11
    212 2002/06/14: Thomas Bretz
    313
  • trunk/WuerzburgSoft/Thomas/mphys/MElectron.cc

    r1367 r1369  
    319319    fEnergy -= e;
    320320
     321    const Double_t phi = rand.Uniform(TMath::Pi()*2);
     322
    321323    MPhoton &p = *new MPhoton(e, fZ);
    322324    p = *this;
    323     p.SetNewDirection(theta1, rand.Uniform(TMath::Pi()*2));
     325    p.SetNewDirection(theta1, phi);
     326
     327    const Double_t beta2  = sqrt(1.-E0/fEnergy*E0/fEnergy);
     328    const Double_t theta2 = asin((epsilon*sin(t)-e*sin(theta1))/fEnergy/beta2);
     329
     330    SetNewDirection(theta2, phi);
    324331
    325332    return &p;
  • trunk/WuerzburgSoft/Thomas/mphys/MParticle.cc

    r1365 r1369  
    135135    r *= B;
    136136
    137     fTheta = sqrt(r(0)*r(0)+r(1)*r(1)); // Numerically bad: acos(r(2));
     137    fTheta = asin(sqrt(r(0)*r(0)+r(1)*r(1))); // Numerically bad: acos(r(2));
    138138    fPsi   = atan2(r(1), r(0));
    139139
Note: See TracChangeset for help on using the changeset viewer.