Changeset 572 in svn for trunk/Utilities/HepMC/interface/SimpleVector.icc
- Timestamp:
- Nov 2, 2011, 5:39:26 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Utilities/HepMC/interface/SimpleVector.icc
r349 r572 49 49 } 50 50 51 inline double FourVector::mag() const {52 return std::sqrt( m_x*m_x + m_y*m_y + m_z*m_z );53 }54 55 51 inline double FourVector::perp2() const { return m_x*m_x + m_y*m_y; } 56 52 … … 78 74 79 75 inline double FourVector::pseudoRapidity() const { 80 double m = mag();76 double m = std::sqrt( m_x*m_x + m_y*m_y + m_z*m_z ); 81 77 if ( m== 0 ) return 0.0; 82 78 if ( m== z() ) return 1.0E72; … … 106 102 } 107 103 108 inline double ThreeVector::mag()const {104 inline double ThreeVector::r() const { 109 105 return std::sqrt( m_x*m_x + m_y*m_y + m_z*m_z ); 110 106 } 111 112 inline double ThreeVector::r() const { return mag(); }113 107 114 108 inline void ThreeVector::set(double x, double y, double z) { … … 125 119 126 120 inline void ThreeVector::setTheta(double th) { 127 double ma = mag();121 double ma = r(); 128 122 double ph = phi(); 129 123 setX(ma*std::sin(th)*std::cos(ph));
Note:
See TracChangeset
for help on using the changeset viewer.