Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Projection Class Reference

#include <Projection.hh>

Inheritance diagram for Projection:

Inheritance graph
[legend]
Collaboration diagram for Projection:

Collaboration graph
[legend]
List of all members.

Detailed Description

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

Definition at line 23 of file Projection.hh.


Public Member Functions

bool before (const Projection &p) const
virtual const Cuts getCuts () const
virtual const set< BeamPairgetBeamPairs () const
virtual string getName () const
 Get the name of the projection.
set< Projection * > getProjections () const
 Get the contained projections, including recursion.
Standard constructors and destructors.
 Projection ()
 The default constructor.
virtual ~Projection ()
 The destructor.

Protected Member Functions

virtual void project (const Event &e)=0
virtual int compare (const Projection &p) const =0
ProjectionaddProjection (Projection &proj)
 Add a projection dependency to the projection list.
ProjectionaddBeamPair (const ParticleName &beam1, const ParticleName &beam2)
 Add a colliding beam pair.
ProjectionaddCut (const string &quantity, const Comparison &comparison, const double value)
 Add a cut.
LoggetLog ()
 Get a Log object based on the getName() property of the calling projection object.

Protected Attributes

Cuts _cuts
 Parameter constraints.
set< BeamPair_beamPairs
 Beam-type constraint.
set< Projection * > _projections
 Collection of pointers to projections, for automatically combining constraints.

Friends

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

Constructor & Destructor Documentation

Projection  )  [inline]
 

The default constructor.

Definition at line 38 of file Projection.hh.

References Rivet::ANY.

virtual ~Projection  )  [inline, virtual]
 

The destructor.

Definition at line 43 of file Projection.hh.


Member Function Documentation

Projection& addBeamPair const ParticleName beam1,
const ParticleName beam2
[inline, protected]
 

Add a colliding beam pair.

Definition at line 145 of file Projection.hh.

References Rivet::BeamPair.

Projection& addCut const string &  quantity,
const Comparison comparison,
const double  value
[inline, protected]
 

Add a cut.

Definition at line 151 of file Projection.hh.

Projection& addProjection Projection proj  )  [inline, protected]
 

Add a projection dependency to the projection list.

Definition at line 139 of file Projection.hh.

bool before const Projection p  )  const [inline]
 

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.

Definition at line 88 of file Projection.hh.

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

virtual int 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 guarranteed 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 Beam, CentralEtHCM, ChargedFinalState, ChargedLeptons, D0ILConeJets, DISKinematics, DISLepton, FastJets, FinalState, FinalStateHCM, KtJets, Multiplicity, ParisiTensor, PVertex, Sphericity, Thrust, TotalVisibleMomentum, TrackJet, VetoedFinalState, and WZandh.

virtual const set<BeamPair> getBeamPairs  )  const [inline, virtual]
 

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

Definition at line 114 of file Projection.hh.

References Cuts::end(), and Rivet::intersection().

virtual const Cuts getCuts  )  const [inline, virtual]
 

Return the Cuts objects for this projection. Derived classes should ensure that all contained projections are registered in the _projections set for the cut chaining to work.

Definition at line 102 of file Projection.hh.

References Cuts::addCuts().

Log & getLog  )  [protected]
 

Get a Log object based on the getName() property of the calling projection object.

Definition at line 7 of file Projection.cc.

References Log::getLog(), and Projection::getName().

Referenced by VetoedFinalState::project(), TrackJet::project(), TotalVisibleMomentum::project(), Sphericity::project(), Multiplicity::project(), ChargedLeptons::project(), ChargedFinalState::project(), and Beam::project().

virtual string getName  )  const [inline, virtual]
 

Get the name of the projection.

Reimplemented in Beam, CentralEtHCM, ChargedFinalState, ChargedLeptons, D0ILConeJets, DISKinematics, DISLepton, FastJets, FinalState, FinalStateHCM, KtJets, Multiplicity, ParisiTensor, PVertex, Sphericity, Thrust, TotalVisibleMomentum, TrackJet, VetoedFinalState, and WZandh.

Definition at line 123 of file Projection.hh.

Referenced by Projection::getLog().

set<Projection*> getProjections  )  const [inline]
 

Get the contained projections, including recursion.

Definition at line 128 of file Projection.hh.

References Cuts::end().

virtual void project const Event e  )  [protected, 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. If the information from other projections are necessary, their project(const Event&) should not be called, rather the corresponding objects should be added to the Event using the Event::applyProjection(Projection *) function.

Implemented in Beam, CentralEtHCM, ChargedFinalState, ChargedLeptons, D0ILConeJets, DISKinematics, DISLepton, FastJets, FinalState, FinalStateHCM, KtJets, Multiplicity, ParisiTensor, PVertex, Sphericity, Thrust, TotalVisibleMomentum, TrackJet, VetoedFinalState, and WZandh.

Referenced by Event::applyProjection().


Friends And Related Function Documentation

friend class Cmp<Projection> [friend]
 

The Cmp specialization for Projection is a friend.

Definition at line 31 of file Projection.hh.

friend class Event [friend]
 

Event is a friend.

Definition at line 28 of file Projection.hh.


Member Data Documentation

set<BeamPair> _beamPairs [protected]
 

Beam-type constraint.

Definition at line 164 of file Projection.hh.

Cuts _cuts [protected]
 

Parameter constraints.

Definition at line 161 of file Projection.hh.

set<Projection*> _projections [protected]
 

Collection of pointers to projections, for automatically combining constraints.

Definition at line 167 of file Projection.hh.


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