File: InvMassFinalState.hh

package info (click to toggle)
rivet 1.8.0-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 22,900 kB
  • sloc: cpp: 47,222; sh: 10,328; python: 6,469; ansic: 1,710; makefile: 1,221
file content (96 lines) | stat: -rw-r--r-- 2,822 bytes parent folder | download
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
// -*- 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);


  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