Rivet: Particle charge/sign comparison functions

| Rivet 3.1.9

Functions
Particle charge/sign comparison functions
Functions for Particles

## Functions
bool | Rivet::oppSign (const Particle &a, const Particle &b)
| Return true if Particles a and b have the opposite charge sign.
bool | Rivet::sameSign (const Particle &a, const Particle &b)
bool | Rivet::oppCharge (const Particle &a, const Particle &b)
bool | Rivet::sameCharge (const Particle &a, const Particle &b)
bool | Rivet::diffCharge (const Particle &a, const Particle &b)
| Return true if Particles a and b have a different (not necessarily opposite) charge.

## Detailed Description

## Function Documentation

## ◆ oppCharge()

bool Rivet::oppCharge | ( | const Particle & | a,
|  | const Particle & | b
| ) |  |
| inline

Return true if Particles a and b have the exactly opposite charge

Note
  Two neutrals returns false

References Rivet::Particle::charge3().

## ◆ oppSign()

bool Rivet::oppSign | ( | const Particle & | a,
|  | const Particle & | b
| ) |  |
| inline

Return true if Particles a and b have the opposite charge sign.

Note
  Two neutrals returns false

References Rivet::Particle::charge3(), and Rivet::sign().

## ◆ sameCharge()

bool Rivet::sameCharge | ( | const Particle & | a,
|  | const Particle & | b
| ) |  |
| inline

Return true if Particles a and b have the same charge (including neutral)

Note
  Two neutrals returns true

References Rivet::Particle::charge3().

## ◆ sameSign()

bool Rivet::sameSign | ( | const Particle & | a,
|  | const Particle & | b
| ) |  |
| inline

Return true if Particles a and b have the same charge sign

Note
  Two neutrals returns true

References Rivet::Particle::charge3(), and Rivet::sign().