rivet is hosted by Hepforge, IPPP Durham
Rivet 4.0.0
Particle charge/sign comparison functions

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().