FoxWolframMoments.hh
// -*- C++ -*-
#ifndef RIVET_FoxWolframMoments_HH
#define RIVET_FoxWolframMoments_HH
#include "Rivet/Rivet.hh"
#include "Rivet/Projection.hh"
#include "Rivet/Projections/FinalState.hh"
#include "Rivet/Projections/VetoedFinalState.hh"
#include "Rivet/Projections/VisibleFinalState.hh"
#include "Rivet/Particle.hh"
#include "Rivet/Event.hh"
#include <gsl/gsl_sf_legendre.h>
#define MAXMOMENT 5
namespace Rivet {
class FoxWolframMoments : public Projection {
public:
FoxWolframMoments(const FinalState& fsp)
{
setName("FoxWolframMoments");
addProjection(fsp, "FS");
VisibleFinalState vfs(fsp);
addProjection(vfs, "VFS");
// Initialize moments vector
for (int i = 0; i < MAXMOMENT ; ++i) {
_fwmoments.push_back(0.0);
}
}
virtual const Projection* clone() const {
return new FoxWolframMoments(*this);
}
public:
double getFoxWolframMoment(unsigned int l) const {
if (l < MAXMOMENT) {
return _fwmoments[l];
}
return -666.0;
}
protected:
void project(const Event& e);
int compare(const Projection& p) const;
private:
vector<double> _fwmoments;
};
}
#endif
Rivet::Projection::setName
void setName(const std::string &name)
Used by derived classes to set their name.
Definition: Projection.hh:120
Rivet
Definition: MC_JetAnalysis.hh:9
Rivet::FoxWolframMoments::clone
virtual const Projection * clone() const
Clone on the heap.
Definition: FoxWolframMoments.hh:42
Rivet::Event
Definition: Event.hh:22
Rivet::FoxWolframMoments::compare
int compare(const Projection &p) const
Compare projections.
Definition: FoxWolframMoments.cc:8
Rivet::FoxWolframMoments::getFoxWolframMoment
double getFoxWolframMoment(unsigned int l) const
The projected Fox-Wolfram Moment of order l.
Definition: FoxWolframMoments.hh:50
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::FoxWolframMoments::project
void project(const Event &e)
Apply the projection to the event.
Definition: FoxWolframMoments.cc:13
Rivet::FoxWolframMoments::FoxWolframMoments
FoxWolframMoments(const FinalState &fsp)
Constructor.
Definition: FoxWolframMoments.hh:25
Rivet::Projection
Base class for all Rivet projections.
Definition: Projection.hh:28
Rivet::FoxWolframMoments
Calculate Fox-Wolfram moments.
Definition: FoxWolframMoments.hh:21
Rivet::VisibleFinalState
Final state modifier excluding particles which are not experimentally visible.
Definition: VisibleFinalState.hh:16