Multiplicity.hh
// -*- C++ -*-
#ifndef RIVET_Multiplicity_HH
#define RIVET_Multiplicity_HH
#include "Rivet/Projection.hh"
#include "Rivet/Projections/FinalState.hh"
#include "Rivet/Particle.hh"
#include "Rivet/Event.hh"
namespace Rivet {
class Multiplicity : public Projection {
public:
Multiplicity(const FinalState& fsp)
: _totalMult(0), _hadMult(0)
{
setName("Multiplicity");
addProjection(fsp, "FS");
}
virtual const Projection* clone() const {
return new Multiplicity(*this);
}
protected:
void project(const Event& e);
int compare(const Projection& p) const;
public:
//@ {
unsigned int totalMultiplicity() const { return _totalMult; }
unsigned int hadronMultiplicity() const { return _hadMult; }
//@ }
private:
unsigned int _totalMult;
unsigned int _hadMult;
};
}
#endif
Rivet::Projection::setName
void setName(const std::string &name)
Used by derived classes to set their name.
Definition: Projection.hh:120
Rivet::Multiplicity::compare
int compare(const Projection &p) const
Compare projections.
Definition: Multiplicity.cc:10
Rivet::Multiplicity::clone
virtual const Projection * clone() const
Clone on the heap.
Definition: Multiplicity.hh:26
Rivet::Event
Definition: Event.hh:22
Rivet::Multiplicity::hadronMultiplicity
unsigned int hadronMultiplicity() const
Hadron multiplicity.
Definition: Multiplicity.hh:48
Rivet::FinalState
Project out all final-state particles in an event. Probably the most important projection in Rivet! ...
Definition: FinalState.hh:14
Rivet::ProjectionApplier::addProjection
const PROJ & addProjection(const PROJ &proj, const std::string &name)
Definition: ProjectionApplier.hh:113
Rivet::Multiplicity::Multiplicity
Multiplicity(const FinalState &fsp)
Constructor. The provided FinalState projection must live throughout the run.
Definition: Multiplicity.hh:18
Rivet::Multiplicity::totalMultiplicity
unsigned int totalMultiplicity() const
Total multiplicity.
Definition: Multiplicity.hh:45
Rivet::Projection
Base class for all Rivet projections.
Definition: Projection.hh:28
Rivet::Multiplicity::project
void project(const Event &e)
Perform the projection on the Event.
Definition: Multiplicity.cc:15
Rivet::Multiplicity
Count the final-state particles in an event.
Definition: Multiplicity.hh:14