rivet is hosted by Hepforge, IPPP Durham
Rivet  2.7.0
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 ChargedLeptons { PROMPTCHLEPTONS=0, ALLCHLEPTONS };
20  enum ClusterPhotons { NOCLUSTER=0, CLUSTERNODECAY=1, CLUSTERALL };
21  enum PhotonTracking { NOTRACK=0, TRACK=1 };
22  enum MassWindow { MASS=0, TRANSMASS=1 };
23 
24 
26 
27 
43  WFinder(const FinalState& inputfs,
44  const Cut& leptoncuts,
45  PdgId pid,
46  double minmass, double maxmass,
47  double missingET,
48  double dRmax=0.1,
49  ChargedLeptons chLeptons=PROMPTCHLEPTONS,
50  ClusterPhotons clusterPhotons=CLUSTERNODECAY,
51  PhotonTracking trackPhotons=NOTRACK,
52  MassWindow masstype=MASS,
53  double masstarget=80.4*GeV);
54 
57  WFinder(const FinalState& inputfs,
58  const Cut& leptoncuts,
59  PdgId pid,
60  double minmass, double maxmass,
61  double missingET,
62  double dRmax,
63  ClusterPhotons clusterPhotons,
64  PhotonTracking trackPhotons=NOTRACK,
65  MassWindow masstype=MASS,
66  double masstarget=80.4*GeV)
67  : WFinder(inputfs, leptoncuts, pid, minmass, maxmass, missingET,
68  dRmax, PROMPTCHLEPTONS, clusterPhotons, trackPhotons, masstype, masstarget)
69  { }
70 
71  // /// Constructor with more convenient argument ordering and default args
72  // ///
73  // /// @todo Revisit NOTRACK as default?
74  // WFinder(const FinalState& inputfs,
75  // const Cut& leptoncuts,
76  // PdgId pid,
77  // double minmass, double maxmass,
78  // double missingET,
79  // MassWindow masstype,
80  // double masstarget=80.4*GeV,
81  // ClusterPhotons clusterPhotons=CLUSTERNODECAY,
82  // double dRmax=0.1,
83  // PhotonTracking trackPhotons=NOTRACK)
84  // : WFinder(inputfs, leptoncuts, pid, minmass, maxmass, missingET,
85  // dRmax, clusterPhotons, trackPhotons, masstype, masstarget)
86  // { }
87 
90 
92 
93 
96  const Particles& bosons() const { return particles(); }
99  const Particle& boson() const { return particles().front(); }
100 
101 
104  const Particles& constituentLeptons() const { return _leptons; }
107  const Particle& constituentLepton() const { return _leptons.front(); }
108 
109 
114  const Particles& constituentNeutrinos() const { return _neutrinos; }
117  const Particle& constituentNeutrino() const { return _neutrinos.front(); }
118 
119 
123  const VetoedFinalState& remainingFinalState() const;
124 
126  const MissingMomentum& missingMom() const;
127 
131  double mT() const {
132  if (bosons().empty()) return -1;
133  return Rivet::mT(constituentLepton().mom(), constituentNeutrino().mom());
134  }
135 
136 
137  protected:
138 
140  void project(const Event& e);
141 
143  int compare(const Projection& p) const;
144 
145 
146  public:
147 
149  void clear() { _theParticles.clear(); }
150 
151 
152  private:
153 
155  double _minmass, _maxmass, _masstarget;
156 
158  bool _useTransverseMass;
159 
161  double _etMissMin;
162 
165  PhotonTracking _trackPhotons;
166 
168  PdgId _pid;
169 
171  Particles _leptons, _neutrinos;
172 
173  };
174 
175 
176 }
177 
178 
179 #endif
Definition: ALICE_2010_I880049.cc:13
double mT() const
Calculate the transverse mass of the W, from the charged lepton and neutrino.
Definition: WFinder.hh:131
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:104
const Particle & boson() const
Definition: WFinder.hh:99
Convenience finder of leptonically decaying W.
Definition: WFinder.hh:16
Particle representation, either from a HepMC::GenEvent or reconstructed.
Definition: Particle.hh:18
int pid(const Particle &p)
Unbound function access to PID code.
Definition: ParticleUtils.hh:20
Base class for projections which return subsets of an event's particles.
Definition: ParticleFinder.hh:11
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
const MissingMomentum & missingMom() const
Access to the missing momentum projection used to find the "neutrino".
Definition: WFinder.cc:80
void project(const Event &e)
Apply the projection on the supplied event.
Definition: WFinder.cc:99
Definition: Event.hh:22
const Particles & bosons() const
Access to the found bosons, equivalent to constituents()
Definition: WFinder.hh:96
Calculate missing , etc.
Definition: MissingMomentum.hh:19
double mT(double pT1, double pT2, double dphi)
Definition: MathUtils.hh:619
int compare(const Projection &p) const
Compare projections.
Definition: WFinder.cc:85
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=PROMPTCHLEPTONS, ClusterPhotons clusterPhotons=CLUSTERNODECAY, PhotonTracking trackPhotons=NOTRACK, MassWindow masstype=MASS, double masstarget=80.4 *GeV)
Definition: WFinder.cc:14
WFinder(const FinalState &inputfs, const Cut &leptoncuts, PdgId pid, double minmass, double maxmass, double missingET, double dRmax, ClusterPhotons clusterPhotons, PhotonTracking trackPhotons=NOTRACK, MassWindow masstype=MASS, double masstarget=80.4 *GeV)
Definition: WFinder.hh:57
Base class for all Rivet projections.
Definition: Projection.hh:29
const Particle & constituentNeutrino() const
Definition: WFinder.hh:117
const Particle & constituentLepton() const
Definition: WFinder.hh:107
const Particles & constituentNeutrinos() const
Definition: WFinder.hh:114
const VetoedFinalState & remainingFinalState() const
Definition: WFinder.cc:75
void clear()
Clear the projection.
Definition: WFinder.hh:149