[Rivet-svn] r2719 - trunk/src/Projections

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Tue Oct 19 10:16:33 BST 2010


Author: richardn
Date: Tue Oct 19 10:16:33 2010
New Revision: 2719

Log:
fix to ensure pair really in list. Could go wrong before for W's where more than one pair of particles in list of allowed particles giving e.g. e+ nu_ebar as well as the e- nu_ebar and e+ nu_e we are looking for.

Modified:
   trunk/src/Projections/InvMassFinalState.cc

Modified: trunk/src/Projections/InvMassFinalState.cc
==============================================================================
--- trunk/src/Projections/InvMassFinalState.cc	Sat Oct 16 12:22:34 2010	(r2718)
+++ trunk/src/Projections/InvMassFinalState.cc	Tue Oct 19 10:16:33 2010	(r2719)
@@ -87,6 +87,18 @@
     // Now calculate the inv mass
     foreach (const Particle* i1, type1) {
       foreach (const Particle* i2, type2) {
+	// check this is actually a pair 
+	// (if more than one pair in vector particles can be unrelated)
+	bool found = false;
+	foreach (const PdgIdPair& ipair, _decayids) {
+	  if (i1->pdgId() == ipair.first &&
+	      i2->pdgId() == ipair.second) {
+	    found=true;
+	    break;
+	  }
+	}
+	if(!found) continue;
+
         FourMomentum v4 = i1->momentum() + i2->momentum();
         if (v4.mass2() < 0) {
           getLog() << Log::DEBUG << "Constructed negative inv mass2: skipping!" << endl;


More information about the Rivet-svn mailing list