Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // ----------------------------------------------------------------------
0002 //
0003 // DecayData.hh
0004 // Author:  Lynn Garren
0005 //
0006 // ----------------------------------------------------------------------
0007 #ifndef DecayData_HH
0008 #define DecayData_HH
0009 
0010 #include <vector>
0011 
0012 #include "HepPDT/DecayChannel.hh"
0013 
0014 namespace HepPDT {
0015 
0016 //! The DecayData class holds particle decay information
0017 
0018 ///
0019 /// \class DecayData
0020 /// \author Lynn Garren
0021 ///
0022 /// Use this class to access particle decay information.
0023 ///
0024 class DecayData {
0025 
0026 public:
0027 
0028   // ---  birth/death:
0029   //
0030   /// default constructor
0031   inline DecayData( );
0032   /// construct from a vector of decay channels
0033   inline DecayData( std::vector<DecayChannel > const & dv );
0034   inline ~DecayData();
0035 
0036   // ---  copying:
0037   //
0038   inline DecayData( DecayData const & orig );
0039   inline DecayData & operator = ( DecayData const & rhs );
0040   inline void swap( DecayData & other );
0041 
0042   // ---  accessors:
0043   //
0044   /// is this a stable particle?
0045   bool                   isStable()     const;
0046   /// how many decay channels does this particle have?
0047   int                    size()         const { return itsDecayList.size(); }
0048   /// return this DecayChannel
0049   DecayChannel  channel( int i ) const { return itsDecayList[i]; }
0050   
0051   /// output decay information
0052   void write( std::ostream & os ) const;
0053 
0054   // ---  mutators:
0055   //
0056   /// append a new decay channel
0057   void  appendMode( DecayChannel );
0058 
0059 private:
0060 
0061   std::vector<DecayChannel > itsDecayList; 
0062 
0063 };  // DecayData
0064 
0065 inline
0066 void swap( DecayData & first, DecayData & second )  {
0067   first.swap( second );
0068 }
0069 
0070 }   // HepPDT
0071 
0072 #include "HepPDT/DecayData.icc"
0073 
0074 #endif // DecayData_HH