HackAnalysis  2
List of all members
HEP::Event Class Reference

Simple event class, separating particles into classes. More...

#include <heputil.h>

Public Member Functions

Jets
const std::vector< Jet * > & jets () const
 Get anti-kT 0.4 jets (not including charged leptons or photons)
 
std::vector< Jet * > & jets ()
 Get anti-kT 0.4 jets (not including charged leptons or photons) (non-const)
 
void set_jets (const std::vector< Jet * > &jets)
 Set the jets collection. More...
 
void add_jet (Jet *j)
 Add a jet to the jets collection. More...
 
Missing energy
const P4missingmom () const
 Get the missing momentum vector. More...
 
void set_missingmom (const P4 &pmiss)
 Set the missing momentum vector. More...
 
double met () const
 Get the missing transverse momentum in GeV.
 

Separate particle collections

double Average_rho
 
void clear ()
 Empty the event's particle, jet and MET collections.
 
 Event ()
 Default constructor.
 
 Event (const std::vector< Particle * > &ps, const std::vector< double > &weights=std::vector< double >())
 Constructor from a list of Particles, I don't use it.
 
 ~Event ()
 Destructor (cleans up all passed Particles and calculated Jets)
 
void add_ECAL (P4 *p)
 
void add_HCAL (P4 *p)
 
void add_charged_track (HEP::Particle *p)
 
const std::vector< P4 * > & get_ECALs () const
 
const std::vector< P4 * > & get_HCALs () const
 
const std::vector< Particle * > & get_charged_tracks () const
 
void add_invisible (Particle *p)
 
void add_HSCP (Particle *p)
 
void add_neutral_hadron (double px, double py, double pz, double e)
 
void add_neutral_hadron (const P4 &p4)
 
void add_neutral_hadrons (const std::vector< P4 * > &hadrs)
 
void add_charged_hadron (double px, double py, double pz, double e, int pid)
 
void add_charged_hadron (const P4 &p4, int pid)
 
void add_charged_hadron (Particle *p)
 
void add_charged_hadrons (const std::vector< Particle * > &hadrs)
 
const std::vector< Particle * > & get_charged_hadrons () const
 
const std::vector< P4 * > & get_neutral_hadrons () const
 Get prompt electrons.
 
Eventclone () const
 Clone a copy on the heap.
 
void cloneTo (Event *e) const
 Clone a deep copy (new Particles and Jets allocated) into the provided event pointer.
 
void cloneTo (Event &e) const
 Clone a deep copy (new Particles and Jets allocated) into the provided event object.
 
void set_weights (const std::vector< double > &ws)
 Set the event weights (also possible directly via non-const reference)
 
void set_weight (double w)
 
const std::vector< double > & weights () const
 Get the event weights (const)
 
std::vector< double > & weights ()
 Get the event weights (non-const)
 
double weight (size_t i) const
 Get a single event weight – the nominal, by default.
 
double weight () const
 
void add_particle (Particle *p)
 
void add_particles (const std::vector< Particle * > &ps)
 
std::vector< Particle * > particles () const
 
std::vector< Particle * > visible_particles () const
 
const std::vector< Particle * > & HSCPs () const
 Get invisible final state particles.
 
std::vector< Particle * > & HSCPs ()
 Get invisible final state particles (non-const)
 
const std::vector< Particle * > & invisible_particles () const
 Get invisible final state particles.
 
std::vector< Particle * > & invisible_particles ()
 Get invisible final state particles (non-const)
 
const std::vector< Particle * > & electrons () const
 Get prompt electrons.
 
std::vector< Particle * > & electrons ()
 Get prompt electrons (non-const)
 
const std::vector< Particle * > & muons () const
 Get prompt muons.
 
std::vector< Particle * > & muons ()
 Get prompt muons (non-const)
 
const std::vector< Particle * > & taus () const
 Get prompt (hadronic) taus.
 
std::vector< Particle * > & taus ()
 Get prompt (hadronic) taus (non-const)
 
const std::vector< Particle * > & photons () const
 Get prompt photons.
 
std::vector< Particle * > & photons ()
 Get prompt photons (non-const)
 

Detailed Description

Simple event class, separating particles into classes.

Member Function Documentation

◆ add_jet()

void HEP::Event::add_jet ( Jet j)
inline

Add a jet to the jets collection.

The Jet should be new'd; Event will take ownership.

◆ add_particle()

void HEP::Event::add_particle ( Particle p)
inline

Add a particle to the event

Supplied particle should be new'd, and Event will take ownership.

Warning
The event takes ownership of all supplied Particles – even those it chooses not to add to its collections, which will be immediately deleted. Accordingly, the pointer passed by user code must be considered potentially invalid from the moment this function is called.

◆ add_particles()

void HEP::Event::add_particles ( const std::vector< Particle * > &  ps)
inline

Add a collection of final state particles to the event

Supplied particles should be new'd, and Event will take ownership.

◆ missingmom()

const P4& HEP::Event::missingmom ( ) const
inline

Get the missing momentum vector.

Not necessarily the sum over momenta of final state invisibles

◆ particles()

std::vector<Particle*> HEP::Event::particles ( ) const
inline

Get all final state particles

Note
Overlap of taus and e/mu

◆ set_jets()

void HEP::Event::set_jets ( const std::vector< Jet * > &  jets)
inline

Set the jets collection.

The Jets should be new'd; Event will take ownership.

◆ set_missingmom()

void HEP::Event::set_missingmom ( const P4 pmiss)
inline

Set the missing momentum vector.

Not necessarily the sum over momenta of final state invisibles

◆ visible_particles()

std::vector<Particle*> HEP::Event::visible_particles ( ) const
inline

Get visible state particles

Note
Overlap of taus and e/mu

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