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

Common base class for Projection and Analysis, used for internal polymorphism. More...

#include <ProjectionApplier.hh>

Inheritance diagram for Rivet::ProjectionApplier:
Rivet::Analysis Rivet::CentralityBinner< T, MDist > Rivet::Projection Rivet::CumulantAnalysis Rivet::MC_JetAnalysis Rivet::MC_JetSplittings Rivet::MC_ParticleAnalysis 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

 ProjectionApplier ()
 Constructor.
 
void markAsOwned () const
 Mark this object as owned by a proj-handler.
 
Metadata functions
virtual std::string name () const =0
 Get the name of this Projection or Analysis class.
 
Projection "getting" functions
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
 
Projection applying functions
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
 
ProjectionHandlergetProjHandler () const
 Get a reference to the ProjectionHandler for this thread.
 
Projection registration functions
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...
 

Detailed Description

Common base class for Projection and Analysis, used for internal polymorphism.

Empty interface used for storing Projection and Analysis pointers in the same container (used by the ProjectionHandler)

Member Function Documentation

◆ addProjection()

template<typename PROJ >
const PROJ& Rivet::ProjectionApplier::addProjection ( const PROJ &  proj,
const std::string &  name 
)
inlineprotected

Register a contained projection (user-facing version)

Deprecated:
Use declareProjection() or declare()
Todo:
Add SFINAE to require that PROJ inherit from Projection

References declareProjection(), and name().

Referenced by Rivet::VetoedFinalState::addVetoOnThisFinalState(), Rivet::BeamThrust::BeamThrust(), Rivet::CentralEtHCM::CentralEtHCM(), Rivet::ChargedFinalState::ChargedFinalState(), Rivet::ChargedLeptons::ChargedLeptons(), Rivet::DISKinematics::DISKinematics(), Rivet::DressedLeptons::DressedLeptons(), Rivet::FinalState::FinalState(), Rivet::FoxWolframMoments::FoxWolframMoments(), Rivet::FParameter::FParameter(), Rivet::HadronicFinalState::HadronicFinalState(), Rivet::HeavyHadrons::HeavyHadrons(), Rivet::Hemispheres::Hemispheres(), Rivet::IdentifiedFinalState::IdentifiedFinalState(), Rivet::JetAlg::JetAlg(), Rivet::JetShape::JetShape(), Rivet::LeadingParticlesFinalState::LeadingParticlesFinalState(), Rivet::LossyFinalState< ConstRandomFilter >::LossyFinalState(), Rivet::MissingMomentum::MissingMomentum(), Rivet::NeutralFinalState::NeutralFinalState(), Rivet::NonHadronicFinalState::NonHadronicFinalState(), Rivet::NonPromptFinalState::NonPromptFinalState(), Rivet::ParisiTensor::ParisiTensor(), Rivet::PrimaryHadrons::PrimaryHadrons(), Rivet::PromptFinalState::PromptFinalState(), Rivet::SmearedJets::SmearedJets(), Rivet::SmearedMET::SmearedMET(), Rivet::SmearedParticles::SmearedParticles(), Rivet::Spherocity::Spherocity(), Rivet::TauFinder::TauFinder(), Rivet::Thrust::Thrust(), Rivet::TriggerCDFRun0Run1::TriggerCDFRun0Run1(), Rivet::TriggerCDFRun2::TriggerCDFRun2(), Rivet::TriggerUA5::TriggerUA5(), Rivet::VetoedFinalState::VetoedFinalState(), Rivet::VisibleFinalState::VisibleFinalState(), Rivet::WFinder::WFinder(), and Rivet::ZFinder::ZFinder().

◆ apply() [1/4]

template<typename PROJ >
const PROJ& Rivet::ProjectionApplier::apply ( const Event evt,
const Projection proj 
) const
inline

Apply the supplied projection on event evt (user-facing alias).

Todo:
Add SFINAE to require that PROJ inherit from Projection

