|
[Rivet-svn] rivet: Add null GenVertex protection in Particle children & desc...Rivet Mercurial rivet at projects.hepforge.orgSun Apr 17 17:15:01 BST 2016
details: https://rivet.hepforge.org/hg/rivet/rev/4e4dfea4266d branches: release-2-4-x changeset: 5156:4e4dfea4266d user: Andy Buckley <andy at insectnation.org> date: Sun Apr 17 16:03:23 2016 +0100 description: Add null GenVertex protection in Particle children & descendants methods. diffs (truncated from 215 to 50 lines): --- a/ChangeLog Sat Apr 16 22:26:14 2016 +0100 +++ b/ChangeLog Sun Apr 17 16:03:23 2016 +0100 @@ -1,3 +1,7 @@ +2016-04-17 Andy Buckley <andy.buckley at cern.ch> + + * Add null GenVertex protection in Particle children & descendants methods. + 2016-04-15 Andy Buckley <andy.buckley at cern.ch> * Add ATLAS_2015_I1397637, ATLAS 8 TeV boosted top cross-section vs. pT --- a/include/Rivet/Particle.hh Sat Apr 16 22:26:14 2016 +0100 +++ b/include/Rivet/Particle.hh Sun Apr 17 16:03:23 2016 +0100 @@ -130,7 +130,13 @@ double charge() const { return PID::charge(pid()); } + /// Three times the charge of this Particle (i.e. integer multiple of smallest quark charge). + int charge3() const { + return PID::charge3(pid()); + } + /// Alias for charge3 + /// @deprecated Use charge3 int threeCharge() const { return PID::threeCharge(pid()); } @@ -156,23 +162,12 @@ /// Does this (hadron) contain a c quark? bool hasCharm() const { return PID::hasCharm(pid()); } - /// Is this particle potentially visible in a detector? - bool isVisible() const { - // Charged particles are visible - if ( PID::threeCharge(pid()) != 0 ) return true; - // Neutral hadrons are visible - if ( PID::isHadron(pid()) ) return true; - // Photons are visible - if ( pid() == PID::PHOTON ) return true; - // Gluons are visible (for parton level analyses) - if ( pid() == PID::GLUON ) return true; - // Everything else is invisible - return false; - } - // /// Does this (hadron) contain an s quark? // bool hasStrange() const { return PID::hasStrange(pid()); } + /// Is this particle potentially visible in a detector? + bool isVisible() const; +
More information about the Rivet-svn mailing list |