|
[Rivet-svn] rivet: 2 new changesetsRivet Mercurial rivet at projects.hepforge.orgFri Jun 9 21:15:02 BST 2017
details: https://rivet.hepforge.org/hg/rivet/rev/224b0d9356c5 branches: release-2-5-x changeset: 5810:224b0d9356c5 user: Andy Buckley <andy at insectnation.org> date: Fri Jun 09 20:59:49 2017 +0100 description: Improvement to Beam projection: before falling back to barcodes 1 & 2, try a manual search for status=4 particles. Based on a patch from Andrii Verbytskyi. details: https://rivet.hepforge.org/hg/rivet/rev/b82b357a09ad branches: release-2-5-x changeset: 5811:b82b357a09ad user: Andy Buckley <andy at insectnation.org> date: Fri Jun 09 21:03:05 2017 +0100 description: Slight improvements to Particle constructors. diffs (truncated from 86 to 50 lines): --- a/ChangeLog Fri Jun 09 14:49:42 2017 +0100 +++ b/ChangeLog Fri Jun 09 21:03:05 2017 +0100 @@ -1,3 +1,11 @@ +2017-06-09 Andy Buckley <andy.buckley at cern.ch> + + * Slight improvements to Particle constructors. + + * Improvement to Beam projection: before falling back to barcodes + 1 & 2, try a manual search for status=4 particles. Based on a + patch from Andrii Verbytskyi. + 2017-06-05 Andy Buckley <andy.buckley at cern.ch> * Add CMS_2016_I1430892: dilepton channel ttbar charge asymmetry analysis. --- a/include/Rivet/Particle.hh Fri Jun 09 14:49:42 2017 +0100 +++ b/include/Rivet/Particle.hh Fri Jun 09 21:03:05 2017 +0100 @@ -25,13 +25,13 @@ /// @note A particle without info is useless. This only exists to keep STL containers happy. Particle() : ParticleBase(), - _original(0), _id(0) + _original(nullptr), _id(PID::ANY) { } /// Constructor without GenParticle. Particle(PdgId pid, const FourMomentum& mom, const FourVector& pos=FourVector()) : ParticleBase(), - _original(0), _id(pid), _momentum(mom), _origin(pos) + _original(nullptr), _id(pid), _momentum(mom), _origin(pos) { } /// Constructor from a HepMC GenParticle pointer. @@ -41,8 +41,9 @@ _momentum(gp->momentum()) { const GenVertex* vprod = gp->production_vertex(); - if (vprod != NULL) + if (vprod != nullptr) { setOrigin(vprod->position().t(), vprod->position().x(), vprod->position().y(), vprod->position().z()); + } } /// Constructor from a HepMC GenParticle. @@ -52,8 +53,9 @@ _momentum(gp.momentum()) { const GenVertex* vprod = gp.production_vertex(); - if (vprod != NULL) + if (vprod != nullptr) { setOrigin(vprod->position().t(), vprod->position().x(), vprod->position().y(), vprod->position().z());
More information about the Rivet-svn mailing list |