|
[Rivet] CMS_2015_I1370682.tgzMarkus Seidel markus.seidel at cern.chThu Mar 24 14:39:59 GMT 2016
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
More information about the Rivet mailing list |