CMS 3D CMS Logo

EPOS_Wrapper.h
Go to the documentation of this file.
1 //--------------------------------------------------------------------------
2 //THIS IS A BRUTAL COPY OF HEPEVT_Wrapper from HEPMC
3 //We need it because the EPOS generator needs a largeer version of HEPEVT to store the event
4 #ifndef EPOS_EntriesAllocation
5 #define EPOS_EntriesAllocation 99900
6 #endif // EPOS_EntriesAllocation
7 
8 //--------------------------------------------------------------------------
9 #ifndef HEPMC_EPOS_COMMON_H
10 #define HEPMC_EPOS_COMMON_H
11 //
13 // PARAMETER (NMXHEP=2000)
14 // COMMON/HEPCOM/NEVHEP,NHEP,ISTHEP(NMXHEP),IDHEP(NMXHEP),
15 // & JMOHEP(2,NMXHEP),JDAHEP(2,NMXHEP),PHEP(5,NMXHEP),VHEP(4,NMXHEP)
16 /**********************************************************/
17 /* D E S C R I P T I O N : */
18 /*--------------------------------------------------------*/
19 /* NEVHEP - event number (or some special meaning*/
20 /* (see documentation for details) */
21 /* NHEP - actual number of entries in current */
22 /* event. */
23 /* ISTHEP[IHEP] - status code for IHEP'th entry - see */
24 /* documentation for details */
25 /* IDHEP [IHEP] - IHEP'th particle identifier according*/
26 /* to PDG. */
27 /* JMOHEP[IHEP][0] - pointer to position of 1st mother */
28 /* JMOHEP[IHEP][1] - pointer to position of 2nd mother */
29 /* JDAHEP[IHEP][0] - pointer to position of 1st daughter */
30 /* JDAHEP[IHEP][1] - pointer to position of 2nd daughter */
31 /* PHEP [IHEP][0] - X momentum */
32 /* PHEP [IHEP][1] - Y momentum */
33 /* PHEP [IHEP][2] - Z momentum */
34 /* PHEP [IHEP][3] - Energy */
35 /* PHEP [IHEP][4] - Mass */
36 /* VHEP [IHEP][0] - X vertex */
37 /* VHEP [IHEP][1] - Y vertex */
38 /* VHEP [IHEP][2] - Z vertex */
39 /* VHEP [IHEP][3] - production time */
40 /*========================================================*/
41 // Remember, array(1) is the first entry in a fortran array, array[0] is the
42 // first entry in a C array.
43 //
44 // This interface to EPOS common block treats the block as
45 // an array of bytes --- the precision and number of entries
46 // is determined "on the fly" by the wrapper and used to decode
47 // each entry.
48 //
49 // EPOS_EntriesAllocation is the maximum size of the EPOS common block
50 // that can be interfaced.
51 // It is NOT the actual size of the EPOS common used in each
52 // individual application. The actual size can be changed on
53 // the fly using EPOS_Wrapper::set_max_number_entries().
54 // Thus EPOS_EntriesAllocation should typically be set
55 // to the maximum possible number of entries --- 10000 is a good choice
56 // (and is the number used by ATLAS versions of Pythia).
57 //
58 // Note: a statement like *( (int*)&hepcom.data[0] )
59 // takes the memory address of the first byte in EPOS,
60 // interprets it as an integer pointer,
61 // and dereferences the pointer.
62 // i.e. it returns an integer corresponding to nevhep
63 //
64 
65 #include <cctype>
66 
67 const unsigned int epos_bytes_allocation =
68  sizeof(long int) * (2 + 6 * EPOS_EntriesAllocation) + sizeof(double) * (9 * EPOS_EntriesAllocation);
69 
70 #ifdef _WIN32 // Platform: Windows MS Visual C++
71 struct HEPCOM_DEF {
73 };
74 extern "C" HEPCOM_DEF HEPCOM;
75 #define hepcom HEPCOM
76 
77 #else
78 extern "C" {
79 extern struct { char data[epos_bytes_allocation]; } hepcom_;
80 }
81 #define hepcom hepcom_
82 
83 #endif // Platform
84 
85 #endif // HEPMC_EPOS_COMMON_H
86 
87 //--------------------------------------------------------------------------
88 #ifndef HEPMC_EPOS_WRAPPER_H
89 #define HEPMC_EPOS_WRAPPER_H
90 
92 // Matt.Dobbs@Cern.CH, April 24, 2000, refer to:
93 // M. Dobbs and J.B. Hansen, "The HepMC C++ Monte Carlo Event Record for
94 // High Energy Physics", Computer Physics Communications (to be published).
95 //
96 // Generic Wrapper for the fortran EPOS common block
97 // This class is intended for static use only - it makes no sense to
98 // instantiate it.
99 // Updated: June 30, 2000 (static initialization moved to separate .cxx file)
101 //
102 // The index refers to the fortran style index:
103 // i.e. index=1 refers to the first entry in the EPOS common block.
104 // all indices must be >0
105 // number_entries --> integer between 0 and max_number_entries() giving total
106 // number of sequential particle indices
107 // first_parent/child --> index of first mother/child if there is one,
108 // zero otherwise
109 // last_parent/child --> if number children is >1, address of last parent/child
110 // if number of children is 1, same as first_parent/child
111 // if there are no children, returns zero.
112 // is_double_precision --> T or F depending if floating point variables
113 // are 8 or 4 bytes
114 //
115 
116 #include <iostream>
117 #include <cstdio> // needed for formatted output using sprintf
118 
119 namespace EPOS {
120 
122 
127  class EPOS_Wrapper {
128  public:
130  static void print_hepcom(std::ostream& ostr = std::cout);
132  static void print_hepcom_particle(int index, std::ostream& ostr = std::cout);
134  static void zero_everything();
135 
137  // Access Methods //
139  static int event_number();
140  static int number_entries();
141  static int status(int index);
142  static int id(int index);
143  static int first_parent(int index);
144  static int last_parent(int index);
145  static int number_parents(int index);
146  static int first_child(int index);
147  static int last_child(int index);
148  static int number_children(int index);
149  static double px(int index);
150  static double py(int index);
151  static double pz(int index);
152  static double e(int index);
153  static double m(int index);
154  static double x(int index);
155  static double y(int index);
156  static double z(int index);
157  static double t(int index);
158 
160  // Set Methods //
162 
164  static void set_event_number(int evtno);
166  static void set_number_entries(int noentries);
168  static void set_status(int index, int status);
170  static void set_id(int index, int id);
172  static void set_parents(int index, int firstparent, int lastparent);
174  static void set_children(int index, int firstchild, int lastchild);
176  static void set_momentum(int index, double px, double py, double pz, double e);
178  static void set_mass(int index, double mass);
180  static void set_position(int index, double x, double y, double z, double t);
182  // EPOS Floorplan //
184  static unsigned int sizeof_int();
185  static unsigned int sizeof_real();
186  static int max_number_entries();
187  static void set_sizeof_int(unsigned int);
188  static void set_sizeof_real(unsigned int);
189  static void set_max_number_entries(unsigned int);
190 
191  protected:
193  static double byte_num_to_double(unsigned int);
195  static int byte_num_to_int(unsigned int);
197  static void write_byte_num(double, unsigned int);
199  static void write_byte_num(int, unsigned int);
201  static void print_legend(std::ostream& ostr = std::cout);
202 
203  private:
204  static unsigned int s_sizeof_int;
205  static unsigned int s_sizeof_real;
206  static unsigned int s_max_number_entries;
207  };
208 
210  // EPOS Floorplan Inlines //
212  inline unsigned int EPOS_Wrapper::sizeof_int() { return s_sizeof_int; }
213 
214  inline unsigned int EPOS_Wrapper::sizeof_real() { return s_sizeof_real; }
215 
217 
218  inline void EPOS_Wrapper::set_sizeof_int(unsigned int size) {
219  if (size != sizeof(short int) && size != sizeof(long int) && size != sizeof(int)) {
220  std::cerr << "HepMC is not able to handle integers "
221  << " of size other than 2 or 4."
222  << " You requested: " << size << std::endl;
223  }
224  s_sizeof_int = size;
225  }
226 
227  inline void EPOS_Wrapper::set_sizeof_real(unsigned int size) {
228  if (size != sizeof(float) && size != sizeof(double)) {
229  std::cerr << "HepMC is not able to handle floating point numbers"
230  << " of size other than 4 or 8."
231  << " You requested: " << size << std::endl;
232  }
234  }
235 
237 
238  inline double EPOS_Wrapper::byte_num_to_double(unsigned int b) {
239  if (b >= epos_bytes_allocation)
240  std::cerr << "EPOS_Wrapper: requested hepcom data exceeds allocation" << std::endl;
241  if (s_sizeof_real == sizeof(float)) {
242  float* myfloat = (float*)&hepcom.data[b];
243  return (double)(*myfloat);
244  } else if (s_sizeof_real == sizeof(double)) {
245  double* mydouble = (double*)&hepcom.data[b];
246  return (*mydouble);
247  } else {
248  std::cerr << "EPOS_Wrapper: illegal floating point number length." << s_sizeof_real << std::endl;
249  }
250  return 0;
251  }
252 
253  inline int EPOS_Wrapper::byte_num_to_int(unsigned int b) {
254  if (b >= epos_bytes_allocation)
255  std::cerr << "EPOS_Wrapper: requested hepcom data exceeds allocation" << std::endl;
256  if (s_sizeof_int == sizeof(short int)) {
257  short int* myshortint = (short int*)&hepcom.data[b];
258  return (int)(*myshortint);
259  } else if (s_sizeof_int == sizeof(long int)) {
260  long int* mylongint = (long int*)&hepcom.data[b];
261  return (*mylongint);
262  // on some 64 bit machines, int, short, and long are all different
263  } else if (s_sizeof_int == sizeof(int)) {
264  int* myint = (int*)&hepcom.data[b];
265  return (*myint);
266  } else {
267  std::cerr << "EPOS_Wrapper: illegal integer number length." << s_sizeof_int << std::endl;
268  }
269  return 0;
270  }
271 
272  inline void EPOS_Wrapper::write_byte_num(double in, unsigned int b) {
273  if (b >= epos_bytes_allocation)
274  std::cerr << "EPOS_Wrapper: requested hepcom data exceeds allocation" << std::endl;
275  if (s_sizeof_real == sizeof(float)) {
276  float* myfloat = (float*)&hepcom.data[b];
277  (*myfloat) = (float)in;
278  } else if (s_sizeof_real == sizeof(double)) {
279  double* mydouble = (double*)&hepcom.data[b];
280  (*mydouble) = (double)in;
281  } else {
282  std::cerr << "EPOS_Wrapper: illegal floating point number length." << s_sizeof_real << std::endl;
283  }
284  }
285 
286  inline void EPOS_Wrapper::write_byte_num(int in, unsigned int b) {
287  if (b >= epos_bytes_allocation)
288  std::cerr << "EPOS_Wrapper: requested hepcom data exceeds allocation" << std::endl;
289  if (s_sizeof_int == sizeof(short int)) {
290  short int* myshortint = (short int*)&hepcom.data[b];
291  (*myshortint) = (short int)in;
292  } else if (s_sizeof_int == sizeof(long int)) {
293  long int* mylongint = (long int*)&hepcom.data[b];
294  (*mylongint) = (int)in;
295  // on some 64 bit machines, int, short, and long are all different
296  } else if (s_sizeof_int == sizeof(int)) {
297  int* myint = (int*)&hepcom.data[b];
298  (*myint) = (int)in;
299  } else {
300  std::cerr << "EPOS_Wrapper: illegal integer number length." << s_sizeof_int << std::endl;
301  }
302  }
303 
305  // INLINES //
307 
308  inline int EPOS_Wrapper::event_number() { return byte_num_to_int(0); }
309 
311  int nhep = byte_num_to_int(1 * sizeof_int());
312  return (nhep <= max_number_entries() ? nhep : max_number_entries());
313  }
314 
315  inline int EPOS_Wrapper::status(int index) { return byte_num_to_int((2 + index - 1) * sizeof_int()); }
316 
317  inline int EPOS_Wrapper::id(int index) {
318  return byte_num_to_int((2 + max_number_entries() + index - 1) * sizeof_int());
319  }
320 
322  int parent = byte_num_to_int((2 + 2 * max_number_entries() + 2 * (index - 1)) * sizeof_int());
323  return (parent > 0 && parent <= number_entries()) ? parent : 0;
324  }
325 
327  // Returns the Index of the LAST parent in the EPOS record
328  // for particle with Index index.
329  // If there is only one parent, the last parent is forced to
330  // be the same as the first parent.
331  // If there are no parents for this particle, both the first_parent
332  // and the last_parent with return 0.
333  // Error checking is done to ensure the parent is always
334  // within range ( 0 <= parent <= nhep )
335  //
336  int firstparent = first_parent(index);
337  int parent = byte_num_to_int((2 + 2 * max_number_entries() + 2 * (index - 1) + 1) * sizeof_int());
338  return (parent > firstparent && parent <= number_entries()) ? parent : firstparent;
339  }
340 
342  int firstparent = first_parent(index);
343  return (firstparent > 0) ? (1 + last_parent(index) - firstparent) : 0;
344  }
345 
347  int child = byte_num_to_int((2 + 4 * max_number_entries() + 2 * (index - 1)) * sizeof_int());
348  return (child > 0 && child <= number_entries()) ? child : 0;
349  }
350 
351  inline int EPOS_Wrapper::last_child(int index) {
352  // Returns the Index of the LAST child in the EPOS record
353  // for particle with Index index.
354  // If there is only one child, the last child is forced to
355  // be the same as the first child.
356  // If there are no children for this particle, both the first_child
357  // and the last_child with return 0.
358  // Error checking is done to ensure the child is always
359  // within range ( 0 <= parent <= nhep )
360  //
361  int firstchild = first_child(index);
362  int child = byte_num_to_int((2 + 4 * max_number_entries() + 2 * (index - 1) + 1) * sizeof_int());
363  return (child > firstchild && child <= number_entries()) ? child : firstchild;
364  }
365 
367  int firstchild = first_child(index);
368  return (firstchild > 0) ? (1 + last_child(index) - firstchild) : 0;
369  }
370 
371  inline double EPOS_Wrapper::px(int index) {
372  return byte_num_to_double((2 + 6 * max_number_entries()) * sizeof_int() + (5 * (index - 1) + 0) * sizeof_real());
373  }
374 
375  inline double EPOS_Wrapper::py(int index) {
376  return byte_num_to_double((2 + 6 * max_number_entries()) * sizeof_int() + (5 * (index - 1) + 1) * sizeof_real());
377  }
378 
379  inline double EPOS_Wrapper::pz(int index) {
380  return byte_num_to_double((2 + 6 * max_number_entries()) * sizeof_int() + (5 * (index - 1) + 2) * sizeof_real());
381  }
382 
383  inline double EPOS_Wrapper::e(int index) {
384  return byte_num_to_double((2 + 6 * max_number_entries()) * sizeof_int() + (5 * (index - 1) + 3) * sizeof_real());
385  }
386 
387  inline double EPOS_Wrapper::m(int index) {
388  return byte_num_to_double((2 + 6 * max_number_entries()) * sizeof_int() + (5 * (index - 1) + 4) * sizeof_real());
389  }
390 
391  inline double EPOS_Wrapper::x(int index) {
392  return byte_num_to_double((2 + 6 * max_number_entries()) * sizeof_int() +
393  (5 * max_number_entries() + (4 * (index - 1) + 0)) * sizeof_real());
394  }
395 
396  inline double EPOS_Wrapper::y(int index) {
397  return byte_num_to_double((2 + 6 * max_number_entries()) * sizeof_int() +
398  (5 * max_number_entries() + (4 * (index - 1) + 1)) * sizeof_real());
399  }
400 
401  inline double EPOS_Wrapper::z(int index) {
402  return byte_num_to_double((2 + 6 * max_number_entries()) * sizeof_int() +
403  (5 * max_number_entries() + (4 * (index - 1) + 2)) * sizeof_real());
404  }
405 
406  inline double EPOS_Wrapper::t(int index) {
407  return byte_num_to_double((2 + 6 * max_number_entries()) * sizeof_int() +
408  (5 * max_number_entries() + (4 * (index - 1) + 3)) * sizeof_real());
409  }
410 
411  inline void EPOS_Wrapper::set_event_number(int evtno) { write_byte_num(evtno, 0); }
412 
413  inline void EPOS_Wrapper::set_number_entries(int noentries) { write_byte_num(noentries, 1 * sizeof_int()); }
414 
415  inline void EPOS_Wrapper::set_status(int index, int status) {
416  if (index <= 0 || index > max_number_entries())
417  return;
418  write_byte_num(status, (2 + index - 1) * sizeof_int());
419  }
420 
421  inline void EPOS_Wrapper::set_id(int index, int id) {
422  if (index <= 0 || index > max_number_entries())
423  return;
424  write_byte_num(id, (2 + max_number_entries() + index - 1) * sizeof_int());
425  }
426 
427  inline void EPOS_Wrapper::set_parents(int index, int firstparent, int lastparent) {
428  if (index <= 0 || index > max_number_entries())
429  return;
430  write_byte_num(firstparent, (2 + 2 * max_number_entries() + 2 * (index - 1)) * sizeof_int());
431  write_byte_num(lastparent, (2 + 2 * max_number_entries() + 2 * (index - 1) + 1) * sizeof_int());
432  }
433 
434  inline void EPOS_Wrapper::set_children(int index, int firstchild, int lastchild) {
435  if (index <= 0 || index > max_number_entries())
436  return;
437  write_byte_num(firstchild, (2 + 4 * max_number_entries() + 2 * (index - 1)) * sizeof_int());
438  write_byte_num(lastchild, (2 + 4 * max_number_entries() + 2 * (index - 1) + 1) * sizeof_int());
439  }
440 
441  inline void EPOS_Wrapper::set_momentum(int index, double px, double py, double pz, double e) {
442  if (index <= 0 || index > max_number_entries())
443  return;
444  write_byte_num(px, (2 + 6 * max_number_entries()) * sizeof_int() + (5 * (index - 1) + 0) * sizeof_real());
445  write_byte_num(py, (2 + 6 * max_number_entries()) * sizeof_int() + (5 * (index - 1) + 1) * sizeof_real());
446  write_byte_num(pz, (2 + 6 * max_number_entries()) * sizeof_int() + (5 * (index - 1) + 2) * sizeof_real());
447  write_byte_num(e, (2 + 6 * max_number_entries()) * sizeof_int() + (5 * (index - 1) + 3) * sizeof_real());
448  }
449 
450  inline void EPOS_Wrapper::set_mass(int index, double mass) {
451  if (index <= 0 || index > max_number_entries())
452  return;
453  write_byte_num(mass, (2 + 6 * max_number_entries()) * sizeof_int() + (5 * (index - 1) + 4) * sizeof_real());
454  }
455 
456  inline void EPOS_Wrapper::set_position(int index, double x, double y, double z, double t) {
457  if (index <= 0 || index > max_number_entries())
458  return;
460  (2 + 6 * max_number_entries()) * sizeof_int() +
461  (5 * max_number_entries() + (4 * (index - 1) + 0)) * sizeof_real());
463  (2 + 6 * max_number_entries()) * sizeof_int() +
464  (5 * max_number_entries() + (4 * (index - 1) + 1)) * sizeof_real());
466  (2 + 6 * max_number_entries()) * sizeof_int() +
467  (5 * max_number_entries() + (4 * (index - 1) + 2)) * sizeof_real());
469  (2 + 6 * max_number_entries()) * sizeof_int() +
470  (5 * max_number_entries() + (4 * (index - 1) + 3)) * sizeof_real());
471  }
472 
474  set_event_number(0);
476  for (int i = 1; i <= max_number_entries(); ++i) {
477  set_status(i, 0);
478  set_id(i, 0);
479  set_parents(i, 0, 0);
480  set_children(i, 0, 0);
481  set_momentum(i, 0, 0, 0, 0);
482  set_mass(i, 0);
483  set_position(i, 0, 0, 0, 0);
484  }
485  }
486 
487  inline void EPOS_Wrapper::print_hepcom(std::ostream& ostr) {
488  ostr << "________________________________________"
489  << "________________________________________" << std::endl;
490  ostr << "***** HEPEVT Common Event#: " << event_number() << ", " << number_entries() << " particles (max "
491  << max_number_entries() << ") *****";
492  ostr << sizeof_int() << "-byte integers, " << sizeof_real() << "-byte floating point numbers, "
493  << max_number_entries() << "-allocated entries." << std::endl;
494  print_legend(ostr);
495  ostr << "________________________________________"
496  << "________________________________________" << std::endl;
497  for (int i = 1; i <= number_entries(); ++i) {
498  print_hepcom_particle(i, ostr);
499  }
500  ostr << "________________________________________"
501  << "________________________________________" << std::endl;
502  }
503 
504  inline void EPOS_Wrapper::print_hepcom_particle(int i, std::ostream& ostr) {
505  char outline[81];
506  sprintf(outline,
507  "%4d %+4d %4d %4d (%9.3g, %9.3g, %9.3g, %9.3g, %9.3g)",
508  i,
509  status(i),
510  first_parent(i),
511  first_child(i),
512  px(i),
513  py(i),
514  pz(i),
515  e(i),
516  m(i));
517  ostr << outline << "\n";
518  sprintf(outline,
519  "%+9d %4d %4d (%9.3g, %9.3g, %9.3g, %9.3g)",
520  // old version was:" (%+9.2e, %+9.2e, %+9.2e, %+9.2e)"
521  id(i),
522  last_parent(i),
523  last_child(i),
524  x(i),
525  y(i),
526  z(i),
527  t(i));
528  ostr << outline << std::endl;
529  }
530 
531  inline void EPOS_Wrapper::print_legend(std::ostream& ostr) {
532  char outline[81];
533  sprintf(outline,
534  "%4s %4s %4s %5s %10s, %9s, %9s, %9s, %10s",
535  "Indx",
536  "Stat",
537  "Par-",
538  "chil-",
539  "( P_x",
540  "P_y",
541  "P_z",
542  "Energy",
543  "M ) ");
544  ostr << outline << std::endl;
545  sprintf(
546  outline, "%9s %4s %4s %10s, %9s, %9s, %9s) %9s", "ID ", "ents", "dren", "Prod ( X", "Y", "Z", "cT", "[mm]");
547  ostr << outline << std::endl;
548  }
549 
550 } // namespace EPOS
551 
552 #endif // HEPMC_EPOS_WRAPPER_H
553 //--------------------------------------------------------------------------
size
Write out results.
static void zero_everything()
set all entries in EPOS to zero
Definition: EPOS_Wrapper.h:473
static void set_children(int index, int firstchild, int lastchild)
define children of a particle
Definition: EPOS_Wrapper.h:434
static void set_mass(int index, double mass)
set particle mass
Definition: EPOS_Wrapper.h:450
static double m(int index)
generated mass
Definition: EPOS_Wrapper.h:387
static void set_status(int index, int status)
set particle status
Definition: EPOS_Wrapper.h:415
static void set_sizeof_real(unsigned int)
define size of real
Definition: EPOS_Wrapper.h:227
static void print_hepcom(std::ostream &ostr=std::cout)
write information from EPOS common block
Definition: EPOS_Wrapper.h:487
static void set_id(int index, int id)
set particle ID
Definition: EPOS_Wrapper.h:421
return((rh ^ lh) &mask)
static void write_byte_num(double, unsigned int)
pretend common block is an array of bytes
Definition: EPOS_Wrapper.h:272
static double e(int index)
Energy.
Definition: EPOS_Wrapper.h:383
static double t(int index)
production time
Definition: EPOS_Wrapper.h:406
static void set_number_entries(int noentries)
set number of entries in EPOS
Definition: EPOS_Wrapper.h:413
static int number_parents(int index)
number of parents
Definition: EPOS_Wrapper.h:341
static void set_event_number(int evtno)
set event number
Definition: EPOS_Wrapper.h:411
#define EPOS_EntriesAllocation
Definition: EPOS_Wrapper.h:5
static void set_momentum(int index, double px, double py, double pz, double e)
set particle momentum
Definition: EPOS_Wrapper.h:441
static int first_child(int index)
index of 1st daughter
Definition: EPOS_Wrapper.h:346
static int first_parent(int index)
index of 1st mother
Definition: EPOS_Wrapper.h:321
struct @746 hepcom_
#define hepcom
Definition: EPOS_Wrapper.h:81
static double y(int index)
Y Production vertex.
Definition: EPOS_Wrapper.h:396
static double py(int index)
Y momentum.
Definition: EPOS_Wrapper.h:375
static unsigned int sizeof_int()
size of integer in bytes
Definition: EPOS_Wrapper.h:212
static int event_number()
event number
Definition: EPOS_Wrapper.h:308
static void set_max_number_entries(unsigned int)
define size of common block
Definition: EPOS_Wrapper.h:236
Generic Wrapper for the fortran EPOS common block.
Definition: EPOS_Wrapper.h:127
static int status(int index)
status code
Definition: EPOS_Wrapper.h:315
static void set_position(int index, double x, double y, double z, double t)
set particle production vertex
Definition: EPOS_Wrapper.h:456
static int number_entries()
num entries in current evt
Definition: EPOS_Wrapper.h:310
static unsigned int s_max_number_entries
Definition: EPOS_Wrapper.h:206
static double byte_num_to_double(unsigned int)
navigate a byte array
Definition: EPOS_Wrapper.h:238
static double pz(int index)
Z momentum.
Definition: EPOS_Wrapper.h:379
static void print_hepcom_particle(int index, std::ostream &ostr=std::cout)
write particle information to ostr
Definition: EPOS_Wrapper.h:504
static double z(int index)
Z Production vertex.
Definition: EPOS_Wrapper.h:401
static int number_children(int index)
number of children
Definition: EPOS_Wrapper.h:366
static int byte_num_to_int(unsigned int)
navigate a byte array
Definition: EPOS_Wrapper.h:253
static int id(int index)
PDG particle id.
Definition: EPOS_Wrapper.h:317
static int max_number_entries()
size of common block
Definition: EPOS_Wrapper.h:216
double b
Definition: hdecay.h:118
static unsigned int s_sizeof_real
Definition: EPOS_Wrapper.h:205
const unsigned int epos_bytes_allocation
Definition: EPOS_Wrapper.h:67
static void print_legend(std::ostream &ostr=std::cout)
print output legend
Definition: EPOS_Wrapper.h:531
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
static int last_child(int index)
index of last daughter
Definition: EPOS_Wrapper.h:351
static unsigned int sizeof_real()
size of real in bytes
Definition: EPOS_Wrapper.h:214
static int last_parent(int index)
index of last mother
Definition: EPOS_Wrapper.h:326
static double x(int index)
X Production vertex.
Definition: EPOS_Wrapper.h:391
static double px(int index)
X momentum.
Definition: EPOS_Wrapper.h:371
static void set_parents(int index, int firstparent, int lastparent)
define parents of a particle
Definition: EPOS_Wrapper.h:427
static void set_sizeof_int(unsigned int)
define size of integer
Definition: EPOS_Wrapper.h:218
static unsigned int s_sizeof_int
Definition: EPOS_Wrapper.h:204