rivet is hosted by Hepforge, IPPP Durham
Rivet 4.0.0
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 { PROMPT=1, NODECAY=1, ALL };
13
15 enum class LeptonReco { ALL=0, ALL_BARE=0,
16 ALL_DRESSED=1,
17 DIRECT_BARE=2, PROMPT_BARE=2,
18 DIRECT_DRESSED=3, PROMPT_DRESSED=3 };
19
21 enum class DressingType { DR=0, CONE=0, CLUSTER=1, AKT=1 };
22
24 enum class PhotonOrigin { NONE=0, PROMPT=1, NODECAY=1, ALL };
25
26
30 class DressedLepton : public Particle {
31 public:
32
35
40
44 void addPhoton(const Particle& p, bool momsum=true);
45
47 const Particle& bareLepton() const;
48
50 const Particles photons() const { return slice(constituents(), 1); }
51
52 };
53
54
56 using DressedLeptons = vector<DressedLepton>;
57
59 template <typename T, typename FN = T(const ParticleBase&)>
60 inline T sum(const DressedLeptons& c, FN&& fn, const T& start=T()) {
61 auto f = std::function(std::forward<FN>(fn));
62 T rtn = start;
63 for (const auto& x : c) rtn += fn(x);
64 return rtn;
65 }
66
67
68
69}
70
71#endif
A charged lepton meta-particle created by clustering photons close to the bare lepton.
Definition DressedLepton.hh:30
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:50
DressedLepton(const Particle &dlepton)
Copy constructor (from Particle)
double p() const
Get the 3-momentum magnitude directly.
Definition ParticleBase.hh:110
double eta() const
Get the directly (alias).
Definition ParticleBase.hh:87
Particle representation, either from a HepMC::GenEvent or reconstructed.
Definition Particle.hh:45
const Particles & constituents() const
Direct constituents of this particle, returned by reference.
Definition Particle.hh:279
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:656
Definition MC_CENT_PPB_Projections.hh:10
PhotonOrigin
Accepted classes of lepton origin.
Definition DressedLepton.hh:24
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:60
DressingType
The approach taken to photon dressing of leptons.
Definition DressedLepton.hh:21
LeptonOrigin
Accepted classes of lepton origin.
Definition DressedLepton.hh:12
vector< DressedLepton > DressedLeptons
Alias for a list of dressed leptons, cf. Particles and Jets.
Definition DressedLepton.hh:56
LeptonReco
Reconstruction/dressing mode for leptons.
Definition DressedLepton.hh:15