Rivet  1.8.3
Public Member Functions | List of all members
Rivet::Particle Class Reference

Representation of particles from a HepMC::GenEvent. More...

#include <Particle.hh>

Inheritance diagram for Rivet::Particle:
Rivet::ParticleBase Rivet::ClusteredLepton

Public Member Functions

 Particle ()
 
 Particle (PdgId pid, const FourMomentum &mom)
 Constructor without GenParticle.
 
 Particle (const GenParticle &gp)
 Constructor from a HepMC GenParticle.
 
const GenParticle & genParticle () const
 Get a const reference to the original GenParticle.
 
bool hasGenParticle () const
 Check if the particle corresponds to a GenParticle.
 
PdgId pdgId () const
 The PDG ID code for this Particle.
 
Particle & setMomentum (const FourMomentum &momentum)
 Set the momentum of this Particle.
 
const FourMomentum & momentum () const
 The momentum of this Particle.
 
double energy () const
 The energy of this Particle.
 
double mass () const
 The mass of this Particle.
 
bool hasAncestor (PdgId pdg_id) const
 
bool fromDecay () const
 Determine whether the particle is from a hadron or tau decay. More...
 

Detailed Description

Representation of particles from a HepMC::GenEvent.

Constructor & Destructor Documentation

Rivet::Particle::Particle ( )
inline

Default constructor.

Deprecated:
A particle without info is useless. This only exists to keep STL containers happy.

Member Function Documentation

bool Rivet::Particle::fromDecay ( ) const

Determine whether the particle is from a hadron or tau decay.

Specifically, walk up the ancestor chain until a status 2 hadron or tau is found, if at all.

Note
This question is valid in MC, but may not be answerable experimentally – use this function with care when replicating experimental analyses!
Todo:
Shouldn't a const vertex be being returned? Ah, HepMC...

References genParticle().

bool Rivet::Particle::hasAncestor ( PdgId  pdg_id) const
Todo:
Re-enable
Todo:
Re-enable

Check whether a given PID is found in the GenParticle's ancestor list

Note
This question is valid in MC, but may not be answerable experimentally – use this function with care when replicating experimental analyses!
Todo:
Shouldn't a const vertex be being returned? Ah, HepMC...

References genParticle().


The documentation for this class was generated from the following files: