rivet is hosted by Hepforge, IPPP Durham
Rivet 3.1.6
WFinder.hh
1// -*- C++ -*-
2#ifndef RIVET_WFinder_HH
3#define RIVET_WFinder_HH
4
5#include "Rivet/Projections/FinalState.hh"
6#include "Rivet/Projections/MissingMomentum.hh"
7#include "Rivet/Projections/VetoedFinalState.hh"
8
9namespace Rivet {
10
11
16 class WFinder : public ParticleFinder {
17 public:
18
19 enum class ChargedLeptons { PROMPT, ALL };
20 enum class ClusterPhotons { NONE, NODECAY, ALL };
21 enum class AddPhotons { NO, YES };
22 enum class MassWindow { M, MT };
23
24
26
27
45 WFinder(const FinalState& inputfs,
46 const Cut& leptoncuts,
47 PdgId pid,
48 double minmass, double maxmass,
49 double missingET,
50 double dRmax=0.1,
51 ChargedLeptons chLeptons=ChargedLeptons::PROMPT,
52 ClusterPhotons clusterPhotons=ClusterPhotons::NODECAY,
53 AddPhotons trackPhotons=AddPhotons::NO,
54 MassWindow masstype=MassWindow::M,
55 double masstarget=80.4*GeV);
56
59
61
62
65 const Particles& bosons() const { return particles(); }
68 const Particle& boson() const { return particles().front(); }
69
70
73 const Particles& constituentLeptons() const { return _leptons; }
76 const Particle& constituentLepton() const { return _leptons.front(); }
77
78
83 const Particles& constituentNeutrinos() const { return _neutrinos; }
86 const Particle& constituentNeutrino() const { return _neutrinos.front(); }
87
88
93
96
100 double mT() const {
101 if (bosons().empty()) return -1;
103 }
104
105
106 protected:
107
109 void project(const Event& e);
110
112 CmpState compare(const Projection& p) const;
113
114
115 public:
116
118 void clear() { _theParticles.clear(); }
119
120
121 private:
122
124 double _minmass, _maxmass, _masstarget;
125
127 bool _useTransverseMass;
128
130 double _etMissMin;
131
134 AddPhotons _trackPhotons;
135
137 PdgId _pid;
138
140 Particles _leptons, _neutrinos;
141
142 };
143
144
145}
146
147
148#endif
Representation of a HepMC event, and enabler of Projection caching.
Definition: Event.hh:22
Project out all final-state particles in an event. Probably the most important projection in Rivet!
Definition: FinalState.hh:12
Calculate missing , etc. as complements to the total visible momentum.
Definition: MissingMomentum.hh:22
Base class for projections which return subsets of an event's particles.
Definition: ParticleFinder.hh:11
bool empty() const
Is this final state empty?
Definition: ParticleFinder.hh:42
virtual const Particles & particles() const
Get the particles in no particular order, with no cuts.
Definition: ParticleFinder.hh:49
Particle representation, either from a HepMC::GenEvent or reconstructed.
Definition: Particle.hh:53
Specialised vector of Particle objects.
Definition: Particle.hh:25
Base class for all Rivet projections.
Definition: Projection.hh:29
FS modifier to exclude classes of particles from the final state.
Definition: VetoedFinalState.hh:11
Convenience finder of leptonically decaying W.
Definition: WFinder.hh:16
const Particles & constituentNeutrinos() const
Definition: WFinder.hh:83
DEFAULT_RIVET_PROJ_CLONE(WFinder)
Clone on the heap.
const Particles & constituentLeptons() const
Access to the Ws' constituent clustered leptons.
Definition: WFinder.hh:73
void project(const Event &e)
Apply the projection on the supplied event.
const VetoedFinalState & remainingFinalState() const
const MissingMomentum & missingMom() const
Access to the missing momentum projection used to find the "neutrino".
WFinder(const FinalState &inputfs, const Cut &leptoncuts, PdgId pid, double minmass, double maxmass, double missingET, double dRmax=0.1, ChargedLeptons chLeptons=ChargedLeptons::PROMPT, ClusterPhotons clusterPhotons=ClusterPhotons::NODECAY, AddPhotons trackPhotons=AddPhotons::NO, MassWindow masstype=MassWindow::M, double masstarget=80.4 *GeV)
Constructor taking cuts object.
double mT() const
Calculate the transverse mass of the W, from the charged lepton and neutrino.
Definition: WFinder.hh:100
void clear()
Clear the projection.
Definition: WFinder.hh:118
const Particle & constituentNeutrino() const
Definition: WFinder.hh:86
const Particle & constituentLepton() const
Definition: WFinder.hh:76
const Particle & boson() const
Definition: WFinder.hh:68
CmpState compare(const Projection &p) const
Compare projections.
const Particles & bosons() const
Access to the found bosons, equivalent to constituents()
Definition: WFinder.hh:65
FourMomentum mom(const ParticleBase &p)
Unbound function access to momentum.
Definition: ParticleBaseUtils.hh:642
double p(const ParticleBase &p)
Unbound function access to p.
Definition: ParticleBaseUtils.hh:653
int pid(const Particle &p)
Unbound function access to PID code.
Definition: ParticleUtils.hh:23
Definition: MC_Cent_pPb.hh:10
double mT(double pT1, double pT2, double dphi)
Definition: MathUtils.hh:681