Rivet  1.8.3
WFinder.hh
1 // -*- C++ -*-
2 #ifndef RIVET_WFinder_HH
3 #define RIVET_WFinder_HH
4 
5 #include "Rivet/Tools/Logging.hh"
6 #include "Rivet/Rivet.hh"
7 #include "Rivet/Particle.hh"
8 #include "Rivet/Event.hh"
9 #include "Rivet/Projection.hh"
10 #include "Rivet/Projections/ChargedFinalState.hh"
11 #include "Rivet/Projections/LeptonClusters.hh"
12 
13 namespace Rivet {
14 
15 
20  class WFinder : public FinalState {
21  public:
22 
24 
25 
39  WFinder(const FinalState& inputfs,
40  double etaMin, double etaMax,
41  double pTmin,
42  PdgId pid,
43  double minmass, double maxmass,
44  double missingET,
45  double dRmax, bool clusterPhotons=true, bool trackPhotons=false,
46  double masstarget=80.4,
47  bool useTransverseMass=false);
48 
49 
63  WFinder(const FinalState& inputfs,
64  const std::vector<std::pair<double, double> >& etaRanges,
65  double pTmin,
66  PdgId pid,
67  double minmass, const double maxmass,
68  double missingET,
69  double dRmax, bool clusterPhotons=true, bool trackPhotons=false,
70  double masstarget=80.4,
71  bool useTransverseMass=false);
72 
73 
75  WFinder(double, double, double, PdgId, double, double, double, double,
76  bool clusterPhotons=true, bool trackPhotons=false,
77  double masstarget=80.4, bool useTransverseMass=false);
79  WFinder(const std::vector<std::pair<double, double> >&, double,
80  PdgId, double, double, double, double,
81  bool clusterPhotons=true, bool trackPhotons=false,
82  double masstarget=80.4, bool useTransverseMass=false);
83 
85  virtual const Projection* clone() const {
86  return new WFinder(*this);
87  }
89 
90 
92  const ParticleVector& bosons() const { return _bosons; }
93 
96  const vector<Particle>& constituentLeptons() const { return _constituentLeptons; }
97 
100  const vector<Particle>& constituentNeutrinos() const { return _constituentNeutrinos; }
101 
105  const FinalState& remainingFinalState() const;
106 
107  protected:
108 
110  void project(const Event& e);
111 
113  int compare(const Projection& p) const;
114 
115 
116  public:
117 
119  void clear() {
120  _theParticles.clear();
121  _bosons.clear();
122  _constituentLeptons.clear();
123  _constituentNeutrinos.clear();
124  }
125 
126 
127  private:
128 
130  void _init(const FinalState& inputfs,
131  const std::vector<std::pair<double, double> >& etaRanges,
132  double pTmin, PdgId pid,
133  double minmass, double maxmass,
134  double missingET,
135  double dRmax, bool clusterPhotons, bool trackPhotons,
136  double masstarget,
137  bool useTransverseMass);
138 
139 
140  private:
141 
143  double _minmass, _maxmass, _masstarget;
144  bool _useTransverseMass;
145 
147  double _etMiss;
148 
155  bool _trackPhotons;
156 
158  PdgId _pid;
159 
161  PdgId _nu_pid;
162 
164  ParticleVector _bosons;
165 
167  ParticleVector _constituentLeptons;
168 
170  ParticleVector _constituentNeutrinos;
171 
172  };
173 
174 
175 }
176 
177 
178 #endif
Definition: MC_JetAnalysis.hh:9
int compare(const Projection &p) const
Compare projections.
Definition: WFinder.cc:131
Convenience finder of leptonically decaying Ws.
Definition: WFinder.hh:20
const vector< Particle > & constituentLeptons() const
Definition: WFinder.hh:96
const vector< Particle > & constituentNeutrinos() const
Definition: WFinder.hh:100
const FinalState & remainingFinalState() const
Definition: WFinder.cc:127
void project(const Event &e)
Apply the projection on the supplied event.
Definition: WFinder.cc:143
Definition: Event.hh:22
const ParticleVector & bosons() const
Access to the found bosons (currently either 0 or 1)
Definition: WFinder.hh:92
WFinder(const FinalState &inputfs, double etaMin, double etaMax, double pTmin, PdgId pid, double minmass, double maxmass, double missingET, double dRmax, bool clusterPhotons=true, bool trackPhotons=false, double masstarget=80.4, bool useTransverseMass=false)
Definition: WFinder.cc:15
virtual const Projection * clone() const
Clone on the heap.
Definition: WFinder.hh:85
Project out all final-state particles in an event. Probably the most important projection in Rivet! ...
Definition: FinalState.hh:14
Base class for all Rivet projections.
Definition: Projection.hh:28
void clear()
Clear the projection.
Definition: WFinder.hh:119