Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // ----------------------------------------------------------------------
0002 //
0003 // ParticleData.icc
0004 // Author: Lynn Garren
0005 //
0006 // ----------------------------------------------------------------------
0007 
0008 #include <algorithm>    // swap()
0009 
0010 namespace HepPDT {
0011 
0012 ParticleData::ParticleData( const CPDID & cpdid, const DDID & ddid  )
0013 : itsCPDID ( cpdid ),
0014   itsDDID  ( ddid )
0015 { ; }
0016 
0017 ParticleData::~ParticleData()
0018 { ; }
0019 
0020 void  ParticleData::swap( ParticleData & other )
0021 {
0022   std::swap(itsCPDID, other.itsCPDID);
0023   std::swap(itsDDID,  other.itsDDID);
0024 }
0025 
0026 ParticleData::ParticleData( const ParticleData & orig )
0027 : itsCPDID ( orig.itsCPDID ),
0028   itsDDID  ( orig.itsDDID )
0029 { ; }
0030 
0031 ParticleData & ParticleData::operator = ( const ParticleData & rhs )
0032 { 
0033   ParticleData temp( rhs );
0034   swap( temp );
0035   return *this;
0036 }
0037 
0038 inline bool ParticleData::isStable() const
0039 {
0040     if( totalWidth().value() == -1. ) return false;
0041     if( totalWidth().value() > 0 || lifetime().value() > 0 ) return false;
0042     return true;
0043 }
0044 
0045 void ParticleData::write( std::ostream & os ) const
0046 {
0047   itsCPDID->write( os );
0048   itsDDID->write( os );
0049 }
0050 
0051 void ParticleData::writeParticleInfo( std::ostream & os ) const
0052 {
0053   itsCPDID->write( os );
0054 }
0055 
0056 void ParticleData::writeParticleTranslation( std::ostream & os ) const
0057 {
0058   itsCPDID->writeTranslation( os );
0059 }
0060 
0061 
0062 }   // HepPDT