InvMassFinalState.hh
// -*- C++ -*-
#ifndef RIVET_InvMassFinalState_HH
#define RIVET_InvMassFinalState_HH
#include "Rivet/Projections/FinalState.hh"
namespace Rivet {
class InvMassFinalState : public FinalState {
public:
InvMassFinalState(const FinalState& fsp,
const std::pair<PdgId, PdgId>& idpair, // pair of decay products
double minmass, // min inv mass
double maxmass, // max inv mass
double masstarget=-1.0);
InvMassFinalState(const FinalState& fsp,
const std::vector<std::pair<PdgId, PdgId> >& idpairs, // vector of pairs of decay products
double minmass, // min inv mass
double maxmass, // max inv mass
double masstarget=-1.0);
InvMassFinalState(const std::pair<PdgId, PdgId>& idpair, // pair of decay products
double minmass, // min inv mass
double maxmass, // max inv mass
double masstarget=-1.0);
InvMassFinalState(const std::vector<std::pair<PdgId, PdgId> >& idpairs, // vector of pairs of decay products
double minmass, // min inv mass
double maxmass, // max inv mass
double masstarget=-1.0);
virtual const Projection* clone() const {
return new InvMassFinalState(*this);
}
public:
const std::vector<std::pair<Particle, Particle> >& particlePairs() const;
void useTransverseMass(bool usetrans=true) {
_useTransverseMass = usetrans;
}
void calc(const ParticleVector& inparticles);
private:
inline double massT( FourMomentum v1, FourMomentum v2) {
return sqrt( (v1.Et() + v2.Et())*(v1.Et() + v2.Et()) -
(v1+v2).perp()*(v1+v2).perp() );
}
protected:
void project(const Event& e);
int compare(const Projection& p) const;
private:
std::vector<PdgIdPair> _decayids;
std::vector<std::pair<Particle, Particle> > _particlePairs;
double _minmass;
double _maxmass;
double _masstarget;
bool _useTransverseMass;
};
}
#endif
Rivet
Definition: MC_JetAnalysis.hh:9
Rivet::InvMassFinalState
Identify particles which can be paired to fit within a given invariant mass window.
Definition: InvMassFinalState.hh:11
Rivet::InvMassFinalState::project
void project(const Event &e)
Apply the projection on the supplied event.
Definition: InvMassFinalState.cc:82
Rivet::Projection::Projection
Projection()
The default constructor.
Definition: Projection.cc:10
Rivet::perp
double perp(const Vector3 &v)
Synonym for polarRadius.
Definition: Vector3.hh:266
Rivet::InvMassFinalState::clone
virtual const Projection * clone() const
Clone on the heap.
Definition: InvMassFinalState.hh:42
Rivet::Projection::Event
friend class Event
Event is a friend.
Definition: Projection.hh:33
Rivet::InvMassFinalState::InvMassFinalState
InvMassFinalState(const FinalState &fsp, const std::pair< PdgId, PdgId > &idpair, double minmass, double maxmass, double masstarget=-1.0)
Constructor for a single inv-mass pair.
Rivet::InvMassFinalState::compare
int compare(const Projection &p) const
Compare projections.
Definition: InvMassFinalState.cc:55
Rivet::FinalState
Project out all final-state particles in an event. Probably the most important projection in Rivet! ...
Definition: FinalState.hh:14
Rivet::InvMassFinalState::calc
void calc(const ParticleVector &inparticles)
Operate on a given particle vector directly instead of through project (no caching) ...
Definition: InvMassFinalState.cc:88
Rivet::InvMassFinalState::useTransverseMass
void useTransverseMass(bool usetrans=true)
Choose whether to use the full inv mass or just the transverse mass.
Definition: InvMassFinalState.hh:54
Rivet::InvMassFinalState::particlePairs
const std::vector< std::pair< Particle, Particle > > & particlePairs() const
Constituent pairs.
Definition: InvMassFinalState.cc:187
Rivet::FourMomentum::Et
double Et() const
Calculate the transverse energy .
Definition: Vector4.hh:420
Rivet::Projection
Base class for all Rivet projections.
Definition: Projection.hh:28
Rivet::FourMomentum
Specialized version of the FourVector with momentum/energy functionality.
Definition: Vector4.hh:324