Rivet API documentation

Rivet 4.1.3
DressedLepton.hh
1// -*- C++ -*-
2#ifndef RIVET_DressedLepton_HH
3#define RIVET_DressedLepton_HH
4
5#include "Rivet/Particle.hh"
6#include "Rivet/Config/RivetCommon.hh"
7
8namespace Rivet {
9
10
12 enum class LeptonOrigin { NONE = 0, DIRECT = 1, PROMPT = 1, NODECAY = 1, DECAY = 2, ALL = 3, ANY = 3 };
13
15 enum class LeptonReco {
16 ALL = 0,
17 ALL_BARE = 0,
18 ALL_DRESSED = 1,
19 DIRECT_BARE = 2,
20 PROMPT_BARE = 2,
21 DIRECT_DRESSED = 3,
22 PROMPT_DRESSED = 3
23 };
24
26 enum class DressingType { DR = 0, CONE = 0, CLUSTER = 1, AKT = 1 };
27
29 enum class PhotonOrigin { NONE = 0, DIRECT = 1, PROMPT = 1, NODECAY = 1, DECAY = 2, ALL = 3, ANY = 3 };
30
31
35 class DressedLepton : public Particle {
36 public:
37
39 DressedLepton(const Particle& dlepton);
40
44 DressedLepton(const Particle& lepton, const Particles& photons, bool momsum = true);
45
49 void addPhoton(const Particle& p, bool momsum = true);
50
52 const Particle& bareLepton() const;
53
55 const Particles photons() const {
56 return slice(constituents(), 1);
57 }
58 };
59
60
62 using DressedLeptons = vector<DressedLepton>;
63
65 template <typename T, typename FN = T(const ParticleBase&)>
66 inline T sum(const DressedLeptons& c, FN&& fn, const T& start = T()) {
67 auto f = std::function(std::forward<FN>(fn));
68 T rtn = start;
69 for (const auto& x : c) rtn += fn(x);
70 return rtn;
71 }
72
73
74}
75
76#endif
const Particle & bareLepton() const
Retrieve the bare lepton.
DressedLepton(const Particle &lepton, const Particles &photons, bool momsum=true)
Components constructor.
void addPhoton(const Particle &p, bool momsum=true)
Add a photon to the dressed lepton.
const Particles photons() const
Retrieve the clustered photons.
Definition DressedLepton.hh:55
DressedLepton(const Particle &dlepton)
Copy constructor (from Particle).
double p() const
Get the 3-momentum magnitude directly.
Definition ParticleBase.hh:168
Particle()
Definition Particle.hh:58
const Particles & constituents() const
Direct constituents of this particle, returned by reference.
Definition Particle.hh:345
Specialised vector of Particle objects.
Definition Particle.hh:21
CONTAINER slice(const CONTAINER &c, int i, int j)
Slice of the container elements cf. Python's [i:j] syntax.
Definition Utils.hh:714
Definition LHCbCommon.hh:9
PhotonOrigin
Possible classes of lepton origin.
Definition DressedLepton.hh:29
vector< DressedLepton > DressedLeptons
Alias for a list of dressed leptons, cf. Particles and Jets.
Definition DressedLepton.hh:62
T sum(const DressedLeptons &c, FN &&fn, const T &start=T())
Generic sum function, adding fn(x) for all x in container c, starting with start.
Definition DressedLepton.hh:66
DressingType
The approach taken to photon dressing of leptons.
Definition DressedLepton.hh:26
LeptonOrigin
Possible classes of lepton origin.
Definition DressedLepton.hh:12
LeptonReco
Reconstruction/dressing mode for leptons.
Definition DressedLepton.hh:15