16 int offset = new_event->size();
17 for (
int i = 0; i < hepevt_.nhep; i++)
20 temp->
isthep = hepevt_.isthep[i];
21 temp->
idhep = hepevt_.idhep[i];
22 for (
int j = 0; j < 2; j++) {
23 temp->
jmohep[j] = hepevt_.jmohep[i][j];
26 for (
int j = 0; j < 2; j++) {
27 temp->
jdahep[j] = hepevt_.jdahep[i][j];
30 for (
int j = 0; j < 5; j++) temp->
phep[j] = hepevt_.phep[i][j];
31 for (
int j = 0; j < 4; j++) temp->
vhep[j] = hepevt_.vhep[i][j];
32 new_event->push_back(*temp);
35 return hepevt_.nevhep;
40 new_event->
nevhep = hepevt_.nevhep;
42 for (
int i = 0; i < hepevt_.nhep; i++)
45 temp->
isthep = hepevt_.isthep[i];
46 temp->
idhep = hepevt_.idhep[i];
47 for (
int j = 0; j < 2; j++) {
48 temp->
jmohep[j] = hepevt_.jmohep[i][j];
51 for (
int j = 0; j < 2; j++) {
52 temp->
jdahep[j] = hepevt_.jdahep[i][j];
55 for (
int j = 0; j < 5; j++) temp->
phep[j] = hepevt_.phep[i][j];
56 for (
int j = 0; j < 4; j++) temp->
vhep[j] = hepevt_.vhep[i][j];
63 new_event->
idruplh = hepev4_.idruplh;
71 hepevt_.nhep = new_event->size();
72 hepevt_.nevhep = nevhep;
74 for (
int i = 0; i < new_event->size(); i++)
78 hepevt_.idhep[i] = temp.
idhep;
79 for (
int j = 0; j < 2; j++) hepevt_.jmohep[i][j] = temp.
jmohep[j];
80 for (
int j = 0; j < 2; j++) hepevt_.jdahep[i][j] = temp.
jdahep[j];
81 for (
int j = 0; j < 5; j++) hepevt_.phep[i][j] = temp.
phep[j];
82 for (
int j = 0; j < 4; j++) hepevt_.vhep[i][j] = temp.
vhep[j];
94 hepevt_.nhep = new_event->
particles.size();
95 hepevt_.nevhep = new_event->
nevhep;
97 for (
int i = 0; i< new_event->
particles.size(); i++)
100 hepevt_.isthep[i] = temp.
isthep;
101 hepevt_.idhep[i] = temp.
idhep;
102 for (
int j = 0; j < 2; j++) hepevt_.jmohep[i][j] = temp.
jmohep[j];
103 for (
int j = 0; j < 2; j++) hepevt_.jdahep[i][j] = temp.
jdahep[j];
104 for (
int j = 0; j < 5; j++) hepevt_.phep[i][j] = temp.
phep[j];
105 for (
int j = 0; j < 4; j++) hepevt_.vhep[i][j] = temp.
vhep[j];
109 hepev4_.idruplh = new_event->
idruplh;
111 hepev4_.alphaqedlh = 0;
112 hepev4_.alphaqcdlh = 0;
113 for (
int i = 0; i < 10; i++) hepev4_.scalelh[i] = 0;
114 for (
int i = 0; i < new_event->
particles.size(); i++)
116 for (
int j = 0; j < 3; j++) hepev4_.spinlh[i][j] = 0.0;
117 for (
int j = 0; j < 3; j++) hepev4_.icolorflowlh[i][j] = 0;
133 for (
int j = 0; j < 2; j++) temp->
jmohep[j] = 0;
134 for (
int j = 0; j < 2; j++) temp->
jdahep[j] = 0;
135 for (
int j = 0; j < 5; j++) temp->
phep[j] = 0.0;
136 temp->
phep[0] += 0.1*sin(0.0305);
137 temp->
phep[2] += 0.1*cos(0.0305);
138 temp->
phep[3] += 0.1;
139 for (
int j = 0; j < 4; j++) temp->
vhep[j] = 0.0;
141 new_event->push_back(*temp);
145 int append_stdhep(vector<stdhep_entry> *event,
const vector<stdhep_entry> *new_event)
147 int offset =
event->size();
148 for (
int i = 0; i < new_event->size(); i++)
151 for (
int j = 0; j < 2; j++) {
154 for (
int j = 0; j < 2; j++) {
157 event->push_back(temp);
159 return event->size();
164 printf(
"Reading from %s; expecting %d events\n",
filename, n_events);
177 printf(
"Writing to %s; expecting %d events\n",
filename, n_events);
194 printf(
"End of file\n");
197 if (ilbl == 1 || ilbl == 4) read_ok =
true;
201 printf(
"ilbl = %d\n", ilbl);
230 printf(
"isthep = %d\tidhep = %d\t", entry.
isthep, entry.
idhep);
231 for (
int i = 0; i < 2; i++) printf(
"jmohep[%d] = %d\t", i, entry.
jmohep[i]);
233 for (
int i = 0; i < 2; i++) printf(
"jdahep[%d] = %d\t", i, entry.
jdahep[i]);
235 for (
int i = 0; i < 5; i++) printf(
"phep[%d] = %f\t", i, entry.
phep[i]);
237 for (
int i=0;i<4;i++) printf(
"vhep[%d] = %f\t",i,entry.
vhep[i]);
int StdHepXdrWriteInit(char *filename, char *title, int ntries, int ist)
int StdHepXdrWrite(int ilbl, int ist)
int StdHepXdrRead(int *ilbl, int ist)
void StdHepXdrEnd(int ist)
int StdHepXdrReadInitNTries(char *filename, int *ntries, int ist)
int StdHepXdrWriteOpen(char *filename, char *title, int ntries, int ist)
int StdHepXdrReadOpenNTries(char *filename, int *ntries, int ist)
void add_filler_particle(vector< stdhep_entry > *new_event)
static vector< stdhep_entry * > vect_for_Memoery_Release
void open_write(char *filename, int ostream, int n_events)
int open_read(char *filename, int istream, int n_events)
int append_stdhep(vector< stdhep_entry > *event, const vector< stdhep_entry > *new_event)
void write_stdhep(vector< stdhep_entry > *new_event, int nevhep)
int read_stdhep(vector< stdhep_entry > *new_event)
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)
vector< stdhep_entry > particles