17#include "GaudiKernel/MsgStream.h"
27#include "CLHEP/Random/RandFlat.h"
28#include "CLHEP/Vector/LorentzVector.h"
35 void hyinit_(
double*,
double*,
int*,
double*,
double*,
double*,
int*);
41 ISvcLocator* pSvcLocator):
GenModule(name,pSvcLocator)
52 ATH_MSG_INFO(
"===> March 13 2008 HYDJET INTERFACE VERSION. \n" );
132 return StatusCode::SUCCESS;
168 int np = (int) round(
m_hyfpar.npart()/2);
169 int nt = (int) round(
m_hyfpar.npart()/2);
170 int n0 = (int) round(
m_hyfpar.nbcol());
180 event_params = std::make_unique<HijingEventParams>(np, nt, n0, n01, n10, n11, natt, jatt, b, bphi);
182 ATH_MSG_INFO(
"\n=================================================\n"
183 <<
" HYDJET event description: \n"
184 <<
" b = " << b <<
" fm \n"
185 <<
" # total participants = " <<
m_hyfpar.npart() <<
"\n"
186 <<
" # collisions = " <<
m_hyfpar.nbcol() <<
"\n"
187 <<
" # jets = " <<
m_hyjpar.njet() <<
"\n"
188 <<
" # pythia particles = " <<
m_hyfpar.npyt() <<
"\n"
189 <<
" # hydro particles = " <<
m_hyfpar.nhyd() <<
"\n"
190 <<
"=================================================\n" );
193 return StatusCode::SUCCESS;
200 return StatusCode::SUCCESS;
219 evt->add_vertex( v1 );
221 double eproj =
m_e/2.0;
222 int proj_id = (int)
m_a;
225 double etarg =
m_e/2.0;
226 int targ_id = (int)
m_a;
231 for (
int i = 1; i <=
m_lujets.n(); ++i)
245 return StatusCode::SUCCESS;
302 std::string myparam = mystring.
piece<std::string>(1);
307 else if (myparam ==
"a")
311 else if (myparam ==
"ifb")
315 else if (myparam ==
"bmin")
320 else if (myparam ==
"bmax")
325 else if (myparam ==
"bfix")
330 else if (myparam ==
"nh")
334 else if (myparam ==
"nseed")
338 else if (myparam ==
"ytfl")
342 else if (myparam ==
"ylfl")
346 else if (myparam ==
"tf")
350 else if (myparam ==
"fpart")
354 else if (myparam ==
"nhsel")
358 else if (myparam ==
"ishad")
362 else if (myparam ==
"ptmin")
368 else if (myparam ==
"ienglu")
372 else if (myparam ==
"ianglu")
376 else if (myparam ==
"t0")
380 else if (myparam ==
"tau0")
384 else if (myparam ==
"nf")
388 else if (myparam ==
"mstu")
390 int myelem = mystring.
piece<
int>(2);
393 else if (myparam ==
"paru")
395 int myelem = mystring.
piece<
int>(2);
398 else if (myparam ==
"mstj")
400 int myelem = mystring.
piece<
int>(2);
403 else if (myparam ==
"parj")
405 int myelem = mystring.
piece<
int>(2);
408 else if (myparam ==
"msel")
412 else if (myparam ==
"mselpd")
416 else if (myparam ==
"msub")
418 int myelem = mystring.
piece<
int>(2);
421 else if (myparam ==
"kfin")
423 int myelem1 = mystring.
piece<
int>(2);
424 int myelem2 = mystring.
piece<
int>(3);
427 else if (myparam ==
"ckin")
429 int myelem = mystring.
piece<
int>(2);
432 else if (myparam ==
"mstp")
434 int myelem = mystring.
piece<
int>(2);
437 else if (myparam ==
"parp")
439 int myelem = mystring.
piece<
int>(2);
442 else if (myparam ==
"msti")
444 int myelem = mystring.
piece<
int>(2);
447 else if (myparam ==
"pari")
449 int myelem = mystring.
piece<
int>(2);
454 ATH_MSG_ERROR(
" ERROR in HIJING INITIALIZATION PARAMETERS " << myparam
455 <<
" is an invalid parameter !" );
#define ATH_CHECK
Evaluate an expression and check for errors.
void hyinit_(double *, double *, int *, double *, double *, double *, int *)
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
void GeVToMeV(HepMC::GenEvent *evt)
Scale event energies/momenta by x 1000.
GenModule(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
virtual StatusCode callGenerator()
For calling the generator on each iteration of the event loop.
CommandVector m_InitializeVector
virtual StatusCode fillEvt(HepMC::GenEvent *evt)
For filling the HepMC event object.
Hydjet(const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode genInitialize()
For initializing the generator, if required.
virtual StatusCode genFinalize()
For finalising the generator, if required.
void set_user_params(void)
SG::WriteHandleKey< HijingEventParams > m_event_paramsKey
Utility object for parsing a string into tokens and returning them as a variety of types.
T piece(size_t num) const
Templated function to get the num'th token as any numeric type.
HepMC::GenVertex * GenVertexPtr
GenVertexPtr newGenVertexPtr(const HepMC::FourVector &pos=HepMC::FourVector(0.0, 0.0, 0.0, 0.0), const int i=0)
GenParticlePtr newGenParticlePtr(const HepMC::FourVector &mom=HepMC::FourVector(0.0, 0.0, 0.0, 0.0), int pid=0, int status=0)
void set_signal_process_id(GenEvent *e, const int i)