Changeset 380 in svn for trunk/src/BFieldProp.cc
- Timestamp:
- May 12, 2009, 9:47:12 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/BFieldProp.cc
r294 r380 31 31 32 32 #include "BFieldProp.h" 33 #include "PdgParticle.h" 33 34 #include "SystemOfUnits.h" 34 35 #include "PhysicalConstants.h" … … 131 132 if (!DET->FLAG_bfield ) return; 132 133 133 q = ChargeVal(Part->PID) *eplus; // in units of 'e' 134 double M; 135 //int q1 = ChargeVal(Part->PID) *eplus; // in units of 'e' 136 if(Part->M < -999) { // unitialised! 137 PdgParticle pdg_part = DET->PDGtable[Part->PID]; 138 q = pdg_part.charge() *eplus; // in units of 'e' 139 M = pdg_part.mass(); // GeV 140 } else { q = Part->Charge; M = Part->M; } 141 134 142 if(q==0) return; 135 143 if(R_max==0) { cout << "ERROR: magnetic field has no lateral extention\n"; return;} … … 165 173 double PT = Part->PT; 166 174 double E = Part->E; // [GeV] 167 double M = Part->M; // [GeV]/c²175 //double M = Part->M; // [GeV]/c² 168 176 double Phi = UNDEFINED; 169 177 … … 477 485 double p = sqrt(pz*pz + pt*pt); //sqrt(px*px+py*py+pz*pz); 478 486 479 double M = Part->M;487 //double M = Part->M; // see above 480 488 double vx = px/M; 481 489 double vy = py/M;
Note:
See TracChangeset
for help on using the changeset viewer.