Rivet::Projection Class Referenceabstract

Base class for all Rivet projections. More...

`#include <Projection.hh>`

Inheritance diagram for Rivet::Projection:

## Public Member Functions

virtual void | project (const Event &e)=0
bool | before (const Projection &p) const
virtual const std::set< PdgIdPair > | beamPairs () const
virtual std::string | name () const
| Get the name of the projection.
Projection & | addPdgIdPair (PdgId beam1, PdgId beam2)
| Add a colliding beam pair.
Log & | getLog () const
| Get a Log object based on the getName() property of the calling projection object.
void | setName (const std::string &name)
| Used by derived classes to set their name.
Standard constructors and destructors.
| Projection ()
| The default constructor.
virtual const Projection * | clone () const =0
| Clone on the heap.
virtual | ~Projection ()
| The destructor.
Public Member Functions inherited from Rivet::ProjectionApplier
| ProjectionApplier ()
| Constructor.
std::set< ConstProjectionPtr > | getProjections () const
| Get the contained projections, including recursion.
template<typename PROJ >
const PROJ & | getProjection (const std::string &name) const
| Get the named projection, specifying return type via a template argument.
const Projection & | getProjection (const std::string &name) const
template<typename PROJ >
const PROJ & | applyProjection (const Event &evt, const PROJ &proj) const
| Apply the supplied projection on event.
template<typename PROJ >
const PROJ & | applyProjection (const Event &evt, const Projection &proj) const
| Apply the supplied projection on event.
template<typename PROJ >
const PROJ & | applyProjection (const Event &evt, const std::string &name) const
| Apply the named projection on event.

## Protected Member Functions

virtual int | compare (const Projection &p) const =0
Cmp< Projection > | mkNamedPCmp (const Projection &otherparent, const std::string &pname) const
Cmp< Projection > | mkPCmp (const Projection &otherparent, const std::string &pname) const
Protected Member Functions inherited from Rivet::ProjectionApplier
Log & | getLog () const
ProjectionHandler & | getProjHandler () const
| Get a reference to the ProjectionHandler for this thread.
template<typename PROJ >
const PROJ & | addProjection (const PROJ &proj, const std::string &name)

## Friends

class | Event
| Event is a friend.
class | Cmp< Projection >
| The Cmp specialization for Projection is a friend.

## Detailed Description

Base class for all Rivet projections.

Projection is the base class of all Projections to be used by Rivet. A Projection object can be assigned to an Event object and will then define a processed part of the information available in the Event, which then can be used by other Projection objects and/or Analysis objects.

The main virtual functions to be overridden by concrete sub-classes are project(const Event &) and compare(const Projection &).

## Member Function Documentation

const set< PdgIdPair > Rivet::Projection::beamPairs | ( |  | ) | const

virtual

Return the BeamConstraints for this projection, not including recursion. Derived classes should ensure that all contained projections are registered in the _projections set for the beam constraint chaining to work.

References getLog(), Rivet::ProjectionApplier::getProjections(), and Rivet::intersection().

bool Rivet::Projection::before | ( | const Projection & | p | ) | const

Determine whether this object should be ordered before the object p given as argument. If p is of a different class than this, the before() function of the corresponding type_info objects is used. Otherwise, if the objects are of the same class, the virtual compare(const Projection &) will be returned.

References compare().

virtual int Rivet::Projection::compare | ( | const Projection & | p | ) | const

protected pure virtual

This function is used to define a unique ordering between different Projection objects of the same class. If this is considered to be equivalent to the Projector object, p, in the argument the function should return 0. If this object should be ordered before p a negative value should be returned, otherwise a positive value should be returned. This function must never be called explicitly, but should only be called from the operator<(const Projection &). When implementing the function in concrete sub-classes, it is then guaranteed that the Projection object p in the argument is of the same class as the sub-class and can be safely dynamically casted to that class.

When implementing this function in a sub-class, the immediate base class version of the function should be called first. If the base class function returns a non-zero value, that value should be returned immediately. Only if zero is returned should this function check the member variables of the sub-class to determine whether this should be ordered before or after p, or if it is equivalent with p.

