Ignore:
Timestamp:
06/20/02 10:22:48 (23 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/WuerzburgSoft/Thomas/mphys
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WuerzburgSoft/Thomas/mphys/MElectron.cc

    r1370 r1371  
    262262        *ep = e;
    263263
    264     const Double_t omega = e*E/E0/E0;
     264    const Double_t omega = (e/E0)*(E/E0);
    265265    const Double_t Gamma = 4.*omega;
    266266
     
    297297    // e:  photon energy after interaction, lab
    298298
    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);
    301302
    302303    const Double_t f = fEnergy/e;
     
    308309        if (t>0)
    309310            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 frame
    312         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);
    313314
    314315    } while (arg<-1 || arg>1);
    315316
    316317    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));
    318319
    319320    const Double_t thetastar = thetas-theta1s;
    320321
    321     const Double_t theta1 = atan(sin(thetastar)/(gamma*(cos(thetastar)+beta)));
     322    const Double_t theta1 = atan(sin(thetastar)/(gamma*cos(thetastar)+gammabeta));
    322323
    323324    fEnergy -= e;
     
    433434    TVectorD p(3);
    434435
    435     Double_t rho = TMath::Pi()/2;    // [2pi]
     436    Double_t rho = 0;   
    436437    if (B>0)
    437438    {
  • trunk/WuerzburgSoft/Thomas/mphys/MParticle.cc

    r1370 r1371  
    109109void MParticle::InitRandom()
    110110{
    111     TRandom rnd(0);
     111    static TRandom rnd(0);
    112112    fPhi = rnd.Uniform(TMath::Pi()*2);
    113113    fPsi = rnd.Uniform(TMath::Pi()*2);
Note: See TracChangeset for help on using the changeset viewer.