85 static struct option siscone_options[]={
92 {
"number", required_argument, NULL,
'N'},
93 {
"radius", required_argument, NULL,
'R'},
94 {
"fraction", required_argument, NULL,
'f'},
95 {
"ptmin", required_argument, NULL,
'p'},
96 {
"npass", required_argument, NULL,
'n'},
97 {
"event", required_argument, NULL,
'e'},
98 {
"sm", required_argument, NULL,
's'},
108 opt_param = getopt_long(argc, argv,
"hvqN:R:f:p:n:e:s:",
109 siscone_options, &option_index);
121 sscanf(optarg,
"%d", &
N_stop);
123 cout <<
"Warning: the specified number of particles must be positive. Using default one" << endl;
128 sscanf(optarg,
"%lf", &
R);
130 cout <<
"Warning: the specified cone radius must be positive. Using default one" << endl;
135 sscanf(optarg,
"%lf", &
f);
137 cout <<
"Warning: the specified split/merge threshold must be in [0,1]. Using default one" << endl;
138 f = THRESHOLD_DEFAULT;
142 sscanf(optarg,
"%lf", &
ptmin);
144 cout <<
"Warning: the specified minimal pT must be non-negative. Using default one" << endl;
145 ptmin = PTMIN_DEFAULT;
149 sscanf(optarg,
"%d", &
npass);
151 cout <<
"Warning: the specified number of passes must be non negative. Using default one" << endl;
152 npass = NPASS_DEFAULT;
157 ev_name =
new char[strlen(optarg)+1];
164 if (strcmp(tmp,
"pttilde")==0){
166 }
else if (strcmp(tmp,
"mt")==0){
168 }
else if (strcmp(tmp,
"pt")==0){
170 }
else if (strcmp(tmp,
"Et")==0){
173 cout <<
"Warning: the specified varible for split--merge is not valid (should be pttilde, pt, mt or Et). Using pttilde as the default one." << endl;
181 fprintf(stderr,
"Giving up.\n");
186 fprintf(stderr,
"unrecognized option %c. Giving up.\n", opt_param);
193 ev_name =
new char[strlen(DEFAULT_EVENT)+1];
194 strcpy(
ev_name, DEFAULT_EVENT);