rivet is hosted by Hepforge, IPPP Durham
Rivet 3.1.6
GeneratedPercentileProjection.hh
1// -*- C++ -*-
2#ifndef RIVET_GENERATEDPERCENTILEPROJECTION_HH
3#define RIVET_GENERATEDPERCENTILEPROJECTION_HH
4
5#include "Rivet/Projections/SingleValueProjection.hh"
6#include "Rivet/Projections/HepMCHeavyIon.hh"
7
8namespace Rivet {
9
11public:
12
14 setName("GeneratedPercentileProjection");
15 declare(HepMCHeavyIon(), "HepMC");
16 }
17
20
21protected:
22
23 void project(const Event& e) {
24 clear();
25 set(apply<HepMCHeavyIon>(e, "HepMC").centrality());
26 }
27
28 CmpState compare(const Projection& p) const {
29 return CmpState::EQ;
30 }
31
32};
33
34}
35
36#endif
Representation of a HepMC event, and enabler of Projection caching.
Definition: Event.hh:22
Definition: GeneratedPercentileProjection.hh:10
DEFAULT_RIVET_PROJ_CLONE(GeneratedPercentileProjection)
Clone on the heap.
CmpState compare(const Projection &p) const
Definition: GeneratedPercentileProjection.hh:28
void project(const Event &e)
Definition: GeneratedPercentileProjection.hh:23
Definition: HepMCHeavyIon.hh:12
const PROJ & declare(const PROJ &proj, const std::string &name)
Register a contained projection (user-facing version)
Definition: ProjectionApplier.hh:170
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:142
Base class for projections returning a single floating point value.
Definition: SingleValueProjection.hh:17
void set(double v)
Definition: SingleValueProjection.hh:51
void clear()
Unset the value.
Definition: SingleValueProjection.hh:54
double p(const ParticleBase &p)
Unbound function access to p.
Definition: ParticleBaseUtils.hh:653
Definition: MC_Cent_pPb.hh:10