30#include "siscone/momentum.h"
31#include "siscone/siscone.h"
32#include "siscone/area.h"
36using namespace siscone;
38int 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;
options for the 'cone' sample
int print_version()
print program version
char * ev_name
event to read
int parse_options(int argc, char **argv)
parse oprions
int verbose_flag
do we need to print the help message
siscone::Esplit_merge_scale SM_var
variable for split-merge
int print_help()
print the help message
int help_flag
do we need to print the help message
int npass
number of passes (0 for \infty)
int version_flag
do we need to print the version description
double f
split/merge threshold
int N_stop
maximum number of particle
class for the computation of jet areas.
std::vector< Cjet_area > jet_areas
jets with their areas
int compute_areas(std::vector< Cmomentum > &_particles, double _radius, double _f, int _n_pass_max=0, Esplit_merge_scale _split_merge_scale=SM_pttilde, bool _hard_only=false)
compute the jet areas from a given particle set.
base class for dynamic coordinates management
std::vector< std::vector< Cmomentum > > protocones_list
list of protocones found pass-by-pass (not filled by compute_jets_progressive_removal)