Rivet  1.8.0
InvMassFinalState.hh
1 // -*- C++ -*-
2 #ifndef RIVET_InvMassFinalState_HH
3 #define RIVET_InvMassFinalState_HH
4 
5 #include "Rivet/Projections/FinalState.hh"
6 
7 namespace Rivet {
8 
9 
11  class InvMassFinalState : public FinalState {
12  public:
13 
15  InvMassFinalState(const FinalState& fsp,
16  const std::pair<PdgId, PdgId>& idpair, // pair of decay products
17  double minmass, // min inv mass
18  double maxmass, // max inv mass
19  double masstarget=-1.0);
20 
21 
23  InvMassFinalState(const FinalState& fsp,
24  const std::vector<std::pair<PdgId, PdgId> >& idpairs, // vector of pairs of decay products
25  double minmass, // min inv mass
26  double maxmass, // max inv mass
27  double masstarget=-1.0);
28 
29 
31  InvMassFinalState(const std::pair<PdgId, PdgId>& idpair, // pair of decay products
32  double minmass, // min inv mass
33  double maxmass, // max inv mass
34  double masstarget=-1.0);
35  InvMassFinalState(const std::vector<std::pair<PdgId, PdgId> >& idpairs, // vector of pairs of decay products
36  double minmass, // min inv mass
37  double maxmass, // max inv mass
38  double masstarget=-1.0);
39 
40 
42  virtual const Projection* clone() const {
43  return new InvMassFinalState(*this);
44  }
45 
46 
47  public:
48 
50  const std::vector<std::pair<Particle, Particle> >& particlePairs() const;
51 
52 
54  void useTransverseMass(bool usetrans=true) {
55  _useTransverseMass = usetrans;
56  }
57 
59  void calc(const ParticleVector& inparticles);
60 
61 
62  protected:
63 
65  void project(const Event& e);
66 
68  int compare(const Projection& p) const;
69 
70 
71  private:
72 
74  std::vector<PdgIdPair> _decayids;
75 
77  std::vector<std::pair<Particle, Particle> > _particlePairs;
78 
80  double _minmass;
81 
83  double _maxmass;
84 
86  double _masstarget;
87 
89  bool _useTransverseMass;
90  };
91 
92 
93 }
94 
95 
96 #endif