|
[Rivet] [Rivet-svn] rivet: 4mom shouldnt be pointers cos they get reordered behind t...Jonathan Butterworth J.Butterworth at ucl.ac.ukSun Mar 4 12:32:11 GMT 2018
The functions which act on the vector of constituents reorder them... e.g. constituentLepton() which uses the isChargedLepton function. I agree it should not be possible for the user to do this, because the analysis code looks sensible and it was a bugger to track down... On 02/03/2018 17:03, Andy Buckley wrote: > This is a bit odd, because after application the projection should be a > const reference -- not something that /can/ 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? > > Andy > > *Dr Andy Buckley, Lecturer / Royal Society University Research Fellow* > Particle Physics Experiment Group, University of Glasgow > > > On Mar 1 2018, at 6:34 pm, David Grellscheid > <david.grellscheid at durham.ac.uk> wrote: > > > Hi Jon, > > 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. > We'll need to look at this properly, it's not the job of the > analysis authors to get this right. > > See you, > > David > > > > On 1 March 2018 18:15:01 GMT, Rivet Mercurial > <rivet at projects.hepforge.org> wrote: > > details: https://rivet.hepforge.org/hg/rivet/rev/ce40a6dcf214 > branches: release-2-6-x > changeset: 6246:ce40a6dcf214 > user: Jon Butterworth <j.butterworth at cern.ch> > date: Wed Feb 28 23:10:34 2018 +0100 > description: > 4mom shouldnt be pointers cos they get reordered behind the > scenes and > mT is then always zero. > > diffs (20 lines): > > --- a/analyses/pluginCMS/CMS_2016_I1491953.cc Tue Feb 27 > 22:34:33 2018 > +0000 > +++ b/analyses/pluginCMS/CMS_2016_I1491953.cc Wed Feb 28 > 23:10:34 2018 > +0100 > @@ -107,9 +107,14 @@ > const WFinder& wfinder_mu = applyProjection<WFinder>(event, > "WFinder_mu"); > if (wfinder_mu.bosons().size() != 1) vetoEvent; > > - const FourMomentum& lepton0 = > wfinder_mu.constituentLeptons()[0].momentum(); > - const FourMomentum& neutrino = > wfinder_mu.constituentNeutrinos()[0].momentum(); > - double WmT = sqrt( 2 * lepton0.pT() * neutrino.pT() * (1 - > cos(deltaPhi(lepton0, neutrino))) ); > + //const FourMomentum& lepton0 = > wfinder_mu.constituentLeptons()[0].momentum(); > + //const FourMomentum& neutrino = > wfinder_mu.constituentNeutrinos()[0].momentum(); > + //double WmT = sqrt( 2 * lepton0.pT() * neutrino.pT() * (1 - > cos(deltaPhi(lepton0, neutrino))) ); > + > + const FourMomentum lepton0 = > wfinder_mu.constituentLepton().momentum(); > + const FourMomentum neutrino = > wfinder_mu.constituentNeutrino().momentum(); > + double WmT = wfinder_mu.mT(); > + > if (WmT < 50.0*GeV) vetoEvent; > if (lepton0.abseta() > 2.1 || lepton0.pT() < 25.0*GeV) vetoEvent; > > _______________________________________________ > Rivet-svn mailing list > Rivet-svn at projects.hepforge.org > https://www.hepforge.org/lists/listinfo/rivet-svn > > _______________________________________________ > Rivet mailing list > Rivet at projects.hepforge.org > https://www.hepforge.org/lists/listinfo/rivet > > > > _______________________________________________ > Rivet mailing list > Rivet at projects.hepforge.org > https://www.hepforge.org/lists/listinfo/rivet > -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Prof. Jonathan Butterworth, http://www.hep.ucl.ac.uk/~jmb/ Head, Physics and Astronomy Department Tel: +44 20 7679 3444 University College London Gower St, London WC1E 6BT, UK ATLAS, CERN Tel: +41 22 76 72340 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
More information about the Rivet mailing list |