00001
00002
00003
00004
00005
00006
00007
00008 #ifndef CONSTITUENT_HH
00009 #define CONSTITUENT_HH
00010
00011 #include "CLHEP/config/CLHEP.h"
00012 #include <algorithm>
00013
00014 #include "CLHEP/HepPDT/ParticleID.hh"
00015
00016 namespace HepPDT {
00017
00022 class Constituent {
00023
00024 public:
00025
00026
00027 Constituent( ParticleID p = ParticleID(0), int m = -1 )
00028 : itsPid(p), itsMultiplicity(m) {}
00029
00030
00031
00032 Constituent( Constituent const & orig )
00033 : itsPid(orig.itsPid), itsMultiplicity(orig.itsMultiplicity) {}
00034 Constituent & operator = ( Constituent const & rhs ) {
00035 Constituent temp( rhs );
00036 swap( temp );
00037 return *this;
00038 }
00039 void swap( Constituent & other ) {
00040 std::swap(itsPid, other.itsPid );
00041 std::swap( itsMultiplicity, other.itsMultiplicity );
00042 }
00043
00044
00045 int multiplicity() const { return itsMultiplicity; }
00046 ParticleID pid() const { return itsPid; }
00047
00048
00049 bool isUp() const;
00050 bool isDown() const;
00051 bool isStrange() const;
00052 bool isCharm() const;
00053 bool isBottom() const;
00054 bool isTop() const;
00055
00056 private:
00057
00058 ParticleID itsPid;
00059 int itsMultiplicity;
00060
00061 };
00062
00063
00064 inline
00065 void swap( Constituent & first, Constituent & second ) { first.swap( second ); }
00066
00067 }
00068
00069 #endif // CONSTITUENT_HH