// $Id: digit.cc,v 1.8 2002/06/09 12:10:56 boudreau Exp $ // ---------------------------------------------------------------------- // // digit.cc // // split the PID into constituent integers // // ---------------------------------------------------------------------- #include "CLHEP/config/CLHEP.h" #include "CLHEP/HepPDT/ParticleID.hh" namespace HepPDT { unsigned short ParticleID::digit( location loc ) const { // PID digits (base 10) are: n nr nl nq1 nq2 nq3 nj // the location enum provides a convenient index into the PID int numerator = (int) pow(10.0,(loc-1)); return (abspid()/numerator)%10; } } // HepPDT