Rivet  3.1.4
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 
9 namespace 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 
95  const MissingMomentum& missingMom() const;
96 
100  double mT() const {
101  if (bosons().empty()) return -1;
102  return Rivet::mT(constituentLepton().mom(), constituentNeutrino().mom());
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
Definition: MC_Cent_pPb.hh:10
double mT() const
Calculate the transverse mass of the W, from the charged lepton and neutrino.
Definition: WFinder.hh:100
const VetoedFinalState & remainingFinalState() const
virtual const Particles & particles() const
Get the particles in no particular order, with no cuts.
Definition: ParticleFinder.hh:49
const Particles & constituentLeptons() const
Access to the Ws' constituent clustered leptons.
Definition: WFinder.hh:73
const Particle & boson() const
Definition: WFinder.hh:68
Convenience finder of leptonically decaying W.
Definition: WFinder.hh:16
Particle representation, either from a HepMC::GenEvent or reconstructed.
Definition: Particle.hh:18
Base class for projections which return subsets of an event's particles.
Definition: ParticleFinder.hh:11
int pid(const Particle &p)
Unbound function access to PID code.
Definition: ParticleUtils.hh:23
DEFAULT_RIVET_PROJ_CLONE(WFinder)
Clone on the heap.
bool empty() const
Is this final state empty?
Definition: ParticleFinder.hh:42
FS modifier to exclude classes of particles from the final state.
Definition: VetoedFinalState.hh:11
void project(const Event &e)
Apply the projection on the supplied event.
Representation of a HepMC event, and enabler of Projection caching.
Definition: Event.hh:22
const MissingMomentum & missingMom() const
Access to the missing momentum projection used to find the "neutrino".
const Particles & bosons() const
Access to the found bosons, equivalent to constituents()
Definition: WFinder.hh:65
Calculate missing , etc. as complements to the total visible momentum.
Definition: MissingMomentum.hh:22
double mT(double pT1, double pT2, double dphi)
Definition: MathUtils.hh:681
Project out all final-state particles in an event. Probably the most important projection in Rivet! ...
Definition: FinalState.hh:12
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.
Base class for all Rivet projections.
Definition: Projection.hh:29
const Particle & constituentNeutrino() const
Definition: WFinder.hh:86
const Particle & constituentLepton() const
Definition: WFinder.hh:76
const Particles & constituentNeutrinos() const
Definition: WFinder.hh:83
CmpState compare(const Projection &p) const
Compare projections.
void clear()
Clear the projection.
Definition: WFinder.hh:118