rivet is hosted by Hepforge, IPPP Durham
Rivet::Event Class Reference

#include <Event.hh>

Public Member Functions

Constructors and destructors.
 Event (const GenEvent *ge)
 Constructor from a HepMC GenEvent pointer.
 
 Event (const GenEvent &ge)
 
 Event (const Event &e)
 Copy constructor.
 
Major event properties
const GenEvent * genEvent () const
 The generated event obtained from an external event generator.
 
double weight () const
 The generation weight associated with the event. More...
 
ParticlePair beams () const
 Get the beam particles.
 
double sqrtS () const
 Get the beam centre-of-mass energy.
 
double asqrtS () const
 Get the beam centre-of-mass energy per nucleon.
 
double centrality () const
 Get the generator centrality (impact-parameter quantile in [0,1]; or -1 if undefined (usual for non-HI generators)) More...
 
Access to event particles
const Particles & allParticles () const
 All the raw GenEvent particles, wrapped in Rivet::Particle objects.
 
Particles allParticles (const Cut &c) const
 All the raw GenEvent particles, wrapped in Rivet::Particle objects, but with a Cut applied. More...
 
template<typename FN >
Particles allParticles (const FN &f) const
 All the raw GenEvent particles, wrapped in Rivet::Particle objects, but with a selection function applied. More...
 
Projection running
template<typename PROJ >
const PROJ & applyProjection (PROJ &p) const
 Add a projection p to this Event. More...
 
template<typename PROJ >
const PROJ & applyProjection (PROJ *pp) const
 Add a projection p to this Event by pointer.
 

Detailed Description

Rivet wrapper for HepMC event and Projection references.

Event is a concrete class representing an generated event in Rivet. It is constructed given a HepMC::GenEvent, a pointer to which is kept by the Event object throughout its lifetime. The user must therefore make sure that the corresponding HepMC::GenEvent will persist at least as long as the Event object.

In addition to the HepMC::GenEvent object the Event also keeps track of all Projection objects which have been applied to the Event so far.

Constructor & Destructor Documentation

◆ Event()

Rivet::Event::Event ( const GenEvent &  ge)
inline

Constructor from a HepMC GenEvent reference

Deprecated:
HepMC uses pointers, so we should talk to HepMC via pointers

Member Function Documentation

◆ allParticles() [1/2]

Particles Rivet::Event::allParticles ( const Cut &  c) const
inline

All the raw GenEvent particles, wrapped in Rivet::Particle objects, but with a Cut applied.

Note
Due to the cut, this returns by value, i.e. involves an expensive copy

References allParticles(), and Rivet::filter_select().

◆ allParticles() [2/2]

template<typename FN >
Particles Rivet::Event::allParticles ( const FN &  f) const
inline

All the raw GenEvent particles, wrapped in Rivet::Particle objects, but with a selection function applied.

Note
Due to the cut, this returns by value, i.e. involves an expensive copy

References allParticles(), and Rivet::filter_select().

◆ applyProjection()

template<typename PROJ >
const PROJ& Rivet::Event::applyProjection ( PROJ &  p) const
inline

Add a projection p to this Event.

If an equivalent Projection has been applied before, the Projection::project(const Event&) of p is not called and a reference to the previous equivalent projection is returned. If no previous Projection was found, the Projection::project(const Event&) of p is called and a reference to p is returned.

References Rivet::Log::getLog(), and Rivet::Projection::project().

Referenced by applyProjection(), and Rivet::ProjectionApplier::ProjectionApplier().

◆ centrality()

double Rivet::Event::centrality ( ) const

Get the generator centrality (impact-parameter quantile in [0,1]; or -1 if undefined (usual for non-HI generators))

Todo:
Use direct "centrality" property if using HepMC3

References genEvent().

Referenced by genEvent().

◆ weight()

double Rivet::Event::weight ( ) const

The generation weight associated with the event.

Todo:
This needs to be revisited when we finally add the mechanism to support NLO counter-events and weight vectors.

References genEvent(), and Rivet::Log::getLog().

Referenced by Rivet::MC_JetSplittings::analyze(), Rivet::MC_JetAnalysis::analyze(), Rivet::AnalysisHandler::analyze(), genEvent(), and Rivet::PercentileTBase< T >::init().


The documentation for this class was generated from the following files:
  • include/Rivet/Event.hh
  • src/Core/Event.cc