Rivet: /Users/chrisg/software/rivet/include/Rivet/Projections/ImpactParameterProjection.hh Source File

| Rivet 3.1.9

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
11 class ImpactParameterProjection: public SingleValueProjection {
12 public:
13
14 ImpactParameterProjection() {
15 setName("ImpactParameterProjection");
16 declare(HepMCHeavyIon(), "HepMC");
17 }
18
20 DEFAULT_RIVET_PROJ_CLONE(ImpactParameterProjection);
21
23 using Projection::operator =;
24
25
26 protected:
27
28 void project(const Event& e) {
29 clear();
30 set(apply<HepMCHeavyIon>(e, "HepMC").impact_parameter());
31 }
32
33 CmpState compare(const Projection& p) const {
34 return CmpState::EQ;
35 }
36
37 };
38
39
40}
41
42#endif
Rivet::Event
Representation of a HepMC event, and enabler of Projection caching.
Definition Event.hh:22
Rivet::HepMCHeavyIon
Definition HepMCHeavyIon.hh:12
Rivet::ImpactParameterProjection
Definition ImpactParameterProjection.hh:11
Rivet::ImpactParameterProjection::project
void project(const Event &e)
Definition ImpactParameterProjection.hh:28
Rivet::ImpactParameterProjection::compare
CmpState compare(const Projection &p) const
Definition ImpactParameterProjection.hh:33
Rivet::ImpactParameterProjection::DEFAULT_RIVET_PROJ_CLONE
DEFAULT_RIVET_PROJ_CLONE(ImpactParameterProjection)
Clone on the heap.
Rivet::ProjectionApplier::declare
const PROJ & declare(const PROJ &proj, const std::string &name)
Register a contained projection (user-facing version)
Definition ProjectionApplier.hh:170
Rivet::Projection
Base class for all Rivet projections.
Definition Projection.hh:29
Rivet::Projection::setName
void setName(const std::string &name)
Used by derived classes to set their name.
Definition Projection.hh:142
Rivet::SingleValueProjection
Base class for projections returning a single floating point value.
Definition SingleValueProjection.hh:17
Rivet::SingleValueProjection::set
void set(double v)
Definition SingleValueProjection.hh:55
Rivet::SingleValueProjection::clear
void clear()
Unset the value.
Definition SingleValueProjection.hh:58
Rivet::Kin::p
double p(const ParticleBase &p)
Unbound function access to p.
Definition ParticleBaseUtils.hh:684
Rivet
Definition MC_Cent_pPb.hh:10