Fork me on GitHub

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


Ignore:
Timestamp:
May 12, 2009, 9:47:12 AM (15 years ago)
Author:
Xavier Rouby
Message:

new PDG table

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/BFieldProp.cc

    r294 r380  
    3131
    3232#include "BFieldProp.h"
     33#include "PdgParticle.h"
    3334#include "SystemOfUnits.h"
    3435#include "PhysicalConstants.h"
     
    131132  if (!DET->FLAG_bfield ) return;
    132133
    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
    134142  if(q==0) return;
    135143  if(R_max==0) { cout << "ERROR: magnetic field has no lateral extention\n"; return;}
     
    165173    double PT = Part->PT;
    166174    double E  = Part->E;              // [GeV]
    167     double M  = Part->M;              // [GeV]/c²
     175    //double M  = Part->M;            // [GeV]/c²
    168176      double Phi = UNDEFINED;
    169177
     
    477485  double p  = sqrt(pz*pz + pt*pt); //sqrt(px*px+py*py+pz*pz);
    478486 
    479   double M  = Part->M;
     487  //double M  = Part->M; // see above
    480488  double vx = px/M;
    481489  double vy = py/M;
Note: See TracChangeset for help on using the changeset viewer.