Rivet  1.8.3
ZFinder.hh
1 // -*- C++ -*-
2 #ifndef RIVET_ZFinder_HH
3 #define RIVET_ZFinder_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/FinalState.hh"
11 #include "Rivet/Projections/LeptonClusters.hh"
12 
13 namespace Rivet {
14 
15 
20  class ZFinder : public FinalState {
21 
22  public:
23 
25 
26 
38  ZFinder(const FinalState& inputfs,
39  double etaMin, double etaMax,
40  double pTmin,
41  PdgId pid,
42  double minmass, double maxmass,
43  double dRmax, bool clusterPhotons, bool trackPhotons,
44  double masstarget=91.2*GeV);
45 
46 
58  ZFinder(const FinalState& inputfs,
59  const std::vector<std::pair<double, double> >& etaRanges,
60  double pTmin,
61  PdgId pid,
62  double minmass, const double maxmass,
63  double dRmax, bool clusterPhotons, bool trackPhotons,
64  double masstarget=91.2*GeV);
65 
66 
68  ZFinder(double, double, double, PdgId, double, double, double,
69  bool, bool, double masstarget=91.2*GeV);
71  ZFinder(const std::vector<std::pair<double, double> >&, double, PdgId,
72  double, double, double, bool, bool, double masstarget=91.2*GeV);
73 
74 
76  virtual const Projection* clone() const {
77  return new ZFinder(*this);
78  }
80 
81 
83  const ParticleVector& bosons() const { return _bosons; }
84 
88  const vector<Particle>& constituents() const { return _constituents; }
89 
93  const FinalState& remainingFinalState() const;
94 
95 
96  protected:
97 
99  void project(const Event& e);
100 
102  int compare(const Projection& p) const;
103 
104 
105  public:
106 
108  void clear() {
109  _theParticles.clear();
110  _bosons.clear();
111  _constituents.clear();
112  }
113 
114 
115  private:
117  void _init(const FinalState& inputfs,
118  const std::vector<std::pair<double, double> >& etaRanges,
119  double pTmin, PdgId pid,
120  double minmass, double maxmass,
121  double dRmax, bool clusterPhotons, bool trackPhotons,
122  double masstarget);
123 
125  double _minmass, _maxmass, _masstarget;
126 
133  bool _trackPhotons;
134 
136  PdgId _pid;
137 
139  ParticleVector _bosons;
140 
142  vector<Particle> _constituents;
143 
144  };
145 
146 
147 }
148 
149 
150 
151 #endif
int PdgId
Typedef for a PDG ID code.
Definition: Particle.fhh:29
const FinalState & remainingFinalState() const
Definition: ZFinder.cc:90
virtual const Projection * clone() const
Clone on the heap.
Definition: ZFinder.hh:76
Convenience finder of leptonically decaying Zs.
Definition: ZFinder.hh:20
const vector< Particle > & constituents() const
Definition: ZFinder.hh:88
int compare(const Projection &p) const
Compare projections.
Definition: ZFinder.cc:96
void project(const Event &e)
Apply the projection on the supplied event.
Definition: ZFinder.cc:106
Definition: Event.hh:22
Project out all final-state particles in an event. Probably the most important projection in Rivet! ...
Definition: FinalState.hh:14
ZFinder(const FinalState &inputfs, double etaMin, double etaMax, double pTmin, PdgId pid, double minmass, double maxmass, double dRmax, bool clusterPhotons, bool trackPhotons, double masstarget=91.2 *GeV)
Definition: ZFinder.cc:13
std::vector< Particle > ParticleVector
Typedef for a vector of Particle objects.
Definition: Particle.fhh:14
const ParticleVector & bosons() const
Access to the found bosons (currently either 0 or 1)
Definition: ZFinder.hh:83
Base class for all Rivet projections.
Definition: Projection.hh:28
void clear()
Clear the projection.
Definition: ZFinder.hh:108