Fork me on GitHub

Changeset 90 in svn for trunk/src/BFieldProp.cc


Ignore:
Timestamp:
Dec 5, 2008, 9:34:52 AM (16 years ago)
Author:
severine ovyn
Message:

remove 1 bug in BField prop

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/BFieldProp.cc

    r62 r90  
    2727TrackPropagation::TrackPropagation() {
    2828
    29  MAXITERATION = 20000;
     29 MAXITERATION = 10000;
    3030 MINSEGLENGTH = 70;
    3131
     
    5757 
    5858  if(q!=0){
    59      double e  = Part->E  / 0.003;
    60 //     double M  = sqrt(e*e - (px*px + py*py + pz*pz) );
    6159     double M  = Part->M;
    62 /*if(fabs(Part->PID)==11)
    63 {
    64      cout<<"genMomentum.M() "<<genMomentum.M()<<"  "<<Part->M<<endl;
    65      cout<<"e*e - (px*px + py*py + pz*pz) "<<e*e - (px*px + py*py + pz*pz)<<endl;
    66 }*/
    6760     double vx = px/M;
    6861     double vy = py/M;
     
    7669     double ay =  (q/M)*(Bx*vz - Bz*vx);
    7770     double az =  (q/M)*(By*vx - Bx*vy);
    78 /*
    79 cout<<"M "<<M<<" et le pid "<<Part->PID<<endl;
    80 cout<<"ax "<<ax<<" ay "<<ay<<" az "<<az<<endl;
    81 */
    8271     double dt = 1/p;
    8372     if(pt<266 && vz < 0.0012)       dt = fabs(0.001/vz);
     
    120109      if(x!=0 && y!=0 && z!=0)
    121110        {
    122           double theta = fabs(atan(y/z));
    123111          double eta;
    124           if(z > 0)eta = -log(tan(theta/2));
    125           else eta = -(-log(tan(theta/2)));
     112          float Theta = atan2(sqrt(x*x+y*y),z);
     113          eta  = -log(tan(Theta/2));
    126114          double phi = atan2(y,x);
    127115          genMomentum.SetPtEtaPhiE(Part->PT,eta,phi,Part->E);
    128116        }
    129      // cout<<"genMomentum final "<<genMomentum.Pt()<<endl;
    130117    }
    131118}
Note: See TracChangeset for help on using the changeset viewer.