[Rivet-svn] rivet: 3 new changesets

Rivet Mercurial rivet at projects.hepforge.org
Mon Jun 20 12:45:02 BST 2016


details:   https://rivet.hepforge.org/hg/rivet/rev/dce16aa9c8ba
branches:  
changeset: 5271:dce16aa9c8ba
user:      Andy Buckley <andy at insectnation.org>
date:      Sun Jun 19 13:44:13 2016 +0100
description:
Update beams test to new LT interface, and fix typos: it works now!

details:   https://rivet.hepforge.org/hg/rivet/rev/978e5c85991a
branches:  
changeset: 5272:978e5c85991a
user:      Andy Buckley <andy at insectnation.org>
date:      Sun Jun 19 13:48:49 2016 +0100
description:
Integrate testBeams into test/Makefile

details:   https://rivet.hepforge.org/hg/rivet/rev/e46470f99190
branches:  
changeset: 5273:e46470f99190
user:      Andy Buckley <andy at insectnation.org>
date:      Mon Jun 20 12:31:09 2016 +0100
description:
Use a numerically cleaner (?) algebraic form for the gamma boost vector

diffs (truncated from 366 to 50 lines):

--- a/include/Rivet/Math/LorentzTrans.hh	Thu Jun 16 16:25:17 2016 +0100
+++ b/include/Rivet/Math/LorentzTrans.hh	Mon Jun 20 12:31:09 2016 +0100
@@ -50,6 +50,12 @@
     /// @name Construction
     //@{
 
+    /// Default (identity) constructor
+    LorentzTransform() {
+      _boostMatrix = Matrix<4>::mkIdentity();
+    }
+
+
     /// Make an LT for an active boost (i.e. object velocity += in boost direction)
     static LorentzTransform mkObjTransformFromBeta(const Vector3& vbeta) {
       LorentzTransform rtn;
@@ -65,19 +71,15 @@
     /// Make an LT for an active boost (i.e. object velocity += in boost direction)
     static LorentzTransform mkObjTransformFromGamma(const Vector3& vgamma) {
       LorentzTransform rtn;
-      return rtn.setGammaVec(vgamma);
+      if (!vgamma.isZero()) rtn.setGammaVec(vgamma);
+      return rtn;
     }
 
     /// Make an LT for a passive boost (i.e. object velocity -= in boost direction)
     static LorentzTransform mkFrameTransformFromGamma(const Vector3& vgamma) {
       LorentzTransform rtn;
-      return rtn.setGammaVec(-vgamma);
-    }
-
-
-    /// Default (identity) constructor
-    LorentzTransform() {
-      _boostMatrix = Matrix<4>::mkIdentity();
+      if (!vgamma.isZero()) rtn.setGammaVec(-vgamma);
+      return rtn;
     }
 
     //@}
--- a/include/Rivet/Math/Vector4.hh	Thu Jun 16 16:25:17 2016 +0100
+++ b/include/Rivet/Math/Vector4.hh	Mon Jun 20 12:31:09 2016 +0100
@@ -72,6 +72,10 @@
       return (t() + z())*(t() - z()) - x()*x() - y()*y();
     }
 
+    bool isNull() const {
+      return Rivet::isZero(invariant());
+    }
+
     /// Angle between this vector and another


More information about the Rivet-svn mailing list