LeptonClusters.hh
// -*- C++ -*-
#ifndef RIVET_LeptonClusters_HH
#define RIVET_LeptonClusters_HH
#include "Rivet/Tools/Logging.hh"
#include "Rivet/Rivet.hh"
#include "Rivet/Particle.hh"
#include "Rivet/Event.hh"
#include "Rivet/Projection.hh"
#include "Rivet/Projections/FinalState.hh"
#include "Rivet/Projections/IdentifiedFinalState.hh"
namespace Rivet {
class ClusteredLepton : public Particle {
public:
ClusteredLepton(Particle lepton) :
Particle(lepton.pdgId(), lepton.momentum()),
_constituentLepton(lepton) {}
void addPhoton(const Particle& p, bool cluster) {
_constituentPhotons.push_back(p);
if (cluster) setMomentum(momentum() + p.momentum());
}
const Particle& constituentLepton() const { return _constituentLepton; }
const ParticleVector& constituentPhotons() const { return _constituentPhotons; }
private:
ParticleVector _constituentPhotons;
Particle _constituentLepton;
};
class LeptonClusters : public FinalState {
public:
LeptonClusters(const FinalState& photons, const FinalState& signal,
double dRmax, bool cluster,
const std::vector<std::pair<double, double> >& etaRanges,
double pTmin);
virtual const Projection* clone() const {
return new LeptonClusters(*this);
}
const vector<ClusteredLepton>& clusteredLeptons() const { return _clusteredLeptons; }
protected:
void project(const Event& e);
int compare(const Projection& p) const;
private:
double _dRmax;
bool _cluster;
vector<ClusteredLepton> _clusteredLeptons;
};
}
#endif
Rivet::Particle::momentum
const FourMomentum & momentum() const
The momentum of this Particle.
Definition: Particle.hh:68
Rivet::Projection::Projection
Projection()
The default constructor.
Definition: Projection.cc:10
Rivet::LeptonClusters::compare
int compare(const Projection &p) const
Compare projections.
Definition: LeptonClusters.cc:26
Rivet::ClusteredLepton
Definition: LeptonClusters.hh:16
Rivet::LeptonClusters::clone
virtual const Projection * clone() const
Clone on the heap.
Definition: LeptonClusters.hh:51
Rivet::Particle
Representation of particles from a HepMC::GenEvent.
Definition: Particle.hh:16
Rivet::LeptonClusters
Cluster photons from a given FS to all charged particles (typically leptons) from signal and store th...
Definition: LeptonClusters.hh:42
Rivet::Particle::pdgId
PdgId pdgId() const
The PDG ID code for this Particle.
Definition: Particle.hh:56
Rivet::Projection::Event
friend class Event
Event is a friend.
Definition: Projection.hh:33
Rivet::FinalState
Project out all final-state particles in an event. Probably the most important projection in Rivet! ...
Definition: FinalState.hh:14
Rivet::Particle::Particle
Particle()
Definition: Particle.hh:21
Rivet::ParticleVector
std::vector< Particle > ParticleVector
Typedef for a vector of Particle objects.
Definition: Particle.fhh:14
Rivet::Particle::setMomentum
Particle & setMomentum(const FourMomentum &momentum)
Set the momentum of this Particle.
Definition: Particle.hh:62
Rivet::Projection
Base class for all Rivet projections.
Definition: Projection.hh:28
Rivet::LeptonClusters::project
void project(const Event &e)
Apply the projection on the supplied event.
Definition: LeptonClusters.cc:42