|
[Rivet-svn] r2058 - in trunk/include/Rivet: . Mathblackhole at projects.hepforge.org blackhole at projects.hepforge.orgMon Nov 16 15:51:37 GMT 2009
Author: dgrell Date: Mon Nov 16 15:51:37 2009 New Revision: 2058 Log: Removed useless const specifiers on function return types passed by value. Modified: trunk/include/Rivet/Analysis.hh trunk/include/Rivet/Math/MatrixN.hh trunk/include/Rivet/Math/Vector4.hh trunk/include/Rivet/Math/VectorN.hh trunk/include/Rivet/Particle.hh Modified: trunk/include/Rivet/Analysis.hh ============================================================================== --- trunk/include/Rivet/Analysis.hh Mon Nov 16 14:16:43 2009 (r2057) +++ trunk/include/Rivet/Analysis.hh Mon Nov 16 15:51:37 2009 (r2058) @@ -160,10 +160,10 @@ virtual const BeamPair& requiredBeams() const; /// Is this analysis able to run on the supplied pair of beams? - virtual const bool isCompatible(const ParticleName& beam1, const ParticleName& beam2) const; + virtual bool isCompatible(const ParticleName& beam1, const ParticleName& beam2) const; /// Is this analysis able to run on the BeamPair @a beams ? - virtual const bool isCompatible(const BeamPair& beams) const; + virtual bool isCompatible(const BeamPair& beams) const; /// Access the controlling AnalysisHandler object. AnalysisHandler& handler() const; Modified: trunk/include/Rivet/Math/MatrixN.hh ============================================================================== --- trunk/include/Rivet/Math/MatrixN.hh Mon Nov 16 14:16:43 2009 (r2057) +++ trunk/include/Rivet/Math/MatrixN.hh Mon Nov 16 15:51:37 2009 (r2058) @@ -160,12 +160,12 @@ } /// Get dimensionality - const size_t size() const { + size_t size() const { return N; } /// Index-wise check for nullness, allowing for numerical precision - const bool isZero(double tolerance=1E-5) const { + bool isZero(double tolerance=1E-5) const { for (size_t i=0; i < N; ++i) { for (size_t j=0; j < N; ++j) { if (! Rivet::isZero(_matrix(i,j), tolerance) ) return false; @@ -175,7 +175,7 @@ } /// Check for index-wise equality, allowing for numerical precision - const bool isEqual(Matrix<N> other) const { + bool isEqual(Matrix<N> other) const { for (size_t i=0; i < N; ++i) { for (size_t j=i; j < N; ++j) { if (! Rivet::isZero(_matrix(i,j) - other._matrix(i,j)) ) return false; @@ -185,12 +185,12 @@ } /// Check for symmetry under transposition - const bool isSymm() const { + bool isSymm() const { return isEqual(this->transpose()); } /// Check that all off-diagonal elements are zero, allowing for numerical precision - const bool isDiag() const { + bool isDiag() const { for (size_t i=0; i < N; ++i) { for (size_t j=0; j < N; ++j) { if (i == j) continue; Modified: trunk/include/Rivet/Math/Vector4.hh ============================================================================== --- trunk/include/Rivet/Math/Vector4.hh Mon Nov 16 14:16:43 2009 (r2057) +++ trunk/include/Rivet/Math/Vector4.hh Mon Nov 16 15:51:37 2009 (r2058) @@ -46,10 +46,10 @@ virtual ~FourVector() { } public: - const double t() const { return get(0); } - const double x() const { return get(1); } - const double y() const { return get(2); } - const double z() const { return get(3); } + double t() const { return get(0); } + double x() const { return get(1); } + double y() const { return get(2); } + double z() const { return get(3); } FourVector& setT(const double t) { set(0, t); return *this; } FourVector& setX(const double x) { set(1, x); return *this; } FourVector& setY(const double y) { set(2, y); return *this; } @@ -225,7 +225,7 @@ /// Calculate the Lorentz self-invariant of a 4-vector. /// \f$ v_\mu v^\mu = g_{\mu\nu} x^\mu x^\nu \f$. - inline const double invariant(const FourVector& lv) { + inline double invariant(const FourVector& lv) { return lv.invariant(); } Modified: trunk/include/Rivet/Math/VectorN.hh ============================================================================== --- trunk/include/Rivet/Math/VectorN.hh Mon Nov 16 14:16:43 2009 (r2057) +++ trunk/include/Rivet/Math/VectorN.hh Mon Nov 16 15:51:37 2009 (r2058) @@ -59,12 +59,12 @@ } /// Vector dimensionality - const size_t size() const { + size_t size() const { return N; } /// Check for nullness, allowing for numerical precision - const bool isZero(double tolerance=1E-5) const { + bool isZero(double tolerance=1E-5) const { for (size_t i=0; i < N; ++i) { if (! Rivet::isZero(_vec[i], tolerance) ) return false; } Modified: trunk/include/Rivet/Particle.hh ============================================================================== --- trunk/include/Rivet/Particle.hh Mon Nov 16 14:16:43 2009 (r2057) +++ trunk/include/Rivet/Particle.hh Mon Nov 16 15:51:37 2009 (r2058) @@ -40,7 +40,7 @@ /// The PDG ID code for this Particle. - const long pdgId() const { return _id; } + long pdgId() const { return _id; } /// The momentum of this Particle. @@ -56,7 +56,7 @@ /// The mass of this Particle. - const double mass() const { return _mass; } + double mass() const { return _mass; } bool hasAncestor(long pdg_id) const {
More information about the Rivet-svn mailing list |