1 #include "PhotosHEPEVTEvent.h"
4 const static int fortranNMXHEP = 10000;
11 int isthep[fortranNMXHEP];
12 int idhep[fortranNMXHEP];
13 int jmohep[fortranNMXHEP][2];
14 int jdahep[fortranNMXHEP][2];
15 double phep[fortranNMXHEP][5];
16 double vhep[fortranNMXHEP][4];
27 int qedrad[fortranNMXHEP];
35 for(
unsigned int i=0;i<particle_list.size();i++)
delete particle_list[i];
51 particle_list.push_back(p);
56 if( i<0 || i>=(
int)particle_list.size() )
return NULL;
57 return particle_list[i];
62 if( i<0 || i>=(
int)particle_list.size() )
return;
68 return particle_list.size();
73 std::vector<PhotosParticle*> ret;
75 for(
unsigned int i=0;i<particle_list.size();i++) ret.push_back( (
PhotosParticle*)particle_list[i] );
82 Log::Info()<<
"PhotosHEPEVTEvent"<<endl<<
"-----------------"<<endl;
83 for(
unsigned int i=0;i<particle_list.size();i++) particle_list[i]->
print();
88 for(
unsigned int i=0;i<particle_list.size();i++)
delete particle_list[i];
89 particle_list.clear();
98 for(
int i=0; i<hepevt_.nhep; i++)
109 hepevt_.jmohep[i][0]-1,
110 hepevt_.jmohep[i][1]-1,
111 hepevt_.jdahep[i][0]-1,
112 hepevt_.jdahep[i][1]-1
124 if(evt==NULL)
return;
128 for(
int i=0; i<hepevt_.nhep; i++)
134 hepevt_.phep [i][0]=p->
getPx();
135 hepevt_.phep [i][1]=p->
getPy();
136 hepevt_.phep [i][2]=p->
getPz();
137 hepevt_.phep [i][3]=p->
getE();
138 hepevt_.phep [i][4]=p->
getMass();
143 hepevt_.vhep [i][0]=0.0;
144 hepevt_.vhep [i][1]=0.0;
145 hepevt_.vhep [i][2]=0.0;
146 hepevt_.vhep [i][3]=0.0;
int getDaughterRangeStart()
std::vector< PhotosParticle * > getParticleList()
void setEvent(PhotosHEPEVTEvent *event)
static void setMomentumUnit(MomentumUnits unit)
PhotosHEPEVTParticle * getParticle(int i)
static void read_event_from_HEPEVT(PhotosHEPEVTEvent *evt)
int getFirstMotherIndex()
int getDaughterRangeEnd()
int getSecondMotherIndex()
void setBarcode(int barcode)
static void write_event_to_HEPEVT(PhotosHEPEVTEvent *evt)
void setParticle(int i, PhotosHEPEVTParticle *p)
void addParticle(PhotosHEPEVTParticle *p)