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

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Tue Oct 19 20:11:39 BST 2010


Author: richardn
Date: Tue Oct 19 20:11:38 2010
New Revision: 2721

Log:
fix for case of two particles

Modified:
   trunk/src/Projections/WFinder.cc

Modified: trunk/src/Projections/WFinder.cc
==============================================================================
--- trunk/src/Projections/WFinder.cc	Tue Oct 19 10:23:23 2010	(r2720)
+++ trunk/src/Projections/WFinder.cc	Tue Oct 19 20:11:38 2010	(r2721)
@@ -151,9 +151,12 @@
     clear();
     const InvMassFinalState& imfs = applyProjection<InvMassFinalState>(e, "IMFS");
 
-    Particle p1 = imfs.particles()[0];
-    Particle p2 = imfs.particles()[1];
-    if (imfs.particles().size() != 2) {
+    Particle p1,p2;
+    if(imfs.particles().size() == 2) {
+      p1 = imfs.particles()[0];
+      p2 = imfs.particles()[1];
+    }
+    else {
       // no candiate, return
       if(imfs.particles().empty()) {
 	getLog() << Log::DEBUG << "No W+- candidates found" << " "


More information about the Rivet-svn mailing list