Commit 6dc3735a authored by Leif Lönnblad's avatar Leif Lönnblad

Changed the use of HeavyIon information from HepMC to use the HepMCHeavyIon projection.

parent 6de47da2
......@@ -9,6 +9,7 @@
#include "Rivet/Projections/SingleValueProjection.hh"
#include "Rivet/Tools/Percentile.hh"
#include "Rivet/Tools/RHICCommon.hh"
#include "Rivet/Projections/HepMCHeavyIon.hh"
namespace Rivet {
......@@ -36,6 +37,9 @@ void init() {
declare(ChargedFinalState(Cuts::abseta < 0.5 &&
Cuts::absrap < 0.1 && Cuts::pT > 0.2), "CFS");
// Access the HepMC heavy ion info
declare(HepMCHeavyIon(), "HepMC");
// Book histograms
// Energy bins
......@@ -188,8 +192,8 @@ void init() {
const double c = cent();
/// Determine the impact parameter
const HepMC::HeavyIon* hi = event.genEvent()->heavy_ion();
const double Npart = hi->Npart_targ();
const HepMCHeavyIon & hi = apply<HepMCHeavyIon>(event, "HepMC");
const double Npart = hi.Npart_targ();
/// Determine the centrality bin
if (c < 5)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment