Rivet  1.8.3
DISFinalState.hh
1 // -*- C++ -*-
2 #ifndef RIVET_DISFinalState_HH
3 #define RIVET_DISFinalState_HH
4 
5 #include "Rivet/Projections/FinalState.hh"
6 #include "Rivet/Projections/DISKinematics.hh"
7 
8 namespace Rivet {
9 
10 
14  class DISFinalState: public FinalState {
15  public:
16 
18  enum BoostType { HCM, BREIT };
19 
20 
22 
23 
25  DISFinalState(const DISKinematics& kinematicsp, BoostType boosttype)
26  : _boosttype(boosttype)
27  {
28  setName("DISFinalState");
29  addProjection(kinematicsp, "Kinematics");
30  }
31 
33  virtual const Projection* clone() const {
34  return new DISFinalState(*this);
35  }
36 
38 
39 
40  protected:
41 
43  void project(const Event& e);
44 
46  int compare(const Projection& p) const {
47  const DISFinalState& other = dynamic_cast<const DISFinalState&>(p);
48  return mkNamedPCmp(p, "Kinematics") || cmp(_boosttype, other._boosttype);
49  }
50 
51 
52  private:
53 
54  BoostType _boosttype;
55 
56  };
57 
58 
59 }
60 
61 #endif
void setName(const std::string &name)
Used by derived classes to set their name.
Definition: Projection.hh:120
Get the DIS kinematic variables and relevant boosts for an event.
Definition: DISKinematics.hh:15
void project(const Event &e)
Apply the projection on the supplied event.
Definition: DISFinalState.cc:8
Final state particles boosted to the hadronic center of mass system.
Definition: DISFinalState.hh:14
Definition: Event.hh:22
int compare(const Projection &p) const
Compare projections.
Definition: DISFinalState.hh:46
BoostType
Type of DIS boost to apply.
Definition: DISFinalState.hh:18
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
Cmp< Projection > mkNamedPCmp(const Projection &otherparent, const std::string &pname) const
Definition: Projection.cc:51
Base class for all Rivet projections.
Definition: Projection.hh:28
DISFinalState(const DISKinematics &kinematicsp, BoostType boosttype)
Constructor.
Definition: DISFinalState.hh:25
virtual const Projection * clone() const
Clone on the heap.
Definition: DISFinalState.hh:33
Cmp< T > cmp(const T &t1, const T &t2)
Global helper function for easy creation of Cmp objects.
Definition: Cmp.hh:285