|
[Rivet-svn] r4150 - in trunk: . include/Rivet/Math include/Rivet/Projectionsblackhole at projects.hepforge.org blackhole at projects.hepforge.orgThu Feb 14 13:18:00 GMT 2013
Author: hoeth Date: Thu Feb 14 13:18:00 2013 New Revision: 4150 Log: merge c4065 from branches/2012-06-aidarivet Modified: trunk/ChangeLog trunk/include/Rivet/Math/Vector4.hh trunk/include/Rivet/Projections/FinalState.hh Modified: trunk/ChangeLog ============================================================================== --- trunk/ChangeLog Thu Feb 14 13:13:41 2013 (r4149) +++ trunk/ChangeLog Thu Feb 14 13:18:00 2013 (r4150) @@ -20,6 +20,14 @@ * Fix TeX variable in the rivetenv scripts, especially for csh +2012-12-07 Andy Buckley <andy.buckley at cern.ch> + + * Adding a note on FourVector and FourMomentum that operator- and + operator-= invert both the space and time components: use of -= + can result in a vector with negative energy. + + * Adding particlesByRapidity and particlesByAbsRapidity to FinalState. + 2012-12-07 Hendrik Hoeth <hendrik.hoeth at cern.ch> * Added ALICE_2012_I1181770 analysis Modified: trunk/include/Rivet/Math/Vector4.hh ============================================================================== --- trunk/include/Rivet/Math/Vector4.hh Thu Feb 14 13:13:41 2013 (r4149) +++ trunk/include/Rivet/Math/Vector4.hh Thu Feb 14 13:18:00 2013 (r4150) @@ -159,28 +159,31 @@ return contract(v); } - /// Multiply by a scalar + /// Multiply by a scalar. FourVector& operator*=(double a) { _vec = multiply(a, *this)._vec; return *this; } - /// Divide by a scalar + /// Divide by a scalar. FourVector& operator/=(double a) { _vec = multiply(1.0/a, *this)._vec; return *this; } + /// Add to this 4-vector. FourVector& operator+=(const FourVector& v) { _vec = add(*this, v)._vec; return *this; } + /// Subtract from this 4-vector. NB time as well as space components are subtracted. FourVector& operator-=(const FourVector& v) { _vec = add(*this, -v)._vec; return *this; } + /// Multiply all components (space and time) by -1. FourVector operator-() const { FourVector result; result._vec = -_vec; @@ -471,16 +474,19 @@ return *this; } + /// Subtract from this 4-vector. NB time as well as space components are subtracted. FourMomentum& operator+=(const FourMomentum& v) { _vec = add(*this, v)._vec; return *this; } + /// Subtract from this 4-vector. NB time as well as space components are subtracted. FourMomentum& operator-=(const FourMomentum& v) { _vec = add(*this, -v)._vec; return *this; } + /// Multiply all components (time and space) by -1. FourMomentum operator-() const { FourMomentum result; result._vec = -_vec; Modified: trunk/include/Rivet/Projections/FinalState.hh ============================================================================== --- trunk/include/Rivet/Projections/FinalState.hh Thu Feb 14 13:13:41 2013 (r4149) +++ trunk/include/Rivet/Projections/FinalState.hh Thu Feb 14 13:18:00 2013 (r4150) @@ -75,6 +75,16 @@ return particles(cmpParticleByAscAbsPseudorapidity); } + /// Get the final-state particles, ordered by increasing \f$ y \f$. + const ParticleVector& particlesByRapidity() const { + return particles(cmpParticleByAscRapidity); + } + + /// Get the final-state particles, ordered by increasing \f$ |y| \f$. + const ParticleVector& particlesByModRapidity() const { + return particles(cmpParticleByAscAbsRapidity); + } + /// Access the projected final-state particles. virtual size_t size() const { return _theParticles.size(); }
More information about the Rivet-svn mailing list |