rivet is hosted by Hepforge, IPPP Durham
Rivet  2.7.0
Rivet::Projection Class Referenceabstract

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::CentralityEstimator Rivet::Correlators Rivet::DISKinematics Rivet::DISLepton Rivet::EventMixingFinalState Rivet::FoxWolframMoments Rivet::FParameter Rivet::Hemispheres Rivet::InitialQuarks Rivet::JetAlg Rivet::JetShape Rivet::MissingMomentum Rivet::ParisiTensor Rivet::ParticleFinder Rivet::SingleValueProjection Rivet::SmearedMET Rivet::TriggerCDFRun0Run1 Rivet::TriggerCDFRun2 Rivet::TriggerProjection Rivet::TriggerUA5

Public Member Functions

virtual std::string name () const
 Get the name of the projection.
 
Standard constructors and destructors.
 Projection ()
 The default constructor.
 
virtual unique_ptr< Projectionclone () const =0
 Clone on the heap.
 
virtual ~Projection ()
 The destructor.
 
Projection operation and comparison
virtual void project (const Event &e)=0
 
virtual int compare (const Projection &p) const =0
 
bool before (const Projection &p) const
 
Beam configuration
Todo:
Does it really make sense to restrict Projections to particular beam configs? Do we use this in practice?
virtual const std::set< PdgIdPair > beamPairs () const
 
ProjectionaddPdgIdPair (PdgId beam1, PdgId beam2)
 
- Public Member Functions inherited from Rivet::ProjectionApplier
 ProjectionApplier ()
 Constructor.
 
void markAsOwned () const
 Mark this object as owned by a proj-handler.
 
std::set< ConstProjectionPtr > getProjections () const
 Get the contained projections, including recursion.
 
bool hasProjection (const std::string &name) const
 Does this applier have a projection registered under the name name?
 
template<typename PROJ >
const PROJ & getProjection (const std::string &name) const
 
template<typename PROJ >
const PROJ & get (const std::string &name) const
 
const ProjectiongetProjection (const std::string &name) const
 
template<typename PROJ >
const PROJ & applyProjection (const Event &evt, const Projection &proj) const
 Apply the supplied projection on event evt. More...
 
template<typename PROJ >
const PROJ & apply (const Event &evt, const Projection &proj) const
 
template<typename PROJ >
const PROJ & applyProjection (const Event &evt, const PROJ &proj) const
 Apply the supplied projection on event evt. More...
 
template<typename PROJ >
const PROJ & apply (const Event &evt, const PROJ &proj) const
 
template<typename PROJ >
const PROJ & applyProjection (const Event &evt, const std::string &name) const
 
template<typename PROJ >
const PROJ & apply (const Event &evt, const std::string &name) const
 
template<typename PROJ >
const PROJ & apply (const std::string &name, const Event &evt) const
 

Protected Member Functions

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.
 
Cmp< ProjectionmkNamedPCmp (const Projection &otherparent, const std::string &pname) const
 
Cmp< ProjectionmkPCmp (const Projection &otherparent, const std::string &pname) const
 
virtual Projectionoperator= (const Projection &)
 Block Projection copying.
 
- Protected Member Functions inherited from Rivet::ProjectionApplier
LoggetLog () const
 
ProjectionHandlergetProjHandler () const
 Get a reference to the ProjectionHandler for this thread.
 
template<typename PROJ >
const PROJ & declareProjection (const PROJ &proj, const std::string &name)
 Register a contained projection. More...
 
template<typename PROJ >
const PROJ & declare (const PROJ &proj, const std::string &name)
 Register a contained projection (user-facing version) More...
 
template<typename PROJ >
const PROJ & declare (const std::string &name, const PROJ &proj)
 Register a contained projection (user-facing, arg-reordered version) More...
 
template<typename PROJ >
const PROJ & addProjection (const PROJ &proj, const std::string &name)
 Register a contained projection (user-facing version) More...
 

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

◆ addPdgIdPair()

