Rivet  1.8.0
Public Member Functions | Protected Member Functions | Friends
Rivet::Projection Class Reference

Base class for all Rivet projections. More...

#include <Projection.hh>

Inheritance diagram for Rivet::Projection:
Rivet::ProjectionApplier Rivet::AxesDefinition Rivet::Beam Rivet::BeamThrust Rivet::CentralEtHCM Rivet::DISKinematics Rivet::DISLepton Rivet::FinalState Rivet::FoxWolframMoments Rivet::FParameter Rivet::Hemispheres Rivet::InitialQuarks Rivet::IsolationProjection< PROJ1, PROJ2, EST > Rivet::JetAlg Rivet::JetShape Rivet::MissingMomentum Rivet::Multiplicity Rivet::ParisiTensor Rivet::PVertex Rivet::SVertex Rivet::TotalVisibleMomentum Rivet::TriggerCDFRun0Run1 Rivet::TriggerCDFRun2 Rivet::TriggerUA5

List of all members.

Public Member Functions

virtual void project (const Event &e)=0
bool before (const Projection &p) const
virtual const std::set< PdgIdPairbeamPairs () const
virtual std::string name () const
 Get the name of the projection.
ProjectionaddPdgIdPair (PdgId beam1, PdgId beam2)
 Add a colliding beam pair.
LoggetLog () 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 Projectionclone () const =0
 Clone on the heap.
virtual ~Projection ()
 The destructor.

Protected Member Functions

virtual int compare (const Projection &p) const =0
Cmp< ProjectionmkNamedPCmp (const Projection &otherparent, const std::string &pname) const
Cmp< ProjectionmkPCmp (const Projection &otherparent, const std::string &pname) const

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 beamPairs(), getLog(), Rivet::ProjectionApplier::getProjections(), and Rivet::intersection().

Referenced by beamPairs().

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().

Referenced by std::less< const Rivet::Projection * >::operator()().

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::FastJets, Rivet::JetAlg, Rivet::VetoedFinalState, Rivet::JetShape, Rivet::WFinder, Rivet::FinalState, Rivet::IdentifiedFinalState, Rivet::ZFinder, Rivet::Hemispheres, Rivet::SVertex, Rivet::Sphericity, Rivet::Thrust, Rivet::InvMassFinalState, 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]
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]

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