| /trunk/ChangeLog |
| @@ -4,6 +4,14 @@ |
| * HepMC/SimpleVector: remove FourVector::mag() and ThreeVector::mag() |
| Change test/testSimpleVector.cc and test/testMass.cc to reflect this. |
| |
| * HepMC/HepMCDefs.h: New header containing HEPMC_HAS_UNITS and |
| similar macros so users can check for various code features. |
| HepMC/GenEvent.h includes HepMCDefs.h. |
| * HepMC/Version.h: Use new HEPMC_VERSION macro. |
| |
| * HepMC/GenParticle: add is_undecayed(), has_decayed(), and is_beam_particle() |
| convenience methods. Test these methods in test/testHepMC. |
| |
| 2009-01-28 Lynn Garren |
| |
| * remove HepMC/IO_Ascii.h and test/testDeprecated |
| /trunk/HepMC/HepMCDefs.h |
New file
| @@ -0,0 +1,53 @@ |
| #ifndef HEPMC_DEFS_H |
| #define HEPMC_DEFS_H |
| // ---------------------------------------------------------------------- |
| // |
| // HepMCDefs.h |
| // Author: Lynn Garren |
| // |
| // Define various useful macros |
| // Most allow users to check for various code features |
| // |
| // ---------------------------------------------------------------------- |
| |
| // the HeavyIon class is available in HepMC |
| #ifndef HEPMC_HAS_HEAVY_ION |
| #define HEPMC_HAS_HEAVY_ION |
| #endif |
| |
| // the IO_Ascii class is NOT available in HepMC |
| #ifndef HEPMC_IO_ASCII_REMOVED |
| #define HEPMC_IO_ASCII_REMOVED |
| #endif |
| |
| // the IO_GenEvent class is available in HepMC |
| #ifndef HEPMC_HAS_IO_GENEVENT |
| #define HEPMC_HAS_IO_GENEVENT |
| #endif |
| |
| // the PdfInfo class is available in HepMC |
| #ifndef HEPMC_HAS_PDF_INFO |
| #define HEPMC_HAS_PDF_INFO |
| #endif |
| |
| // HepMC uses SimpleVector (FourVector) to store momentum and position |
| #ifndef HEPMC_HAS_SIMPLE_VECTOR |
| #define HEPMC_HAS_SIMPLE_VECTOR |
| #endif |
| |
| // units are defined in HepMC |
| #ifndef HEPMC_HAS_UNITS |
| #define HEPMC_HAS_UNITS |
| #endif |
| |
| // the GenCrossSection class is available in HepMC |
| #ifndef HEPMC_HAS_CROSS_SECTION |
| #define HEPMC_HAS_CROSS_SECTION |
| #endif |
| |
| // define the version of HepMC. |
| #ifndef HEPMC_VERSION |
| #define HEPMC_VERSION "2.04.01" |
| #endif |
| |
| #endif // HEPMC_DEFS_H |
| /trunk/HepMC/GenParticle.h |
| @@ -121,6 +121,15 @@ |
| /// event has a unique barcode. Particle barcodes are positive numbers, |
| /// vertex barcodes are negative numbers. |
| int barcode() const; //!< particle barcode |
| |
| /// Convenience method. Returns true if status==1 |
| bool is_undecayed() const; |
| /// Convenience method. Returns true if status==2 |
| bool has_decayed() const; |
| /// Convenience method. Returns true if status==4 |
| /// Note that using status 4 for beam particles is a new convention which |
| /// may not have been implemented by the code originating this GenEvent. |
| bool is_beam() const; |
| |
| ///////////////////// |
| // mutator methods // |
| @@ -224,6 +233,16 @@ |
| |
| inline void GenParticle::set_barcode_( int bc ) { m_barcode = bc; } |
| |
| inline bool GenParticle::is_undecayed() const { |
| return ( m_status==1 ) ? true : false; |
| } |
| inline bool GenParticle::has_decayed() const { |
| return ( m_status==2 ) ? true : false; |
| } |
| inline bool GenParticle::is_beam() const { |
| return ( m_status==4 ) ? true : false; |
| } |
| |
| } // HepMC |
| |
| #endif // HEPMC_GEN_PARTICLE_H |