[Rivet-svn] r3797 - in branches/2012-06-aidarivet: . include/Rivet/Math include/Rivet/Projections src/Projections

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Tue Jul 3 22:47:23 BST 2012


Author: hoeth
Date: Tue Jul  3 22:47:22 2012
New Revision: 3797

Log:
fix transverse mass

Modified:
   branches/2012-06-aidarivet/ChangeLog
   branches/2012-06-aidarivet/include/Rivet/Math/Vector4.hh
   branches/2012-06-aidarivet/include/Rivet/Projections/InvMassFinalState.hh
   branches/2012-06-aidarivet/src/Projections/InvMassFinalState.cc

Modified: branches/2012-06-aidarivet/ChangeLog
==============================================================================
--- branches/2012-06-aidarivet/ChangeLog	Tue Jul  3 21:44:29 2012	(r3796)
+++ branches/2012-06-aidarivet/ChangeLog	Tue Jul  3 22:47:22 2012	(r3797)
@@ -1,3 +1,11 @@
+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>
+
+	* Create AIDA based Rivet branch and convert trunk to YODA
+
 2012-06-20  Hendrik Hoeth <hendrik.hoeth at cern.ch>
 
 	* Added D0_2011_I895662: 3-jet mass

Modified: branches/2012-06-aidarivet/include/Rivet/Math/Vector4.hh
==============================================================================
--- branches/2012-06-aidarivet/include/Rivet/Math/Vector4.hh	Tue Jul  3 21:44:29 2012	(r3796)
+++ branches/2012-06-aidarivet/include/Rivet/Math/Vector4.hh	Tue Jul  3 22:47:22 2012	(r3797)
@@ -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: branches/2012-06-aidarivet/include/Rivet/Projections/InvMassFinalState.hh
==============================================================================
--- branches/2012-06-aidarivet/include/Rivet/Projections/InvMassFinalState.hh	Tue Jul  3 21:44:29 2012	(r3796)
+++ branches/2012-06-aidarivet/include/Rivet/Projections/InvMassFinalState.hh	Tue Jul  3 22:47:22 2012	(r3797)
@@ -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: branches/2012-06-aidarivet/src/Projections/InvMassFinalState.cc
==============================================================================
--- branches/2012-06-aidarivet/src/Projections/InvMassFinalState.cc	Tue Jul  3 21:44:29 2012	(r3796)
+++ branches/2012-06-aidarivet/src/Projections/InvMassFinalState.cc	Tue Jul  3 22:47:22 2012	(r3797)
@@ -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