Rivet  3.1.0
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 
8 namespace Rivet {
9 
11 public:
12 
14  setName("GeneratedPercentileProjection");
15  }
16 
19 
20 protected:
21 
22  void project(const Event& e) {
23  clear();
24  set(apply<HepMCHeavyIon>(e, "HepMC").centrality());
25  }
26 
27  CmpState compare(const Projection& p) const {
28  return CmpState::EQ;
29  }
30 
31 };
32 
33 }
34 
35 #endif
void setName(const std::string &name)
Used by derived classes to set their name.
Definition: Projection.hh:142
Definition: MC_Cent_pPb.hh:10
Definition: GeneratedPercentileProjection.hh:10
Base class for projections returning a single floating point value.
Definition: SingleValueProjection.hh:17
DEFAULT_RIVET_PROJ_CLONE(GeneratedPercentileProjection)
Clone on the heap.
void project(const Event &e)
Definition: GeneratedPercentileProjection.hh:22
Representation of a HepMC event, and enabler of Projection caching.
Definition: Event.hh:22
CmpState compare(const Projection &p) const
Definition: GeneratedPercentileProjection.hh:27
Base class for all Rivet projections.
Definition: Projection.hh:29
void clear()
Unset the value.
Definition: SingleValueProjection.hh:54