Referenced by Rivet::DISFinalState::project(), Rivet::ALICE::V0Trigger< MODE >::project(), and Rivet::PercentileBase::selectBins().

◆ apply() [2/4]

template<typename PROJ >
const PROJ& Rivet::ProjectionApplier::apply ( const Event evt,
const PROJ &  proj 
) const
inline

Apply the supplied projection on event evt (user-facing alias).

Todo:
Add SFINAE to require that PROJ inherit from Projection

◆ apply() [3/4]

template<typename PROJ >
const PROJ& Rivet::ProjectionApplier::apply ( const Event evt,
const std::string &  name 
) const
inline

Apply the supplied projection on event evt (user-facing alias).

Todo:
Add SFINAE to require that PROJ inherit from Projection

References name().

◆ apply() [4/4]

template<typename PROJ >
const PROJ& Rivet::ProjectionApplier::apply ( const std::string &  name,
const Event evt 
) const
inline

Apply the supplied projection on event evt (convenience arg-reordering alias).

Todo:
Add SFINAE to require that PROJ inherit from Projection

References name().

◆ applyProjection() [1/3]

template<typename PROJ >
const PROJ& Rivet::ProjectionApplier::applyProjection ( const Event evt,
const Projection proj 
) const
inline

Apply the supplied projection on event evt.

Todo:
Add SFINAE to require that PROJ inherit from Projection

◆ applyProjection() [2/3]

template<typename PROJ >
const PROJ& Rivet::ProjectionApplier::applyProjection ( const Event evt,
const PROJ &  proj 
) const
inline

Apply the supplied projection on event evt.

Todo:
Add SFINAE to require that PROJ inherit from Projection

◆ applyProjection() [3/3]

template<typename PROJ >
const PROJ& Rivet::ProjectionApplier::applyProjection ( const Event evt,
const std::string &  name 
) const
inline

Apply the named projection on event evt.

Todo:
Add SFINAE to require that PROJ inherit from Projection

◆ declare() [1/2]

◆ declare() [2/2]

template<typename PROJ >
const PROJ& Rivet::ProjectionApplier::declare ( const std::string &  name,
const PROJ &  proj 
)
inlineprotected

Register a contained projection (user-facing, arg-reordered version)

Todo:
Add SFINAE to require that PROJ inherit from Projection

References declareProjection().

◆ declareProjection()

template<typename PROJ >
const PROJ& Rivet::ProjectionApplier::declareProjection ( const PROJ &  proj,
const std::string &  name 
)
inlineprotected

Register a contained projection.

The type of the argument is used to instantiate a new projection internally: this new object is applied to events rather than the argument object. Hence you are advised to only use locally-scoped Projection objects in your Projection and Analysis constructors, and to avoid polymorphism (e.g. handling ConcreteProjection via a pointer or reference to type Projection) since this will screw up the internal type management.

Todo:
Add SFINAE to require that PROJ inherit from Projection

Referenced by addProjection(), and declare().

◆ get()

template<typename PROJ >
const PROJ& Rivet::ProjectionApplier::get ( const std::string &  name) const
inline

Get the named projection, specifying return type via a template argument (user-facing alias).

Todo:
Add SFINAE to require that PROJ inherit from Projection

References name().

Referenced by Rivet::ProjectionHandler::registerProjection().

◆ getProjection() [1/2]

template<typename PROJ >
const PROJ& Rivet::ProjectionApplier::getProjection ( const std::string &  name) const
inline

Get the named projection, specifying return type via a template argument.

Todo:
Add SFINAE to require that PROJ inherit from Projection

References Rivet::ProjectionHandler::getProjection(), and getProjHandler().

Referenced by Rivet::pcmp(), Rivet::Hemispheres::project(), and ProjectionApplier().

◆ getProjection() [2/2]

const Projection& Rivet::ProjectionApplier::getProjection ( const std::string &  name) const
inline

Get the named projection (non-templated, so returns as a reference to a Projection base class).

References Rivet::ProjectionHandler::getProjection(), and getProjHandler().


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