Rivet  1.8.3
MergedFinalState.hh
1 // -*- C++ -*-
2 #ifndef RIVET_MergedFinalState_HH
3 #define RIVET_MergedFinalState_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 MergedFinalState : public FinalState {
17 
18  public:
19 
21 
22  MergedFinalState(const FinalState& fspa, const FinalState& fspb) {
23  setName("MergedFinalState");
24  addProjection(fspa, "FSA");
25  addProjection(fspb, "FSB");
26  }
27 
29  virtual const Projection* clone() const {
30  return new MergedFinalState(*this);
31  }
33 
34  protected:
35 
37  void project(const Event& e);
38 
40  int compare(const Projection& p) const;
41  };
42 
43 
44 }
45 
46 
47 #endif
void setName(const std::string &name)
Used by derived classes to set their name.
Definition: Projection.hh:120
Definition: MC_JetAnalysis.hh:9
virtual const Projection * clone() const
Clone on the heap.
Definition: MergedFinalState.hh:29
int compare(const Projection &p) const
Compare projections.
Definition: MergedFinalState.cc:11
Definition: Event.hh:22
Get final state particles merged from two FinalState projections.
Definition: MergedFinalState.hh:16
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
Base class for all Rivet projections.
Definition: Projection.hh:28
void project(const Event &e)
Apply the projection on the supplied event.
Definition: MergedFinalState.cc:17