HPS-MC
stdhep_util.hh
Go to the documentation of this file.
1 #include <vector>
2 using namespace std;
3 
4 extern bool xdr_init_done;
5 extern bool has_hepev4;
6 
7 struct stdhep_entry {
8  int isthep; /* status code */
9  int idhep; /* The particle id */
10  int jmohep[2]; /* The position of the mother particle */
11  int jdahep[2]; /* Position of the first daughter... */
12  double phep[5]; /* 4-Momentum, mass */
13  double vhep[4]; /* Vertex information */
14  //double spinlh[3];
15  //double icolorflowlh[2];
16 };
17 
18 struct stdhep_event {
19  vector<stdhep_entry> particles;
20  int nevhep;
21  bool has_hepev4;
22  int idruplh;
23  double eventweightlh;
24  //double alphaqedlh;
25  //double alphaqcdlh;
26  //double scalelh[10];
27 };
28 
29 int read_stdhep(vector<stdhep_entry> *new_event);
30 void read_stdhep(stdhep_event *new_event);
31 void write_stdhep(vector<stdhep_entry> *new_event, int nevhep);
32 void write_stdhep(stdhep_event *new_event);
33 void add_filler_particle(vector<stdhep_entry> *new_event);
34 int append_stdhep(vector<stdhep_entry> *event, const vector<stdhep_entry> *new_event);
35 
36 int open_read(char *filename, int istream, int n_events=1000000);
37 void open_write(char *filename, int ostream, int n_events);
38 void close_write(int ostream);
39 void write_file(int ostream);
40 bool read_next(int istream);
41 void close_read(int istream);
42 void print_entry(stdhep_entry entry);
void add_filler_particle(vector< stdhep_entry > *new_event)
bool has_hepev4
Definition: stdhep_util.cpp:10
void open_write(char *filename, int ostream, int n_events)
bool xdr_init_done
Definition: stdhep_util.cpp:9
int open_read(char *filename, int istream, int n_events=1000000)
int append_stdhep(vector< stdhep_entry > *event, const vector< stdhep_entry > *new_event)
void write_stdhep(vector< stdhep_entry > *new_event, int nevhep)
Definition: stdhep_util.cpp:69
int read_stdhep(vector< stdhep_entry > *new_event)
Definition: stdhep_util.cpp:14
bool read_next(int istream)
void close_read(int istream)
void print_entry(stdhep_entry entry)
void write_file(int ostream)
void close_write(int ostream)
Definition: stdhep_util.hh:7
int idhep
Definition: stdhep_util.hh:9
int isthep
Definition: stdhep_util.hh:8
vector< stdhep_entry > particles
Definition: stdhep_util.hh:19
double eventweightlh
Definition: stdhep_util.hh:23