/usr/include/Rivet/Projections/InvMassFinalState.hh is in librivet-dev 1.8.3-1.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | // -*- C++ -*-
#ifndef RIVET_InvMassFinalState_HH
#define RIVET_InvMassFinalState_HH
#include "Rivet/Projections/FinalState.hh"
namespace Rivet {
/// @brief Identify particles which can be paired to fit within a given invariant mass window
class InvMassFinalState : public FinalState {
public:
/// Constructor for a single inv-mass pair.
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);
/// Constructor for multiple inv-mass pairs.
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);
/// Same thing as above, but we want to pass the particles directly to the calc method
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);
/// Clone on the heap.
virtual const Projection* clone() const {
return new InvMassFinalState(*this);
}
public:
/// Constituent pairs.
const std::vector<std::pair<Particle, Particle> >& particlePairs() const;
/// Choose whether to use the full inv mass or just the transverse mass.
void useTransverseMass(bool usetrans=true) {
_useTransverseMass = usetrans;
}
/// Operate on a given particle vector directly instead of through project (no caching)
void calc(const ParticleVector& inparticles);
private:
/// Transverse Mass
inline double massT( FourMomentum v1, FourMomentum v2) {
return sqrt( (v1.Et() + v2.Et())*(v1.Et() + v2.Et()) -
(v1+v2).perp()*(v1+v2).perp() );
}
protected:
/// Apply the projection on the supplied event.
void project(const Event& e);
/// Compare projections.
int compare(const Projection& p) const;
private:
/// IDs of the decay products.
std::vector<PdgIdPair> _decayids;
/// Constituent pairs.
std::vector<std::pair<Particle, Particle> > _particlePairs;
/// Min inv mass.
double _minmass;
/// Max inv mass.
double _maxmass;
/// Target mass if only one pair should be returned.
double _masstarget;
/// Flag to decide whether to use the full inv mass or just the transverse mass.
bool _useTransverseMass;
};
}
#endif
|