159 {
160 bool debug = 0;
162 if ( p->
getId() != myvpho )
163 {
164 std::cout << "Parent particle is required to be vpho for Phokhara model" << std::endl;
165 abort();
166 }
167 if ( nevtgen == 0 )
168 {
170 std::cout << "PHOKHARA : Lambda anti-Lambda mode " << std::endl;
171 }
172 else
173 {
175 if ( debug ) cout << "init_evt works!" << endl;
176 }
177
178 if ( debug )
179 {
180 std::cout << "flags "
181 ":ph0,nlo,pion,fsr,fsrnlo,ivac,FF_pion,f0_model,FF_kaon,narr_res,FF_pp,chi_"
182 "sw,chi_pion,FF_Pgg,nlo2 "
183 << std::endl;
189 std::cout <<
"ctes: Sp = " <<
ctes_.Sp << std::endl;
190 std::cout << "cuts : w,q2min,q2_min_c,gmin,phot1cut,phot2cut,pi1cut,pi2cut" << std::endl
191 <<
"= " <<
cuts_.w <<
"," <<
cuts_.q2min <<
"," <<
cuts_.q2_min_c <<
","
193 <<
cuts_.pi1cut <<
"," <<
cuts_.pi2cut << std::endl;
194 }
195
197 int ntrials = 0;
198 int tr_old[3];
199 tr_old[0] = (int)
maxima_.tr[0];
200 tr_old[1] = (int)
maxima_.tr[1];
201 tr_old[2] = (int)
maxima_.tr[2];
202
203 while ( ntrials < 1000000 )
204 {
205 ievent++;
207 Ar[1] = Ar_r[0];
208
209 if ( Ar[1] <=
211 {
214 }
217 {
219 GEN_1PH( 2, qqmin, qqmax, cos1min, cos1max, cos3min, cos3max );
220 }
221 else
222 {
224 GEN_2PH( 2, qqmin, cos1min, cos1max, cos2min, cos2max, cos3min, cos3max );
225 }
226
228 ( tr_old[0] + tr_old[1] + tr_old[2] ) )
229 { goto storedEvents; }
230 ntrials++;
231 }
232 std::cout << "FATAL: Could not satisfy cuts after " << ntrials << "trials. Terminate."
233 << std::endl;
234
235storedEvents:
236 int more = 0;
237 int numstable = 0;
238 int numparton = 0;
239 EvtId evtnumstable[100];
240 EvtVector4R p4[20];
241
242
244 {
245
248 ctes_.momenta[3][5] );
249 numstable++;
250
253 ctes_.momenta[3][6] );
254 numstable++;
255 }
257 {
258
261 ctes_.momenta[3][5] );
262 numstable++;
263
266 ctes_.momenta[3][6] );
267 numstable++;
268 }
270 {
271
274 ctes_.momenta[3][5] );
275 numstable++;
276
279 ctes_.momenta[3][6] );
280 numstable++;
281
284 ctes_.momenta[3][7] );
285 numstable++;
286
289 ctes_.momenta[3][8] );
290 numstable++;
291 }
293 {
294
297 ctes_.momenta[3][5] );
298 numstable++;
299
302 ctes_.momenta[3][6] );
303 numstable++;
304
307 ctes_.momenta[3][7] );
308 numstable++;
309
312 ctes_.momenta[3][8] );
313 numstable++;
314 }
316 {
317
320 ctes_.momenta[3][5] );
321 numstable++;
322
325 ctes_.momenta[3][6] );
326 numstable++;
327 }
329 {
330
333 ctes_.momenta[3][5] );
334 numstable++;
335
338 ctes_.momenta[3][6] );
339 numstable++;
340 }
342 {
343
346 ctes_.momenta[3][5] );
347 numstable++;
348
351 ctes_.momenta[3][6] );
352 numstable++;
353 }
355 {
356
359 ctes_.momenta[3][5] );
360 numstable++;
361
364 ctes_.momenta[3][6] );
365 numstable++;
366 }
368 {
369
372 ctes_.momenta[3][5] );
373 numstable++;
374
377 ctes_.momenta[3][6] );
378 numstable++;
379
382 ctes_.momenta[3][7] );
383 numstable++;
384 }
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403 int LambdaDaus = 0;
404 EvtId LambdaMode[100];
405 EvtVector4R Lambdap4[20];
406 EvtVector4R ZERO( 0, 0, 0, 0 );
407 EvtVector4R tmp( 0, 0, 0, 0 );
408
410 {
411
414 ctes_.momenta[3][5] );
415 if ( debug )
416 std::cout << "Phokhara_Lambda: anti-Lambda0 p4[numstable] = " << p4[numstable]
417 << std::endl;
418 numstable++;
419
422 ctes_.momenta[3][6] );
423 if ( debug )
424 std::cout << "Phokhara_Lambda: Lambda0 p4[numstable] = " << p4[numstable] << std::endl;
425 numstable++;
426
427
429 Lambdap4[LambdaDaus].
set(
ctes_.momenta[0][7],
ctes_.momenta[1][7],
ctes_.momenta[2][7],
430 ctes_.momenta[3][7] );
431 if ( debug )
432 std::cout << "Phokhara_Lambda: Pi+ p4[numstable] = " << Lambdap4[LambdaDaus]
433 << std::endl;
434
435
436 tmp.
set( p4[0].get( 0 ), -p4[0].get( 1 ), -p4[0].get( 2 ), -p4[0].get( 3 ) );
437 Lambdap4[LambdaDaus] =
boostTo( Lambdap4[LambdaDaus], tmp );
438 if ( debug )
439 std::cout << "Phokhara_Lambda:Boosted Pi+ p4[numstable] = " << Lambdap4[LambdaDaus]
440 << std::endl;
441 LambdaDaus++;
442
444 Lambdap4[LambdaDaus].
set(
ctes_.momenta[0][8],
ctes_.momenta[1][8],
ctes_.momenta[2][8],
445 ctes_.momenta[3][8] );
446 if ( debug )
447 std::cout << "Phokhara_Lambda: pbar p4[numstable] = " << Lambdap4[LambdaDaus]
448 << std::endl;
449
450
451
452 tmp.
set( p4[0].get( 0 ), -p4[0].get( 1 ), -p4[0].get( 2 ), -p4[0].get( 3 ) );
453 Lambdap4[LambdaDaus] =
boostTo( Lambdap4[LambdaDaus], tmp );
454 if ( debug )
455 std::cout << "Phokhara_Lambda:Boosted pbar p4[numstable] = " << Lambdap4[LambdaDaus]
456 << std::endl;
457 LambdaDaus++;
458
460 Lambdap4[LambdaDaus].
set(
ctes_.momenta[0][9],
ctes_.momenta[1][9],
ctes_.momenta[2][9],
461 ctes_.momenta[3][9] );
462 if ( debug )
463 std::cout << "Phokhara_Lambda: pi- p4[numstable] = " << Lambdap4[LambdaDaus]
464 << std::endl;
465
466
467
468 tmp.
set( p4[1].get( 0 ), -p4[1].get( 1 ), -p4[1].get( 2 ), -p4[1].get( 3 ) );
469 Lambdap4[LambdaDaus] =
boostTo( Lambdap4[LambdaDaus], tmp );
470 if ( debug )
471 std::cout << "Phokhara_Lambda:Boosted pi- p4[numstable] = " << Lambdap4[LambdaDaus]
472 << std::endl;
473 LambdaDaus++;
474
476 Lambdap4[LambdaDaus].
set(
ctes_.momenta[0][10],
ctes_.momenta[1][10],
ctes_.momenta[2][10],
477 ctes_.momenta[3][10] );
478 if ( debug )
479 std::cout << "Phokhara_Lambda: p p4[numstable] = " << Lambdap4[LambdaDaus] << std::endl;
480
481
482
483 tmp.
set( p4[1].get( 0 ), -p4[1].get( 1 ), -p4[1].get( 2 ), -p4[1].get( 3 ) );
484 Lambdap4[LambdaDaus] =
boostTo( Lambdap4[LambdaDaus], tmp );
485 if ( debug )
486 std::cout << "Phokhara_Lambda:Boosted p p4[numstable] = " << Lambdap4[LambdaDaus]
487 << std::endl;
488 LambdaDaus++;
489 }
490
491
494 ctes_.momenta[3][2] );
495 if ( debug )
496 std::cout << "Phokhara_Lambda: first gamma p4[numstable] = " << p4[numstable] << std::endl;
497 numstable++;
498 if (
ctes_.momenta[0][3] != 0 )
499 {
502 ctes_.momenta[3][3] );
503 if ( debug )
504 std::cout << "Phokhara_Lambda: second gamma p4[numstable] = " << p4[numstable]
505 << std::endl;
506 numstable++;
507 }
508
510 more = ( channel != -1 );
511 if ( more )
512 {
513 std::cout << "EvtPhokhara_Lambda:Existence of mode " << channel
514 << " in exclusive decay list has the same final state as this one" << std::endl;
515 abort();
516 }
517
519
521 {
522
524 for ( int i = 0; i < LambdaDaus; i++ )
525 {
528 }
529 }
530 int ndaugFound = 0;
531 EvtVector4R SUMP4( 0, 0, 0, 0 );
532 for ( int i = 0; i < numstable; i++ )
533 {
535 ndaugFound++;
536 }
537 if ( ndaugFound == 0 )
538 {
539 report(
ERROR,
"EvtGen" ) <<
"Phokhara has failed to do a decay ";
541 << endl;
542 assert( 0 );
543 }
544 if ( debug )
545 std::cout <<
"EvtPhokhara_Lambda SUMMARY: part p4" << p->
getP4Lab() << std::endl;
546 if ( debug )
547 std::cout <<
"EvtPhokhara_Lambda SUMMARY: Daug0 p4" << p->
getDaug( 0 )->
getP4Lab()
548 << std::endl;
549 if ( debug )
550 std::cout <<
"EvtPhokhara_Lambda SUMMARY: Daug1 p4" << p->
getDaug( 1 )->
getP4Lab()
551 << std::endl;
552 if ( debug )
553 std::cout <<
"EvtPhokhara_Lambda SUMMARY: Daug2 p4" << p->
getDaug( 2 )->
getP4Lab()
554 << std::endl;
555
556 nevtgen++;
557 return;
558}
EvtDiracSpinor boostTo(const EvtDiracSpinor &sp, const EvtVector4R p4)
struct @053254170326070136226344307237142165176240334330 ctes_
struct @027003056066344010031101102046265032310161340072 maxima_
#define GEN_1PH(I, QQMIN, QQMAX, COS1MIN, COS1MAX, COS3MIN, COS3MAX)
#define GEN_0PH(I, QQMIN, SP, COS3MIN, COS3MAX)
#define GEN_2PH(I, QQMIN, COS1MIN, COS1MAX, COS2MIN, COS2MAX, COS3MIN, COS3MAX)
struct @366025114004024134344043225357106161032107165361 flags_
struct @276363222274272223263152166363125067340201005217 cuts_
static int inChannelList(EvtId parent, int ndaug, EvtId *daugs)
static int getStdHep(EvtId id)
static EvtId evtIdFromStdHep(int stdhep)
static std::string name(EvtId i)
static EvtId getId(const std::string &name)
void makeDaughters(int ndaug, EvtId *id)
virtual void init(EvtId part_n, const EvtVector4R &p4)=0
static EvtId _NextLevelId[20]
static int _NextLevelDauNum
EvtParticle * getDaug(int i)
static EvtVector4R _NextLevelP4[20]
void init_evt(EvtParticle *p)
void init_mode(EvtParticle *p)
void set(int i, double d)