Projection& Rivet::Projection::addPdgIdPair ( PdgId  beam1,
PdgId  beam2 
)
inline

Add a colliding beam pair.

Todo:
This deserves a better name!

Referenced by Projection().

◆ beamPairs()

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

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

Todo:
Remove the beam constraints system from projections.

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

Referenced by name().

◆ before()

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 Rivet::cmp(), and compare().

Referenced by name(), and setName().

◆ compare()

virtual int Rivet::Projection::compare ( const Projection p) const
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::GeneratedCentrality, Rivet::ALICE::PrimaryParticles, Rivet::ALICE::V0AndTrigger, Rivet::FastJets, Rivet::ALICE::V0Trigger< MODE >, Rivet::VetoedFinalState, Rivet::JetAlg, Rivet::ALICE::CLMultiplicity< INNER >, Rivet::JetShape, Rivet::DressedLeptons, Rivet::Correlators, Rivet::WFinder, Rivet::ParticleFinder, Rivet::MissingMomentum, Rivet::IdentifiedFinalState, Rivet::SmearedParticles, Rivet::ATLAS::MinBiasTrigger, Rivet::SmearedJets, Rivet::PercentileProjection, Rivet::HeavyHadrons, Rivet::ZFinder, Rivet::Hemispheres, Rivet::PartonicTops, Rivet::EventMixingFinalState, Rivet::ALICE::V0Multiplicity< MODE >, Rivet::MC_pPbMinBiasTrigger, Rivet::ATLAS::SumET_PBPB_Centrality, Rivet::DISFinalState, Rivet::Sphericity, Rivet::CentralityProjection, Rivet::Thrust, Rivet::LossyFinalState< FILTER >, Rivet::LossyFinalState< ConstRandomFilter >, Rivet::InvMassFinalState, Rivet::ParisiTensor, Rivet::PrimaryParticles, Rivet::FoxWolframMoments, Rivet::Spherocity, Rivet::LeadingParticlesFinalState, Rivet::TriggerUA5, Rivet::PromptFinalState, Rivet::CentralityEstimator, Rivet::NeutralFinalState, Rivet::TriggerProjection, Rivet::TauFinder, Rivet::SmearedMET, Rivet::VisibleFinalState, Rivet::InitialQuarks, Rivet::NonPromptFinalState, Rivet::HadronicFinalState, Rivet::ATLAS::SumET_PB_Centrality, Rivet::MC_SumETFwdPbCentrality, Rivet::NonHadronicFinalState, Rivet::ChargedLeptons, Rivet::MergedFinalState, Rivet::TriggerCDFRun0Run1, Rivet::TriggerCDFRun2, Rivet::DISKinematics, Rivet::DISLepton, Rivet::FinalState, Rivet::BeamThrust, Rivet::CentralEtHCM, Rivet::ChargedFinalState, Rivet::FParameter, Rivet::GeneratedPercentileProjection, Rivet::UserCentEstimate, and Rivet::ImpactParameterProjection.

Referenced by before(), and name().

◆ mkNamedPCmp()

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::FParameter::compare(), Rivet::ChargedFinalState::compare(), Rivet::CentralEtHCM::compare(), Rivet::BeamThrust::compare(), Rivet::DISKinematics::compare(), Rivet::DISLepton::compare(), Rivet::MergedFinalState::compare(), Rivet::ChargedLeptons::compare(), Rivet::MC_SumETFwdPbCentrality::compare(), Rivet::ATLAS::SumET_PB_Centrality::compare(), Rivet::NonPromptFinalState::compare(), Rivet::VisibleFinalState::compare(), Rivet::TauFinder::compare(), Rivet::NeutralFinalState::compare(), Rivet::PromptFinalState::compare(), Rivet::CentralityEstimator::compare(), Rivet::LeadingParticlesFinalState::compare(), Rivet::FoxWolframMoments::compare(), Rivet::Spherocity::compare(), Rivet::ParisiTensor::compare(), Rivet::InvMassFinalState::compare(), Rivet::LossyFinalState< ConstRandomFilter >::compare(), Rivet::Thrust::compare(), Rivet::Sphericity::compare(), Rivet::DISFinalState::compare(), Rivet::MC_pPbMinBiasTrigger::compare(), Rivet::ATLAS::SumET_PBPB_Centrality::compare(), Rivet::EventMixingFinalState::compare(), Rivet::Hemispheres::compare(), Rivet::ZFinder::compare(), Rivet::HeavyHadrons::compare(), Rivet::PercentileProjection::compare(), Rivet::ATLAS::MinBiasTrigger::compare(), Rivet::IdentifiedFinalState::compare(), Rivet::MissingMomentum::compare(), Rivet::WFinder::compare(), Rivet::DressedLeptons::compare(), Rivet::JetShape::compare(), Rivet::VetoedFinalState::compare(), Rivet::FastJets::compare(), Rivet::GeneratedCentrality::compare(), and setName().

