158 {
160
161
162
163
164 if ( m_pion < 0 || m_pion > 9 )
165 {
166 std::cout << "mode index for phokhar 0~9, but you give " << m_pion << std::endl;
167 abort();
168 }
171
172 m_tagged = 0;
173 m_nm = 50000;
174 m_nlo = 1;
175 m_w = 0.0001;
176 m_fsr = 1;
177 m_fsrnlo = 1;
178 m_NarrowRes = 1;
179 m_FF_Kaon = 1;
180 m_ivac = 0;
181 m_FF_Pion = 0;
182 m_f0_model = 0;
183 m_q2min = 0.0;
184 m_q2_min_c = 0.0447;
185 m_q2_max_c = m_E * m_E;
186 m_gmin = 0.001;
187 m_phot1cut = 0.0;
188 m_phot2cut = 180.0;
189 m_pi1cut = 0.0;
190 m_pi2cut = 180.0;
191
192 if ( !( m_pion == 0 || m_pion == 1 || m_pion == 6 ) )
193 {
194 m_fsr = 0;
195 m_fsrnlo = 0;
196 }
197 if ( m_pion == 9 ) { m_nlo = 0; }
198
199 m_initSeed = 123456789;
207 flags_.FF_pion = m_FF_Pion;
208 flags_.f0_model = m_f0_model;
209 flags_.FF_kaon = m_FF_Kaon;
210 flags_.narr_res = m_NarrowRes;
211
212 ctes_.Sp = m_E * m_E;
213 ;
214
216 cuts_.q2min = m_q2min;
217 cuts_.q2_min_c = m_q2_min_c;
218 cuts_.q2_max_c = m_q2_max_c;
220 cuts_.phot1cut = m_phot1cut;
221 cuts_.phot2cut = m_phot2cut;
222 cuts_.pi1cut = m_pi1cut;
223 cuts_.pi2cut = m_pi2cut;
224
226
227
228 cout << "-------------------------------------------------------------" << endl;
229 if (
flags_.pion == 0 ) cout <<
" PHOKHARA 7.0 : e^+ e^- -> mu^+ mu^- gamma" << endl;
230 else if (
flags_.pion == 1 ) cout <<
" PHOKHARA 7.0: e^+ e^- -> pi^+ pi^- gamma" << endl;
231 else if (
flags_.pion == 2 )
232 cout << " PHOKHARA 7.0: e^+ e^- -> pi^+ pi^- 2pi^0 gamma" << endl;
233 else if (
flags_.pion == 3 ) cout <<
" PHOKHARA 7.0: e^+ e^- -> 2pi^+ 2pi^- gamma" << endl;
234 else if (
flags_.pion == 4 ) cout <<
" PHOKHARA 7.0: e^+ e^- -> p pbar gamma" << endl;
235 else if (
flags_.pion == 5 ) cout <<
" PHOKHARA 7.0: e^+ e^- -> n nbar gamma" << endl;
236 else if (
flags_.pion == 6 ) cout <<
" PHOKHARA 7.0: e^+ e^- -> K^+ K^- gamma" << endl;
237 else if (
flags_.pion == 7 ) cout <<
" PHOKHARA 7.0: e^+ e^- -> K_0 K_0bar gamma" << endl;
238 else if (
flags_.pion == 8 )
239 cout << " PHOKHARA 7.0: e^+ e^- -> pi^+ pi^- pi^0 gamma" << endl;
240 else if (
flags_.pion == 9 )
241 {
242 cout << "PHOKHARA 7.0 : e^+ e^- ->" << endl;
243 cout << " Lambda (-> pi^- p) Lambda bar (-> pi^+ pbar) gamma" << endl;
244 }
245 else cout << " PHOKHARA 7.0: not yet implemented" << endl;
246
247
248 cout << "--------------------------------------------------------------" << endl;
249 printf(
" %s %f %s\n",
"cms total energy = ", sqrt(
ctes_.Sp ),
250 " GeV " );
251
252
253 if (
cuts_.gmin < 0.001 )
254 {
255 cerr << " minimal missing energy set too small" << endl;
256 abort();
257 }
258 printf(
" %s %f %s\n",
"minimal tagged photon energy = ",
cuts_.gmin,
" GeV " );
259 printf(
" %s %f,%f\n",
"angular cuts on tagged photon = ",
cuts_.phot1cut,
261
262
264 printf(
" %s %f,%f\n",
"angular cuts on muons = ",
cuts_.pi1cut,
266 else if (
flags_.pion == 4 )
267 printf(
" %s %f,%f\n",
"angular cuts on protons = ",
cuts_.pi1cut,
269 else if (
flags_.pion == 5 )
270 printf(
" %s %f,%f\n",
"angular cuts on neutrons = ",
cuts_.pi1cut,
272 else if ( (
flags_.pion == 6 ) || (
flags_.pion == 7 ) )
273 printf(
" %s %f,%f\n",
"angular cuts on kaons = ",
cuts_.pi1cut,
275 else if (
flags_.pion == 9 )
276 printf(
" %s %f,%f\n",
"angular cuts on pions and protons = ",
cuts_.pi1cut,
278 else
279 printf(
" %s %f,%f\n",
"angular cuts on pions = ",
cuts_.pi1cut,
282 printf(
" %s %f %s\n",
"min. muons-tagged photon inv.mass^2 = ",
cuts_.q2min,
283 " GeV^2" );
284 else if (
flags_.pion == 4 )
285 printf(
" %s %f %s\n",
"min. protons-tagged photon inv.mass^2 = ",
cuts_.q2min,
286 " GeV^2" );
287 else if (
flags_.pion == 5 )
288 printf(
" %s %f %s\n",
"min. neutrons-tagged photon inv.mass^2 = ",
cuts_.q2min,
289 " GeV^2" );
290 else if ( (
flags_.pion == 6 ) || (
flags_.pion == 7 ) )
291 printf(
" %s %f %s\n",
"min. kaons-tagged photon inv.mass^2 = ",
cuts_.q2min,
292 " GeV^2" );
293 else if (
flags_.pion == 9 )
294 printf(
" %s %f %s\n",
" min. lambdas-tagged photon inv.mass^2 = ",
cuts_.q2min,
295 " GeV^2" );
296 else
297 printf(
" %s %f %s\n",
"min. pions-tagged photon inv.mass^2 = ",
cuts_.q2min,
298 " GeV^2" );
301 cos2min = -1.0;
302 cos2max = 1.0;
303 cos3min = -1.0;
304 cos3max = 1.0;
308 else if (
flags_.pion == 2 )
315 else if (
flags_.pion == 8 )
319 if (
cuts_.q2_max_c < qqmax ) qqmax =
cuts_.q2_max_c;
320
321
322 if ( (
cuts_.q2_min_c > qqmin ) &&
325 qqmin =
cuts_.q2_min_c;
326 else
327 {
328 cerr << "------------------------------" << endl;
329 cerr << " Q^2_min TOO SMALL" << endl;
330 cerr << " Q^2_min CHANGED BY PHOKHARA = " << qqmin << " GeV^2" << endl;
331 cerr << "------------------------------" << endl;
332 }
333
334 if ( qqmax <= qqmin )
335 {
336 cerr << " Q^2_max to small " << endl;
337 cerr << " Q^2_max = " << qqmax << endl;
338 cerr << " Q^2_min = " << qqmin << endl;
339 abort();
340 }
341
342
344 {
345 printf( " %s %f %s\n", "minimal muon-pair invariant mass^2 = ", qqmin, " GeV^2" );
346 printf( " %s %f %s\n", "maximal muon-pair invariant mass^2 = ", qqmax, " GeV^2" );
347 }
348 else if (
flags_.pion == 1 )
349 {
350 printf( " %s %f %s\n", "minimal pion-pair invariant mass^2 = ", qqmin, " GeV^2" );
351 printf( " %s %f %s\n", "maximal pion-pair invariant mass^2 = ", qqmax, " GeV^2" );
352 }
353 else if (
flags_.pion == 4 )
354 {
355 printf( " %s %f %s\n", "minimal proton-pair invariant mass^2 = ", qqmin, " GeV^2" );
356 printf( " %s %f %s\n", "maximal proton-pair invariant mass^2 = ", qqmax, " GeV^2" );
357 }
358 else if (
flags_.pion == 5 )
359 {
360 printf( " %s %f %s\n", "minimal neutron-pair invariant mass^2 = ", qqmin, " GeV^2" );
361 printf( " %s %f %s\n", "maximal neutron-pair invariant mass^2 = ", qqmax, " GeV^2" );
362 }
363 else if ( (
flags_.pion == 6 ) || (
flags_.pion == 7 ) )
364 {
365 printf( " %s %f %s\n", "minimal kaon-pair invariant mass^2 = ", qqmin, " GeV^2" );
366 printf( " %s %f %s\n", "maximal kaon-pair invariant mass^2 = ", qqmax, " GeV^2" );
367 }
368 else if (
flags_.pion == 8 )
369 {
370 printf( " %s %f %s\n", "minimal three-pion invariant mass^2 = ", qqmin, " GeV^2" );
371 printf( " %s %f %s\n", "maximal three-pion invariant mass^2 = ", qqmax, " GeV^2" );
372 }
373 else if (
flags_.pion == 9 )
374 {
375 printf( " %s %f %s\n", "minimal lambda-pair invariant mass^2 = ", qqmin, " GeV^2" );
376 printf( " %s %f %s\n", "maximal lambda-pair invariant mass^2 = ", qqmax, " GeV^2" );
377 }
378 else
379 {
380 printf( " %s %f %s\n", "minimal four-pion invariant mass^2 = ", qqmin, " GeV^2" );
381 printf( " %s %f %s\n", "maximal four-pion invariant mass^2 = ", qqmax, " GeV^2" );
382 }
383
385 {
386 cout << "Born" << endl;
388 {
389 cerr << "WRONG FSRNLO flag - only fsrnlo=0 allowed for Born" << endl;
390 abort();
391 }
392 }
393
395 {
396 cerr << "WRONG NLO flag - only Born allowed for Lambdas" << endl;
397 cerr << "If you feel that you need NLO" << endl;
398 cerr << "please contact the authors" << endl;
399 abort();
400 }
401
403 printf(
" %s %f\n",
"NLO: soft photon cutoff w = ",
cuts_.w );
405 {
406
409 (
flags_.fsrnlo == 0 ) ) )
410 {
411 cerr << "WRONG combination of FSR, FSRNLO flags" << endl;
412 abort();
413 }
414
415 if (
flags_.fsr == 0 ) cout <<
"ISR only" << endl;
416 else if (
flags_.fsr == 1 ) cout <<
"ISR+FSR" << endl;
417 else if (
flags_.fsr == 2 )
418 {
419 if (
flags_.nlo == 0 ) cout <<
"ISR+INT+FSR" << endl;
420 else
421 {
422 cerr << "WRONG FSR flag: interference is included only for nlo=0" << endl;
423 abort();
424 }
425 }
426 else
427 {
428 cerr <<
"WRONG FSR flag" <<
flags_.fsr << endl;
429 abort();
430 }
431 if (
flags_.fsrnlo == 1 ) cout <<
"IFSNLO included" << endl;
432 }
433 else
434 {
435 if ( (
flags_.fsr == 0 ) && (
flags_.fsrnlo == 0 ) ) cout <<
"ISR only" << endl;
436 else
437 {
438 cerr << "FSR is implemented only for pi+pi-, mu+mu- and K+K- modes" << endl;
439 abort();
440 }
441 }
442
443 if (
flags_.ivac == 0 ) { cout <<
"Vacuum polarization is NOT included" << endl; }
444 else if (
flags_.ivac == 1 )
445 {
446 cout << "Vacuum polarization by Fred Jegerlehner "
447 "(http://www-com.physik.hu-berlin.de/fjeger/alphaQEDn.uu)"
448 << endl;
449 }
450 else if (
flags_.ivac == 2 )
451 {
452 cout << "Vacuum polarization (VP_HLMNT_v1_3nonr) by Daisuke Nomura and Thomas Teubner"
453 << endl;
454 }
455 else
456 {
457 cout << "WRONG vacuum polarization switch" << endl;
458 abort();
459 }
460
461
463 {
464 if (
flags_.FF_pion == 0 ) cout <<
"Kuhn-Santamaria PionFormFactor" << endl;
465 else if (
flags_.FF_pion == 1 ) cout <<
"Gounaris-Sakurai PionFormFactor old" << endl;
466 else if (
flags_.FF_pion == 2 ) cout <<
"Gounaris-Sakurai PionFormFactor new" << endl;
467 else
468 {
469 cout << "WRONG PionFormFactor switch" << endl;
470 abort();
471 }
473 {
474 if (
flags_.f0_model == 0 ) cout <<
"f0+f0(600): K+K- model" << endl;
475 else if (
flags_.f0_model == 1 ) cout <<
"f0+f0(600): \"no structure\" model" << endl;
476 else if (
flags_.f0_model == 2 ) cout <<
"NO f0+f0(600)" << endl;
477 else if (
flags_.f0_model == 3 )
478 cout << "only f0, KLOE: Cesare Bini-private communication" << endl;
479 else
480 {
481 cout << "WRONG f0+f0(600) switch" << endl;
482 abort();
483 }
484 }
485 }
486
488 {
489 if (
flags_.FF_kaon == 0 ) cout <<
"constrained KaonFormFactor" << endl;
490 else if (
flags_.FF_kaon == 1 ) { cout <<
"unconstrained KaonFormFactor" << endl; }
491 else if (
flags_.FF_kaon == 2 )
492 { cout << "Kuhn-Khodjamirian-Bruch KaonFormFactor" << endl; }
493 else
494 {
495 cout << "WRONG KaonFormFactor switch" << endl;
496 abort();
497 }
498 }
499
502 {
503 if (
flags_.narr_res == 1 ) { cout <<
"THE NARROW RESONANCE J/PSI INCLUDED" << endl; }
504 else if (
flags_.narr_res == 2 )
505 { cout << "THE NARROW RESONANCE PSI(2S) INCLUDED" << endl; }
506 else if (
flags_.narr_res != 0 )
507 {
508 cout << "wrong flag narr_res: only 0, 1 or 2 allowed" << endl;
509 abort();
510 }
511 }
512
513 cout << "--------------------------------------------------------------" << endl;
514
515
516
517 for ( int i = 0; i < 2; i++ )
518 {
522 }
523
525
530
531
532
533 for ( int j = 1; j <= m_nm; j++ )
534 {
536 Ar[1] = Ar_r[0];
538 {
540 GEN_1PH( 1, qqmin, qqmax, cos1min, cos1max, cos3min, cos3max );
541 }
542 else
543 {
545 GEN_2PH( 1, qqmin, cos1min, cos1max, cos2min, cos2max, cos3min, cos3max );
546 }
547 }
548
549
550
554 theMmax[m_pion][0] =
maxima_.Mmax[0];
555 theMmax[m_pion][1] =
maxima_.Mmax[1];
556
561
564
566 {
569 }
570
572 {
575 }
576
577
582}
#define RLXDINIT(LUXURY, SEED)