Implemented in Rivet::FastJets, Rivet::JetAlg, Rivet::VetoedFinalState, Rivet::JetShape, Rivet::FinalState, Rivet::WFinder, Rivet::IdentifiedFinalState, Rivet::ZFinder, Rivet::Hemispheres, Rivet::SVertex, Rivet::Sphericity, Rivet::InvMassFinalState, Rivet::Thrust, Rivet::LossyFinalState< FILTER >, Rivet::LossyFinalState< ConstRandomFilter >, Rivet::FoxWolframMoments, Rivet::MissingMomentum, Rivet::LeadingParticlesFinalState, Rivet::ParisiTensor, Rivet::Spherocity, Rivet::LeptonClusters, Rivet::TotalVisibleMomentum, Rivet::VisibleFinalState, Rivet::ClusteredPhotons, Rivet::InitialQuarks, Rivet::NeutralFinalState, Rivet::IsolationProjection< PROJ1, PROJ2, EST >, Rivet::ChargedFinalState, Rivet::DISFinalState, Rivet::HadronicFinalState, Rivet::NonHadronicFinalState, Rivet::DISKinematics, Rivet::DISLepton, Rivet::MergedFinalState, Rivet::CentralEtHCM, Rivet::FParameter, Rivet::BeamThrust, Rivet::ChargedLeptons, and Rivet::Multiplicity.

Referenced by before().

Cmp< Projection > Rivet::Projection::mkNamedPCmp | ( | const Projection & | otherparent,
|  | const std::string & | pname
| ) |  | const

protected

Shortcut to make a named Cmp<Projection> comparison with the `*this` object automatically passed as one of the parent projections.

References Rivet::pcmp().

Referenced by Rivet::BeamThrust::compare(), Rivet::ChargedLeptons::compare(), Rivet::Multiplicity::compare(), Rivet::FParameter::compare(), Rivet::CentralEtHCM::compare(), Rivet::MergedFinalState::compare(), Rivet::DISLepton::compare(), Rivet::DISKinematics::compare(), Rivet::ChargedFinalState::compare(), Rivet::DISFinalState::compare(), Rivet::ClusteredPhotons::compare(), Rivet::NeutralFinalState::compare(), Rivet::TotalVisibleMomentum::compare(), Rivet::VisibleFinalState::compare(), Rivet::LeptonClusters::compare(), Rivet::LeadingParticlesFinalState::compare(), Rivet::ParisiTensor::compare(), Rivet::Spherocity::compare(), Rivet::FoxWolframMoments::compare(), Rivet::MissingMomentum::compare(), Rivet::LossyFinalState< ConstRandomFilter >::compare(), Rivet::Thrust::compare(), Rivet::InvMassFinalState::compare(), Rivet::Sphericity::compare(), Rivet::SVertex::compare(), Rivet::Hemispheres::compare(), Rivet::ZFinder::compare(), Rivet::IdentifiedFinalState::compare(), Rivet::WFinder::compare(), Rivet::JetShape::compare(), Rivet::VetoedFinalState::compare(), and Rivet::FastJets::compare().

Cmp< Projection > Rivet::Projection::mkPCmp | ( | const Projection & | otherparent,
|  | const std::string & | pname
| ) |  | const

protected

Shortcut to make a named Cmp<Projection> comparison with the `*this` object automatically passed as one of the parent projections.

References Rivet::pcmp().

virtual void Rivet::Projection::project | ( | const Event & | e | ) |

pure virtual

Take the information available in the Event and make the calculations necessary to obtain the projection. Note that this function must never be called except inside the Event::applyProjection(Projection *) function.

Implemented in Rivet::FastJets, Rivet::JetAlg, Rivet::VetoedFinalState, Rivet::JetShape, Rivet::FinalState, Rivet::WFinder, Rivet::IdentifiedFinalState, Rivet::ZFinder, Rivet::Hemispheres, Rivet::SVertex, Rivet::Sphericity, Rivet::Beam, Rivet::InvMassFinalState, Rivet::Thrust, Rivet::FoxWolframMoments, Rivet::MissingMomentum, Rivet::LeadingParticlesFinalState, Rivet::ParisiTensor, Rivet::LeptonClusters, Rivet::LossyFinalState< FILTER >, Rivet::Spherocity, Rivet::LossyFinalState< ConstRandomFilter >, Rivet::TriggerUA5, Rivet::PVertex, Rivet::UnstableFinalState, Rivet::TotalVisibleMomentum, Rivet::VisibleFinalState, Rivet::ClusteredPhotons, Rivet::InitialQuarks, Rivet::IsolationProjection< PROJ1, PROJ2, EST >, Rivet::NeutralFinalState, Rivet::ChargedFinalState, Rivet::DISFinalState, Rivet::HadronicFinalState, Rivet::NonHadronicFinalState, Rivet::DISKinematics, Rivet::TriggerCDFRun0Run1, Rivet::TriggerCDFRun2, Rivet::DISLepton, Rivet::MergedFinalState, Rivet::CentralEtHCM, Rivet::ChargedLeptons, Rivet::Multiplicity, Rivet::FParameter, and Rivet::BeamThrust.

Referenced by Rivet::Event::applyProjection().

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

- include/Rivet/Projection.hh
- src/Core/Projection.cc