4 #include "boost/lexical_cast.hpp" 20 #include "HepMC/GenEvent.h" 21 #include "HepMC/HeavyIon.h" 22 #include "HepMC/SimpleVector.h" 24 #include "CLHEP/Random/RandomEngine.h" 26 static const double pi = 3.14159265358979;
60 bmax_(pset.getParameter<double>(
"bMax")),
61 bmin_(pset.getParameter<double>(
"bMin")),
62 efrm_(pset.getParameter<double>(
"comEnergy")),
63 frame_(pset.getParameter<
string>(
"frame")),
64 proj_(pset.getParameter<
string>(
"proj")),
65 targ_(pset.getParameter<
string>(
"targ")),
66 iap_(pset.getParameter<
int>(
"iap")),
67 izp_(pset.getParameter<
int>(
"izp")),
68 iat_(pset.getParameter<
int>(
"iat")),
69 izt_(pset.getParameter<
int>(
"izt")),
73 rotate_(pset.getParameter<
bool>(
"rotateEventPlane")) {
88 HepMC::HeavyIon*
hi =
new HepMC::HeavyIon(
himain1.jatt,
104 evt->set_heavy_ion(*hi);
132 p->suggest_barcode(barcode);
147 HepMC::GenVertex*
vertex =
new HepMC::GenVertex(HepMC::FourVector(x, y, z, t),
id);
158 float f_bmin =
bmin_;
159 float f_bmax =
bmax_;
177 HepMC::GenVertex* vertice;
180 vector<int> mother_ids;
181 vector<HepMC::GenVertex*> prods;
183 vertice =
new HepMC::GenVertex(HepMC::FourVector(0, 0, 0, 0), 0);
184 evt->add_vertex(vertice);
185 if (!evt->signal_process_vertex())
186 evt->set_signal_process_vertex(vertice);
188 const unsigned int knumpart =
himain1.natt;
190 for (
unsigned int ipart = 0; ipart < knumpart; ipart++) {
191 int mid =
himain2.katt[2][ipart] - 1;
195 mother_ids.push_back(mid);
196 LogDebug(
"DecayChain") <<
"Mother index : " << mid;
199 LogDebug(
"Hijing") <<
"Number of particles in vector " << particles.size();
201 for (
unsigned int ipart = 0; ipart < particles.size(); ipart++) {
204 int mid = mother_ids[ipart];
205 LogDebug(
"DecayChain") <<
"Particle " << ipart;
206 LogDebug(
"DecayChain") <<
"Mother's ID " << mid;
207 LogDebug(
"DecayChain") <<
"Particle's PDG ID " << part->pdg_id();
210 if (part->status() == 1 &&
211 sqrt(part->momentum().px() * part->momentum().px() + part->momentum().py() * part->momentum().py()) == 0)
215 vertice->add_particle_out(part);
221 LogDebug(
"DecayChain") <<
"Mother's PDG ID " << mother->pdg_id();
222 HepMC::GenVertex* prod_vertex = mother->end_vertex();
224 prod_vertex = prods[ipart];
225 prod_vertex->add_particle_in(mother);
227 evt->add_vertex(prod_vertex);
228 prods[ipart] =
nullptr;
230 prod_vertex->add_particle_out(part);
235 for (
unsigned int i = 0;
i < prods.size();
i++) {
256 strlen(frame.data()),
258 strlen(targ.data()));
bool initializeForInternalPartons()
HepMC::GenParticle * build_hijing(int index, int barcode)
Sin< T >::type sin(const T &t)
~HijingHadronizer() override
static const std::string kPythia6
void add_heavy_ion_rec(HepMC::GenEvent *evt)
float rlu_(unsigned int *iseed)
HepMC::GenVertex * build_hijing_vertex(int i, int id)
Cos< T >::type cos(const T &t)
static CLHEP::HepRandomEngine * hijRandomEngine
std::unique_ptr< HepMC::GenEvent > & event()
const char * classname() const
bool get_particles(HepMC::GenEvent *evt)
float ran_(unsigned int *iseed)
void doSetRandomEngine(CLHEP::HepRandomEngine *v) override
bool generatePartonsAndHadronize()
bool call_hijset(double efrm, std::string frame, std::string proj, std::string targ, int iap, int izp, int iat, int izt)
bool declareStableParticles(const std::vector< int > &)