30 #include "siscone/momentum.h"
31 #include "siscone/siscone.h"
32 #include "siscone/area.h"
36 using namespace siscone;
38 int main(
int argc,
char *argv[]){
39 vector<Cmomentum> particles;
40 Carea siscone_with_area;
66 if (opts.
verbose_flag) cout <<
"reading particles" << endl;
67 flux = fopen(opts.
ev_name,
"r");
69 cerr <<
"cannot read event" << endl;
74 fpart = fopen(
"particles.dat",
"w+");
75 while ((opts.
N_stop!=0) && (fgets(fline, 512, flux)!=NULL)){
77 if (sscanf(fline,
"%le%le%le%le", &px, &py, &pz, &E)==4){
78 particles.push_back(
Cmomentum(px, py, pz, E));
79 fprintf(fpart,
"%e\t%e\n", particles[N].eta, particles[N].phi);
83 cout <<
"error in reading event file Giving up." << endl;
93 cout <<
" working with " << N <<
" particles" << endl;
96 if (opts.
verbose_flag) cout <<
"computing jet contents" << endl;
101 cout <<
" pass " << pass <<
" found " << siscone_with_area.
protocones_list[pass].size()
102 <<
" stable cones" << endl;
103 cout <<
" Final result: " << i <<
" jets found" << endl;
108 cout <<
"saving result" << endl;
109 flux = fopen(
"jets_with_area.dat",
"w+");
110 vector<Cjet_area>::iterator ja;
111 for (ja=siscone_with_area.
jet_areas.begin();ja!=siscone_with_area.
jet_areas.end();ja++){
112 fprintf(flux,
"%e\t%e\t%e\t%e\t%e\n",
113 ja->v.perp(), ja->v.eta, ja->v.phi,
114 ja->active_area, ja->passive_area);
120 cout <<
"bye..." << endl;