Fork me on GitHub

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • external/fastjet/PseudoJet.cc

    r1d208a2 rb7b836a  
    11//FJSTARTHEADER
    2 // $Id: PseudoJet.cc 4100 2016-03-15 20:50:22Z salam $
    3 //
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     2// $Id: PseudoJet.cc 4354 2018-04-22 07:12:37Z salam $
     3//
     4// Copyright (c) 2005-2018, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    203203//----------------------------------------------------------------------
    204204/// multiply the jet's momentum by the coefficient
    205 void PseudoJet::operator*=(double coeff) {
     205PseudoJet & PseudoJet::operator*=(double coeff) {
    206206  // operator*= aims to maintain the rapidity and azimuth
    207207  // for the PseudoJet; if they have already been evaluated
     
    218218  _kt2*= coeff*coeff;
    219219  // phi and rap are unchanged
     220  return *this;
    220221}
    221222
    222223//----------------------------------------------------------------------
    223224/// divide the jet's momentum by the coefficient
    224 void PseudoJet::operator/=(double coeff) {
     225PseudoJet & PseudoJet::operator/=(double coeff) {
    225226  (*this) *= 1.0/coeff;
     227  return *this;
    226228}
    227229
     
    229231//----------------------------------------------------------------------
    230232/// add the other jet's momentum to this jet
    231 void PseudoJet::operator+=(const PseudoJet & other_jet) {
     233PseudoJet & PseudoJet::operator+=(const PseudoJet & other_jet) {
    232234  _px += other_jet._px;
    233235  _py += other_jet._py;
     
    235237  _E  += other_jet._E ;
    236238  _finish_init(); // we need to recalculate phi,rap,kt2
     239  return *this;
    237240}
    238241
     
    240243//----------------------------------------------------------------------
    241244/// subtract the other jet's momentum from this jet
    242 void PseudoJet::operator-=(const PseudoJet & other_jet) {
     245PseudoJet & PseudoJet::operator-=(const PseudoJet & other_jet) {
    243246  _px -= other_jet._px;
    244247  _py -= other_jet._py;
     
    246249  _E  -= other_jet._E ;
    247250  _finish_init(); // we need to recalculate phi,rap,kt2
     251  return *this;
    248252}
    249253
Note: See TracChangeset for help on using the changeset viewer.