[Rivet-svn] rivet: 2 new changesets

Rivet Mercurial rivet at projects.hepforge.org
Sun Oct 4 16:45:01 BST 2015


details:   https://rivet.hepforge.org/hg/rivet/rev/d0e372d4d320
branches:  
changeset: 4887:d0e372d4d320
user:      Andy Buckley <andy at insectnation.org>
date:      Sun Oct 04 08:05:15 2015 +0100
description:
Rename FourVector/FourMomentum flip3() as reverse()

details:   https://rivet.hepforge.org/hg/rivet/rev/dd286dd6c573
branches:  
changeset: 4888:dd286dd6c573
user:      Andy Buckley <andy at insectnation.org>
date:      Sun Oct 04 08:25:41 2015 +0100
description:
Set Python module rivet.__version__ variable

diffs (truncated from 60 to 50 lines):

--- a/ChangeLog	Wed Sep 30 22:09:00 2015 +0100
+++ b/ChangeLog	Sun Oct 04 08:25:41 2015 +0100
@@ -1,6 +1,6 @@
 2015-09-30  Andy Buckley  <andy.buckley at cern.ch>
 
-	* Important improvement in FourVector & FourMomentum: new flip3()
+	* Important improvement in FourVector & FourMomentum: new reverse()
 	method to return a 4-vector in which only the spatial component
 	has been inverted cf. operator- which flips the t/E component as
 	well.
--- a/include/Rivet/Math/Vector4.hh	Wed Sep 30 22:09:00 2015 +0100
+++ b/include/Rivet/Math/Vector4.hh	Sun Oct 04 08:25:41 2015 +0100
@@ -197,7 +197,7 @@
     }
 
     /// Multiply space components only by -1.
-    FourVector flip3() const {
+    FourVector reverse() const {
       FourVector result = -*this;
       result.setT(-result.t());
       return result;
@@ -478,7 +478,7 @@
     }
 
     /// Multiply space components only by -1.
-    FourMomentum flip3() const {
+    FourMomentum reverse() const {
       FourMomentum result = -*this;
       result.setE(-result.E());
       return result;
--- a/include/Rivet/Projections/MissingMomentum.hh	Wed Sep 30 22:09:00 2015 +0100
+++ b/include/Rivet/Projections/MissingMomentum.hh	Sun Oct 04 08:25:41 2015 +0100
@@ -46,7 +46,7 @@
 
     /// The vector-summed visible four-momentum in the event.
     ///
-    /// @note Reverse this vector with .flip3() to get the missing momentum vector.
+    /// @note Reverse this vector with .reverse() to get the missing momentum vector.
     ///
     /// @note The optional @a mass argument is used to set a mass on the 4-vector. By
     ///   default it is zero (since missing momentum is really a 3-momentum quantity:
@@ -60,7 +60,7 @@
     /// @note The optional @a mass argument is used to set a mass on the 4-vector. By
     ///   default it is zero (since missing momentum is really a 3-momentum quantity:
     ///   adding the E components of visible momenta just gives a huge mass)
-    const FourMomentum missingMomentum(double mass=0*GeV) const { return visibleMomentum(mass).flip3(); }
+    const FourMomentum missingMomentum(double mass=0*GeV) const { return visibleMomentum(mass).reverse(); }
     /// Alias for missingMomentum
     const FourMomentum missingMom(double mass=0*GeV) const { return missingMomentum(mass); }
 


More information about the Rivet-svn mailing list