◆ mkPCmp()

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.

Note
Alias for mkNamedPCmp

References Rivet::pcmp().

Referenced by Rivet::FinalState::compare(), Rivet::SmearedMET::compare(), Rivet::SmearedJets::compare(), Rivet::SmearedParticles::compare(), Rivet::Correlators::compare(), Rivet::ALICE::PrimaryParticles::compare(), and setName().

◆ project()

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::GeneratedCentrality, Rivet::ALICE::V0AndTrigger, Rivet::FastJets, Rivet::ALICE::V0Trigger< MODE >, Rivet::VetoedFinalState, Rivet::JetAlg, Rivet::Beam, Rivet::JetShape, Rivet::ALICE::CLMultiplicity< INNER >, Rivet::DressedLeptons, Rivet::Correlators, Rivet::WFinder, Rivet::ParticleFinder, Rivet::SmearedParticles, Rivet::MissingMomentum, Rivet::SmearedJets, Rivet::IdentifiedFinalState, Rivet::ATLAS::MinBiasTrigger, Rivet::HeavyHadrons, Rivet::ZFinder, Rivet::PercentileProjection, Rivet::Hemispheres, Rivet::PrimaryParticles, Rivet::DISFinalState, Rivet::Sphericity, Rivet::MC_pPbMinBiasTrigger, Rivet::PartonicTops, Rivet::EventMixingFinalState, Rivet::ATLAS::SumET_PBPB_Centrality, Rivet::ALICE::V0Multiplicity< MODE >, Rivet::Thrust, Rivet::InvMassFinalState, Rivet::ParisiTensor, Rivet::SmearedMET, Rivet::FoxWolframMoments, Rivet::LeadingParticlesFinalState, Rivet::CentralityProjection, Rivet::LossyFinalState< FILTER >, Rivet::PromptFinalState, Rivet::LossyFinalState< ConstRandomFilter >, Rivet::Spherocity, Rivet::TriggerUA5, Rivet::NeutralFinalState, Rivet::UnstableParticles, Rivet::CentralityEstimator, Rivet::TauFinder, Rivet::VisibleFinalState, Rivet::PrimaryHadrons, Rivet::InitialQuarks, Rivet::NonPromptFinalState, Rivet::HadronicFinalState, Rivet::TriggerProjection, Rivet::NonHadronicFinalState, Rivet::ChargedLeptons, Rivet::MergedFinalState, Rivet::DISKinematics, Rivet::DISLepton, Rivet::FinalState, Rivet::CentralEtHCM, Rivet::TriggerCDFRun0Run1, Rivet::TriggerCDFRun2, Rivet::ChargedFinalState, Rivet::ATLAS::SumET_PB_Centrality, Rivet::MC_SumETFwdPbCentrality, Rivet::BeamThrust, Rivet::FParameter, Rivet::GeneratedPercentileProjection, Rivet::ImpactParameterProjection, Rivet::UserCentEstimate, and Rivet::FinalPartons.

Referenced by Rivet::Event::applyProjection(), and name().


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