[Rivet-svn] rivet: Fix testMatVec for LT updates

Rivet Mercurial rivet at projects.hepforge.org
Wed Jun 15 00:30:01 BST 2016


details:   https://rivet.hepforge.org/hg/rivet/rev/ac7735927090
branches:  
changeset: 5258:ac7735927090
user:      Andy Buckley <andy at insectnation.org>
date:      Wed Jun 15 00:17:39 2016 +0100
description:
Fix testMatVec for LT updates

diffs (truncated from 63 to 50 lines):

--- a/test/testMatVec.cc	Tue Jun 14 12:54:37 2016 +0100
+++ b/test/testMatVec.cc	Wed Jun 15 00:17:39 2016 +0100
@@ -1,13 +1,12 @@
+#include "Rivet/Math/MathUtils.hh"
+#include "Rivet/Math/Vectors.hh"
+#include "Rivet/Math/Matrices.hh"
+using namespace Rivet;
+
 #include <iostream>
 #include <limits>
 #include <cassert>
-
-#include "Rivet/Math/MathUtils.hh"
-#include "Rivet/Math/Vectors.hh"
-#include "Rivet/Math/Matrices.hh"
-
 using namespace std;
-using namespace Rivet;
 
 int main() {
 
@@ -115,33 +114,33 @@
   cout << endl;
 
   cout << "Boosts:" << endl;
-  LorentzTransform ltX(0.5,0,0);
+  LorentzTransform ltX = LorentzTransform::mkObjTransformFromBeta(Vector3(0.5, 0, 0));
   cout << "LTx: " << ltX << endl;
   cout << "I on LTx: " << ltX.rotate(Matrix3::mkIdentity()) << endl;
   cout << "Rot90 on LTx: " << ltX.rotate(rot90) << endl;
   cout << endl;
 
   cout << "X-boosts:" << endl;
-  const FourMomentum p1 = FourMomentum(10,0,0,1);
+  const FourMomentum p1 = FourMomentum(10, 0, 0, 1);
   const FourMomentum p2 = ltX.transform(p1);
   cout << p1 << " -> " << p2 << endl;
   cout << p2 << " -> " << ltX.inverse().transform(p2) << endl;
   //cout << p1.boostVector() << endl;
-  const FourMomentum p3 = LorentzTransform(-p1.boostVector()).transform(p1);
+  const FourMomentum p3 = LorentzTransform::mkFrameTransformFromBeta(p1.boostVector()).transform(p1);
   cout << p1 << " -> " << p3 << endl;
   cout << endl;
 
-  LorentzTransform ltY(0,0.4,0);
+  LorentzTransform ltY = LorentzTransform::mkObjTransformFromGamma(Vector3(0, 1.2, 0));
   cout << FourMomentum(1,0,0,1) << " -> " //<< "\n  "
        << (ltX * ltY).transform(FourMomentum(1,0,0,1)) << endl;
   cout << FourMomentum(1,0,0,1) << " -> " //<< "\n  "
        << (ltY * ltX).transform(FourMomentum(1,0,0,1)) << endl;


More information about the Rivet-svn mailing list