Warning, file /include/HepMC/GenCrossSection.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 #ifndef HEPMC_GEN_CROSS_SECTION_H
0002 #define HEPMC_GEN_CROSS_SECTION_H
0003
0004
0005
0006
0007
0008
0009
0010
0011 #include <iostream>
0012
0013 namespace HepMC {
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032 class GenCrossSection {
0033
0034 public:
0035 GenCrossSection()
0036 : m_cross_section(0),
0037 m_cross_section_error(0),
0038 m_is_set(false)
0039 {}
0040 ~GenCrossSection() {}
0041
0042 GenCrossSection( GenCrossSection const & orig );
0043
0044 void swap( GenCrossSection & other);
0045 GenCrossSection & operator = ( GenCrossSection const & rhs );
0046
0047 bool operator==( const GenCrossSection& ) const;
0048
0049 bool operator!=( const GenCrossSection& ) const;
0050
0051
0052
0053
0054
0055 double cross_section() const { return m_cross_section; }
0056
0057 double cross_section_error() const { return m_cross_section_error; }
0058
0059
0060 bool is_set() const { return m_is_set; }
0061
0062
0063
0064 void set_cross_section( double xs, double xs_err );
0065
0066 void set_cross_section( double );
0067
0068 void set_cross_section_error( double );
0069
0070
0071 void clear();
0072
0073
0074
0075 std::ostream & write( std::ostream & ) const;
0076
0077 std::istream & read( std::istream & );
0078
0079 private:
0080 double m_cross_section;
0081 double m_cross_section_error;
0082 bool m_is_set;
0083
0084 };
0085
0086
0087
0088
0089 inline std::ostream & operator << ( std::ostream & os, GenCrossSection & xs )
0090 { return xs.write(os); }
0091
0092 inline std::istream & operator >> ( std::istream & is, GenCrossSection & xs )
0093 { return xs.read(is); }
0094
0095
0096
0097
0098 inline void GenCrossSection::set_cross_section( double xs, double xserr ) {
0099 set_cross_section(xs);
0100 set_cross_section_error(xserr);
0101 }
0102
0103 inline void GenCrossSection::set_cross_section( double xs )
0104 {
0105 m_cross_section = xs;
0106 m_is_set = true;
0107 }
0108
0109 inline void GenCrossSection::set_cross_section_error( double xserr )
0110 {
0111 m_cross_section_error = xserr;
0112 }
0113
0114 }
0115
0116 #endif