|
|
Go to the documentation of this file.
4 #ifndef EPOS_EntriesAllocation
5 #define EPOS_EntriesAllocation 99900
6 #endif // EPOS_EntriesAllocation
9 #ifndef HEPMC_EPOS_COMMON_H
10 #define HEPMC_EPOS_COMMON_H
70 #ifdef _WIN32 // Platform: Windows MS Visual C++
74 extern "C" HEPCOM_DEF HEPCOM;
81 #define hepcom hepcom_
85 #endif // HEPMC_EPOS_COMMON_H
88 #ifndef HEPMC_EPOS_WRAPPER_H
89 #define HEPMC_EPOS_WRAPPER_H
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);
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;
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;
240 std::cerr <<
"EPOS_Wrapper: requested hepcom data exceeds allocation" << std::endl;
242 float* myfloat = (
float*)&
hepcom.data[
b];
243 return (
double)(*myfloat);
245 double* mydouble = (
double*)&
hepcom.data[
b];
255 std::cerr <<
"EPOS_Wrapper: requested hepcom data exceeds allocation" << std::endl;
257 short int* myshortint = (
short int*)&
hepcom.data[
b];
258 return (
int)(*myshortint);
260 long int* mylongint = (
long int*)&
hepcom.data[
b];
264 int* myint = (
int*)&
hepcom.data[
b];
274 std::cerr <<
"EPOS_Wrapper: requested hepcom data exceeds allocation" << std::endl;
276 float* myfloat = (
float*)&
hepcom.data[
b];
279 double* mydouble = (
double*)&
hepcom.data[
b];
280 (*mydouble) = (double)
in;
288 std::cerr <<
"EPOS_Wrapper: requested hepcom data exceeds allocation" << std::endl;
290 short int* myshortint = (
short int*)&
hepcom.data[
b];
291 (*myshortint) = (
short int)
in;
293 long int* mylongint = (
long int*)&
hepcom.data[
b];
294 (*mylongint) = (
int)
in;
297 int* myint = (
int*)&
hepcom.data[
b];
488 ostr <<
"________________________________________"
489 <<
"________________________________________" << std::endl;
495 ostr <<
"________________________________________"
496 <<
"________________________________________" << std::endl;
500 ostr <<
"________________________________________"
501 <<
"________________________________________" << std::endl;
507 "%4d %+4d %4d %4d (%9.3g, %9.3g, %9.3g, %9.3g, %9.3g)",
517 ostr << outline <<
"\n";
519 "%+9d %4d %4d (%9.3g, %9.3g, %9.3g, %9.3g)",
528 ostr << outline << std::endl;
534 "%4s %4s %4s %5s %10s, %9s, %9s, %9s, %10s",
544 ostr << outline << std::endl;
546 outline,
"%9s %4s %4s %10s, %9s, %9s, %9s) %9s",
"ID ",
"ents",
"dren",
"Prod ( X",
"Y",
"Z",
"cT",
"[mm]");
547 ostr << outline << std::endl;
552 #endif // HEPMC_EPOS_WRAPPER_H
static void set_number_entries(int noentries)
set number of entries in EPOS
static unsigned int s_sizeof_int
static double pz(int index)
Z momentum.
static unsigned int s_sizeof_real
static void set_sizeof_int(unsigned int)
define size of integer
static void print_hepcom_particle(int index, std::ostream &ostr=std::cout)
write particle information to ostr
static int last_parent(int index)
index of last mother
static int number_entries()
num entries in current evt
static double y(int index)
Y Production vertex.
static double x(int index)
X Production vertex.
static int byte_num_to_int(unsigned int)
navigate a byte array
static void print_legend(std::ostream &ostr=std::cout)
print output legend
#define EPOS_EntriesAllocation
static void set_momentum(int index, double px, double py, double pz, double e)
set particle momentum
static double py(int index)
Y momentum.
static unsigned int sizeof_real()
size of real in bytes
static void zero_everything()
set all entries in EPOS to zero
static int event_number()
event number
static void print_hepcom(std::ostream &ostr=std::cout)
write information from EPOS common block
static double byte_num_to_double(unsigned int)
navigate a byte array
static int number_children(int index)
number of children
static int last_child(int index)
index of last daughter
static double z(int index)
Z Production vertex.
static double t(int index)
production time
static void set_children(int index, int firstchild, int lastchild)
define children of a particle
static int id(int index)
PDG particle id.
static void set_position(int index, double x, double y, double z, double t)
set particle production vertex
static void set_mass(int index, double mass)
set particle mass
Generic Wrapper for the fortran EPOS common block.
static void set_sizeof_real(unsigned int)
define size of real
static double e(int index)
Energy.
static double px(int index)
X momentum.
static int max_number_entries()
size of common block
static void set_parents(int index, int firstparent, int lastparent)
define parents of a particle
static unsigned int sizeof_int()
size of integer in bytes
char data[epos_bytes_allocation]
static void set_status(int index, int status)
set particle status
static int number_parents(int index)
number of parents
static void set_event_number(int evtno)
set event number
static int first_parent(int index)
index of 1st mother
static double m(int index)
generated mass
const unsigned int epos_bytes_allocation
static int first_child(int index)
index of 1st daughter
static void set_max_number_entries(unsigned int)
define size of common block
static int status(int index)
status code
static unsigned int s_max_number_entries
static void set_id(int index, int id)
set particle ID
static void write_byte_num(double, unsigned int)
pretend common block is an array of bytes