ATLAS Offline Software
Hijing.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // -------------------------------------------------------------
6 // Generators/Hijing.cxx Description: Allows the user
7 // to generate hijing events and store the result in the
8 // Transient Store.
9 //
10 // AuthorList:
11 // Georgios Stavropoulos: Initial Code October 2002
12 // Brian Cole, Mikhail Leltchouk, Andrzej Olszewski: 2006, 2007
13 // Modified:
14 // 2007-Feb Alden Stradling: Added vertex shifting and made options settable in jO.
15 // 2007-Sep Aaron Angerami: keepSpectators option.
16 // 2007-Nov Brian Cole, Mikhail Leltchouk: each vertex is added to the event before particles are added to the vertex
17 // - this fixed bug #30991 for release 13.1.0 and for HepMC 2.3.0 where the 'set's comparison operates
18 // on the bcode rather than on the pointer.
19 // 2008-Jul Borut Kersevan: randomizing the left<->right direction by mirroring momenta settable in jobOpts for beamgas
20 // 2023-Aug Aaron Angerami: adding keepAllDecayVertices option to keep decay vertices for strong decays (default=true)
21 
22 #include "Hijing_i/Hijing.h"
23 #include "Hijing_i/VertexShift.h"
24 
25 #include "GaudiKernel/MsgStream.h"
26 
27 #include "CxxUtils/StringParse.h"
28 
29 #include "AtlasHepMC/GenEvent.h"
30 #include "AtlasHepMC/GenVertex.h"
31 #include "AtlasHepMC/GenParticle.h"
32 #include "AtlasHepMC/HeavyIon.h"
33 
34 #include <stdlib.h>
35 
36 #include "CLHEP/Random/RandFlat.h"
37 #include "CLHEP/Geometry/Point3D.h"
38 
40 
41 namespace {
42  static CLHEP::HepRandomEngine *p_Engine;
43  static std::string hijing_stream = "HIJING_INIT";
44 }
45 
46 // calls to fortran routines
47 extern "C"
48 {
49  float atl_ran_( int* )
50  {
51  return (float) CLHEP::RandFlat::shoot(p_Engine);
52  }
53 
54  void hijset_(float*,
55  const char*,
56  const char*,
57  const char*,
58  int*,
59  int*,
60  int*,
61  int*,
62  long int,
63  long int,
64  long int);
65  void hijing_(const char*, float*, float*, long int);
66 }
67 
68 Hijing::Hijing(const std::string& name,
69  ISvcLocator* pSvcLocator): GenModule(name,pSvcLocator)
70 {
71  declareProperty("Initialize", m_InitializeVector);
72  declareProperty("partonStoreMinPt", m_partonStoreMinPt);
73  declareProperty("vertexOffsetCut", m_vertexOffsetCut);
74  declareProperty("randomizeVertices", m_rand); // Randomize for beam gas
75  declareProperty("selectVertex", m_sel); // Select vertex location (off for random)
76  declareProperty("wide", m_wide); // Allow randoms off the beamline (out to the pipe)
77  declareProperty("x", m_x);
78  declareProperty("y", m_y);
79  declareProperty("z", m_z);
80  declareProperty("keepSpectators", m_spec);
81  declareProperty("randomizeP", m_prand); //BPK randomizes the left<->right direction by mirroring momenta for beam gas
82  declareProperty("keepAllDecayVertices", m_keepAllDecayVertices);
83 }
84 
86 {
88 
89  // Initialisation of input parameters
90  std::cout << "MetaData: generator = Hijing "
91  << HIJINGVERSION << std::endl;
92  ATH_MSG_INFO( "===> Hijing initialising \n" );
93  if( m_rand ){
94  ATH_MSG_INFO( "===> Vertex randomization ON." );
95  }
96  if( m_wide ){
97  ATH_MSG_INFO( "===> Vertex rand covers whole beampipe." );
98  }
99  //BPK
100  if( m_prand ) ATH_MSG_INFO( "===> Random Momentum Mirroring enabled" );
101 
102  //CLHEP::HepRandomEngine* engine
103  p_Engine = getRandomEngineDuringInitialize(hijing_stream, m_randomSeed, m_dsid); // NOT THREAD-SAFE
104  hijing_stream = "HIJING";
105 
106  // Set the users' initialisation parameters choices
107  set_user_params();
108 
109  const char* frame = m_frame.c_str();
110  const char* proj = m_proj.c_str();
111  const char* targ = m_targ.c_str();
112 
113  hijset_( &m_efrm, frame, proj, targ, &m_iap, &m_izp, &m_iat, &m_izt,
114  strlen(frame), strlen(proj), strlen(targ) );
115 
116  ATH_MSG_INFO( "\n=================================================\n"
117  << " HIJING initialization results: \n"
118  << " Total sigma = " << m_hiparnt.hint1(13) << " mb\n"
119  << " Inelastic sigma = " << m_hiparnt.hint1(12) << " mb\n"
120  << " Jet sigma = " << m_hiparnt.hint1(11) << " mb\n"
121  << "=================================================\n" );
122 
123 // std::cout << " PRINTING HIPR1 " << std::endl;
124 // for (int i = 1; i <= m_hiparnt.lenHipr1(); ++i)
125 // std::cout << i << ":" << m_hiparnt.hipr1(i) << ", ";
126 // std::cout << std::endl;
127 // std::cout << " PRINTING IHPR2 " << std::endl;
128 // for (int i = 1; i <= m_hiparnt.lenIhpr2(); ++i)
129 // std::cout << i << ":" << m_hiparnt.ihpr2(i) << ", ";
130 // std::cout << std::endl;
131 // std::cout << " PRINTING HINT1 " << std::endl;
132 // for (int i = 1; i <= m_hiparnt.lenHint1(); ++i)
133 // std::cout << i << ":" << m_hiparnt.hint1(i) << ", ";
134 // std::cout << std::endl;
135 // std::cout << " PRINTING IHNT2 " << std::endl;
136 // for (int i = 1; i <= m_hiparnt.lenIhnt2(); ++i)
137 // std::cout << i << ":" << m_hiparnt.ihnt2(i) << ", ";
138 // std::cout << std::endl;
139 
140 // std::cout << " NSEED = " << m_ranseed.nseed() << std::endl;
141 
142  return StatusCode::SUCCESS;
143 }
144 
146 {
147  ATH_MSG_INFO( " HIJING generating. \n" );
148 
149  // Save the random number seeds in the event
150  //Re-seed the random number stream
151  long seeds[7];
152  const EventContext& ctx = Gaudi::Hive::currentContext();
153  ATHRNG::calculateSeedsMC21(seeds, hijing_stream, ctx.eventID().event_number(), m_dsid, m_randomSeed);
154  p_Engine->setSeeds(seeds, 0); // NOT THREAD-SAFE
155  m_seeds.clear();
156  m_seeds.push_back(seeds[0]);
157  m_seeds.push_back(seeds[1]);
158 
159  // Generate event
160  const char* frame = m_frame.c_str();
161  hijing_(frame, &m_bmin, &m_bmax, strlen(frame));
162 
163  // Check for error using the new (custom) error return
164  //
165  int errorStatus = m_himain1.ierrstat();
166  if (errorStatus != 0) {
167  ATH_MSG_ERROR( "Error returned from HIJING, value = " << errorStatus );
168  return StatusCode::FAILURE;
169  }
170 
171  // update event counter
172  ++m_events;
173 
174  // store hijing event parameters
175  // -----------------------------
176  ATH_MSG_DEBUG( "New HijingEventParams" );
177  int np = m_himain1.np();
178  int nt = m_himain1.nt();
179  int n0 = m_himain1.n0();
180  int n01 = m_himain1.n01();
181  int n10 = m_himain1.n10();
182  int n11 = m_himain1.n11();
183  int natt = m_himain1.natt();
184  int jatt = m_himain1.jatt();
185  float b = m_hiparnt.hint1(19);
186  float bphi = m_hiparnt.hint1(20);
187 
189  event_params = std::make_unique<HijingEventParams>(np, nt, n0, n01, n10, n11, natt, jatt, b, bphi);
190 
191  ATH_MSG_INFO( "\n=================================================\n"
192  << " HIJING event description: \n"
193  << " b = " << b << " fm \n"
194  << " # proj participants = " << np << "\n"
195  << " # targ participants = " << nt << "\n"
196  << " # final particles = " << natt << "\n"
197  << "=================================================\n" );
198 
199  ATH_MSG_DEBUG( " HIJING generating done. \n" );
200  return StatusCode::SUCCESS;
201 }
202 
205 {
206  ATH_MSG_INFO( " HIJING Ending. \n" );
207  return StatusCode::SUCCESS;
208 }
209 
211 Hijing::fillEvt(HepMC::GenEvent* evt)
212 {
213  // These two parameters need to be made user settable (done - AS)
214  //
215  MsgStream log(msgSvc(), name());
216  ATH_MSG_INFO( " HIJING Filing. \n" );
217 
218  // Set the event number
219  evt->set_event_number( m_events );
220 
221  // Set the random generator seeds
223 
224  // Set the generator id
226 
227  // Store collision parameters
228  int np = m_himain1.np();
229  int nt = m_himain1.nt();
230  int n0 = m_himain1.n0();
231  int n01 = m_himain1.n01();
232  int n10 = m_himain1.n10();
233  int n11 = m_himain1.n11();
234  //int natt = m_himain1.natt();
235  int jatt = m_himain1.jatt();
236  float b = m_hiparnt.hint1(19);
237  float bphi = m_hiparnt.hint1(20);
238 
239  float sigmainel = m_hiparnt.hint1(12);
240 
241  #ifdef HEPMC3
242  HepMC::GenHeavyIonPtr ion= std::make_shared<HepMC::GenHeavyIon>();
243  ion->Ncoll_hard=static_cast<int>(jatt);
244  ion->Npart_proj=static_cast<int>(np);
245  ion->Npart_targ=static_cast<int>(nt);
246  ion->Ncoll=static_cast<int>(n0+n10+n01+n11);
247  ion->N_Nwounded_collisions=static_cast<int>(n01);
248  ion->Nwounded_N_collisions=static_cast<int>(n10);
249  ion->Nwounded_Nwounded_collisions=static_cast<int>(n11);
250  ion->spectator_neutrons=-1;
251  ion->spectator_protons=-1;
252  ion->impact_parameter= b;
253  ion->event_plane_angle=bphi;
254  ion->event_plane_angle=-1;
255  ion->sigma_inel_NN=sigmainel;
256 #else
257  HepMC::HeavyIon ion
258  (
259  static_cast<int>(jatt), // Ncoll_hard
260  static_cast<int>(np), // Npart_proj
261  static_cast<int>(nt), // Npart_targ
262  static_cast<int>(n0+n10+n01+n11), // Ncoll
263  static_cast<int>(-1), // spectator_neutrons
264  static_cast<int>(-1), // spectator_protons
265  static_cast<int>(n01), // N_Nwounded_collisions
266  static_cast<int>(n10), // Nwounded_N_collisions
267  static_cast<int>(n11), // Nwounded_Nwounded_collisions
268  b, // impact_parameter
269  bphi, // event_plane_angle
270  -1, // eccentricity
271  sigmainel ); // sigma_inel_NN
272 
273  evt->set_heavy_ion(ion);
274  std::cout << " heavy ion " << evt->heavy_ion() << std::endl;
275 #endif
276 
277  // Did we keep decay history?
278  //
279  bool keptHistory = (m_hiparnt.ihpr2(21) == 1);
280 
281  // The number of particles in the hijing output
282  //
283  int numHijingPart = m_himain1.natt();
284 
285  // Vectors that will keep track of where particles originate from and die
286  //
287  std::vector<int> partOriginVertex_vec(numHijingPart, 0);
288  std::vector<int> partDecayVertex_vec(numHijingPart, -1);
289  std::vector<HepMC::GenParticlePtr> particleHepPartPtr_vec(numHijingPart, nullptr);
290 
291  // Vector that will keep pointers to generated vertices
292  //
293  std::vector<HepMC::GenVertexPtr> vertexPtrVec;
294 
295  // Create the event vertex
296  //
297  CLHEP::HepLorentzVector newVertex;
298  newVertex = CLHEP::HepLorentzVector(0.,0.,0.,0.);
299 
300  if( m_rand )newVertex = randomizeVertex(p_Engine); // Create a random vertex along the pipe
301  else if(m_sel) newVertex = CLHEP::HepLorentzVector(m_x, m_y, m_z, 0.); // Create vertex at selected point - preempted by m_rand
302 
303  HepMC::GenVertexPtr v1 = HepMC::newGenVertexPtr(HepMC::FourVector(newVertex.x(),newVertex.y(),newVertex.z(),newVertex.t()));
304 
306  vertexPtrVec.push_back(v1);
307 
308  double eproj = (double) m_efrm;
309  if ( m_frame == "CMS " ) eproj = eproj / 2.;
310 
311  int proj_id = 2212;
312  if ( m_proj == "PBAR " ) {
313  proj_id = -2212;
314  } else if ( m_proj == "N " ) {
315  proj_id = 2112;
316  } else if ( m_proj == "NBAR " ) {
317  proj_id = -2112;
318  } else if ( m_proj == "PI+ " ) {
319  proj_id = 211;
320  } else if ( m_proj == "PI- " ) {
321  proj_id = -211;
322  } else if ( m_proj == "A " ) {
323  proj_id = 3000000 + m_iap;
324  }
325  HepMC::GenParticlePtr part_p = HepMC::newGenParticlePtr(HepMC::FourVector(0., 0., eproj, eproj), proj_id, 101 );
326  v1->add_particle_in( part_p );
327 
328  double etarg = 0.;
329  if ( m_frame == "CMS " ) etarg = ( (double) m_efrm ) / 2.;
330 
331  int targ_id = 2212;
332  if ( m_targ == "PBAR " ) {
333  targ_id = -2212;
334  } else if ( m_targ == "N " ) {
335  targ_id = 2112;
336  } else if ( m_targ == "NBAR " ) {
337  targ_id = -2112;
338  } else if ( m_targ == "PI+ " ) {
339  targ_id = 211;
340  } else if ( m_targ == "PI- " ) {
341  targ_id = -211;
342  } else if ( m_targ == "A " ) {
343  targ_id = 3000000 + m_iat;
344  }
345  HepMC::GenParticlePtr part_t = HepMC::newGenParticlePtr(HepMC::FourVector(0., 0., -etarg, etarg), targ_id, 102 );
346  v1->add_particle_in( part_t );
347 
348  evt->set_beam_particles(part_p,part_t);
349 
350  ATH_MSG_DEBUG( "Hijing particles for event # " << m_events << ":\n"
351  << " px, "
352  << " py, "
353  << " pz, "
354  << " Id, "
355  << " Source, "
356  << " Parent, "
357  << " Status, " );
358 
359  bool inconsistency = false;
360 
361  // Loop on all Hijing particles and put them all as outgoing from the event vertex
362  //
363  for (int i = 1; i <= m_himain1.natt(); ++i)
364  {
365  // Skip non-interacting projectile and target nucleons
366  //
367  if (!m_spec && ((m_himain2.katt(i, 2) == 0) || (m_himain2.katt(i, 2)) == 10)) continue;
368 
369  // Find the vertex of the parent particle
370  //
371  int parentIndex = m_himain2.katt(i, 3) - 1;
372  int parentOriginIndex = 0;
373  int parentDecayIndex = -1;
374 
375  // If the particle has a true parent, record its vertex info
376  //
377  if (parentIndex >= 0)
378  {
379  parentOriginIndex = partOriginVertex_vec[parentIndex];
380  parentDecayIndex = partDecayVertex_vec[parentIndex];
381  }
382 
383  // A CLHEP vector containing the particle start point
384  //
385  // If the particle has been shifted, offset the particleStart accordingly
386  //
387  if( m_rand || m_sel ){ // Either way, we need to shift the particle vertex
388  m_himain2.vatt(i,1) += newVertex(0);
389  m_himain2.vatt(i,2) += newVertex(1);
390  m_himain2.vatt(i,3) += newVertex(2);
391  m_himain2.vatt(i,4) += newVertex(3);
392  }
393 
394  ATH_MSG_DEBUG( std::fixed << std::setprecision(2)
395  << std::setw(5) << i << ","
396  << std::setw(7) << m_himain2.patt(i, 1) << ", "
397  << std::setw(7) << m_himain2.patt(i, 2) << ", "
398  << std::setw(7) << m_himain2.patt(i, 3) << ", "
399  << std::setw(7) << m_himain2.katt(i, 1) << ", "
400  << std::setw(7) << m_himain2.katt(i, 2) << ", "
401  << std::setw(7) << m_himain2.katt(i, 3) << ", "
402  << std::setw(7) << m_himain2.katt(i, 4) << ", "
403  << std::setw(7) << m_himain2.vatt(i, 1) << ", "
404  << std::setw(7) << m_himain2.vatt(i, 2) << ", "
405  << std::setw(7) << m_himain2.vatt(i, 3) );
406 
407  CLHEP::HepLorentzVector particleStart(m_himain2.vatt(i, 1), m_himain2.vatt(i, 2),
408  m_himain2.vatt(i, 3), m_himain2.vatt(i, 4));
409 
410  // By default, the particle originates from the primary vertex
411  //
412  int particleVertexIndex = 0;
413 
414  // Have we kept the history?
415  //
416  if (keptHistory)
417  {
418  // Check to see if we've already generated a decay vertex for this parent
419  //
420  // std::cout << "ML-> keptHistory == True" << std::endl;
421  if (parentDecayIndex != -1)
422  {
423  // Make sure it is consistent with this track origin
424  //
425  HepGeom::Point3D<double> vertex_pos(vertexPtrVec[parentDecayIndex]->position().x(),
426  vertexPtrVec[parentDecayIndex]->position().y(),
427  vertexPtrVec[parentDecayIndex]->position().z());
428  double distance = vertex_pos.distance(particleStart.vect());
429 
430  //std::cout << "ML-> distance = " << distance <<" parentDecayIndex = "<<parentDecayIndex<< std::endl;
432  {
433  // We have an inconsistency, print a message
434  //
435  ATH_MSG_WARNING( " Inconsistency in Hijing particle vertexing, particle # " << i
436  << " starting point (x,y,z) = ("
437  << particleStart.x() << ", "
438  << particleStart.y() << ", "
439  << particleStart.z() << ") "
440  << " a distance " << distance << " away from parent decay point " );
441 
442 
443  // Dump the parent decay vertex
444  //
445  log << MSG::WARNING << " Parent decay vertex: (x,y,z) = " << vertexPtrVec[parentDecayIndex]->position().x()
446  << ", " << vertexPtrVec[parentDecayIndex]->position().y()
447  << ", " << vertexPtrVec[parentDecayIndex]->position().z()
448  << ", associated daughter IDs = ";
449 
450 #ifdef HEPMC3
451  auto vertexPtrVec_particles_out_const_begin=vertexPtrVec[parentDecayIndex]->particles_out().begin();
452  auto vertexPtrVec_particles_out_const_end=vertexPtrVec[parentDecayIndex]->particles_out().end();
453 #else
454  auto vertexPtrVec_particles_out_const_begin=vertexPtrVec[parentDecayIndex]->particles_out_const_begin();
455  auto vertexPtrVec_particles_out_const_end=vertexPtrVec[parentDecayIndex]->particles_out_const_end();
456 #endif
457  for (auto iter = vertexPtrVec_particles_out_const_begin;
458  iter != vertexPtrVec_particles_out_const_end;
459  iter++)
460  {
461  log << (*iter) << ", ";
462  }
463 
464  log << endmsg;
465  inconsistency = true;
466  }
467 
468  // Nonetheless set the parent decay vertex to be this particle's vertex
469  //
470  particleVertexIndex = parentDecayIndex;
471  }
472  else
473  {
474  // Now compare the distance between the vertex FROM which the parent originates and the
475  // start of this particle
476  //
477  HepGeom::Point3D<double> vertex_pos(vertexPtrVec[parentOriginIndex]->position().x(),
478  vertexPtrVec[parentOriginIndex]->position().y(),
479  vertexPtrVec[parentOriginIndex]->position().z());
480  double distance = vertex_pos.distance(particleStart.vect());
481 
482  if (distance > m_vertexOffsetCut && parentIndex == -1)
483  {
484  // *** Explicitly handle Hijing bug which generates particle with displaced vertex
485  // *** but no parent ????
486  //
487 
488  ATH_MSG_WARNING( "HIJING BUG:: Particle found with displaced vertex but no parent " );
489  ATH_MSG_WARNING( " Particle parameters: " << std::fixed << std::setprecision(2)
490  << std::setw(5) << i << ","
491  << std::setw(7) << m_himain2.patt(i, 1) << ", "
492  << std::setw(7) << m_himain2.patt(i, 2) << ", "
493  << std::setw(7) << m_himain2.patt(i, 3) << ", "
494  << std::setw(7) << m_himain2.katt(i, 1) << ", "
495  << std::setw(7) << m_himain2.katt(i, 2) << ", "
496  << std::setw(7) << m_himain2.katt(i, 3) << ", "
497  << std::setw(7) << m_himain2.katt(i, 4) << ", "
498  << std::setw(7) << m_himain2.vatt(i, 1) << ", "
499  << std::setw(7) << m_himain2.vatt(i, 2) << ", "
500  << std::setw(7) << m_himain2.vatt(i, 3) );
501 
502  // Assign the particle to its parent's vertex
503  //
504  particleVertexIndex = parentOriginIndex;
505  //std::cout << "ML-> case 2 distane = " << distance <<" particleVertexIndex = "<<particleVertexIndex<< std::endl;
506  }
507  if( parentIndex!=-1 && ((distance > m_vertexOffsetCut || parentOriginIndex !=0) || m_keepAllDecayVertices ) )
508  {
509  // We need to create a new vertex
510  //
511  HepMC::GenVertexPtr newVertex_p = HepMC::newGenVertexPtr(HepMC::FourVector(particleStart.x(),particleStart.y(),particleStart.z(),particleStart.t()));
512  evt->add_vertex(newVertex_p);
513  vertexPtrVec.push_back(newVertex_p);
514  particleVertexIndex = vertexPtrVec.size() - 1;
515 
516  // Now we indicate that the parent has a decay vertex
517  //
518  partDecayVertex_vec[parentIndex] = particleVertexIndex;
519 
520  // Now tell the vertex about the particle that created it
521  //
522 
523  newVertex_p->add_particle_in(particleHepPartPtr_vec[parentIndex]);
524  }
525  else {
526  // Assign the particle to its parent's vertex
527  //
528  particleVertexIndex = parentOriginIndex;
529  }
530  }
531  }
532  else
533  {
534  // We have to brute-force search for a vertex that might match this particle
535  //
536  int foundVert = -1;
537  for (unsigned int ivert = 0; ivert < vertexPtrVec.size(); ivert++)
538  {
539 
540  HepGeom::Point3D<double> vertex_pos(vertexPtrVec[ivert]->position().x(),
541  vertexPtrVec[ivert]->position().y(),
542  vertexPtrVec[ivert]->position().z());
543  double distance = vertex_pos.distance(particleStart.vect());
545  {
546  foundVert = ivert;
547  break;
548  }
549  }
550 
551  if (foundVert == -1)
552  {
553  // We need to create a new vertex
554  //
555  HepMC::GenVertexPtr newVertex_p = HepMC::newGenVertexPtr(HepMC::FourVector(particleStart.x(),particleStart.y(),particleStart.z(),particleStart.t()));
556 
557  evt->add_vertex(newVertex_p);
558  vertexPtrVec.push_back(newVertex_p);
559  particleVertexIndex = vertexPtrVec.size() - 1;
560  }
561  else
562  {
563  particleVertexIndex = foundVert;
564  }
565  //std::cout << "ML-> case 3 particleVertexIndex = "<<particleVertexIndex<< std::endl;
566  }
567 
568  // If the Hijing particle has decayed, set the status appropriately
569  //
570  int particleId = m_himain2.katt(i, 1);
571  int particleStatus = 1;
572  if (m_himain2.katt(i, 4) == 11) particleStatus = 2;
573 
574  // Create the new particle
575  //
576  HepMC::FourVector particleP4(m_himain2.patt(i, 1),
577  m_himain2.patt(i, 2),
578  m_himain2.patt(i, 3),
579  m_himain2.patt(i, 4));
580 
581  HepMC::GenParticlePtr newParticle_p = HepMC::newGenParticlePtr(particleP4, particleId,
582  particleStatus);
583 
584  // Record the particle in the vector of pointers
585  // (ostensibly we only need this when we have the
586  // history but for simplicity always do it)
587  //
588  particleHepPartPtr_vec[i-1] = newParticle_p;
589 
590  // Now add the particle to its vertex
591  //
592  vertexPtrVec[particleVertexIndex]->add_particle_out(newParticle_p);
593  partOriginVertex_vec[i-1] = particleVertexIndex;
594 
595  //std::cout << "ML-> particleId = " << particleId << " particleStatus = " << particleStatus
596  // << " particleVertexIndex = " << particleVertexIndex << std::endl;
597  }
598 
599  if (inconsistency)
600  {
601  for (int i = 1; i <= m_himain1.natt(); ++i)
602  {
603  // Skip non-interacting projectile and target nucleons
604  //
605  if (!m_spec && ((m_himain2.katt(i, 2) == 0) || (m_himain2.katt(i, 2)) == 10)) continue;
606 
607  ATH_MSG_WARNING( " Hijing.cxx inconsistency: " << std::fixed << std::setprecision(2)
608  // std::cout << std::fixed << std::setprecision(2)
609  << std::setw(5) << i << ","
610  << std::setw(7) << m_himain2.patt(i, 1) << ", "
611  << std::setw(7) << m_himain2.patt(i, 2) << ", "
612  << std::setw(7) << m_himain2.patt(i, 3) << ", "
613  << std::setw(7) << m_himain2.katt(i, 1) << ", "
614  << std::setw(7) << m_himain2.katt(i, 2) << ", "
615  << std::setw(7) << m_himain2.katt(i, 3) << ", "
616  << std::setw(7) << m_himain2.katt(i, 4) << ", "
617  << std::setw(7) << m_himain2.vatt(i, 1) << ", "
618  << std::setw(7) << m_himain2.vatt(i, 2) << ", "
619  << std::setw(7) << m_himain2.vatt(i, 3) );
620  }
621  }
622 
623  // Now loop over all vertices and add them to the event
624  //
625  // for (unsigned int ivertex = 0; ivertex < vertexPtrVec.size(); ivertex++)
626  //{
627  // evt->add_vertex(vertexPtrVec[ivertex]);
628  //}
629 
630  // Generate documentation lines for high-pt partons
631  //
632  for (int isg = 1; isg <= m_hijjet2.nsg(); isg++)
633  {
634  for (int jparton = 1; jparton <= m_hijjet2.njsg(isg); jparton++)
635  {
636  double px = m_hijjet2.pxsg(isg, jparton);
637  double py = m_hijjet2.pysg(isg, jparton);
638  double pz = m_hijjet2.pzsg(isg, jparton);
639  double mass = m_hijjet2.pmsg(isg, jparton);
640 
641  double ptsq = px*px + py*py;
642  double e = std::sqrt(ptsq + pz*pz + mass*mass);
643  double mt = std::sqrt(ptsq + mass*mass);
644  double pt = std::sqrt(ptsq);
645 
646  double pseud = 0.5*std::log((e + pz)/(e - pz));
647 
648  int partonId = m_hijjet2.k2sg(isg, jparton);
649 
650  if (mt > m_partonStoreMinPt)
651  {
652  ATH_MSG_DEBUG( "hijjet2 entry: isg = " << isg
653  << ", pt = " << pt
654  << ", mt = " << mt
655  << ", eta = " << pseud );
656 
657  // Add aaa non-tracked entry in the hepmc event with status code 103 (temporary)
658  //
659  v1->add_particle_out( HepMC::newGenParticlePtr( HepMC::FourVector(px, py, pz, e), partonId, 103 ) );
660  }
661  }
662  }
663 
664  // Generate documentation lines for high-pt partons
665  //
666  int iap = m_hiparnt.ihnt2(1); // # of projectile nucleons
667  int iat = m_hiparnt.ihnt2(3); // # of target nucleons
668 
669  for (int iproj = 1; iproj <= iap; iproj++)
670  {
671  for (int jparton = 1; jparton <= m_hijjet1.npj(iproj); jparton++)
672  {
673  double px = m_hijjet1.pjpx(iproj, jparton);
674  double py = m_hijjet1.pjpy(iproj, jparton);
675  double pz = m_hijjet1.pjpz(iproj, jparton);
676  double mass = m_hijjet1.pjpm(iproj, jparton);
677 
678  double ptsq = px*px + py*py;
679  double e = std::sqrt(ptsq + pz*pz + mass*mass);
680  double mt = std::sqrt(ptsq + mass*mass);
681  double pt = std::sqrt(ptsq);
682 
683  double pseud = 0.5*std::log((e + pz)/(e - pz));
684 
685  int partonId = m_hijjet1.kfpj(iproj, jparton);
686 
687  if (mt > m_partonStoreMinPt)
688  {
689  ATH_MSG_DEBUG( "hijjet1 entry: iproj = " << iproj
690  << ", pt = " << pt
691  << ", mt = " << mt
692  << ", eta = " << pseud );
693 
694  // Add aaa non-tracked entry in the hepmc event with status code 103 (temporary)
695  //
696  v1->add_particle_out( HepMC::newGenParticlePtr( HepMC::FourVector(px, py, pz, e), partonId, 103 ) );
697  }
698  }
699  }
700 
701  // Now for target nucleons
702  //
703  for (int itarg = 1; itarg <= iat; itarg++)
704  {
705  for (int jparton = 1; jparton <= m_hijjet1.ntj(itarg); jparton++)
706  {
707  double px = m_hijjet1.pjtx(itarg, jparton);
708  double py = m_hijjet1.pjty(itarg, jparton);
709  double pz = m_hijjet1.pjtz(itarg, jparton);
710  double mass = m_hijjet1.pjtm(itarg, jparton);
711 
712  double ptsq = px*px + py*py;
713  double e = std::sqrt(ptsq + pz*pz + mass*mass);
714  double mt = std::sqrt(ptsq + mass*mass);
715  double pt = std::sqrt(ptsq);
716 
717  double pseud = 0.5*std::log((e + pz)/(e - pz));
718 
719  int partonId = m_hijjet1.kftj(itarg, jparton);
720 
721  if (mt > m_partonStoreMinPt)
722  {
723  ATH_MSG_DEBUG( "hijjet1 entry: itarg = " << itarg
724  << ", pt = " << pt
725  << ", mt = " << mt
726  << ", eta = " << pseud );
727 
728  // Add aaa non-tracked entry in the hepmc event with status code 103 (temporary)
729  //
730  v1->add_particle_out( HepMC::newGenParticlePtr( HepMC::FourVector(px, py, pz, e), partonId, 103 ) );
731  }
732  }
733  }
734 
735  // Convert CLHEP::cm->CLHEP::mm and CLHEP::GeV->CLHEP::MeV
736  //
737  GeVToMeV(evt);
738 
739  //BPK-> Loop over the particles in the event, if p needs to be mirrored:
740  if( m_prand ){
741  HepMC::FourVector tmpmom(0.,0.,0.,0.);
742  double ranz = CLHEP::RandFlat::shoot(p_Engine);
743  // std::cout <<"random="<<ranz <<std::endl;
744  if (ranz < 0.5) {
745  // std::cout <<"flip="<<ranz <<std::endl;
746  for(auto pitr: *evt){
747  tmpmom= pitr->momentum();
748  tmpmom.setX(-tmpmom.x());
749  tmpmom.setY(-tmpmom.y());
750  tmpmom.setZ(-tmpmom.z());
751  tmpmom.setT(tmpmom.t());
752  pitr->set_momentum(tmpmom);
753  }
754  }
755  }
756  //BPK-<
757 
758  //ARA -- ATLHI-483, clean up unstable particles with no decay vertex
759 #ifdef HEPMC3
761  {
762  const std::vector <HepMC::GenParticlePtr> allParticles=evt->particles();
763  for(auto p : allParticles)
764  {
765  HepMC::ConstGenVertexPtr end_v=p->end_vertex();
766  if(p->status()==2 && !end_v) evt->remove_particle(p);
767  }
768  }
769 #else
771  {
772  for (HepMC::GenParticle* p : *evt) {
773  HepMC::ConstGenVertexPtr end_v = p->end_vertex();
774  if (p->status() == 2 && !end_v) p->production_vertex()->remove_particle(p);
775  }
776  }
777 #endif
778  return StatusCode::SUCCESS;
779 }
780 
781 CLHEP::HepLorentzVector
782 Hijing::randomizeVertex(CLHEP::HepRandomEngine* engine)
783 {
784  // Check the range in Z for the correct pipe diameter
785  // Definitions of constants are in VertexShift.h
786 
787  using namespace VertexShift;
788 
789  double ranx, rany, xmax, ymax;
790  double ranz = CLHEP::RandFlat::shoot(engine, -Zmax, Zmax);
791  if( m_wide ){ // Allow the whole pipe
792  if( std::abs(ranz) < Start1 ) {
793  xmax = Xmin + Delta1;
794  ymax = xmax;
795  } else if( std::abs(ranz) < Start2 ) {
796  xmax = Xmin + Delta2;
797  ymax = xmax;
798  } else if( std::abs(ranz) < Start3 ) {
799  xmax = Xmin + Delta3;
800  ymax = xmax;
801  } else if ( std::abs(ranz) <= Envelope ){
802  xmax = Xmin;
803  ymax = xmax;
804  } else {
805  ATH_MSG_ERROR( "**** Hijing::randomizeVertex() " << ranz << " (z) is outside the detector (units of mm). Returning a centered event." );
806  return CLHEP::HepLorentzVector(0.,0.,0.,0.);
807  }
808  } else {
809  ATH_MSG_INFO( "New Coordinates: x=0., y=0., z=" << ranz );
810  return CLHEP::HepLorentzVector(0., 0., ranz, 0); // Allow distribution just along the beam (no "width", m_wide is false (default))
811  }
812  ranx = CLHEP::RandFlat::shoot(engine, -xmax, xmax);
813  rany = CLHEP::RandFlat::shoot(engine, -ymax, ymax);
814 
815  ATH_MSG_INFO( "New Coordinates: x=" << ranx << ", y=" << rany << ", z=" << ranz );
816 
817  return CLHEP::HepLorentzVector(ranx, rany, ranz, 0);
818 }
819 
820 void
822 {
823  // set up the DEFAULT input parameters to hijset: these can be changed by the user ...
824  m_efrm = 14000.;
825  m_frame = "CMS ";
826  m_proj = "P ";
827  m_targ = "P ";
828  m_iap = 1;
829  m_iat = 1;
830  m_izp = 1;
831  m_izt = 1;
832  // ... and to hijing
833  m_bmin = 0.;
834  m_bmax = 0.;
835 
836  // Set user Initialization parameters
838  {
839  ATH_MSG_INFO( " Hijing init. Command is: " << *i );
840  StringParse mystring(*i);
841  std::string myparam = mystring.piece<std::string>(1);
842  if (myparam == "efrm")
843  {
844  m_efrm = mystring.piece<double>(2);
845  }
846  else if (myparam == "frame")
847  {
848  m_frame = mystring.piece<std::string>(2);
849  if (m_frame.size() < 8)
850  {
851  unsigned nbl = 8 - m_frame.size();
852  for (unsigned i = 0; i < nbl; ++i) m_frame += ' ';
853  }
854  }
855  else if (myparam == "proj")
856  {
857  m_proj = mystring.piece<std::string>(2);
858  if (m_proj.size() < 8)
859  {
860  unsigned nbl = 8 - m_proj.size();
861  for (unsigned i = 0; i < nbl; ++i) m_proj += ' ';
862  }
863  }
864  else if (myparam == "targ")
865  {
866  m_targ = mystring.piece<std::string>(2);
867  if (m_targ.size() < 8)
868  {
869  unsigned nbl = 8 - m_targ.size();
870  for (unsigned i = 0; i < nbl; ++i) m_targ += ' ';
871  }
872  }
873  else if (myparam == "iap")
874  {
875  m_iap = mystring.piece<int>(2);
876  }
877  else if (myparam == "izp")
878  {
879  m_izp = mystring.piece<int>(2);
880  }
881  else if (myparam == "iat")
882  {
883  m_iat = mystring.piece<int>(2);
884  }
885  else if (myparam == "izt")
886  {
887  m_izt = mystring.piece<int>(2);
888  }
889  else if (myparam == "bmin")
890  {
891  m_bmin = mystring.piece<double>(2);
892  }
893  else if (myparam == "bmax")
894  {
895  m_bmax = mystring.piece<double>(2);
896  }
897  else if (myparam == "nseed")
898  {
899  m_ranseed.nseed() = mystring.piece<int>(2);
900  }
901  else if (myparam == "hipr1")
902  {
903  int myelem = mystring.piece<int>(2);
904  m_hiparnt.hipr1(myelem) = mystring.piece<double>(3);
905  }
906  else if (myparam == "ihpr2")
907  {
908  int myelem = mystring.piece<int>(2);
909  m_hiparnt.ihpr2(myelem) = mystring.piece<int>(3);
910  }
911  else if (myparam == "hint1")
912  {
913  int myelem = mystring.piece<int>(2);
914  m_hiparnt.hint1(myelem) = mystring.piece<double>(3);
915  }
916  else if (myparam == "ihnt2")
917  {
918  int myelem = mystring.piece<int>(2);
919  m_hiparnt.ihnt2(myelem) = mystring.piece<int>(3);
920  }
921  else
922  {
923  ATH_MSG_ERROR( " ERROR in HIJING INITIALIZATION PARAMETERS " << myparam << " is an invalid parameter !" );
924  }
925  }
926 }
HepMC::GenVertexPtr
HepMC::GenVertex * GenVertexPtr
Definition: GenVertex.h:59
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
Envelope
Definition: IDetectorGeometryTool.h:17
Hijing::m_efrm
float m_efrm
Definition: Hijing.h:60
HijJet1::pjtz
float & pjtz(int i, int j)
Definition: HijJet1.h:201
Hijing::m_iap
int m_iap
Definition: Hijing.h:64
VertexShift::Zmax
const float Zmax
Definition: VertexShift.h:26
StringParse
Utility object for parsing a string into tokens and returning them as a variety of types.
Definition: StringParse.h:33
Hijing::m_frame
std::string m_frame
Definition: Hijing.h:61
HiMain1::n10
int & n10(void)
Definition: HiMain1.h:139
GenEvent.h
test_pyathena.px
px
Definition: test_pyathena.py:18
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
HiParnt::hint1
float & hint1(int n)
Definition: HiParnt.h:94
VertexShift::Start1
const float Start1
Definition: VertexShift.h:36
HiMain2::katt
int & katt(int i, int j)
Definition: HiMain2.h:82
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
Hijing::m_targ
std::string m_targ
Definition: Hijing.h:63
Hijing::m_bmin
float m_bmin
Definition: Hijing.h:69
VertexShift::Start3
const float Start3
Definition: VertexShift.h:38
VertexShift::Xmin
const float Xmin
Definition: VertexShift.h:25
GenBase::GeVToMeV
void GeVToMeV(HepMC::GenEvent *evt)
Scale event energies/momenta by x 1000.
Definition: GenBase.cxx:61
AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
HijJet2::njsg
int & njsg(int i)
Definition: HijJet2.h:98
VertexShift::Delta3
const float Delta3
Definition: VertexShift.h:31
HeavyIon.h
GenVertex.h
StringParse.h
HepMC::GenParticlePtr
GenParticle * GenParticlePtr
Definition: GenParticle.h:37
HiParnt::hipr1
float & hipr1(int n)
Definition: HiParnt.h:78
Hijing::fillEvt
virtual StatusCode fillEvt(HepMC::GenEvent *evt) override
For filling the HepMC event object.
Definition: Hijing.cxx:211
Hijing::m_proj
std::string m_proj
Definition: Hijing.h:62
HijJet1::pjpz
float & pjpz(int i, int j)
Definition: HijJet1.h:133
test_pyathena.pt
pt
Definition: test_pyathena.py:11
Hijing::m_iat
int m_iat
Definition: Hijing.h:65
LArG4FSStartPointFilter.evt
evt
Definition: LArG4FSStartPointFilter.py:42
VertexShift
Definition: VertexShift.h:23
Hijing::m_spec
bool m_spec
Definition: Hijing.h:78
HiMain1::n0
int & n0(void)
Definition: HiMain1.h:125
Hijing::m_event_paramsKey
SG::WriteHandleKey< HijingEventParams > m_event_paramsKey
Definition: Hijing.h:117
PlotPulseshapeFromCool.np
np
Definition: PlotPulseshapeFromCool.py:64
HijJet1::pjty
float & pjty(int i, int j)
Definition: HijJet1.h:191
x
#define x
GenParticle.h
dqt_zlumi_pandas.mass
mass
Definition: dqt_zlumi_pandas.py:170
Hijing::m_y
float m_y
Definition: Hijing.h:75
Hijing::m_InitializeVector
CommandVector m_InitializeVector
Definition: Hijing.h:98
HijJet1::pjtx
float & pjtx(int i, int j)
Definition: HijJet1.h:181
Hijing::m_hijjet1
HijJet1 m_hijjet1
Definition: Hijing.h:109
Hijing::genInitialize
virtual StatusCode genInitialize() override
For initializing the generator, if required.
Definition: Hijing.cxx:85
Hijing::genFinalize
virtual StatusCode genFinalize() override
For finalising the generator, if required.
Definition: Hijing.cxx:204
HiMain1::natt
int & natt(void)
Definition: HiMain1.h:90
Hijing::m_wide
bool m_wide
Definition: Hijing.h:82
GenModule
Base class for common behaviour of generator interfaces.
Definition: GenModule.h:39
VertexShift::Delta2
const float Delta2
Definition: VertexShift.h:30
HijJet2::pmsg
float & pmsg(int i, int j)
Definition: HijJet2.h:176
atl_ran_
float atl_ran_(int *)
Definition: Hijing.cxx:49
Hijing::m_events
int m_events
Definition: Hijing.h:95
StringParse::piece
T piece(size_t num) const
Templated function to get the num'th token as any numeric type.
Definition: StringParse.h:44
HepMC::set_signal_process_vertex
void set_signal_process_vertex(GenEvent *e, T v)
Definition: GenEvent.h:528
Hijing::m_rand
bool m_rand
Definition: Hijing.h:81
HijJet1::ntj
int & ntj(int i)
Definition: HijJet1.h:163
RanSeed::nseed
int & nseed(void)
Definition: RanSeed.h:51
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
Hijing::randomizeVertex
virtual CLHEP::HepLorentzVector randomizeVertex(CLHEP::HepRandomEngine *engine)
Definition: Hijing.cxx:782
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
HiMain2::patt
float & patt(int i, int j)
Definition: HiMain2.h:92
HijJet2::nsg
int & nsg(void)
Definition: HijJet2.h:91
Hijing::m_hiparnt
HiParnt m_hiparnt
Definition: Hijing.h:101
HepMC::newGenVertexPtr
GenVertexPtr newGenVertexPtr(const HepMC::FourVector &pos=HepMC::FourVector(0.0, 0.0, 0.0, 0.0), const int i=0)
Definition: GenVertex.h:64
lumiFormat.i
int i
Definition: lumiFormat.py:92
z
#define z
Hijing::m_bmax
float m_bmax
Definition: Hijing.h:70
Hijing::m_prand
bool m_prand
Definition: Hijing.h:83
HijJet1::kftj
int & kftj(int i, int j)
Definition: HijJet1.h:171
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
HijJet2::pxsg
float & pxsg(int i, int j)
Definition: HijJet2.h:136
Amg::pz
@ pz
Definition: GeoPrimitives.h:40
HiMain1::jatt
int & jatt(void)
Definition: HiMain1.h:104
Hijing::m_himain2
HiMain2 m_himain2
Definition: Hijing.h:108
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
HiMain1::ierrstat
int & ierrstat(void)
Definition: HiMain1.h:153
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
xAOD::double
double
Definition: CompositeParticle_v1.cxx:159
Hijing::m_seeds
std::vector< long int > m_seeds
Definition: Hijing.h:92
Hijing::m_sel
bool m_sel
Definition: Hijing.h:77
HijJet1::kfpj
int & kfpj(int i, int j)
Definition: HijJet1.h:103
make_coralServer_rep.proj
proj
Definition: make_coralServer_rep.py:48
Hijing::Hijing
Hijing(const std::string &name, ISvcLocator *pSvcLocator)
Definition: Hijing.cxx:68
Hijing::m_vertexOffsetCut
double m_vertexOffsetCut
Definition: Hijing.h:88
HijJet2::pysg
float & pysg(int i, int j)
Definition: HijJet2.h:146
Amg::py
@ py
Definition: GeoPrimitives.h:39
Hijing::callGenerator
virtual StatusCode callGenerator() override
For calling the generator on each iteration of the event loop.
Definition: Hijing.cxx:145
HiParnt::ihpr2
int & ihpr2(int n)
Definition: HiParnt.h:86
HijJet1::pjpy
float & pjpy(int i, int j)
Definition: HijJet1.h:123
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
VertexShift::Start2
const float Start2
Definition: VertexShift.h:37
HiMain2::vatt
float & vatt(int i, int j)
Definition: HiMain2.h:102
Hijing::m_izt
int m_izt
Definition: Hijing.h:67
RNGWrapper.h
HiMain1::n11
int & n11(void)
Definition: HiMain1.h:146
Hijing::m_keepAllDecayVertices
bool m_keepAllDecayVertices
Definition: Hijing.h:84
SG::WriteHandle< HijingEventParams >
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
HepMC::newGenParticlePtr
GenParticlePtr newGenParticlePtr(const HepMC::FourVector &mom=HepMC::FourVector(0.0, 0.0, 0.0, 0.0), int pid=0, int status=0)
Definition: GenParticle.h:39
HiMain1::nt
int & nt(void)
Definition: HiMain1.h:111
y
#define y
Hijing::m_partonStoreMinPt
double m_partonStoreMinPt
Definition: Hijing.h:87
hijset_
void hijset_(float *, const char *, const char *, const char *, int *, int *, int *, int *, long int, long int, long int)
HijJet1::pjpm
float & pjpm(int i, int j)
Definition: HijJet1.h:153
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
Hijing::m_izp
int m_izp
Definition: Hijing.h:66
GenModule::m_randomSeed
IntegerProperty m_randomSeed
Seed for random number engine.
Definition: GenModule.h:84
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
xmax
double xmax
Definition: listroot.cxx:61
HiMain1::np
int & np(void)
Definition: HiMain1.h:118
ATHRNG::calculateSeedsMC21
void calculateSeedsMC21(long *seeds, const std::string &algName, uint64_t ev, uint64_t run, uint64_t offset=0)
Set the random seed using a string (e.g.
Definition: RNGWrapper.cxx:37
Hijing::m_x
float m_x
Definition: Hijing.h:74
Hijing::m_hijjet2
HijJet2 m_hijjet2
Definition: Hijing.h:110
Hijing::m_z
float m_z
Definition: Hijing.h:76
Hijing::m_himain1
HiMain1 m_himain1
Definition: Hijing.h:107
HepMC::ConstGenVertexPtr
const HepMC::GenVertex * ConstGenVertexPtr
Definition: GenVertex.h:60
HiParnt::ihnt2
int & ihnt2(int n)
Definition: HiParnt.h:103
beamspotnt.nt
def nt
Definition: bin/beamspotnt.py:1063
VertexShift::Delta1
const float Delta1
Definition: VertexShift.h:29
VertexShift.h
HijJet2::k2sg
int & k2sg(int i, int j)
Definition: HijJet2.h:126
HijJet2::pzsg
float & pzsg(int i, int j)
Definition: HijJet2.h:156
HepMC::set_signal_process_id
void set_signal_process_id(GenEvent *e, const int i)
Definition: GenEvent.h:519
HiMain1::n01
int & n01(void)
Definition: HiMain1.h:132
Amg::distance
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
Definition: GeoPrimitivesHelpers.h:54
HijJet1::pjtm
float & pjtm(int i, int j)
Definition: HijJet1.h:221
Hijing::m_ranseed
RanSeed m_ranseed
Definition: Hijing.h:104
HijJet1::npj
int & npj(int i)
Definition: HijJet1.h:95
HijJet1::pjpx
float & pjpx(int i, int j)
Definition: HijJet1.h:113
Hijing::set_user_params
void set_user_params(void)
Definition: Hijing.cxx:821
GenModule::getRandomEngineDuringInitialize
CLHEP::HepRandomEngine * getRandomEngineDuringInitialize(const std::string &streamName, unsigned long int randomSeedOffset, unsigned int conditionsRun=1, unsigned int lbn=1) const
Definition: GenModule.cxx:53
hijing_
void hijing_(const char *, float *, float *, long int)
GenParticle
@ GenParticle
Definition: TruthClasses.h:30
ymax
double ymax
Definition: listroot.cxx:64
Hijing::m_dsid
IntegerProperty m_dsid
Definition: Hijing.h:57
Hijing.h
HepMC::set_random_states
void set_random_states(GenEvent *e, std::vector< T > a)
Definition: GenEvent.h:525