<div>This is a bit odd, because after application the projection should be a const reference -- not something that <em>can</em> be reordered. Unless we're using mutable internally... which is possible, but I thought we called the sorting earlier. If it's possible for particle-list elements to be re-ordered after project(), breaking references/pointers exposed to user code, then we definitely need to fix that. Is that what was happening here, Jon?</div><br><div>Andy</div><br><div><signature id="initial"><div><table cellpadding="0" cellspacing="0"><tbody><tr><td colspan="2"><div style="padding-bottom:15px;"><div><strong>Dr Andy Buckley, Lecturer / Royal Society University Research Fellow</strong></div><div>Particle Physics Experiment Group, University of Glasgow</div></div></td></tr><tr><td style="vertical-align:top;"></td><td><div style="font-size:0.9em;white-space:nowrap;border-left:2px solid gray;margin-left:20px;padding-left:20px;"><div><div></div><div></div></div></div></td></tr></tbody></table></div></signature></div><div class="gmail_quote_attribution">On Mar 1 2018, at 6:34 pm, David Grellscheid <david.grellscheid@durham.ac.uk> wrote:</div><blockquote><br><div><div>Hi Jon,</div><br><div>Great find! Thanks! We've been looking at the return values of the finders before, and this clearly demonstrates that they have very delicate semantics right now with ordering.</div><div>We'll need to look at this properly, it's not the job of the analysis authors to get this right.</div><br><div>See you,</div><br><div>David</div><br><br><br><div>On 1 March 2018 18:15:01 GMT, Rivet Mercurial <rivet@projects.hepforge.org> wrote:</div><blockquote><div>details: https://rivet.hepforge.org/hg/rivet/rev/ce40a6dcf214</div><div>branches: release-2-6-x</div><div>changeset: 6246:ce40a6dcf214</div><div>user: Jon Butterworth <j.butterworth@cern.ch></div><div>date: Wed Feb 28 23:10:34 2018 +0100</div><div>description:</div><div>4mom shouldnt be pointers cos they get reordered behind the scenes and</div><div>mT is then always zero.</div><br><div>diffs (20 lines):</div><br><div>--- a/analyses/pluginCMS/CMS_2016_I1491953.cc Tue Feb 27 22:34:33 2018</div><div>+0000</div><div>+++ b/analyses/pluginCMS/CMS_2016_I1491953.cc Wed Feb 28 23:10:34 2018</div><div>+0100</div><div>@@ -107,9 +107,14 @@</div><div>const WFinder& wfinder_mu = applyProjection<WFinder>(event,</div><div>"WFinder_mu");</div><div>if (wfinder_mu.bosons().size() != 1) vetoEvent;</div><br><div>- const FourMomentum& lepton0 =</div><div>wfinder_mu.constituentLeptons()[0].momentum();</div><div>- const FourMomentum& neutrino =</div><div>wfinder_mu.constituentNeutrinos()[0].momentum();</div><div>- double WmT = sqrt( 2 * lepton0.pT() * neutrino.pT() * (1 -</div><div>cos(deltaPhi(lepton0, neutrino))) );</div><div>+ //const FourMomentum& lepton0 =</div><div>wfinder_mu.constituentLeptons()[0].momentum();</div><div>+ //const FourMomentum& neutrino =</div><div>wfinder_mu.constituentNeutrinos()[0].momentum();</div><div>+ //double WmT = sqrt( 2 * lepton0.pT() * neutrino.pT() * (1 -</div><div>cos(deltaPhi(lepton0, neutrino))) );</div><div>+</div><div>+ const FourMomentum lepton0 =</div><div>wfinder_mu.constituentLepton().momentum();</div><div>+ const FourMomentum neutrino =</div><div>wfinder_mu.constituentNeutrino().momentum();</div><div>+ double WmT = wfinder_mu.mT();</div><div>+</div><div>if (WmT < 50.0*GeV) vetoEvent;</div><div>if (lepton0.abseta() > 2.1 || lepton0.pT() < 25.0*GeV) vetoEvent;</div><br><div>_______________________________________________</div><div>Rivet-svn mailing list</div><div>Rivet-svn@projects.hepforge.org</div><div>https://www.hepforge.org/lists/listinfo/rivet-svn</div></blockquote><div>_______________________________________________</div><div>Rivet mailing list</div><div>Rivet@projects.hepforge.org</div><div>https://www.hepforge.org/lists/listinfo/rivet</div></div></blockquote>