[Rivet-svn] r3979 - branches/2012-06-aidarivet/src/Analyses

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Sun Nov 11 15:34:09 GMT 2012


Author: buckley
Date: Sun Nov 11 15:34:09 2012
New Revision: 3979

Log:
Cleanup in boost angle construction, since Vector3::angle is now numerically safe for back-to-back vectors.

Modified:
   branches/2012-06-aidarivet/src/Analyses/MC_VH2BB.cc

Modified: branches/2012-06-aidarivet/src/Analyses/MC_VH2BB.cc
==============================================================================
--- branches/2012-06-aidarivet/src/Analyses/MC_VH2BB.cc	Sun Nov 11 15:32:02 2012	(r3978)
+++ branches/2012-06-aidarivet/src/Analyses/MC_VH2BB.cc	Sun Nov 11 15:34:09 2012	(r3979)
@@ -55,14 +55,7 @@
 
       double cosbb = b1BOOSTED.vector3().unit().dot(b2BOOSTED.vector3().unit());
       double test = 1.+cosbb;
-      double anglebb;
-      if(test<0.&&test>-1e-10) {
-        cosbb=-1.;
-        anglebb = M_PI;
-      }
-      else {
-        anglebb = acos(cosbb);
-      }
+      double anglebb = b1BOOSTED.angle(b2BOOSTED);
 
       vector<double> toReturn;
       toReturn.push_back(angle1 < angle2 ? angle1 : angle2);


More information about the Rivet-svn mailing list