Ignore:
Timestamp:
07/26/02 14:49:58 (22 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r1430 r1448  
    371371Bool_t MElectron::SetNewPositionB(Double_t B)
    372372{
     373    if (B==0)
     374        return SetNewPosition();
     375
    373376    static TRandom rand(0);
    374377    Double_t x = rand.Exp(GetInteractionLength());
     
    456459        p(0) = beta_p/beta*x;
    457460        p(1) = GetPType()==kEElectron?r*sin(rho):-r*sin(rho);
    458         p(2) = r*(1-cos(rho));
     461        p(2) = r*(1.-cos(rho));
    459462    }
    460463    else
     
    463466        p(1) = beta_o/beta*x;
    464467        p(2) = 0;
     468        cout << "------------- HEY! --------------" << endl;
    465469    }
    466470
     
    474478    p *= N2;
    475479    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
    476487    s -= p;
    477488
     
    479490    fPhi = atan2(s(1), s(0));
    480491    fZ   = ZofR(&s(2));
     492    fX  += x-p(2);
    481493
    482494    // -----------------------------
Note: See TracChangeset for help on using the changeset viewer.