00001
00002
00003
00004
00005
00006
00007 #ifndef DECAYDATAT_HH
00008 #define DECAYDATAT_HH
00009
00010 #include "CLHEP/config/CLHEP.h"
00011 #include <vector>
00012
00013 #include "CLHEP/HepPDT/DecayChannelT.hh"
00014
00015 namespace HepPDT {
00016
00021 template< class Config >
00022 class DecayDataT {
00023
00024 public:
00025
00026
00027 typedef typename Config::PT PT;
00028
00029
00030
00031 inline DecayDataT( );
00032 inline DecayDataT( std::vector<DecayChannelT<Config> > const & dv );
00033 inline ~DecayDataT();
00034
00035
00036
00037 inline DecayDataT( DecayDataT<Config> const & orig );
00038 inline DecayDataT & operator = ( DecayDataT<Config> const & rhs );
00039 inline void swap( DecayDataT<Config> & other );
00040
00041
00042
00043 bool isStable() const;
00044 int size() const { return itsDecayList.size(); }
00045 DecayChannelT<Config> channel( int i ) const { return itsDecayList[i]; }
00046
00047
00048
00049
00050 bool decay( int i, const PT & parent, std::vector<PT> & daughters );
00051
00052 bool decay( double rdm, const PT & parent, std::vector<PT> & daughters );
00053
00054 inline void write( std::ostream & os ) const;
00055
00056
00057
00058 void appendMode( DecayChannelT<Config> );
00059
00060 private:
00061
00062 std::vector<DecayChannelT<Config> > itsDecayList;
00063
00064 };
00065
00066 template< class Config >
00067 inline
00068 void swap( DecayDataT<Config> & first, DecayDataT<Config> & second ) {
00069 first.swap( second );
00070 }
00071
00072 }
00073
00074 #include "CLHEP/HepPDT/DecayDataT.icc"
00075
00076 #endif // DECAYDATAT_HH