Rivet  1.8.3
NeutralFinalState.hh
1 // -*- C++ -*-
2 #ifndef RIVET_NeutralFinalState_HH
3 #define RIVET_NeutralFinalState_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 
12 namespace Rivet {
13 
14 
16  class NeutralFinalState : public FinalState {
17 
18  public:
19 
21 
22  NeutralFinalState(const FinalState& fsp) : _Etmin(0.0*GeV) {
23  setName("NeutralFinalState");
24  addProjection(fsp, "FS");
25  }
26 
27  NeutralFinalState(double mineta = -MAXRAPIDITY,
28  double maxeta = MAXRAPIDITY,
29  double minEt = 0.0*GeV) : _Etmin(minEt)
30  {
31  setName("NeutralFinalState");
32  addProjection(FinalState(mineta, maxeta, 0.0*GeV), "FS");
33  }
34 
36  virtual const Projection* clone() const {
37  return new NeutralFinalState(*this);
38  }
40 
41  protected:
42 
44  void project(const Event& e);
45 
47  double _Etmin;
48 
50  int compare(const Projection& p) const;
51  };
52 
53 
54 }
55 
56 
57 #endif
void setName(const std::string &name)
Used by derived classes to set their name.
Definition: Projection.hh:120
Project only neutral final state particles.
Definition: NeutralFinalState.hh:16
int compare(const Projection &p) const
Compare projections.
Definition: NeutralFinalState.cc:11
Definition: Event.hh:22
Project out all final-state particles in an event. Probably the most important projection in Rivet! ...
Definition: FinalState.hh:14
const PROJ & addProjection(const PROJ &proj, const std::string &name)
Definition: ProjectionApplier.hh:113
void project(const Event &e)
Apply the projection on the supplied event.
Definition: NeutralFinalState.cc:17
FinalState(double mineta=-MAXRAPIDITY, double maxeta=MAXRAPIDITY, double minpt=0.0 *GeV)
Definition: FinalState.cc:9
static const double MAXRAPIDITY
A sensible default maximum value of rapidity for Rivet analyses to use.
Definition: Rivet.hh:24
Base class for all Rivet projections.
Definition: Projection.hh:28
virtual const Projection * clone() const
Clone on the heap.
Definition: NeutralFinalState.hh:36