rivet is hosted by Hepforge, IPPP Durham
Rivet 4.0.0
ImpactParameterProjection.hh
1// -*- C++ -*-
2#ifndef RIVET_IMPACTPARAMETERPROJECTION_HH
3#define RIVET_IMPACTPARAMETERPROJECTION_HH
4
5#include "Rivet/Projections/SingleValueProjection.hh"
6#include "Rivet/Projections/HepMCHeavyIon.hh"
7
8
9namespace Rivet {
10
12 public:
13
14 using SingleValueProjection::operator=;
15
17 setName("ImpactParameterProjection");
18 declare(HepMCHeavyIon(), "HepMC");
19 }
20
23
25 using Projection::operator =;
26
27
28 protected:
29
30 void project(const Event& e) {
31 clear();
32 setValue(apply<HepMCHeavyIon>(e, "HepMC").impact_parameter());
33 }
34
35 CmpState compare(const Projection&) const {
36 return CmpState::EQ;
37 }
38
39 };
40
41}
42
43#endif
Representation of a HepMC event, and enabler of Projection caching.
Definition Event.hh:22
Definition HepMCHeavyIon.hh:12
Definition ImpactParameterProjection.hh:11
RIVET_DEFAULT_PROJ_CLONE(ImpactParameterProjection)
Clone on the heap.
void project(const Event &e)
Definition ImpactParameterProjection.hh:30
CmpState compare(const Projection &) const
Definition ImpactParameterProjection.hh:35
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
Base class for projections returning a single floating point value.
Definition SingleValueProjection.hh:17
void setValue(double v)
Set the value.
Definition SingleValueProjection.hh:48
void clear()
Unset the value.
Definition SingleValueProjection.hh:54
Definition MC_CENT_PPB_Projections.hh:10