rivet is hosted by Hepforge, IPPP Durham
Rivet  2.7.0
ImpactParameterProjection.hh
1 // -*- C++ -*-
2 #ifndef RIVET_IMPACTPARAMETERPROJECTION_HH
3 #define RIVET_IMPACTPARAMETERPROJECTION_HH
4 
5 #include "Rivet/Projections/SingleValueProjection.hh"
6 
7 
8 namespace Rivet {
9 
11 
12 public:
13 
15  setName("ImpactParameterProjection");
16  }
17 
20 
21 protected:
22 
23  void project(const Event& e) {
24  clear();
25  const HepMC::HeavyIon * hi = e.genEvent()->heavy_ion();
26  if ( hi && hi->impact_parameter() >= 0.0 )
27  set(hi->impact_parameter());
28  }
29 
30  int compare(const Projection& p) const {
31  return 0;
32  }
33 
34 };
35 
36 }
37 
38 #endif
39 
void setName(const std::string &name)
Used by derived classes to set their name.
Definition: Projection.hh:133
Definition: ALICE_2010_I880049.cc:13
int compare(const Projection &p) const
Definition: ImpactParameterProjection.hh:30
DEFAULT_RIVET_PROJ_CLONE(ImpactParameterProjection)
Clone on the heap.
Base class for projections returning a single floating point value.
Definition: SingleValueProjection.hh:18
const GenEvent * genEvent() const
The generated event obtained from an external event generator.
Definition: Event.hh:51
Definition: Event.hh:22
void project(const Event &e)
Definition: ImpactParameterProjection.hh:23
Base class for all Rivet projections.
Definition: Projection.hh:29
Definition: ImpactParameterProjection.hh:10
void clear()
Unset the value.
Definition: SingleValueProjection.hh:47