Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 10:11:34

0001 // ----------------------------------------------------------------------
0002 //
0003 // ParticleID.icc
0004 //
0005 // ----------------------------------------------------------------------
0006 
0007 namespace HepPDT {
0008 
0009 
0010 inline ParticleID::ParticleID( int pid )
0011 : itsPID            ( pid )
0012 { ; }
0013 
0014 inline ParticleID::ParticleID( const ParticleID & orig )
0015 : itsPID            ( orig.itsPID )
0016 { ; }
0017 
0018 inline ParticleID& ParticleID::operator=( const ParticleID & rhs )
0019 { 
0020   ParticleID temp( rhs );
0021   swap( temp );
0022   return *this;
0023 }
0024 
0025 inline void ParticleID::swap( ParticleID & other ) 
0026 {
0027   std::swap( itsPID, other.itsPID );
0028 }
0029 
0030 inline bool  ParticleID::operator <  ( ParticleID const & other ) const
0031 {
0032   return itsPID < other.itsPID;
0033 }
0034 
0035 inline bool  ParticleID::operator == ( ParticleID const & other ) const
0036 {
0037   return itsPID == other.itsPID;
0038 }
0039 
0040 inline int ParticleID::abspid( ) const
0041 {
0042   /// return a value greater than or equal to zero
0043   return (itsPID < 0) ? -itsPID : itsPID;
0044 }
0045 
0046 } // HepPDT