[Rivet-svn] r3803 - in trunk: . include/Rivet/Math include/Rivet/Projections src/Projections

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Tue Jul 3 23:15:13 BST 2012


Author: hoeth
Date: Tue Jul  3 23:15:13 2012
New Revision: 3803

Log:
merge c3797 from branches/2012-06-aidarivet: fix to transverse mass by Gavin Hesketh

Modified:
   trunk/ChangeLog
   trunk/include/Rivet/Math/Vector4.hh
   trunk/include/Rivet/Projections/InvMassFinalState.hh
   trunk/src/Projections/InvMassFinalState.cc

Modified: trunk/ChangeLog
==============================================================================
--- trunk/ChangeLog	Tue Jul  3 23:11:40 2012	(r3802)
+++ trunk/ChangeLog	Tue Jul  3 23:15:13 2012	(r3803)
@@ -1,3 +1,7 @@
+2012-07-03  Hendrik Hoeth <hendrik.hoeth at cern.ch>
+
+	* Bugfix for transverse mass (thanks to Gavin Hesketh)
+
 2012-06-29  Hendrik Hoeth <hendrik.hoeth at cern.ch>
 
 	* Merge YODA branch into trunk. YODA is alive!!!!!!

Modified: trunk/include/Rivet/Math/Vector4.hh
==============================================================================
--- trunk/include/Rivet/Math/Vector4.hh	Tue Jul  3 23:11:40 2012	(r3802)
+++ trunk/include/Rivet/Math/Vector4.hh	Tue Jul  3 23:15:13 2012	(r3803)
@@ -385,21 +385,11 @@
       }
     }
 
-    /// Calculate the transverse mass \f$ m_T = m \sin{\theta} \f$.
-    double massT() const {
-      return mass() * sin(polarAngle());
-    }
-
     /// Get the squared mass \f$ m^2 = E^2 - p^2 \f$ (the Lorentz self-invariant).
     double mass2() const {
       return invariant();
     }
 
-    /// Calculate the squared transverse mass \f$ m_T^2 = m^2 \sin^2{\theta} \f$.
-    double massT2() const {
-      return massT() * massT();
-    }
-
     /// Calculate the rapidity.
     double rapidity() const {
       return 0.5 * std::log( (E() + pz()) / (E() - pz()) );
@@ -541,21 +531,11 @@
     return v.mass();
   }
 
-  /// Get the transverse mass \f$ m_T = m \sin{\theta} \f$ of a momentum 4-vector.
-  inline double massT(const FourMomentum& v) {
-    return v.massT();
-  }
-
   /// Get the squared mass \f$ m^2 = E^2 - p^2 \f$ (the Lorentz self-invariant) of a momentum 4-vector.
   inline double mass2(const FourMomentum& v) {
     return v.mass2();
   }
 
-  /// Get the squared transverse mass \f$ m_T^2 = m^2 \sin^2{\theta} \f$ of a momentum 4-vector.
-  inline double massT2(const FourMomentum& v) {
-    return v.massT2();
-  }
-
   /// Calculate the rapidity of a momentum 4-vector.
   inline double rapidity(const FourMomentum& v) {
     return v.rapidity();

Modified: trunk/include/Rivet/Projections/InvMassFinalState.hh
==============================================================================
--- trunk/include/Rivet/Projections/InvMassFinalState.hh	Tue Jul  3 23:11:40 2012	(r3802)
+++ trunk/include/Rivet/Projections/InvMassFinalState.hh	Tue Jul  3 23:15:13 2012	(r3803)
@@ -58,6 +58,13 @@
     /// Operate on a given particle vector directly instead of through project (no caching)
     void calc(const ParticleVector& inparticles);
 
+  private:
+
+    /// Transverse Mass
+    inline double massT( FourMomentum v1, FourMomentum v2) {
+      return sqrt( (v1.Et() + v2.Et())*(v1.Et() + v2.Et()) -
+                   (v1+v2).perp()*(v1+v2).perp() );
+    }
 
   protected:
 

Modified: trunk/src/Projections/InvMassFinalState.cc
==============================================================================
--- trunk/src/Projections/InvMassFinalState.cc	Tue Jul  3 23:11:40 2012	(r3802)
+++ trunk/src/Projections/InvMassFinalState.cc	Tue Jul  3 23:15:13 2012	(r3803)
@@ -137,7 +137,7 @@
         }
         bool passedMassCut = false;
         if (_useTransverseMass) {
-          passedMassCut = inRange(v4.massT(), _minmass, _maxmass);
+          passedMassCut = inRange(massT(i1->momentum(), i2->momentum()), _minmass, _maxmass);
         } else {
           passedMassCut = inRange(v4.mass(), _minmass, _maxmass);
         }


More information about the Rivet-svn mailing list