Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // ----------------------------------------------------------------------
0002 //
0003 // QQDecay.hh
0004 // Author: Lynn Garren
0005 //
0006 // Temporary holding tank for QQ decays 
0007 // 
0008 // ----------------------------------------------------------------------
0009 #ifndef QQDECAY_HH
0010 #define QQDECAY_HH
0011 
0012 #include <vector>
0013 #include <sstream>
0014 
0015 #include "HepPDT/defs.h"
0016 #include "HepPDT/QQChannel.hh"
0017 
0018 namespace HepPDT {
0019 
0020 //! QQDecay is a temporary holder for QQ decay information
0021 
0022 ///
0023 /// \class QQDecay
0024 /// \author Lynn Garren
0025 ///
0026 /// Temporarily keep QQ decay information in this class and convert it 
0027 /// when we finish inputing QQ information.
0028 ///
0029 class QQDecay  {
0030 
0031 public:
0032 
0033   typedef std::vector<QQChannel>  ChannelList;
0034 
0035   // -- constructors
0036   QQDecay();
0037   ~QQDecay();
0038 
0039   // ---  copying:
0040   //
0041   void  swap ( QQDecay & rhs );
0042   QQDecay( const QQDecay & orig );
0043   QQDecay & operator = ( const QQDecay & rhs );
0044 
0045   // --- mutators
0046   //
0047   /// add a decay channel
0048   void addChannel( QQChannel c ) { itsChannels.push_back( c ); }
0049   /// declare this particle stable
0050   void makeStable( ) { itsStable = true; }
0051 
0052   // --- accessors
0053   //
0054   /// does this particle decay?
0055   bool isStable()  const { return itsStable; };
0056   /// return a QQ decay channel
0057   QQChannel  channel( int i ) const { return itsChannels[i]; }
0058   /// write decay information for diagnostics
0059   void write( std::ostream & os ) const;    // intended for diagnostic use
0060 
0061   /// how many decay channels does this particle have?
0062   int                          size()  const { return itsChannels.size(); }
0063 
0064 private:
0065 
0066   bool itsStable;
0067   ChannelList itsChannels;
0068 
0069 };  // QQDecay
0070 
0071 inline void swap( QQDecay & first, QQDecay & second ) {
0072   first.swap( second );
0073 }
0074 
0075 }  // namespace HepPDT
0076 
0077 #endif // QQDECAY_HH