rivet is hosted by Hepforge, IPPP Durham
Rivet 4.0.0
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
8namespace Rivet {
9
10
14 class DISFinalState: public FinalState {
15 public:
16
19
21 DISFinalState(const FinalState& fs, DISFrame boosttype)
22 : _boosttype(boosttype)
23 {
24 setName("DISFinalState");
25 declare(fs, "FS");
26 declare(DISKinematics(), "Kinematics");
27 }
28
29
32 : DISFinalState(fs, boosttype)
33 { }
34
35
41 DISFinalState(const Cut& c, DISFrame boosttype)
42 : DISFinalState(FinalState(c), boosttype)
43 { }
44
45
53 DISFinalState(DISFrame boosttype, const Cut& c)
54 : DISFinalState(FinalState(c), boosttype)
55 { }
56
57
58 // /// @brief Constructor with default FinalState
59 // DISFinalState(BoostFrame boosttype)
60 // : DISFinalState(FinalState(), boosttype)
61 // { }
62
63
66
68
69
71 using Projection::operator =;
72
73
76 return getProjection<DISKinematics>("Kinematics");
77 }
78
79
80 protected:
81
83 void project(const Event& e);
84
85
87 CmpState compare(const Projection& p) const {
88 const DISFinalState& other = dynamic_cast<const DISFinalState&>(p);
89 return mkNamedPCmp(p, "Kinematics") || mkNamedPCmp(p, "FS") || cmp(_boosttype, other._boosttype);
90 }
91
92
93 protected:
94
95 DISFrame _boosttype;
96
97 };
98
99
100}
101
102#endif
Final state particles boosted to the hadronic center of mass system.
Definition DISFinalState.hh:14
RIVET_DEFAULT_PROJ_CLONE(DISFinalState)
Clone on the heap.
void project(const Event &e)
Apply the projection on the supplied event.
DISFinalState(DISFrame boosttype, const FinalState &fs=FinalState())
Constructor with optional FinalState.
Definition DISFinalState.hh:31
DISFinalState(DISFrame boosttype, const Cut &c)
Constructor with explicit cuts to define final-state particles.
Definition DISFinalState.hh:53
CmpState compare(const Projection &p) const
Compare projections.
Definition DISFinalState.hh:87
const DISKinematics & kinematics()
Get the associated DISKinematics (to avoid needing a separate projection)
Definition DISFinalState.hh:75
DISFinalState(const Cut &c, DISFrame boosttype)
Constructor with explicit cuts to define final-state particles.
Definition DISFinalState.hh:41
DISFinalState(const FinalState &fs, DISFrame boosttype)
Constructor with explicit FinalState.
Definition DISFinalState.hh:21
Get the DIS kinematic variables and relevant boosts for an event.
Definition DISKinematics.hh:19
Representation of a HepMC event, and enabler of Projection caching.
Definition Event.hh:22
Project out all final-state particles in an event. Probably the most important projection in Rivet!
Definition FinalState.hh:12
const PROJ & declare(const PROJ &proj, const std::string &name) const
Register a contained projection (user-facing version)
Definition ProjectionApplier.hh:175
Base class for all Rivet projections.
Definition Projection.hh:29
void setName(const std::string &name)
Used by derived classes to set their name.
Definition Projection.hh:148
Cmp< Projection > mkNamedPCmp(const Projection &otherparent, const std::string &pname) const
Definition MC_CENT_PPB_Projections.hh:10
DISFrame
Type of DIS boost to apply.
Definition DISKinematics.hh:15
Cmp< T > cmp(const T &t1, const T &t2)
Global helper function for easy creation of Cmp objects.
Definition Cmp.hh:255