<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">This explains why this bug suddenly turned up when we started using the user added information to the jets<br><div><br><div>Begin forwarded message:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>From: </b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica">Gavin Salam <<a href="mailto:salam@lpthe.jussieu.fr">salam@lpthe.jussieu.fr</a>></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>Date: </b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica">15 August 2008 10:03:26 GMT+02:00</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>To: </b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica">James Monk <<a href="mailto:jmonk@hep.ucl.ac.uk">jmonk@hep.ucl.ac.uk</a>></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>Cc: </b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica"><a href="mailto:fastjet@projects.hepforge.org">fastjet@projects.hepforge.org</a></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>Subject: </b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica"><b>Re: [Fastjet] Bug in CDFJetClu::_insert_unique</b></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><br></div> </div><div>Hi James,<br><br>Yes, that was a nasty hack -- we needed to know which particle was in what jet, but the jetclu code didn't provide any easy way of accessing a particle index to retain that information. (And we didn't want to touch<br>jetclu). Of course, it had always worked for us!<br><br>We'll look into a better solution...<br><br>Ciao,<br>Gavin<br><br><br><br><br><blockquote type="cite">Date: Thu, 14 Aug 2008 21:07:53 +0200<br></blockquote><blockquote type="cite">From: James Monk <<a href="mailto:jmonk@hep.ucl.ac.uk">jmonk@hep.ucl.ac.uk</a>><br></blockquote><blockquote type="cite">Reply-To: "Email the developers (subscription not required)"<br></blockquote><blockquote type="cite"> <<a href="mailto:fastjet@projects.hepforge.org">fastjet@projects.hepforge.org</a>><br></blockquote><blockquote type="cite">To: <a href="mailto:fastjet@projects.hepforge.org">fastjet@projects.hepforge.org</a><br></blockquote><blockquote type="cite">Subject: [Fastjet] Bug in CDFJetClu::_insert_unique<br></blockquote><blockquote type="cite">Hi Gavin,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">We found an infinite loop bug in the CDFJetClu plugin when run on the<br></blockquote><blockquote type="cite">system used for the Debrecen tutorial. It looks like there is a map<br></blockquote><blockquote type="cite">of the jets with the energy as the key. Using find on a map keyed by<br></blockquote><blockquote type="cite">a double is not safe, and somehow this causes the while loop on line<br></blockquote><blockquote type="cite">152 of CDFJetCluPlugin.cc to continue forever. We temporarily solved<br></blockquote><blockquote type="cite">the problem by reducing the value of the increment on line 156 to<br></blockquote><blockquote type="cite">1e-9, but the proper fix would be to use upper_bound and lower_bound<br></blockquote><blockquote type="cite">to safely find the entry in the map instead of find.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">cheers,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">James<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">_______________________________________________<br></blockquote><blockquote type="cite">Fastjet mailing list<br></blockquote><blockquote type="cite"><a href="mailto:Fastjet@projects.hepforge.org">Fastjet@projects.hepforge.org</a><br></blockquote><blockquote type="cite"><a href="http://www.hepforge.org/lists/listinfo/fastjet">http://www.hepforge.org/lists/listinfo/fastjet</a><br></blockquote><blockquote type="cite"><br></blockquote><br>- Gavin Salam ------------------------------------------------------------<br> <a href="http://www.lpthe.jussieu.fr/~salam/">http://www.lpthe.jussieu.fr/~salam/</a> | tel: +33 1 44 27 74 31<br> LPTHE, Univ. Paris 6 et 7, Paris 05, France | fax: +33 1 44 27 70 88<br>------------------------------------------------- <a href="mailto:salam@lpthe.jussieu.fr">salam@lpthe.jussieu.fr</a> -<br></div></blockquote></div><br></body></html>