9 #include "Pythia8/HIUserHooks.h"
10 #include "Pythia8Plugins/HepMC2.h"
11 #include "HepMC/GenEvent.h"
12 #include "HepMC/IO_GenEvent.h"
16 #include "Rivet/Rivet.hh"
40 : pythia(&pytin), filename(fname), rivet(0), igBeam(false) {}
62 preloads.push_back(prel);
83 rivet =
new Rivet::AnalysisHandler(rname);
84 rivet->setIgnoreBeams(igBeam);
85 Rivet::addAnalysisLibPath(
".");
86 for(
int i = 0, N = preloads.size(); i < N; ++i)
87 rivet->readData(preloads[i]);
88 for (set<string>::iterator it = analyses.begin();
89 it != analyses.end(); ++it) {
90 rivet->addAnalysis(*it);
100 this->
operator()(pythia->event, -1, &pythia->info, &pythia->settings);
111 converter.fill_next_event(event, &geneve, ievnum, pyinfo, pyset,
112 append, rootParticle, iBarcode);
113 if ( pyinfo && pyinfo->hiInfo ) {
116 ion.
set_Ncoll(pyinfo->hiInfo->nAbsProj() +
117 pyinfo->hiInfo->nDiffProj() +
118 pyinfo->hiInfo->nAbsTarg() +
119 pyinfo->hiInfo->nDiffTarg() -
120 pyinfo->hiInfo->nCollND() -
121 pyinfo->hiInfo->nCollDD());
123 pyinfo->hiInfo->nDiffProj());
125 pyinfo->hiInfo->nDiffTarg());
129 if ( !rivet )
init(geneve);
130 rivet->analyze(geneve);
138 if ( !rivet )
return;
140 rivet->writeData(filename);
160 set<string> analyses;
165 vector<string> preloads;
170 Rivet::AnalysisHandler * rivet;
void addRunName(const string runname)
void ignoreBeams(bool flagIn)
void set_impact_parameter(const float &f)
set Impact Parameter in fm
void set_Npart_proj(const int &i)
set number of projectile participants
void init(const HepMC::GenEvent &gev)
void set_Npart_targ(const int &i)
set number of target participants
Pythia8Rivet(Pythia &pytin, string fname)
void operator()(Event &event, int ievnum=-1, const Pythia8::Info *pyinfo=0, Pythia8::Settings *pyset=0, bool append=false, HepMC::GenParticle *rootParticle=0, int iBarcode=-1)
void set_Ncoll(const int &i)
set number of NN (nucleon-nucleon) collisions
The GenEvent class is the core of HepMC.
void addAnalysis(string ana)
void set_heavy_ion(const HeavyIon &ion)
provide a pointer to the HeavyIon container
void set_Ncoll_hard(const int &i)
set number of hard scatterings
void addPreload(string prel)
The HeavyIon class stores information about heavy ions.
The GenParticle class contains information about generated particles.