Rivet  1.8.3
Public Member Functions | Protected Member Functions | List of all members
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::Projection Rivet::MC_JetAnalysis Rivet::MC_JetSplittings 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

Public Member Functions

 ProjectionApplier ()
 Constructor.
 
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.
 
template<typename PROJ >
const PROJ & getProjection (const std::string &name) const
 Get the named projection, specifying return type via a template argument.
 
const ProjectiongetProjection (const std::string &name) const
 
Projection applying functions
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

LoggetLog () const
 
ProjectionHandlergetProjHandler () const
 Get a reference to the ProjectionHandler for this thread.
 
Projection registration functions
template<typename PROJ >
const PROJ & addProjection (const PROJ &proj, const std::string &name)
 

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

template<typename PROJ >
const PROJ& Rivet::ProjectionApplier::addProjection ( 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.

References name().

Referenced by Rivet::VetoedFinalState::addVetoOnThisFinalState(), Rivet::BeamThrust::BeamThrust(), Rivet::CentralEtHCM::CentralEtHCM(), Rivet::ChargedFinalState::ChargedFinalState(), Rivet::ChargedLeptons::ChargedLeptons(), Rivet::DISFinalState::DISFinalState(), Rivet::DISKinematics::DISKinematics(), Rivet::FinalState::FinalState(), Rivet::FoxWolframMoments::FoxWolframMoments(), Rivet::FParameter::FParameter(), Rivet::HadronicFinalState::HadronicFinalState(), Rivet::Hemispheres::Hemispheres(), Rivet::IdentifiedFinalState::IdentifiedFinalState(), Rivet::IsolationProjection< PROJ1, PROJ2, EST >::IsolationProjection(), Rivet::JetAlg::JetAlg(), Rivet::JetShape::JetShape(), Rivet::LeadingParticlesFinalState::LeadingParticlesFinalState(), Rivet::LossyFinalState< ConstRandomFilter >::LossyFinalState(), Rivet::MissingMomentum::MissingMomentum(), Rivet::Multiplicity::Multiplicity(), Rivet::NonHadronicFinalState::NonHadronicFinalState(), Rivet::ParisiTensor::ParisiTensor(), Rivet::Spherocity::Spherocity(), Rivet::Thrust::Thrust(), Rivet::TotalVisibleMomentum::TotalVisibleMomentum(), Rivet::TriggerCDFRun0Run1::TriggerCDFRun0Run1(), Rivet::TriggerCDFRun2::TriggerCDFRun2(), Rivet::TriggerUA5::TriggerUA5(), Rivet::VetoedFinalState::VetoedFinalState(), Rivet::VisibleFinalState::VisibleFinalState(), Rivet::WFinder::WFinder(), and Rivet::ZFinder::ZFinder().

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: