|
[Rivet] CMS_2015_I1370682.tgzAndy Buckley andy.buckley at cern.chThu Mar 24 15:22:26 GMT 2016
Yep, sorry about that. I thought I had caught any copy & paste errors in that conversion, but didn't notice that there was no std::next to be replaced in the semi-leptonic block. Andy On 24/03/16 14:39, Markus Seidel wrote: > The +1 was introduced when Andy moved the code away from C++11. > In fact, we want only one hadronic top in lepton+jets channel :) > > Cheers, > Markus > > On 24.03.2016 12:34, David Grellscheid wrote: >> Hi all, >> >> I don't understand this fix here. The first version segfaults sometimes, >> if there is no element at begin()+1. But why is it okay to take the one >> at begin() instead? There must have been a reason for the '+1' in the >> first place. >> >> David >> >> >> On 17/03/2016 14:03, Markus Seidel wrote: >>> Hi Andy, >>> >>> thanks a lot for integrating CMS_2015_I1370682! >>> >>> Unfortunately, there is a bug that causes segfault, see fix below. >>> (I do not know if it still runs outside the CMS framework but the >>> physics output is certainly not correct then.) >>> >>> Cheers, >>> Markus >>> >>> diff --git a/src/CMS_2015_I1370682.cc b/src/CMS_2015_I1370682.cc >>> index a56f195..7b47aa8 100644 >>> --- a/src/CMS_2015_I1370682.cc >>> +++ b/src/CMS_2015_I1370682.cc >>> @@ -518,7 +518,7 @@ namespace Rivet { >>> w2dau2LVec = w2dau2.momentum(); >>> } else if (nWLepCand == 1) { // Semi-leptonic case >>> const pair<size_t, size_t>& idPair1 = >>> wLepCandIdxs.begin()->second; >>> - const pair<size_t, size_t>& idPair2 = >>> (++wHadCandIdxs.begin())->second; ///< @todo Reinstate std::next >>> + const pair<size_t, size_t>& idPair2 = >>> wHadCandIdxs.begin()->second; >>> const Jet& w1dau1 = leptons[idPair1.first]; >>> const Particle& w1dau2 = neutrinos[idPair1.second]; >>> const Jet& w2dau1 = _ljets[idPair2.first]; >>> >>> _______________________________________________ >>> 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 -- Dr Andy Buckley, Lecturer / Royal Society University Research Fellow Particle Physics Expt Group, University of Glasgow
More information about the Rivet mailing list |