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 {
81 } hepcom_;
82 }
83 #define hepcom hepcom_
84 
85 #endif // Platform
86 
87 #endif // HEPMC_EPOS_COMMON_H
88 
89 //--------------------------------------------------------------------------
90 #ifndef HEPMC_EPOS_WRAPPER_H
91 #define HEPMC_EPOS_WRAPPER_H
92 
94 // Matt.Dobbs@Cern.CH, April 24, 2000, refer to:
95 // M. Dobbs and J.B. Hansen, "The HepMC C++ Monte Carlo Event Record for
96 // High Energy Physics", Computer Physics Communications (to be published).
97 //
98 // Generic Wrapper for the fortran EPOS common block
99 // This class is intended for static use only - it makes no sense to
100 // instantiate it.
101 // Updated: June 30, 2000 (static initialization moved to separate .cxx file)
103 //
104 // The index refers to the fortran style index:
105 // i.e. index=1 refers to the first entry in the EPOS common block.
106 // all indices must be >0
107 // number_entries --> integer between 0 and max_number_entries() giving total
108 // number of sequential particle indices
109 // first_parent/child --> index of first mother/child if there is one,
110 // zero otherwise
111 // last_parent/child --> if number children is >1, address of last parent/child
112 // if number of children is 1, same as first_parent/child
113 // if there are no children, returns zero.
114 // is_double_precision --> T or F depending if floating point variables
115 // are 8 or 4 bytes
116 //
117 
118 #include <iostream>
119 #include <cstdio> // needed for formatted output using sprintf
120 
121 namespace EPOS {
122 
124 
129  class EPOS_Wrapper {
130  public:
132  static void print_hepcom(std::ostream& ostr = std::cout);
134  static void print_hepcom_particle(int index, std::ostream& ostr = std::cout);
136  static void zero_everything();
137 
139  // Access Methods //
141  static int event_number();
142  static int number_entries();
143  static int status(int index);
144  static int id(int index);
145  static int first_parent(int index);
146  static int last_parent(int index);
147  static int number_parents(int index);
148  static int first_child(int index);
149  static int last_child(int index);
150  static int number_children(int index);
151  static double px(int index);
152  static double py(int index);
153  static double pz(int index);
154  static double e(int index);
155  static double m(int index);
156  static double x(int index);
157  static double y(int index);
158  static double z(int index);
159  static double t(int index);
160 
162  // Set Methods //
164 
166  static void set_event_number(int evtno);
168  static void set_number_entries(int noentries);
170  static void set_status(int index, int status);
172  static void set_id(int index, int id);
174  static void set_parents(int index, int firstparent, int lastparent);
176  static void set_children(int index, int firstchild, int lastchild);
178  static void set_momentum(int index, double px, double py, double pz, double e);
180  static void set_mass(int index, double mass);
182  static void set_position(int index, double x, double y, double z, double t);
184  // EPOS Floorplan //
186  static unsigned int sizeof_int();
187  static unsigned int sizeof_real();
188  static int max_number_entries();
189  static void set_sizeof_int(unsigned int);
190  static void set_sizeof_real(unsigned int);
191  static void set_max_number_entries(unsigned int);
192 
193  protected:
195  static double byte_num_to_double(unsigned int);
197  static int byte_num_to_int(unsigned int);
199  static void write_byte_num(double, unsigned int);
201  static void write_byte_num(int, unsigned int);
203  static void print_legend(std::ostream& ostr = std::cout);
204 
205  private:
206  static unsigned int s_sizeof_int;
207  static unsigned int s_sizeof_real;
208  static unsigned int s_max_number_entries;
209  };
210 
212  // EPOS Floorplan Inlines //
214  inline unsigned int EPOS_Wrapper::sizeof_int() { return s_sizeof_int; }
215 
216  inline unsigned int EPOS_Wrapper::sizeof_real() { return s_sizeof_real; }
217 
219 
220  inline void EPOS_Wrapper::set_sizeof_int(unsigned int size) {
221  if (size != sizeof(short int) && size != sizeof(long int) && size != sizeof(int)) {
222  std::cerr << "HepMC is not able to handle integers "
223  << " of size other than 2 or 4."
224  << " You requested: " << size << std::endl;
225  }
226  s_sizeof_int = size;
227  }
228 
229  inline void EPOS_Wrapper::set_sizeof_real(unsigned int size) {
230  if (size != sizeof(float) && size != sizeof(double)) {
231  std::cerr << "HepMC is not able to handle floating point numbers"
232  << " of size other than 4 or 8."
233  << " You requested: " << size << std::endl;
234  }
236  }
237 
239 
240  inline double EPOS_Wrapper::byte_num_to_double(unsigned int b) {
241  if (b >= epos_bytes_allocation)
242  std::cerr << "EPOS_Wrapper: requested hepcom data exceeds allocation" << std::endl;
243  if (s_sizeof_real == sizeof(float)) {
244  float* myfloat = (float*)&hepcom.data[b];
245  return (double)(*myfloat);
246  } else if (s_sizeof_real == sizeof(double)) {
247  double* mydouble = (double*)&hepcom.data[b];
248  return (*mydouble);
249  } else {
250  std::cerr << "EPOS_Wrapper: illegal floating point number length." << s_sizeof_real << std::endl;
251  }
252  return 0;
253  }
254 
255  inline int EPOS_Wrapper::byte_num_to_int(unsigned int b) {
256  if (b >= epos_bytes_allocation)
257  std::cerr << "EPOS_Wrapper: requested hepcom data exceeds allocation" << std::endl;
258  if (s_sizeof_int == sizeof(short int)) {
259  short int* myshortint = (short int*)&hepcom.data[b];
260  return (int)(*myshortint);
261  } else if (s_sizeof_int == sizeof(long int)) {
262  long int* mylongint = (long int*)&hepcom.data[b];
263  return (*mylongint);
264  // on some 64 bit machines, int, short, and long are all different
265  } else if (s_sizeof_int == sizeof(int)) {
266  int* myint = (int*)&hepcom.data[b];
267  return (*myint);
268  } else {
269  std::cerr << "EPOS_Wrapper: illegal integer number length." << s_sizeof_int << std::endl;
270  }
271  return 0;
272  }
273 
274  inline void EPOS_Wrapper::write_byte_num(double in, unsigned int b) {
275  if (b >= epos_bytes_allocation)
276  std::cerr << "EPOS_Wrapper: requested hepcom data exceeds allocation" << std::endl;
277  if (s_sizeof_real == sizeof(float)) {
278  float* myfloat = (float*)&hepcom.data[b];
279  (*myfloat) = (float)in;
280  } else if (s_sizeof_real == sizeof(double)) {
281  double* mydouble = (double*)&hepcom.data[b];
282  (*mydouble) = (double)in;
283  } else {
284  std::cerr << "EPOS_Wrapper: illegal floating point number length." << s_sizeof_real << std::endl;
285  }
286  }
287 
288  inline void EPOS_Wrapper::write_byte_num(int in, unsigned int b) {
289  if (b >= epos_bytes_allocation)
290  std::cerr << "EPOS_Wrapper: requested hepcom data exceeds allocation" << std::endl;
291  if (s_sizeof_int == sizeof(short int)) {
292  short int* myshortint = (short int*)&hepcom.data[b];
293  (*myshortint) = (short int)in;
294  } else if (s_sizeof_int == sizeof(long int)) {
295  long int* mylongint = (long int*)&hepcom.data[b];
296  (*mylongint) = (int)in;
297  // on some 64 bit machines, int, short, and long are all different
298  } else if (s_sizeof_int == sizeof(int)) {
299  int* myint = (int*)&hepcom.data[b];
300  (*myint) = (int)in;
301  } else {
302  std::cerr << "EPOS_Wrapper: illegal integer number length." << s_sizeof_int << std::endl;
303  }
304  }
305 
307  // INLINES //
309 
310  inline int EPOS_Wrapper::event_number() { return byte_num_to_int(0); }
311 
313  int nhep = byte_num_to_int(1 * sizeof_int());
314  return (nhep <= max_number_entries() ? nhep : max_number_entries());
315  }
316 
317  inline int EPOS_Wrapper::status(int index) { return byte_num_to_int((2 + index - 1) * sizeof_int()); }
318 
319  inline int EPOS_Wrapper::id(int index) {
320  return byte_num_to_int((2 + max_number_entries() + index - 1) * sizeof_int());
321  }
322 
324  int parent = byte_num_to_int((2 + 2 * max_number_entries() + 2 * (index - 1)) * sizeof_int());
325  return (parent > 0 && parent <= number_entries()) ? parent : 0;
326  }
327 
329  // Returns the Index of the LAST parent in the EPOS record
330  // for particle with Index index.
331  // If there is only one parent, the last parent is forced to
332  // be the same as the first parent.
333  // If there are no parents for this particle, both the first_parent
334  // and the last_parent with return 0.
335  // Error checking is done to ensure the parent is always
336  // within range ( 0 <= parent <= nhep )
337  //
338  int firstparent = first_parent(index);
339  int parent = byte_num_to_int((2 + 2 * max_number_entries() + 2 * (index - 1) + 1) * sizeof_int());
340  return (parent > firstparent && parent <= number_entries()) ? parent : firstparent;
341  }
342 
344  int firstparent = first_parent(index);
345  return (firstparent > 0) ? (1 + last_parent(index) - firstparent) : 0;
346  }
347 
349  int child = byte_num_to_int((2 + 4 * max_number_entries() + 2 * (index - 1)) * sizeof_int());
350  return (child > 0 && child <= number_entries()) ? child : 0;
351  }
352 
353  inline int EPOS_Wrapper::last_child(int index) {
354  // Returns the Index of the LAST child in the EPOS record
355  // for particle with Index index.
356  // If there is only one child, the last child is forced to
357  // be the same as the first child.
358  // If there are no children for this particle, both the first_child
359  // and the last_child with return 0.
360  // Error checking is done to ensure the child is always
361  // within range ( 0 <= parent <= nhep )
362  //
363  int firstchild = first_child(index);
364  int child = byte_num_to_int((2 + 4 * max_number_entries() + 2 * (index - 1) + 1) * sizeof_int());
365  return (child > firstchild && child <= number_entries()) ? child : firstchild;
366  }
367 
369  int firstchild = first_child(index);
370  return (firstchild > 0) ? (1 + last_child(index) - firstchild) : 0;
371  }
372 
373  inline double EPOS_Wrapper::px(int index) {
374  return byte_num_to_double((2 + 6 * max_number_entries()) * sizeof_int() + (5 * (index - 1) + 0) * sizeof_real());
375  }
376 
377  inline double EPOS_Wrapper::py(int index) {
378  return byte_num_to_double((2 + 6 * max_number_entries()) * sizeof_int() + (5 * (index - 1) + 1) * sizeof_real());
379  }
380 
381  inline double EPOS_Wrapper::pz(int index) {
382  return byte_num_to_double((2 + 6 * max_number_entries()) * sizeof_int() + (5 * (index - 1) + 2) * sizeof_real());
383  }
384 
385  inline double EPOS_Wrapper::e(int index) {
386  return byte_num_to_double((2 + 6 * max_number_entries()) * sizeof_int() + (5 * (index - 1) + 3) * sizeof_real());
387  }
388 
389  inline double EPOS_Wrapper::m(int index) {
390  return byte_num_to_double((2 + 6 * max_number_entries()) * sizeof_int() + (5 * (index - 1) + 4) * sizeof_real());
391  }
392 
393  inline double EPOS_Wrapper::x(int index) {
394  return byte_num_to_double((2 + 6 * max_number_entries()) * sizeof_int() +
395  (5 * max_number_entries() + (4 * (index - 1) + 0)) * sizeof_real());
396  }
397 
398  inline double EPOS_Wrapper::y(int index) {
399  return byte_num_to_double((2 + 6 * max_number_entries()) * sizeof_int() +
400  (5 * max_number_entries() + (4 * (index - 1) + 1)) * sizeof_real());
401  }
402 
403  inline double EPOS_Wrapper::z(int index) {
404  return byte_num_to_double((2 + 6 * max_number_entries()) * sizeof_int() +
405  (5 * max_number_entries() + (4 * (index - 1) + 2)) * sizeof_real());
406  }
407 
408  inline double EPOS_Wrapper::t(int index) {
409  return byte_num_to_double((2 + 6 * max_number_entries()) * sizeof_int() +
410  (5 * max_number_entries() + (4 * (index - 1) + 3)) * sizeof_real());
411  }
412 
413  inline void EPOS_Wrapper::set_event_number(int evtno) { write_byte_num(evtno, 0); }
414 
415  inline void EPOS_Wrapper::set_number_entries(int noentries) { write_byte_num(noentries, 1 * sizeof_int()); }
416 
417  inline void EPOS_Wrapper::set_status(int index, int status) {
418  if (index <= 0 || index > max_number_entries())
419  return;
420  write_byte_num(status, (2 + index - 1) * sizeof_int());
421  }
422 
423  inline void EPOS_Wrapper::set_id(int index, int id) {
424  if (index <= 0 || index > max_number_entries())
425  return;
426  write_byte_num(id, (2 + max_number_entries() + index - 1) * sizeof_int());
427  }
428 
429  inline void EPOS_Wrapper::set_parents(int index, int firstparent, int lastparent) {
430  if (index <= 0 || index > max_number_entries())
431  return;
432  write_byte_num(firstparent, (2 + 2 * max_number_entries() + 2 * (index - 1)) * sizeof_int());
433  write_byte_num(lastparent, (2 + 2 * max_number_entries() + 2 * (index - 1) + 1) * sizeof_int());
434  }
435 
436  inline void EPOS_Wrapper::set_children(int index, int firstchild, int lastchild) {
437  if (index <= 0 || index > max_number_entries())
438  return;
439  write_byte_num(firstchild, (2 + 4 * max_number_entries() + 2 * (index - 1)) * sizeof_int());
440  write_byte_num(lastchild, (2 + 4 * max_number_entries() + 2 * (index - 1) + 1) * sizeof_int());
441  }
442 
443  inline void EPOS_Wrapper::set_momentum(int index, double px, double py, double pz, double e) {
444  if (index <= 0 || index > max_number_entries())
445  return;
446  write_byte_num(px, (2 + 6 * max_number_entries()) * sizeof_int() + (5 * (index - 1) + 0) * sizeof_real());
447  write_byte_num(py, (2 + 6 * max_number_entries()) * sizeof_int() + (5 * (index - 1) + 1) * sizeof_real());
448  write_byte_num(pz, (2 + 6 * max_number_entries()) * sizeof_int() + (5 * (index - 1) + 2) * sizeof_real());
449  write_byte_num(e, (2 + 6 * max_number_entries()) * sizeof_int() + (5 * (index - 1) + 3) * sizeof_real());
450  }
451 
452  inline void EPOS_Wrapper::set_mass(int index, double mass) {
453  if (index <= 0 || index > max_number_entries())
454  return;
455  write_byte_num(mass, (2 + 6 * max_number_entries()) * sizeof_int() + (5 * (index - 1) + 4) * sizeof_real());
456  }
457 
458  inline void EPOS_Wrapper::set_position(int index, double x, double y, double z, double t) {
459  if (index <= 0 || index > max_number_entries())
460  return;
462  (2 + 6 * max_number_entries()) * sizeof_int() +
463  (5 * max_number_entries() + (4 * (index - 1) + 0)) * sizeof_real());
465  (2 + 6 * max_number_entries()) * sizeof_int() +
466  (5 * max_number_entries() + (4 * (index - 1) + 1)) * sizeof_real());
468  (2 + 6 * max_number_entries()) * sizeof_int() +
469  (5 * max_number_entries() + (4 * (index - 1) + 2)) * sizeof_real());
471  (2 + 6 * max_number_entries()) * sizeof_int() +
472  (5 * max_number_entries() + (4 * (index - 1) + 3)) * sizeof_real());
473  }
474 
476  set_event_number(0);
478  for (int i = 1; i <= max_number_entries(); ++i) {
479  set_status(i, 0);
480  set_id(i, 0);
481  set_parents(i, 0, 0);
482  set_children(i, 0, 0);
483  set_momentum(i, 0, 0, 0, 0);
484  set_mass(i, 0);
485  set_position(i, 0, 0, 0, 0);
486  }
487  }
488 
489  inline void EPOS_Wrapper::print_hepcom(std::ostream& ostr) {
490  ostr << "________________________________________"
491  << "________________________________________" << std::endl;
492  ostr << "***** HEPEVT Common Event#: " << event_number() << ", " << number_entries() << " particles (max "
493  << max_number_entries() << ") *****";
494  ostr << sizeof_int() << "-byte integers, " << sizeof_real() << "-byte floating point numbers, "
495  << max_number_entries() << "-allocated entries." << std::endl;
496  print_legend(ostr);
497  ostr << "________________________________________"
498  << "________________________________________" << std::endl;
499  for (int i = 1; i <= number_entries(); ++i) {
500  print_hepcom_particle(i, ostr);
501  }
502  ostr << "________________________________________"
503  << "________________________________________" << std::endl;
504  }
505 
506  inline void EPOS_Wrapper::print_hepcom_particle(int i, std::ostream& ostr) {
507  char outline[81];
508  sprintf(outline,
509  "%4d %+4d %4d %4d (%9.3g, %9.3g, %9.3g, %9.3g, %9.3g)",
510  i,
511  status(i),
512  first_parent(i),
513  first_child(i),
514  px(i),
515  py(i),
516  pz(i),
517  e(i),
518  m(i));
519  ostr << outline << "\n";
520  sprintf(outline,
521  "%+9d %4d %4d (%9.3g, %9.3g, %9.3g, %9.3g)",
522  // old version was:" (%+9.2e, %+9.2e, %+9.2e, %+9.2e)"
523  id(i),
524  last_parent(i),
525  last_child(i),
526  x(i),
527  y(i),
528  z(i),
529  t(i));
530  ostr << outline << std::endl;
531  }
532 
533  inline void EPOS_Wrapper::print_legend(std::ostream& ostr) {
534  char outline[81];
535  sprintf(outline,
536  "%4s %4s %4s %5s %10s, %9s, %9s, %9s, %10s",
537  "Indx",
538  "Stat",
539  "Par-",
540  "chil-",
541  "( P_x",
542  "P_y",
543  "P_z",
544  "Energy",
545  "M ) ");
546  ostr << outline << std::endl;
547  sprintf(
548  outline, "%9s %4s %4s %10s, %9s, %9s, %9s) %9s", "ID ", "ents", "dren", "Prod ( X", "Y", "Z", "cT", "[mm]");
549  ostr << outline << std::endl;
550  }
551 
552 } // namespace EPOS
553 
554 #endif // HEPMC_EPOS_WRAPPER_H
555 //--------------------------------------------------------------------------
size
Write out results.
static void zero_everything()
set all entries in EPOS to zero
Definition: EPOS_Wrapper.h:475
static void set_children(int index, int firstchild, int lastchild)
define children of a particle
Definition: EPOS_Wrapper.h:436
static void set_mass(int index, double mass)
set particle mass
Definition: EPOS_Wrapper.h:452
static double m(int index)
generated mass
Definition: EPOS_Wrapper.h:389
static void set_status(int index, int status)
set particle status
Definition: EPOS_Wrapper.h:417
static void set_sizeof_real(unsigned int)
define size of real
Definition: EPOS_Wrapper.h:229
static void print_hepcom(std::ostream &ostr=std::cout)
write information from EPOS common block
Definition: EPOS_Wrapper.h:489
static void set_id(int index, int id)
set particle ID
Definition: EPOS_Wrapper.h:423
return((rh ^ lh) &mask)
static void write_byte_num(double, unsigned int)
pretend common block is an array of bytes
Definition: EPOS_Wrapper.h:274
static double e(int index)
Energy.
Definition: EPOS_Wrapper.h:385
static double t(int index)
production time
Definition: EPOS_Wrapper.h:408
static void set_number_entries(int noentries)
set number of entries in EPOS
Definition: EPOS_Wrapper.h:415
static int number_parents(int index)
number of parents
Definition: EPOS_Wrapper.h:343
static void set_event_number(int evtno)
set event number
Definition: EPOS_Wrapper.h:413
#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:443
static int first_child(int index)
index of 1st daughter
Definition: EPOS_Wrapper.h:348
static int first_parent(int index)
index of 1st mother
Definition: EPOS_Wrapper.h:323
#define hepcom
Definition: EPOS_Wrapper.h:83
static double y(int index)
Y Production vertex.
Definition: EPOS_Wrapper.h:398
static double py(int index)
Y momentum.
Definition: EPOS_Wrapper.h:377
static unsigned int sizeof_int()
size of integer in bytes
Definition: EPOS_Wrapper.h:214
static int event_number()
event number
Definition: EPOS_Wrapper.h:310
static void set_max_number_entries(unsigned int)
define size of common block
Definition: EPOS_Wrapper.h:238
Generic Wrapper for the fortran EPOS common block.
Definition: EPOS_Wrapper.h:129
static int status(int index)
status code
Definition: EPOS_Wrapper.h:317
static void set_position(int index, double x, double y, double z, double t)
set particle production vertex
Definition: EPOS_Wrapper.h:458
static int number_entries()
num entries in current evt
Definition: EPOS_Wrapper.h:312
static unsigned int s_max_number_entries
Definition: EPOS_Wrapper.h:208
static double byte_num_to_double(unsigned int)
navigate a byte array
Definition: EPOS_Wrapper.h:240
struct @760 hepcom_
static double pz(int index)
Z momentum.
Definition: EPOS_Wrapper.h:381
static void print_hepcom_particle(int index, std::ostream &ostr=std::cout)
write particle information to ostr
Definition: EPOS_Wrapper.h:506
static double z(int index)
Z Production vertex.
Definition: EPOS_Wrapper.h:403
static int number_children(int index)
number of children
Definition: EPOS_Wrapper.h:368
static int byte_num_to_int(unsigned int)
navigate a byte array
Definition: EPOS_Wrapper.h:255
static int id(int index)
PDG particle id.
Definition: EPOS_Wrapper.h:319
static int max_number_entries()
size of common block
Definition: EPOS_Wrapper.h:218
double b
Definition: hdecay.h:120
static unsigned int s_sizeof_real
Definition: EPOS_Wrapper.h:207
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:533
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
static int last_child(int index)
index of last daughter
Definition: EPOS_Wrapper.h:353
static unsigned int sizeof_real()
size of real in bytes
Definition: EPOS_Wrapper.h:216
static int last_parent(int index)
index of last mother
Definition: EPOS_Wrapper.h:328
static double x(int index)
X Production vertex.
Definition: EPOS_Wrapper.h:393
static double px(int index)
X momentum.
Definition: EPOS_Wrapper.h:373
static void set_parents(int index, int firstparent, int lastparent)
define parents of a particle
Definition: EPOS_Wrapper.h:429
static void set_sizeof_int(unsigned int)
define size of integer
Definition: EPOS_Wrapper.h:220
static unsigned int s_sizeof_int
Definition: EPOS_Wrapper.h:206