![]() |
Rivet
3.1.2
|
Representation of a HepMC event, and enabler of Projection caching. More...
#include <Event.hh>
Public Member Functions | |
Constructors and destructors. | |
Event (const GenEvent *ge, bool strip=false) | |
Constructor from a HepMC GenEvent pointer. | |
Event (const GenEvent &ge, bool strip=false) | |
Event (const Event &e) | |
Copy constructor. | |
Major event properties | |
const GenEvent * | genEvent () const |
The generated event obtained from an external event generator. | |
const GenEvent * | originalGenEvent () const |
The generated event obtained from an external event generator. | |
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. | |
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... | |
std::valarray< double > | weights () const |
The generation weight associated with the event. More... | |
double | weight () const |
Obsolete weight method. Always returns 1 now. | |
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. | |
Representation of a HepMC event, and enabler of Projection caching.
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.
|
inline |
Constructor from a HepMC GenEvent reference
|
inline |
All the raw GenEvent particles, wrapped in Rivet::Particle objects, but with a Cut applied.
References allParticles(), and Rivet::filter_select().
|
inline |
All the raw GenEvent particles, wrapped in Rivet::Particle objects, but with a selection function applied.
References allParticles(), Rivet::filter_select(), and weights().
|
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::getEnvParam(), Rivet::Log::getLog(), and Rivet::Projection::project().
Referenced by applyProjection().
std::valarray<double> Rivet::Event::weights | ( | ) | const |
The generation weight associated with the event.
Referenced by allParticles().