5 * Revision 1.1.1.1 1995/10/24 10:19:56 cernlib
9 #include "geant321/pilot.h"
10 *CMZ : 3.21/02 29/03/94 15.41.43 by S.Giani
15 *=== hadevv ===========================================================*
17 SUBROUTINE HADEVV ( NHAD, KPROJ, KTARG, PPROJ, EPROJ, UMO )
19 #include "geant321/dblprc.inc"
20 #include "geant321/dimpar.inc"
21 #include "geant321/iounit.inc"
23 *----------------------------------------------------------------------*
25 * Modified version of Hadevt created by Alfredo Ferrari, INFN-Milan *
27 * Last change on 20-jun-93 by Alfredo Ferrari, INFN - MIlan *
29 * Hadevt90: kinematics completed revised by A. Ferrari, before it was *
30 * always wrong every time the second jet to be sampled was *
31 * a "parjet". A few other bugs corrected: maybe others are *
33 *----------------------------------------------------------------------*
36 C GENERATE HADRON PRODC
37 C GENERATE HADRON PRODUCTION EVENT IN KPROJ - KTARG COLLISION
38 C WITH LAB PROJECTILE MOMENTUM PPROJ
39 C INCLUDING MESON MESON AND MESON ANTIBARYON COLLISIONS
41 C********************************************************************
43 #include "geant321/auxpar.inc"
44 #include "geant321/balanc.inc"
45 #include "geant321/cmsres.inc"
46 #include "geant321/finpar.inc"
47 #include "geant321/hadpar.inc"
48 #include "geant321/inpdat2.inc"
49 #include "geant321/part.inc"
50 #include "geant321/qquark.inc"
51 COMMON /FKINVT/PNUC(3),INUCVT
52 COMMON /FKPRIN/ IPRI, INIT
54 LOGICAL LISSU, LQTARG, LQPROJ
62 C*******************************************************************"
66 C********************************************************************
69 * Ijproj = paprop numbering
70 IJPROJ = KPTOIP (KPROJ)
71 IJTARG = KPTOIP (KTARG)
74 * The usual gamma and sqrt[beta**2/(1-beta**2)]=eta=gamma*beta factors
77 GAMCM = (EPROJ+AMTAR)/UMO
80 *or IF(IPRI.EQ.1) WRITE(LUNOUT,101)KPROJ,KTARG,PPROJ,AMPROJ,AMTAR,
81 *or &EPROJ,UMO,GAMCM,BGCM
82 *or 101 FORMAT(2I5,10F11.5)
84 C********************************************************************
86 C SELECTION OF QUARK - DIQUARK - CHAINS
88 C********************************************************************
91 * Ibproj = baryonic charge of the projectile
95 * Ibtarg = baryonic charge of the target nucleon
99 * Ipq1,ipq2,ipq3 = quarks of the projectile
101 IQP1 = MQUARK(1,IJPROJ)
102 IQP2 = MQUARK(2,IJPROJ)
103 IQP3 = MQUARK(3,IJPROJ)
105 * Iqt1,iqt2,iqt3 = quarks of the projectile
107 IQT1 = MQUARK(1,IJTARG)
108 IQT2 = MQUARK(2,IJTARG)
109 IQT3 = MQUARK(3,IJTARG)
111 *or &WRITE(LUNOUT,102)IBPROJ, IQP1,IQP2,IQP3,IQT1,IQT2,
113 *or 102 FORMAT(12I10)
114 IF (IBPROJ) 11, 12, 13
117 C********************************************************************
119 C SELECTION OF CHAINS
120 C ANTIBARYON - BARYON COLLISION
122 C********************************************************************
124 * +-------------------------------------------------------------------*
125 * | The incoming projectile is an antibaryon!!!
128 ISAM1 = 1.D0 + 3.D0*RNDM(1)
129 GO TO (111,112,113),ISAM1
146 ISAM2 = 1.D0 + 3.D0*RNDM(1)
147 GO TO (115,116,117),ISAM2
164 * | Quark selection for incoming antibaryon has been completed
165 * +-->-->-->-->-->-->-->-->-->--> go to 14 continue
168 * +-------------------------------------------------------------------*
169 * | The incoming projectile is a meson!!!
171 IF (IBTARG)712,812,912
172 * | +----------------------------------------------------------------*
173 * | | The target nucleon is a baryon (meson projectile)
177 C********************************************************************
179 C SELECTION OF CHAINS
180 C MESON - BARYON COLLISION
182 C********************************************************************
185 ISAM3 = 1.D0 + 2.D0*RNDM(1)
186 GO TO (121,122),ISAM3
196 ISAM4 = 1.D0 + 3.D0*RNDM(1)
197 GO TO (124,125,126),ISAM4
199 GO TO (1241,1242),ISAM3
211 GO TO (1251,1252),ISAM3
223 GO TO (1261,1262),ISAM3
235 * | | Quark selection for incoming meson and baryon target completed
236 * | +-->-->-->-->-->-->-->-->-->--> go to 114 continue
238 * | +----------------------------------------------------------------*
239 * | | The target nucleon is a meson (meson projectile)
242 C===============================================================
244 C SELECTION OF CHAINS
245 C MESON MESON COLLISIONS
247 C================================================================
249 ISAM3 = 1.D0 + 2.D0*RNDM(1)
250 GO TO (1218,1228),ISAM3
264 * | | Quark selection for incoming meson and meson target completed
265 * | +-->-->-->-->-->-->-->-->-->--> go to 14 continue
267 * | +----------------------------------------------------------------*
268 * | | The target nucleon is an anti-baryon (meson projectile)
271 C=================================================================
273 C SELECTION OF CHAINS
274 C MESON ANTIBARYON COLLISIONS
276 C==================================================================
281 ISAM4 = 1.D0 + 3.D0*RNDM(1)
282 GO TO (1247,1257,1267),ISAM4
284 GO TO (12417,12427),ISAM3
296 GO TO (12517,12527),ISAM3
308 GO TO (12617,12627),ISAM3
320 * | | Quark selection for incoming meson and a-baryon target completed
321 * | +-->-->-->-->-->-->-->-->-->--> go to 14 continue
323 * | end meson projectile
324 * +-------------------------------------------------------------------*
326 * +-------------------------------------------------------------------*
327 * | The incoming projectile is a baryon!!!
331 C********************************************************************
333 C SELECTION OF CHAINS
334 C BARYON - BARYON COLLISION
336 C********************************************************************
339 ISAM5 = 1.D0 + 3.D0*RNDM(1)
340 GO TO (131,132,133),ISAM5
357 ISAM6 = 1.D0 + 3.D0*RNDM(1)
358 GO TO (135,136,137),ISAM6
374 * | | Quark selection for incoming baryon and baryon target completed
375 * + |-->-->-->-->-->-->-->-->-->--> go to 14 continue
377 * | Quark selection completed
378 * +-------------------------------------------------------------------*
380 *or IF (IPRI.EQ.1) WRITE(LUNOUT,102)IFF,IBF,IFF1,IFF2,IFB1,IFB2,
381 *or &IFB,IBB,IBB1,IBB2
383 C********************************************************************
385 C*** SAMPLING MOMENTUM FRACTIONS OF QUARKS AND DIQUARKS
387 C********************************************************************
392 * +-------------------------------------------------------------------*
393 * | Selection of xp and xt from beta distribution:
394 * | xp and xt are then used to select the fraction of momentum and
395 * | energy for each jet, according to the following relations:
396 * | (where we assume to use xp, xt for the jet n. 1)
400 * | Ech1 = umo * (xp + xt ) / 2
401 * | Ech2 = umo * (xxp + xxt) / 2
402 * | Pch1 = umo * (xp - xt ) / 2
403 * | Pch2 = umo * (xxp - xxt) / 2
404 * | Amch1 = umo * sqrt (xp * xt )
405 * | Amch2 = umo * sqrt (xxp * xxt)
409 * | Note for antibaryon projectile xp and xt are sampled from the
410 * | same distribution, ===> no difference in exchanging them!
412 XP = BETARN(HLFHLF,UNO)
415 XT = BETARN(HLFHLF,UNO)
419 * | Note for baryon projectile xp and xt are sampled from the
420 * | same distribution, ===> no difference in exchanging them!
422 XP = BETARN(HLFHLF,UNO)
425 XT = BETARN(HLFHLF,UNO)
429 * | Note for meson projectile xp and xt are not sampled from the
430 * | same distribution, ===> difference in exchanging them!
432 IF (IFF.EQ.3 .OR. IFF.EQ.-3) UNO = UNOMS
433 XP = BETARN(HLFHLF,UNO)
435 IF (IBTARG .EQ. 0) GO TO 2288
438 XT = BETARN(HLFHLF,UNO)
441 * | Now xp and xt have been selected from the appropriate beta
442 * | distributions, xxp and xxt are the complements to one of xp and xt
443 * +-------------------------------------------------------------------*
445 * +-------------------------------------------------------------------*
446 * | From here to 1124 it is likely to be obsolete (inucvt is now used
447 * | nowhere in the code, the same for pnuc
450 *or IF (INUCVT.EQ.0) GO TO 1124
451 *or IF (RNDMVV.LT.PNUC(1)) GO TO 1124
452 *or XT=2.D0*BETARN(0.5D0,UNO+6.D0)
454 *or IF (XXT.LE.0.D0) XXT=RNDM(V)
455 *or IF (RNDMVV.LT.PNUC(2)) GO TO 1124
456 *or XT=3.D0*BETARN(0.5D0,UNO+12.D0)
458 *or IF (XXT.LE.0.D0) XXT=RNDM(V)
461 * +-------------------------------------------------------------------*
462 *or IF (IPRI .EQ. 1) WRITE(LUNOUT,103)XP,XT,XXP,XXT
463 *or 103 FORMAT (10F10.5)
465 C********************************************************************
467 C*** KINEMATICAL PARAMETERS OF BOTH CHAINS IN CMS
469 C********************************************************************
472 ****===================================================================*
473 * | Now selecting the kinematical parameters for the two jets:
475 * | amch1 = invariant mass of the 1st jet
476 * | ech1 = total energy of the 1st jet in CMS
477 * | pch1 = total momentum of the 1st jet in CMS (with sign)
479 * | amch2 = invariant mass of the 2nd jet
480 * | ech2 = total energy of the 2nd jet in CMS
481 * | pch2 = total momentum of the 2nd jet in CMS (with sign)
483 * | The following relations must be fulfilled:
485 * | ech1 + ech2 = umo (energy in CMS = inv. mass of the system)
486 * | ech1 = sqrt (pch1**2 + amch1**2)
487 * | ech2 = sqrt (pch2**2 + amch2**2)
490 ****===================================================================*
493 * +-------------------------------------------------------------------*
494 * | antibaryon projectile!!! (note that only antibaryon projectile
495 * | baryon target is allowed, antibaryon projectile meson target is
496 * | considered as meson projectile antibaryon target)
500 C********************************************************************
502 C*** KINEMATICAL PARAMETERS OF BOTH CHAINS IN CMS
503 C*** ANTINUCLEON-NUCLEUON
504 C*** LONG ANTIDIQUARK - DIQUARK CHAIN
506 C********************************************************************
508 * | Ibb, ifb1, ifb2 contain the quark numbers of the target, ibf,
509 * | iff1, iff2 the quark numbers of the projectile
510 * | iff...= forward chain, forward quark (diquark)
511 * | ifb...= forward chain, backward quark (diquark)
512 * | ibf...= backward chain, forward quark
513 * | ibb...= backward chain, backward quark
514 * | By definition all i..f.. come from the projectile and all
515 * | i..b.. from the target
516 * | Of course, since we are treating an antibaryon projectile and
517 * | a baryon target all i..f.. are antiquark and all i..b.. are
519 * | Of course the two following cards are equivalent to
520 * | IIFF1 = IABS (IFF1) ...
523 IF (IIFF1 .EQ. IFB1) GO TO 3111
524 IF (IIFF1 .EQ. IFB2) GO TO 3112
525 IF (IIFF2 .EQ. IFB1) GO TO 3113
526 IF (IIFF2 .EQ. IFB2) GO TO 3114
527 * | Get the index and the mass of the pseudoscalar meson corre-
528 * | sponding to the lowest energy for chain 2 ("b")
530 IBPS = IMPS(IIBF,IBB)
532 * | *****************************************************************
533 * | New version: of course, as it is explained below it is not *
534 * | correct to comment the "go to 3115", however it is not correct*
535 * | also to use it in its original form, we need to compute a de- *
536 * | tailed threshold, also for the Amff value: we can believe that*
537 * | the lowest threshold is given by the two scalar mesons resul- *
538 * | ting from the combinations of the 4 quarks (iff1,iff2,ibf1, *
539 * | ibf2). Remember that the Imps(i,j) array gives the index of *
540 * | the pseudoscalar meson with antiquark -i and quark j, the same*
541 * | apply to the Imve array but for vector mesons *
542 * | But, since bamjev it is likely to produce at least one baryon *
543 * | and one antibaryon when called with Iopt=5 (since it hadroni- *
544 * | zes a chain with a diquark and an anti-diquark at the extremi-*
545 * | ties) a more realistic threshold could be to check for the *
546 * | masses of the baryon-antibaryon combinations corresponding to *
547 * | a uubar or a ddbar sea pair added to the original diquarks *
548 * | *****************************************************************
549 * | Selection of the mass threshold from the two pseudoscalar mesons
550 * IMPS11 = IMPS(IIFF1,IFB1)
551 * IMPS21 = IMPS(IIFF2,IFB2)
552 * IMPS12 = IMPS(IIFF1,IFB2)
553 * IMPS22 = IMPS(IIFF2,IFB1)
554 * | Amff is selected as the maximum of the two possible meson configu-
555 * | rations, to be sure that no problem will result during frag-
557 * AMFF = MAX ( AM (IMPS11) + AM (IMPS21), AM (IMPS12) +
559 * | Of course at least two mesons must be produced
560 * | First check that the total invariant mass is enough (it must
561 * | be larger than the two meson masses and the pseudoscalar
562 * | meson mass of the second chain)
564 * | Selection of the mass threshold from the two baryon configura-
566 CALL BKLASS (-1, IFF1, IFF2, IA1F8, IA1F10 )
567 CALL BKLASS ( 1, IFB1, IFB2, I1F8, I1F10 )
568 CALL BKLASS (-2, IFF1, IFF2, IA2F8, IA2F10 )
569 CALL BKLASS ( 2, IFB1, IFB2, I2F8, I2F10 )
570 AMFF = MIN ( AM (IA1F8) + AM (I1F8), AM (IA2F8) + AM (I2F8) )
572 * | +----------------------------------------------------------------*
573 * | | New treatment: check the mass threshold
574 IF ( AMFF + AMBPS .LT. UMO ) THEN
578 AMCH2 = UMO*UMO*XP*XT
579 * | | +------------------------------------------------------------*
580 * | | | Check if we have enough energy for the "f" jet
581 IF ( AMCH1 .LE. AMFF .OR. AMCH2 .LE. AMBPS * AMBPS ) THEN
583 IF ( IXPXT .LT. 5 ) GO TO 25
584 * | | | if amch1 < amfps xp and xt are resampled, but if we are
585 * | | | resampling too often force amch1 to be above
586 * | | | the minimum required, anyway the kinematic region
587 * | | | allowed for xp, xt seems to be marginal
588 * | | *-->-->-->-->-->-->-->-->-->--> xp, xt resampling
589 XSQ1 = ( AMFF / UMO )**2
590 XSQ2 = ( AMBPS / UMO )**2
592 XXYMX = 0.5D+00 * ( 1.D+00 + XSQ1 - XSQ2 )
593 XXYMN = SQRT ( 1.D+00 - XSQ1 / ( XXYMX * XXYMX ) )
594 XXXMN = MAX ( XSQ1, XXYMX * ( ONEONE - XXYMN ) )
595 XXXMX = MIN ( 1.D+00, XXYMX * ( 1.D+00 + XXYMN ) )
596 * | | | +----------------------------------------------------------*
600 XXP = XXXMN + ( XXXMX - XXXMN ) * RNDM (1)
603 XXYMX = 1.D+00 - XSQ2 / XP
604 * | | | | +-------------------------------------------------------*
606 IF ( XXYMN .GT. XXYMX ) THEN
609 * | | | |-<|--<--<--<--< no allowed interval for xxt, resample
612 * | | | | +-------------------------------------------------------*
614 * | | | +----------------------------------------------------------*
616 XXT = XXYMN + ( XXYMX - XXYMN ) * RNDM (1)
623 * | | +------------------------------------------------------------*
627 * | +----------------------------------------------------------------*
628 * | | We are in troubles: the selected quark combinations
629 * | | for the two chains are unphysical since the invariant
630 * | | mass is too low to produce the required three mesons
631 * | | First try to change the quark combinations:
634 IRNDM = 1.D+00 + RNDM (1)
637 GO TO (3171,3181) IRNDM
638 * | | +-------------------------------------------------------------*
639 * | | | Try to change one of the projectile quarks in the
643 * | | | +----------------------------------------------------------*
644 * | | | | The third antibaryon quark can combine with the
645 * | | | | first or/and the second quark of the target diquark
646 IF ( -IBF .EQ. IFB1 .OR. -IBF .EQ. IFB2 ) THEN
647 * | | | | +-------------------------------------------------------*
648 * | | | | | Make a random choiche of the quark to be substituted
650 IF ( RNDM (1) .LT. 0.5D+00 ) THEN
655 * | | | | +-------------------------------------------------------*
663 * | | | | +-------------------------------------------------------*
666 * | | | +----------------------------------------------------------*
667 * | | | | No possibility to solve the situation changing one of
668 * | | | | the projectile quarks inside the "f" chain, try with
669 * | | | | the projectile quarks (if not yet tried)
671 IF ( .NOT. LQTARG ) GO TO 3181
675 * | | | +----------------------------------------------------------*
677 * | | +-------------------------------------------------------------*
678 * | | +-------------------------------------------------------------*
679 * | | | Try to change one of the target quarks in the
680 * | | | first chain (for uud and udd targets this is usually
681 * | | | useless, but it has been included for the sake of
682 * | | | completness )
685 * | | | +----------------------------------------------------------*
686 * | | | | The third target quark can combine with the first
687 * | | | | or/and the second quark of the projectile diquark
688 IF ( IBB .EQ. -IFF1 .OR. IBB .EQ. -IFF2 ) THEN
689 * | | | | +-------------------------------------------------------*
690 * | | | | | Make a random choiche of the quark to be substituted
692 IF ( RNDM (1) .LT. 0.5D+00 ) THEN
697 * | | | | +-------------------------------------------------------*
705 * | | | | +-------------------------------------------------------*
708 * | | | +----------------------------------------------------------*
709 * | | | | No possibility to solve the situation changing one of
710 * | | | | the target quarks inside the "f" chain, try with
711 * | | | | the projectile quarks (if not yet tried)
713 IF ( .NOT. LQPROJ ) GO TO 3171
716 * | | | +----------------------------------------------------------*
718 * | | +-------------------------------------------------------------*
720 * | | If we are here we cannot perform an interaction conserving
721 * | | all additive quantum numbers: ignore one (typically it is
722 * | | strangeness) and go on
724 & ' *** Hadevv, impossible interaction, kp,kt, Umo',
727 & ' *** Hadevv, impossible interaction, kp,kt, Umo',
731 * | +----------------------------------------------------------------*
732 * | Now we want to get the indexes of the pseudo-scalar and vector
733 * | mesons which can be created from the first (forward) chain.
734 * | Of course if one of the ff quark is the antiquark of one of
735 * | fb quarks then the mesons are defined completely by the remaining
736 * | two quarks: we have anyway to deal also with the situation
737 * | were no ff quark is the antiquark of a fb quark (the goto 3115...)
738 * | which clearly requires at least two mesons!!! So no Amfps and
739 * | Amfv can be defined in this situation, and the "go to 3115" was
740 * | really important to assure that we are not producing single
741 * | particle jets which are not possible, we have only to substitute
742 * | the 1.5 threshold with the proper threshold for the two
743 * | mesons (at least the two scalar mesons): this is also true for
744 * | the Amff value which of course should be equal to the sum
745 * | of the two scalar mesons resulting from the combinations
746 * | of the 4 quarks (see above)
749 IFPS = IMPS(IIFF2,IFB2)
752 IFPS2 = IMPS(IIFF1,IFB1)
753 IFV = IMVE(IIFF2,IFB2)
757 IFPS = IMPS(IIFF2,IFB1)
760 IFPS2 = IMPS(IIFF1,IFB2)
761 IFV = IMVE(IIFF2,IFB1)
765 IFPS = IMPS(IIFF1,IFB2)
768 IFPS2 = IMPS(IIFF2,IFB1)
769 IFV = IMVE(IIFF1,IFB2)
773 IFPS = IMPS(IIFF1,IFB1)
776 IFPS2 = IMPS(IIFF2,IFB2)
777 IFV = IMVE(IIFF1,IFB1)
779 * Amfps, amfv are the masses of the pseudoscalar and vector mesons
780 * corresponding to the two unpaired quarks of the 1 (f) chain
785 C ATTENTION THIS MIGHT LEAD TO TOO LOW ANNIHILATION MULTIPLICITIES
788 AMFF = MAX ( AMFV + 0.3D+00, AMFV + AMFPS2 + 0.1D+00 )
789 * | This expression for Amff0 (threshold for a complete diquark-diquark
790 * | jet) is not correct: this jet will fragment at least into two
791 * | hadrons corresponding to the lowest energy hadrons with respecti-
792 * | vely the first and the second diquark. Of corse one will be an
793 * | antibaryon. It must be checked that bamjet produces a baryon-
794 * | antibaryon pair any time it is called with iopt = 5 (corresponding
795 * | to the fragmentation of a complete diquark-antidiquark jet)
796 * | It is also questionable if it is correct to call bamjet with
797 * | iopt=5 whenever energetically possible: this clearly implies
798 * | that no annihilation takes place (an antibaryon will emerge
799 * | from the interaction). This is a question to be addressed
801 * AMFF0 = 2.D+00 * AMFF
802 * | A tentative way could be to check for the masses of the
803 * | baryon-antibaryon combinations corresponding to a uubar
804 * | or a ddbar sea pair
805 CALL BKLASS (-1, IFF1, IFF2, IA1F8, IA1F10 )
806 CALL BKLASS ( 1, IFB1, IFB2, I1F8, I1F10 )
807 CALL BKLASS (-2, IFF1, IFF2, IA2F8, IA2F10 )
808 CALL BKLASS ( 2, IFB1, IFB2, I2F8, I2F10 )
809 AMFF0 = MIN ( AM (IA1F8) + AM (I1F8), AM (IA2F8) + AM (I2F8) )
812 * | here xxt and xxp are used for the first jet
818 *or IF (IPRI.EQ.1) WRITE(LUNOUT,103)XSQ,AMCH1,AMCH2,AAPS,AAV,
821 * | +----------------------------------------------------------------*
823 IF (AMCH1 .LT. AMFPS) GO TO 25
824 * | | if amch1 < amfps xp and xt are resampled
825 * | *-->-->-->-->-->-->-->-->-->--> xp, xt resampling
827 * | Kinematical parameters xxp, xxt for the 1st jet
828 IF (AMCH1 .GT. AMFV ) GO TO 3151
833 * | | recalculating xxp, xp
838 IF (AMCH1 .GT. AMFF) GO TO 3153
843 * | | recalculating xxp, xp
848 IF (AMCH1 .LE. AMFF0) THEN
856 C********************************************************************
858 C*** KINEMATICAL PARAMETERS OF BOTH CHAINS IN CMS
859 C ANTINUCLEON NUCLEON
860 C*** SHORT ANTIQUARK - QUARK CHAIN
862 C********************************************************************
865 IBPS = IMPS(IIBF,IBB)
873 * | +----------------------------------------------------------------*1
875 * | | Now commented, is useless!!!
876 * IF (XP .LE. 0.D0 .OR. XT .LE. 0.D0) GO TO 25
877 * | | resample xp and xt if one is negative or zero
878 * | +-->-->-->-->-->-->-->-->-->--> xp, xt resampling
880 * | Now xp and xt are used for the second jet
883 *or IF (IPRI.EQ.1) WRITE(LUNOUT,103)XSQ,AMCH1,AMCH2
884 *or & ,AAPS,AAV,AMBPS,AMBV
886 * | +----------------------------------------------------------------*
888 IF (AMCH2 .LT. AMBPS) THEN
891 * | | if amch1 < amfps xp and xt are resampled
892 * | *-->-->-->-->-->-->-->-->-->--> xp, xt resampling
895 * | +----------------------------------------------------------------*
897 IF (AMCH2 .GT. AMBV ) GO TO 3121
899 * For Prof. Ranft: here there was a "large" mistake, amch2 = ambps
904 *or IF (INUCVT .EQ. 1) GO TO 3123
907 IF (AMCH2 .GT. AMBB) GO TO 3123
912 *or IF (INUCVT .EQ. 1) GO TO 3123
914 * | +----------------------------------------------------------------*
915 * | | Here adjusting kinematics!!!!!
916 * | | Now, chain 2 is a single particle jet, so we have to reset the
917 * | | kinematical parameters xp, xxp, xt and xxt
921 * | | +-------------------------------------------------------------*
922 * | | | If also chain 1 is a parjet (nnch1 .ne. 0) then the paramet.
923 * | | | to be recomputed are xp and xt, from alpha and beta, in
924 * | | | such a way to conserve the original momentum direction
926 IF (NNCH1 .NE. 0) THEN
928 HELP = XSQ2 * (XSQ2 - 2.D0) + XXSQ2 * (XXSQ2 - 2.D0)
929 & - 2.D0 * XSQ2 * XXSQ2
930 DDIFF = SQRT (HELP + 1.D0)
931 SSUM = SQRT (HELP + 1.D0 + 4.D0 * XXSQ2)
932 ALPHA = (SSUM + DDIFF) * 0.5D0
933 BETA = (SSUM - DDIFF) * 0.5D0
944 * | | +-------------------------------------------------------------*
946 * | | +-------------------------------------------------------------*
947 * | | | If chain 1 is not a parjet (nnch1 .eq. 0) then the paramet.
948 * | | | xp, xt are to be recomputed in such a way to conserve the
949 * | | | original momentum direction and modulus
952 SSUM = SQRT (4.D0 * XXSQ2 + DDIFF**2)
953 XP = (SSUM + DDIFF) * 0.5D0
954 XT = (SSUM - DDIFF) * 0.5D0
957 XSQ = SQRT (XXP * XXT)
961 * | | +-------------------------------------------------------------*
962 * | | end kinematics correction
963 * | +----------------------------------------------------------------*
967 PCH1 = UMO*(XXP - XXT)*.5D0
968 ECH1 = UMO*(XXP + XXT)*.5D0
971 PCH2 = UMO*(XP - XT)*.5D0
972 ECH2 = UMO*(XP + XT)*.5D0
976 * | end kin. sel. for antibaryon projectile
977 * +-->-->-->-->-->-->-->-->-->--> go to 34
979 * +-------------------------------------------------------------------*
980 * | baryon projectile!!!
984 C********************************************************************
986 C*** KINEMATICAL PARAMETERS OF BOTH CHAINS IN CMS
987 C*** NUCLEON - NUCLEON
988 C*** FORWARD DIQUARK - QUARK CHAIN
990 C********************************************************************
994 * +-->-->-->-->-->-->-->-->-->--> jump # 1 to 332
996 * +--<--<--<--<--<--<--<--<--<--< here from jump # 3
1000 CALL BKLASS (IFB,IFF1,IFF2,IF8,IF10)
1003 AMFF = AMF10 + 0.3D0
1005 * | here xxp, xt are used for the jet # 1
1006 XSQ = SQRT(ABS(XXP*XT))
1010 *or IF (IPRI .EQ. 1) WRITE(LUNOUT,103)XSQ,AMCH1,AMCH2
1011 *or & ,AA8,AA10,AMF8,AMF10
1013 * | +----------------------------------------------------------------*
1014 * | | This check added by A. Ferrari, to avoid negative x(x)p or
1015 * | | x(x)t !!!!!?????? Maybe also "go to 33366" if we want to create
1016 * | | the jet anyway
1017 * I (A. Ferrari) think this check was missing and is
1018 * actually needed, else we can get negative energies
1019 IF (AMCH1 .LT. AMF8) GO TO 25
1020 * | | if amch1 < amf8 xp and xt are resampled
1021 * | +-->-->-->-->-->-->-->-->-->--> xp, xt resampling
1023 IF (AMCH1 .GT. AMF10) GO TO 331
1030 IF (AMCH1 .GT. AMFF) GO TO 333
1036 * | +----------------------------------------------------------------*
1037 * | | Here adjusting kinematics!!!!!
1038 * | | Now, chain 1 is a single particle jet, so we have to reset the
1039 * | | kinematical parameters xp, xxp, xt and xxt
1043 * | | +-------------------------------------------------------------*
1044 * | | | If also chain 2 is a parjet (nnch2 .ne. 0) then the paramet.
1045 * | | | to be recomputed are xxp and xt, from alpha and beta, in
1046 * | | | such a way to conserve the original momentum direction
1048 IF (NNCH2 .NE. 0) THEN
1050 HELP = XSQ2 * (XSQ2 - 2.D0) + XXSQ2 * (XXSQ2 - 2.D0)
1051 & - 2.D0 * XSQ2 * XXSQ2
1052 DDIFF = SQRT (HELP + 1.D0)
1053 SSUM = SQRT (HELP + 1.D0 + 4.D0 * XSQ2)
1054 ALPHA = (SSUM + DDIFF) * 0.5D0
1055 BETA = (SSUM - DDIFF) * 0.5D0
1056 IF (XXP .GT. XT) THEN
1066 * | | +-------------------------------------------------------------*
1068 * | | +-------------------------------------------------------------*
1069 * | | | If chain 2 is not a parjet (nnch2 .eq. 0) then the paramet.
1070 * | | | xxp,xt have to be recomputed in such a way to conserve the
1071 * | | | original momentum direction and modulus
1074 SSUM = SQRT (4.D0 * XSQ2 + DDIFF**2)
1075 XXP = (SSUM + DDIFF) * 0.5D0
1076 XT = (SSUM - DDIFF) * 0.5D0
1079 XXSQ = SQRT (XP * XXT)
1083 * | | +-------------------------------------------------------------*
1084 * | | end kinematics correction
1085 * | +----------------------------------------------------------------*
1088 * | we are using xp and xxt for chain 2
1089 PCH1 = UMO*(XXP - XT)*.5D0
1090 ECH1 = UMO*(XXP + XT)*.5D0
1093 PCH2 = UMO*(XP - XXT)*.5D0
1094 ECH2 = UMO*(XP + XXT)*.5D0
1098 * | end kin. sel. for baryon projectile
1099 * +-->-->-->-->-->-->-->-->-->--> go to 34
1102 C********************************************************************
1104 C*** KINEMATICAL PARAMETERS OF BOTH CHAINS IN CMS
1106 C*** BACKWARD QUARK - DIQUARK CHAIN
1108 C********************************************************************
1110 * +--<--<--<--<--<--<--<--<--<--< here from the previous jump # 1
1113 * | Starting from chain # 2!!!
1114 CALL BKLASS (IBF,IBB1,IBB2,IB8,IBIO)
1118 AMBB = AMB10 + 0.3D0
1119 * | here xp, xxt are used for the jet # 2
1124 *or IF (IPRI.EQ.1) WRITE(LUNOUT,103)XSQ,AMCH1,AMCH2
1125 *or & ,AAB8,AAB10,AMB8,AMB10
1127 * | +----------------------------------------------------------------*
1128 * | | This check added by A. Ferrari, to avoid negative x(x)p or
1129 * | | x(x)t !!!!!?????? Maybe also "go to 335" if we want to create
1130 * | | the jet anyway
1131 * I (A. Ferrari) think this check was missing and is
1132 * actually needed, else we can get negative energies
1133 IF (AMCH2 .LT. AMB8) GO TO 25
1134 * | | if amch2 < amb8 xp and xt are resampled
1135 * | +-->-->-->-->-->-->-->-->-->--> xp, xt resampling
1137 IF (AMCH2 .GT. AMB10) GO TO 334
1146 IF (AMCH2 .GT. AMBB) GO TO 335
1154 C PCH1=UMO*(XXP-XT)*.5D0
1155 C ECH1=UMO*(XXP+XT)*.5D0
1163 * +-->-->-->-->-->-->-->-->-->--> jump # 3 to 3310
1165 * +-------------------------------------------------------------------*
1166 * | meson projectile!!!
1170 C********************************************************************
1172 C*** KINEMATICAL PARAMETERS OF BOTH CHAINS IN CMS
1175 C********************************************************************
1177 IF (IBTARG)3277,3288,3299
1178 * | +----------------------------------------------------------------*
1179 * | | meson projectile, baryon target!!!!
1182 GO TO (321,325),ISAM3
1183 * | | +-------------------------------------------------------------*
1184 * | | | meson projectile, baryon target, isam3 = 1
1187 C*** MESON NUCLEON Q(XXP)-QQ(XXT)+AQ(XP-Q(XT)
1190 * | | +-->-->-->-->-->-->-->-->-->--> jump # 4 to 322
1192 * | | +--<--<--<--<--<--<--<--<--<--< here from jump # 5
1195 C=================================================================
1197 C*** KINEMATICAL PARAMETERS OF BOTH CHAINS IN CMS
1199 C*** FIRST LONG Q(XXP)-QQ(XXT) CHAIN
1201 C===================================================================
1202 CALL BKLASS (IFF,IFB1,IFB2,IF8,IFIO)
1206 AMFF = AMF10 + 0.3D0
1207 * | here xxp, xxt are used for the jet # 1
1212 *or IF (IPRI .EQ. 1) WRITE(LUNOUT,103)XSQ,AMCH1,AMCH2
1213 *or & ,AA8,AA10,AMF8,AMF10
1215 * | | | +----------------------------------------------------------*
1217 IF (AMCH1 .LT. AMF8) GO TO 25
1218 * | | | | if amch1 < amf8 xp and xt are resampled
1219 * | | | +-->-->-->-->-->-->-->-->-->--> xp, xt resampling
1221 IF (AMCH1 .GT. AMF10) GO TO 3211
1228 IF (AMCH1 .GT. AMFF) GO TO 3213
1234 * | | | +----------------------------------------------------------*
1235 * | | | | Here adjusting kinematics!!!!!
1236 * | | | | Now, chain 1 is a single particle jet, so we have to
1237 * | | | | reset the kinematical parameters xp, xxp, xt and xxt
1241 * | | | | +-------------------------------------------------------*
1242 * | | | | | If also chain 2 is a parjet (nnch2 .ne. 0) then the
1243 * | | | | | param. to be recomputed are xxp and xxt, from alpha
1244 * | | | | | and beta, in such a way to conserve the original
1245 * | | | | | momentum direction
1247 IF (NNCH2 .NE. 0) THEN
1249 HELP = XSQ2 * (XSQ2 - 2.D0) + XXSQ2 *
1250 & (XXSQ2 - 2.D0) - 2.D0 * XSQ2 * XXSQ2
1251 DDIFF = SQRT (HELP + 1.D0)
1252 SSUM = SQRT (HELP + 1.D0 + 4.D0 * XSQ2)
1253 ALPHA = (SSUM + DDIFF) * 0.5D0
1254 BETA = (SSUM - DDIFF) * 0.5D0
1255 IF (XXP .GT. XXT) THEN
1265 * | | | | +-------------------------------------------------------*
1267 * | | | | +-------------------------------------------------------*
1268 * | | | | | If chain 2 is not a parjet (nnch2 .eq. 0) then the
1269 * | | | | | paramet. xxp,xxt have to be recomputed in such a way
1270 * | | | | | to conserve the original momentum direction and
1274 SSUM = SQRT (4.D0 * XSQ2 + DDIFF**2)
1275 XXP = (SSUM + DDIFF) * 0.5D0
1276 XXT = (SSUM - DDIFF) * 0.5D0
1279 XXSQ = SQRT (XP * XT)
1283 * | | | | +-------------------------------------------------------*
1284 * | | | | end kinematics correction
1285 * | | | +----------------------------------------------------------*
1288 PCH1 = UMO*(XXP - XXT)*.5D0
1289 ECH1 = UMO*(XXP + XXT)*.5D0
1292 PCH2 = UMO*(XP - XT)*.5D0
1293 ECH2 = UMO*(XP + XT)*.5D0
1297 * | | | end kin. sel. for meson proj. (baryon target), isam3 = 1
1298 * | | +-->-->-->-->-->-->-->-->-->--> go to 34
1300 * | | +--<--<--<--<--<--<--<--<--<--< here from jump # 4
1303 C===============================================================
1305 C*** KINEMATICAL PARAMETERS OF BOTH CHAINS IN CMS
1307 C*** SHORT AQ(XP)-Q(XT) CHAIN
1309 C================================================================
1311 IBPS = IMPS(IIBF,IBB)
1312 IBV = IMVE(IIBF,IBB)
1317 * | here xp, xt are used for the jet # 2
1322 *or IF (IPRI.EQ.1) WRITE(LUNOUT,103)XSQ,AMCH1,AMCH2
1323 *or & ,AAPS,AAV,AMBPS,AMBV
1325 * | | | +----------------------------------------------------------*
1327 IF (AMCH2 .LT. AMBPS) GO TO 25
1328 * | | | | if amch2 < ambps xp and xt are resampled
1329 * | | | +-->-->-->-->-->-->-->-->-->--> xp, xt resampling
1331 IF (AMCH2 .GT. AMBV) GO TO 3221
1337 *or IF (INUCVT .EQ. 1) GO TO 3223
1341 IF (AMCH2 .GT. AMBB) GO TO 3223
1347 *or IF (INUCVT .EQ. 1) GO TO 3223
1350 C PCH1=UMO*(XXP-XXT)*.5D0
1351 C ECH1=UMO*(XXP+XXT)*.5D0
1359 * | | +-->-->-->-->-->-->-->-->-->--> jump # 5 to 3259
1361 * | | +-------------------------------------------------------------*
1362 * | | | meson projectile, baryon target, isam3 = 2
1365 C=================================================================
1367 C*** KINEMATICAL PARAMETERS OF BOTH CHAINS IN CMS
1369 C*** FORWARD ANTIQUARK-DIQUARK CHAIN
1371 C=================================================================
1374 * | | +-->-->-->-->-->-->-->-->-->--> jump # 6 to 326
1376 * | | +--<--<--<--<--<--<--<--<--<--< here from jump # 7
1379 C*** MESON NUCLEON FORWARD AQ(XXP)-Q(XT) AND BACKWARD CHAINS Q(XP)-QQ(
1381 C=====================================================================
1383 C*** KINEMATICAL PARAMETERS OF BOTH CHAINS IN CMS
1385 C*** FORWARD AQ(XXP)-Q(XT) CHAIN
1387 C====================================================================
1389 IFPS = IMPS(IIFF,IFB)
1390 IFV = IMVE(IIFF,IFB)
1395 * | | | here xxp, xt are used for the jet # 1
1400 *or IF (IPRI .EQ. 1) WRITE(LUNOUT,103)XSQ,AMCH1,AMCH2
1401 *or & ,AAPS,AAV,AMFPS,AMFV
1403 * | | +-------------------------------------------------------------*
1405 IF (AMCH1 .LT. AMFPS) GO TO 25
1406 * | | | if amch1 < amfps xp and xt are resampled
1407 * | | +-->-->-->-->-->-->-->-->-->--> xp, xt resampling
1409 IF (AMCH1 .GT. AMFV) GO TO 3251
1416 IF (AMCH1.GT.AMFF) GO TO 3253
1422 * | | | +----------------------------------------------------------*
1423 * | | | | Here adjusting kinematics!!!!!
1424 * | | | | Now, chain 1 is a single particle jet, so we have to
1425 * | | | | reset the kinematical parameters xp, xxp, xt and xxt
1429 * | | | | +-------------------------------------------------------*
1430 * | | | | | If also chain 2 is a parjet (nnch2 .ne. 0) then the
1431 * | | | | | param. to be recomputed are xxp and xt, from alpha
1432 * | | | | | and beta, in such a way to conserve the original
1433 * | | | | | momentum direction
1435 IF (NNCH2 .NE. 0) THEN
1437 HELP = XSQ2 * (XSQ2 - 2.D0) + XXSQ2 *
1438 & (XXSQ2 - 2.D0) - 2.D0 * XSQ2 * XXSQ2
1439 DDIFF = SQRT (HELP + 1.D0)
1440 SSUM = SQRT (HELP + 1.D0 + 4.D0 * XSQ2)
1441 ALPHA = (SSUM + DDIFF) * 0.5D0
1442 BETA = (SSUM - DDIFF) * 0.5D0
1443 IF (XXP .GT. XT) THEN
1453 * | | | | +-------------------------------------------------------*
1455 * | | | | +-------------------------------------------------------*
1456 * | | | | | If chain 2 is not a parjet (nnch2 .eq. 0) then the
1457 * | | | | | paramet. xxp,xt have to be recomputed in such a way
1458 * | | | | | to conserve the original momentum direction and
1462 SSUM = SQRT (4.D0 * XSQ2 + DDIFF**2)
1463 XXP = (SSUM + DDIFF) * 0.5D0
1464 XT = (SSUM - DDIFF) * 0.5D0
1467 XXSQ = SQRT (XP * XXT)
1471 * | | | | +-------------------------------------------------------*
1472 * | | | | end kinematics correction
1473 * | | | +----------------------------------------------------------*
1476 PCH1 = UMO*(XXP - XT)*.5D0
1477 ECH1 = UMO*(XXP + XT)*.5D0
1480 PCH2 = UMO*(XP - XXT)*.5D0
1481 ECH2 = UMO*(XP + XXT)*.5D0
1485 * | | | end kin. sel. for meson proj. (baryon target), isam3 = 2
1486 * | | +-->-->-->-->-->-->-->-->-->--> go to 34
1488 * | | +--<--<--<--<--<--<--<--<--<--< here from jump # 6
1491 C*** BACKWARD Q(XP)-QQ(XXT) CHAIN
1492 CALL BKLASS (IBF,IBB1,IBB2,IB8,IBIO)
1496 AMBB = AMB10 + 0.3D0
1497 C===================================================================
1499 C*** KINEMATICAL PARAMETERS OF BOTH CHAINS IN CMS
1501 C*** BACKWARD QUARK -DIQUARK CHAIN
1503 C====================================================================
1504 * | | | here xp, xxt are used for the jet # 2
1509 *or IF (IPRI .EQ. 1) WRITE(LUNOUT,103)XXSQ,AMCH1,AMCH2
1510 *or & ,AA8,AA10,AMB8,AMB10
1512 * | | | +----------------------------------------------------------*
1514 IF (AMCH2 .LT. AMB8 ) GO TO 25
1515 * | | | | if amch2 < amb8 xp and xt are resampled
1516 * | | | +-->-->-->-->-->-->-->-->-->--> xp, xt resampling
1518 IF (AMCH2 .GT. AMB10) GO TO 3261
1524 *or IF (INUCVT .EQ. 1) GO TO 3263
1528 IF (AMCH2 .GT. AMBB) GO TO 3263
1534 *or IF (INUCVT .EQ. 1) GO TO 3263
1537 C PCH1=UMO*(XXP-XT)*.5D0
1538 C ECH1=UMO*(XXP+XT)*.5D0
1546 * | | +-->-->-->-->-->-->-->-->-->--> jump # 7 to 3250
1547 * | +----------------------------------------------------------------*
1549 * | +----------------------------------------------------------------*
1550 * | | Meson projectile, meson target!!!
1554 C================================================================
1556 C*** KINEMATICAL PARAMETERS OF BOTH CHAINS IN CMS
1559 C================================================================
1561 IF (RNDM(1) .LE. 0.5D0) GO TO 93288
1565 GO TO (3218,3258),ISAM3
1566 * | | +-------------------------------------------------------------*
1567 * | | | Meson projectile, meson target, isam3 = 1
1570 C==================================================================
1571 C*** MESON MESON Q(XXP)-AQ(XXT)+AQ(XP)-Q(XT)
1572 C=================================================================
1575 * | | +-->-->-->-->-->-->-->-->-->--> jump # 8 to 3228
1577 * | | +--<--<--<--<--<--<--<--<--<--< here from jump # 9
1580 C=================================================================
1582 C*** KINEMATICAL PARAMETERS OF BOTH CHAINS IN CMS
1584 C*** FIRST LONG Q(XXP)-AQ(XXT) CHAIN
1586 C===================================================================
1588 IFPS = IMPS(IIFB,IFF)
1589 IFV = IMVE(IIFB,IFF)
1591 * | | | Of course AMPV seems to be a mistyping for AMFV
1596 * | | | here we are using xxp, xxt for the jet # 1
1601 *or IF (IPRI .EQ. 1) WRITE(LUNOUT,103)XSQ,AMCH1,AMCH2
1602 *or & ,AAPS,AAV,AMFPS,AMFV
1604 * | | +-------------------------------------------------------------*
1606 IF (AMCH1 .LT. AMFPS) GO TO 25
1607 * | | | if amch2 < amfps xp and xt are resampled
1608 * | | +-->-->-->-->-->-->-->-->-->--> xp, xt resampling
1610 IF (AMCH1 .GT. AMFV ) GO TO 32118
1617 IF (AMCH1 .GT. AMFF) GO TO 32138
1623 * | | | +----------------------------------------------------------*
1624 * | | | | Here adjusting kinematics!!!!!
1625 * | | | | Now, chain 1 is a single particle jet, so we have to
1626 * | | | | reset the kinematical parameters xp, xxp, xt and xxt
1630 * | | | | +-------------------------------------------------------*
1631 * | | | | | If also chain 2 is a parjet (nnch2 .ne. 0) then the
1632 * | | | | | param. to be recomputed are xxp and xxt, from alpha
1633 * | | | | | and beta, in such a way to conserve the original
1634 * | | | | | momentum direction
1636 IF (NNCH2 .NE. 0) THEN
1638 HELP = XSQ2 * (XSQ2 - 2.D0) + XXSQ2 *
1639 & (XXSQ2 - 2.D0) - 2.D0 * XSQ2 * XXSQ2
1640 DDIFF = SQRT (HELP + 1.D0)
1641 SSUM = SQRT (HELP + 1.D0 + 4.D0 * XSQ2)
1642 ALPHA = (SSUM + DDIFF) * 0.5D0
1643 BETA = (SSUM - DDIFF) * 0.5D0
1644 IF (XXP .GT. XXT) THEN
1654 * | | | | +-------------------------------------------------------*
1656 * | | | | +-------------------------------------------------------*
1657 * | | | | | If chain 2 is not a parjet (nnch2 .eq. 0) then the
1658 * | | | | | paramet. xxp,xxt have to be recomputed in such a way
1659 * | | | | | to conserve the original momentum direction and
1663 SSUM = SQRT (4.D0 * XSQ2 + DDIFF**2)
1664 XXP = (SSUM + DDIFF) * 0.5D0
1665 XXT = (SSUM - DDIFF) * 0.5D0
1668 XXSQ = SQRT (XP * XT)
1672 * | | | | +-------------------------------------------------------*
1673 * | | | | end kinematics correction
1674 * | | | +----------------------------------------------------------*
1677 PCH1 = UMO*(XXP - XXT)*.5D0
1678 ECH1 = UMO*(XXP + XXT)*.5D0
1681 PCH2 = UMO*(XP - XT)*.5D0
1682 ECH2 = UMO*(XP + XT)*.5D0
1686 * | | | end kin. sel. for meson proj. (meson target), isam3 = 1
1687 * | | +-->-->-->-->-->-->-->-->-->--> go to 348
1689 * | | +--<--<--<--<--<--<--<--<--<--< here from jump # 8
1692 C===============================================================
1694 C*** KINEMATICAL PARAMETERS OF BOTH CHAINS IN CMS
1696 C*** SHORT AQ(XP)-Q(XT) CHAIN
1698 C================================================================
1700 IBPS = IMPS(IIBF,IBB)
1701 IBV = IMVE(IIBF,IBB)
1706 * | | | here we are using xp, xt for the jet # 2
1711 *or IF (IPRI .EQ. 1) WRITE(LUNOUT,103)XXSQ,AMCH1,AMCH2
1712 *or & ,AAPS,AAV,AMBPS,AMBV
1714 * | | | +----------------------------------------------------------*
1716 IF (AMCH2 .LT. AMBPS) GO TO 25
1717 * | | | | if amch2 < ambps xp and xt are resampled
1718 * | | | +-->-->-->-->-->-->-->-->-->--> xp, xt resampling
1720 IF (AMCH2 .GT. AMBV ) GO TO 32218
1726 *or IF (INUCVT .EQ. 1) GO TO 32238
1730 IF (AMCH2 .GT. AMBB) GO TO 32238
1736 *or IF (INUCVT .EQ. 1) GO TO 32238
1739 C PCH1=UMO*(XXP-XXT)*.5D0
1740 C ECH1=UMO*(XXP+XXT)*.5D0
1748 * | | +-->-->-->-->-->-->-->-->-->--> jump # 9 to 32598
1750 * | | +-------------------------------------------------------------*
1751 * | | | Meson projectile, meson target, isam3 = 2
1754 C=================================================================
1756 C*** KINEMATICAL PARAMETERS OF BOTH CHAINS IN CMS
1758 C*** FORWARD ANTIQUARK-DIQUARK CHAIN
1760 C=================================================================
1763 * | | +-->-->-->-->-->-->-->-->-->--> jump # 10 to 3268
1765 * | | +--<--<--<--<--<--<--<--<--<--< here from jump # 11
1768 C===================================================================
1769 C*** MESON MESON FORWARD AQ(XXP)-Q(XT) AND BACKWARD CHAINS Q(XP)-AQ(
1771 C====================================================================
1772 C=====================================================================
1774 C*** KINEMATICAL PARAMETERS OF BOTH CHAINS IN CMS
1776 C*** FORWARD AQ(XXP)-Q(XT) CHAIN
1778 C====================================================================
1780 IFPS = IMPS(IIFF,IFB)
1781 IFV = IMVE(IIFF,IFB)
1786 * | | | here we are using xxp, xt for the jet # 1
1791 *or IF (IPRI .EQ. 1) WRITE(LUNOUT,103)XSQ,AMCH1,AMCH2
1792 *or & ,AAPS,AAV,AMFPS,AMFV
1794 * | | | +----------------------------------------------------------*
1796 IF (AMCH1 .LT. AMFPS) GO TO 25
1797 * | | | | if amch1 < amfps xp and xt are resampled
1798 * | | | +-->-->-->-->-->-->-->-->-->--> xp, xt resampling
1800 IF (AMCH1 .GT. AMFV) GO TO 32518
1807 IF (AMCH1 .GT. AMFF) GO TO 32538
1813 * | | | +----------------------------------------------------------*
1814 * | | | | Here adjusting kinematics!!!!!
1815 * | | | | Now, chain 1 is a single particle jet, so we have to
1816 * | | | | reset the kinematical parameters xp, xxp, xt and xxt
1820 * | | | | +-------------------------------------------------------*
1821 * | | | | | If also chain 2 is a parjet (nnch2 .ne. 0) then the
1822 * | | | | | param. to be recomputed are xxp and xt, from alpha
1823 * | | | | | and beta, in such a way to conserve the original
1824 * | | | | | momentum direction
1826 IF (NNCH2 .NE. 0) THEN
1828 HELP = XSQ2 * (XSQ2 - 2.D0) + XXSQ2 *
1829 & (XXSQ2 - 2.D0) - 2.D0 * XSQ2 * XXSQ2
1830 DDIFF = SQRT (HELP + 1.D0)
1831 SSUM = SQRT (HELP + 1.D0 + 4.D0 * XSQ2)
1832 ALPHA = (SSUM + DDIFF) * 0.5D0
1833 BETA = (SSUM - DDIFF) * 0.5D0
1834 IF (XXP .GT. XT) THEN
1844 * | | | | +-------------------------------------------------------*
1846 * | | | | +-------------------------------------------------------*
1847 * | | | | | If chain 2 is not a parjet (nnch2 .eq. 0) then the
1848 * | | | | | paramet. xxp,xt have to be recomputed in such a way
1849 * | | | | | to conserve the original momentum direction and
1853 SSUM = SQRT (4.D0 * XSQ2 + DDIFF**2)
1854 XXP = (SSUM + DDIFF) * 0.5D0
1855 XT = (SSUM - DDIFF) * 0.5D0
1858 XXSQ = SQRT (XP * XXT)
1862 * | | | | +-------------------------------------------------------*
1863 * | | | | end kinematics correction
1864 * | | | +----------------------------------------------------------*
1867 PCH1 = UMO*(XXP - XT)*.5D0
1868 ECH1 = UMO*(XXP + XT)*.5D0
1871 PCH2 = UMO*(XP - XXT)*.5D0
1872 ECH2 = UMO*(XP + XXT)*.5D0
1876 * | | | end kin. sel. meson proj. (meson target), isam3 = 2
1877 * | | +-->-->-->-->-->-->-->-->-->--> go to 348
1879 * | | +--<--<--<--<--<--<--<--<--<--< here from jump # 10
1882 C*** BACKWARD Q(XP)-AQ(XXT) CHAIN
1884 IBPS = IMPS(IIBB,IBF)
1885 IBV = IMVE(IIBB,IBF)
1890 C===================================================================
1892 C*** KINEMATICAL PARAMETERS OF BOTH CHAINS IN CMS
1894 C*** BACKWARD QUARK -ANTIQUARK CHAIN
1896 C====================================================================
1897 * | | | here we are using xp, xxt for the jet # 2
1902 *or IF (IPRI .EQ. 1) WRITE(LUNOUT,103)XSQ,AMCH1,AMCH2
1903 *or & ,AAPS,AAV,AMBPS,AMBV
1905 * | | | +----------------------------------------------------------*
1907 IF (AMCH2 .LT. AMBPS) GO TO 25
1908 * | | | | if amch2 < ambps xp and xt are resampled
1909 * | | | +-->-->-->-->-->-->-->-->-->--> xp, xt resampling
1911 IF (AMCH2 .GT. AMBV) GO TO 32618
1917 *or IF (INUCVT .EQ. 1) GO TO 32638
1921 IF (AMCH2 .GT. AMBB) GO TO 32638
1927 *or IF (INUCVT .EQ. 1) GO TO 32638
1930 C PCH1=UMO*(XXP-XT)*.5D0
1931 C ECH1=UMO*(XXP+XT)*.5D0
1939 * | | +-->-->-->-->-->-->-->-->-->--> jump # 11 to 32508
1940 * | +----------------------------------------------------------------*
1943 *or IF (IPRI .EQ. 1) WRITE(LUNOUT,103)XP,XT,XXP,XXT
1944 *or IF (IPRI .EQ. 1) WRITE(LUNOUT,103)AMCH1,AMCH2,PCH1,PCH2,ECH1,
1945 *or &ECH2,GAMCH1,GAMCH2,BGCH1,BGCH2
1947 * | | end kin. sel. meson proj. (meson target)
1948 * | +-->-->-->-->-->-->-->-->-->--> go to 34
1950 * | +----------------------------------------------------------------*
1951 * | | meson projectile, antibaryon target!!!
1954 C=================================================================
1956 C*** KINEMATICAL PARAMETERS OF BOTH CHAINS IN CMS
1959 C===============================================================
1960 C====================================================================
1961 C====================================================================
1964 C====================================================================
1965 C`===================================================================
1966 GO TO (3217,3257),ISAM3
1967 * | | +-------------------------------------------------------------*
1968 * | | | meson projectile, antibaryon target, isam = 2
1971 C*** MESON NUCLEON AQ(XXP)-AQAQ(XXT)+Q(XP)-AQ(XT)
1974 * | | +-->-->-->-->-->-->-->-->-->--> jump # 12 to 3227
1976 * | | +--<--<--<--<--<--<--<--<--<--< here from jump # 13
1979 C=================================================================
1981 C*** KINEMATICAL PARAMETERS OF BOTH CHAINS IN CMS
1983 C*** FIRST LONG AQ(XXP)-AQAQ(XXT) CHAIN
1985 C===================================================================
1986 CALL BKLASS (IBF,IBB1,IBB2,IF8,IFIO)
1990 AMFF = AMF10 + 0.3D0
1991 * | | | here we are using xxp, xxt for the jet # 1
1996 *or IF (IPRI .EQ. 1) WRITE(LUNOUT,103)XSQ,AMCH1,AMCH2
1997 *or & ,AA8,AA10,AMF8,AMF10
1999 * | | | +----------------------------------------------------------*
2001 IF (AMCH1 .LT. AMF8) GO TO 25
2002 * | | | | if amch1 < amf8 xp and xt are resampled
2003 * | | | +-->-->-->-->-->-->-->-->-->--> xp, xt resampling
2005 IF (AMCH1 .GT. AMF10) GO TO 32117
2012 IF (AMCH1 .GT. AMFF) GO TO 32137
2018 * | | | +----------------------------------------------------------*
2019 * | | | | Here adjusting kinematics!!!!!
2020 * | | | | Now, chain 1 is a single particle jet, so we have to
2021 * | | | | reset the kinematical parameters xp, xxp, xt and xxt
2025 * | | | | +-------------------------------------------------------*
2026 * | | | | | If also chain 2 is a parjet (nnch2 .ne. 0) then the
2027 * | | | | | param. to be recomputed are xxp and xxt, from alpha
2028 * | | | | | and beta, in such a way to conserve the original
2029 * | | | | | momentum direction
2031 IF (NNCH2 .NE. 0) THEN
2033 HELP = XSQ2 * (XSQ2 - 2.D0) + XXSQ2 *
2034 & (XXSQ2 - 2.D0) - 2.D0 * XSQ2 * XXSQ2
2035 DDIFF = SQRT (HELP + 1.D0)
2036 SSUM = SQRT (HELP + 1.D0 + 4.D0 * XSQ2)
2037 ALPHA = (SSUM + DDIFF) * 0.5D0
2038 BETA = (SSUM - DDIFF) * 0.5D0
2039 IF (XXP .GT. XXT) THEN
2049 * | | | | +-------------------------------------------------------*
2051 * | | | | +-------------------------------------------------------*
2052 * | | | | | If chain 2 is not a parjet (nnch2 .eq. 0) then the
2053 * | | | | | paramet. xxp,xxt have to be recomputed in such a way
2054 * | | | | | to conserve the original momentum direction and
2058 SSUM = SQRT (4.D0 * XSQ2 + DDIFF**2)
2059 XXP = (SSUM + DDIFF) * 0.5D0
2060 XXT = (SSUM - DDIFF) * 0.5D0
2063 XXSQ = SQRT (XP * XT)
2067 * | | | | +-------------------------------------------------------*
2068 * | | | | end kinematics correction
2069 * | | | +----------------------------------------------------------*
2072 PCH1 = UMO*(XXP - XXT)*.5D0
2073 ECH1 = UMO*(XXP + XXT)*.5D0
2076 PCH2 = UMO*(XP - XT)*.5D0
2077 ECH2 = UMO*(XP + XT)*.5D0
2081 * | | | end kin. sel. meson proj. (abaryon target), isam3 = 2
2082 * | | +-->-->-->-->-->-->-->-->-->--> go to 34
2084 * | | +--<--<--<--<--<--<--<--<--<--< here from jump # 12
2087 C===============================================================
2089 C*** KINEMATICAL PARAMETERS OF BOTH CHAINS IN CMS
2091 C*** SHORT AQ(XP)-Q(XT) CHAIN
2093 C================================================================
2095 IBPS = IMPS(IIFB,IFF)
2096 IBV = IMVE(IIFB,IFF)
2101 * | | | here we are using xp,xt for jet # 2
2106 *or IF (IPRI .EQ. 1) WRITE(LUNOUT,103)XSQ,AMCH1,AMCH2
2107 *or & ,AAPS,AAV,AMBPS,AMBV
2109 * | | | +----------------------------------------------------------*
2111 IF (AMCH2 .LT. AMBPS) GO TO 25
2112 * | | | | if amch2 < ambps xp and xt are resampled
2113 * | | | +-->-->-->-->-->-->-->-->-->--> xp, xt resampling
2115 IF (AMCH2 .GT. AMBV) GO TO 32217
2121 *or IF (INUCVT .EQ. 1) GO TO 32237
2125 IF (AMCH2 .GT. AMBB) GO TO 32237
2131 *or IF (INUCVT .EQ. 1) GO TO 32237
2134 C PCH1=UMO*(XXP-XXT)*.5D0
2135 C ECH1=UMO*(XXP+XXT)*.5D0
2143 * | | +-->-->-->-->-->-->-->-->-->--> jump # 13 to 32597
2145 * | | +-------------------------------------------------------------*
2146 * | | | meson projectile, antibaryon target, isam = 1
2149 C=================================================================
2151 C*** KINEMATICAL PARAMETERS OF BOTH CHAINS IN CMS
2152 C*** MESON ANTINUCLEUS
2153 C*** BACKWARD QUARK- ANTIQUARK CHAIN
2155 C=================================================================
2157 C=====================================================================
2160 C*** BACKWARD Q(XP)-AQ(XT) CHAIN
2162 C====================================================================
2164 IFPS = IMPS(IIBB,IBF)
2165 IFV = IMVE(IIBB,IBF)
2170 * | | | here we are using xp,xt for jet # 1
2175 *or IF (IPRI .EQ. 1) WRITE(LUNOUT,103)XSQ,AMCH1,AMCH2
2176 *or & ,AAPS,AAV,AMFPS,AMFV
2178 * | | | +----------------------------------------------------------*
2180 IF (AMCH1 .LT. AMFPS) GO TO 25
2181 * | | | | if amch1 < amfps xp and xt are resampled
2182 * | | | +-->-->-->-->-->-->-->-->-->--> xp, xt resampling
2184 IF (AMCH1 .GT. AMFV) GO TO 32517
2193 IF (AMCH1 .GT. AMFF) GO TO 32537
2204 C***FORWARD AQ(XXP)-AQAQ(XXT) CHAIN
2205 CALL BKLASS(IFF,IFB1,IFB2,IB8,IBIO)
2209 AMBB = AMB10 + 0.3D0
2210 C===================================================================
2212 C*** KINEMATICAL PARAMETERS OF BOTH CHAINS IN CMS
2214 C*** FORWARD ANTIQUARK -ANTIDIQUARK CHAIN
2216 C====================================================================
2217 * | | | here we are using xxp,xXt for jet # 2
2218 XXSQ = SQRT(XXP*XXT)
2222 *or IF (IPRI .EQ. 1) WRITE(LUNOUT,103)XSQ,AMCH1,AMCH2
2223 *or & ,AA8,AA10,AMB8,AMB10
2225 * | | | +----------------------------------------------------------*
2227 IF (AMCH2 .LT. AMB8 ) GO TO 25
2228 * | | | | if amch2 < amb8 xp and xt are resampled
2229 * | | | +-->-->-->-->-->-->-->-->-->--> xp, xt resampling
2231 IF (AMCH2 .GT. AMB10) GO TO 32617
2236 *or IF (INUCVT .EQ. 1) GO TO 32637
2239 IF (AMCH2 .GT. AMBB) GO TO 32637
2244 *or IF (INUCVT .EQ. 1) GO TO 32637
2246 C PCH1=UMO*(XXP-XT)*.5D0
2247 C ECH1=UMO*(XXP+XT)*.5D0
2250 * Here there was a "large" mistake in the old Hadevt!!!
2252 * | | | +----------------------------------------------------------*
2253 * | | | | Here adjusting kinematics!!!!!
2254 * | | | | Now, chain 2 is a single particle jet, so we have to
2255 * | | | | reset the kinematical parameters xp, xxp, xt and xxt
2259 * | | | | +-------------------------------------------------------*
2260 * | | | | | If also chain 1 is a parjet (nnch1 .ne. 0) then the
2261 * | | | | | param. to be recomputed are xxp and xxt, from alpha
2262 * | | | | | and beta, in such a way to conserve the original
2263 * | | | | | momentum direction
2265 IF (NNCH1 .NE. 0) THEN
2267 HELP = XSQ2 * (XSQ2 - 2.D0) + XXSQ2 *
2268 & (XXSQ2 - 2.D0) - 2.D0 * XSQ2 * XXSQ2
2269 DDIFF = SQRT (HELP + 1.D0)
2270 SSUM = SQRT (HELP + 1.D0 + 4.D0 * XXSQ2)
2271 ALPHA = (SSUM + DDIFF) * 0.5D0
2272 BETA = (SSUM - DDIFF) * 0.5D0
2273 IF (XXP .GT. XXT) THEN
2283 * | | | | +-------------------------------------------------------*
2285 * | | | | +-------------------------------------------------------*
2286 * | | | | | If chain 1 is not a parjet (nnch1 .eq. 0) then the
2287 * | | | | | paramet. xxp,xxt have to be recomputed in such a way
2288 * | | | | | to conserve the original momentum direction and
2292 SSUM = SQRT (4.D0 * XXSQ2 + DDIFF**2)
2293 XXP = (SSUM + DDIFF) * 0.5D0
2294 XXT = (SSUM - DDIFF) * 0.5D0
2297 XSQ = SQRT (XP * XT)
2301 * | | | | +-------------------------------------------------------*
2302 * | | | | end kinematics correction
2303 * | | | +----------------------------------------------------------*
2306 PCH1 = UMO*(XP - XT)*.5D0
2307 ECH1 = UMO*(XP + XT)*.5D0
2310 PCH2 = UMO*(XXP - XXT)*.5D0
2311 ECH2 = UMO*(XXP + XXT)*.5D0
2315 * | | | end kin. sel. meson proj. (abaryon target), isam3 = 1
2316 * | | +-->-->-->-->-->-->-->-->-->--> go to 34
2317 * | +----------------------------------------------------------------*
2319 * | end of kinematical selections!!!!!!!!!
2320 * +-------------------------------------------------------------------*
2321 *or IF (IPRI .EQ. 1) WRITE(LUNOUT,103)XP,XT,XXP,XXT
2322 *or IF (IPRI .EQ. 1) WRITE(LUNOUT,103)AMCH1,AMCH2,PCH1,PCH2,
2323 *or &ECH1,ECH2,GAMCH1,GAMCH2,BGCH1,BGCH2
2325 C********************************************************************
2327 C*** MC SAMPLING OF FORWARD CHAIN
2329 C********************************************************************
2331 IF (IBPROJ) 41,42,43
2332 C==================================================================
2333 C FORWARD CHAIN OF ANTIBARYON BARYON
2334 C==================================================================
2336 IF (NNCH1) 4111,4112,4113
2344 IF (IOPBAM .EQ. 5) THEN
2345 IAIFF1 = IABS(IFF1) + 6
2346 IAIFF2 = IABS(IFF2) + 6
2347 *or IF (IPRI .EQ. 1)WRITE(LUNOUT,991)IFB1,IFB2,IAIFF1
2348 *or 991 FORMAT (' BAMJEV 4112',5I5)
2349 CALL BAMJEV(IHAD,IFB1,IFB2,IAIFF1,IAIFF2,AMCH1,5)
2351 IAIFF = IABS(IAIFF) + 6
2352 CALL BAMJEV(IHAD,IFB,IAIFF,IFB,IFB,AMCH1,IOPBAM)
2356 *or IF (IPRI .EQ. 1) WRITE(LUNOUT,992)ICH1
2357 *or 992 FORMAT (' PARJET 4114 ',5I5)
2358 CALL PARJET(IHAD,ICH1)
2363 C CALL DECAY(IHAD,2)
2366 C=====================================================================
2367 C*** FORWARD CHAIN OF MESON NUCLEON
2368 C======================================================================
2369 IF (IBTARG) 427,428,429
2371 GO TO (421,422),ISAM3
2373 IF (NNCH1) 4211,4212,4213
2381 CALL BAMJEV(IHAD,IFF,IFB1,IFB2,IFF,AMCH1,4)
2384 CALL PARJET(IHAD,ICH1)
2386 C CALL DECAY(IHAD,2)
2389 C*** IFA - IFB AQ - Q EXISTIERT NICHT
2390 IF (NNCH1) 4221,4222,4223
2398 IAIFF = IABS(IFF) + 6
2399 CALL BAMJEV(IHAD,IFB,IAIFF,IFB,IFB,AMCH1,3)
2402 CALL PARJET(IHAD,ICH1)
2404 C CALL DECAY(IHAD,2)
2406 C===================================================================
2408 C FORWARD CHAIN OF MESON MESON
2410 C====================================================================
2411 C=====================================================================
2413 GO TO (4218,4228),ISAM3
2415 IF (NNCH1) 42118,42128,42138
2423 IAIFB = IABS(IFB) + 6
2424 CALL BAMJEV(IHAD,IFF,IAIFB,IFB2,IFF,AMCH1,3)
2427 CALL PARJET(IHAD,ICH1)
2429 C CALL DECAY(IHAD,2)
2432 C*** IFA - IFB AQ - Q EXISTIERT NICHT
2433 IF (NNCH1) 42218,42228,42238
2441 IAIFF = IABS(IFF) + 6
2442 CALL BAMJEV(IHAD,IFB,IAIFF,IFB,IFB,AMCH1,3)
2445 CALL PARJET(IHAD,ICH1)
2447 C CALL DECAY(IHAD,2)
2449 C================================================================
2451 C FORWARD CHAIN OF MESON ANTIBARYON
2453 C==================================================================
2455 C=================================================================
2457 C=================================================================
2458 GO TO (4217,4227),ISAM3
2460 IF (NNCH1) 42117,42127,42137
2468 IAIBF = IABS(IBF) + 6
2469 IAIBB1= IABS(IBB1) + 6
2470 IAIBB2= IABS(IBB2) + 6
2471 *or IF (IPRI.EQ.1) WRITE(LUNOUT,994)IAIBF,IAIBB1,IAIBB2
2472 *or 994 FORMAT(' BAMJEV 43147',5I5)
2473 CALL BAMJEV(IHAD,IAIBF,IAIBB1,IAIBB2,IBB,AMCH1,4)
2476 *or IF (IPRI.EQ.1) WRITE(LUNOUT,993)ICH1
2477 *or 993 FORMAT (' PARJET 42147',5I5)
2478 CALL PARJET(IHAD,ICH1)
2480 C CALL DECAY(IHAD,2)
2483 C*** IFA - IFB AQ - Q EXISTIERT NICHT
2484 IF (NNCH2) 42217,42227,42237
2492 IAIFF = IABS(IFF) + 6
2493 IAIFB1= IABS(IFB1) + 6
2494 IAIFB2= IABS(IFB2) + 6
2495 *or IF (IPRI.EQ.1) WRITE(LUNOUT,995)IAIFF,IAIFB1,IAIFB2
2496 *or 995 FORMAT (' BAMJEV 42227',5I5)
2497 CALL BAMJEV(IHAD,IAIFF,IAIFB1,IAIFB2,IFB,AMCH2,4)
2500 *or IF (IPRI.EQ.1) WRITE(LUNOUT,996)ICH1
2501 *or 996 FORMAT ('PARJET 42247',5I5)
2502 CALL PARJET(IHAD,ICH1)
2504 C CALL DECAY(IHAD,2)
2507 C==================================================================
2508 C*** FORWARD CHAIN OF NUCLEON NUCLEON
2509 C===================================================================
2510 IF (NNCH1) 431,432,433
2518 CALL BAMJEV(IHAD,IFB,IFF1,IFF2,IFB,AMCH1,4)
2521 CALL PARJET(IHAD,ICH1)
2523 C CALL DECAY(IHAD,2)
2525 C*** TURN CHAINS AROUND IF NECESSARY
2526 IF (IBPROJ) 51,52,53
2531 GO TO (521,522),ISAM3
2538 C*** NUCLEON-NUCLEON
2542 C*** TURN JET AROUND
2548 C*** AND INT. CHAIN TRANSVERSE MOMENTA
2550 * This is consistent with b3bamj = 10 for an initial value of 6
2551 B3BAMJ = 1.666666666666667D+00 * B3BAMJ
2552 * B3BAMJ = 5.D+00 / ( LOG10 ( 1.D+00 + ( UMO / E00 )**1.5D+00 )
2555 ES = -2.D0/(B3BAMJ**2)*LOG(RNDM(1)*RNDM(2))
2557 * HPS = SQRT(ES*ES+2.D0*ES*AMCH1)
2558 HPS = SQRT(ES*ES+2.D0*ES*AM(1))
2559 CALL SFECFE(SFE,CFE)
2565 * +-------------------------------------------------------------------*
2566 * | Loop to establish the transverse momentum
2569 PTXCH1 = 0.75D0 * PTXCH1
2570 PTYCH1 = 0.75D0 * PTYCH1
2573 * | The following two cards provide momentum conservation for
2574 * | x and y components
2577 BGCH1X = PTXCH1/AMCH1
2578 BGCH1Y = PTYCH1/AMCH1
2579 ACH1 = BGCH1**2-(PTXCH1**2+PTYCH1**2)/AMCH1**2
2580 IF (ACH1.LE.0.D0) GO TO 6170
2582 * +--<--<--<--<--< if Pt is too large loop again on the forward jet
2583 BGCH2X = PTXCH2/AMCH2
2584 BGCH2Y = PTYCH2/AMCH2
2585 ACH2 = BGCH2**2-(PTXCH2**2+PTYCH2**2)/AMCH2**2
2586 IF (ACH2.LE.0.D0) GO TO 6170
2588 * +--<--<--<--<--<--<--<--<--<--< if Pt is too large loop again
2590 BGCH1Z = SIGN(BGCH1Z,BGCH1)
2592 BGCH2Z = SIGN(BGCH2Z,BGCH2)
2594 CALL LORTRA(IHAD,1,GAMCH1,BGCH1X,BGCH1Y,BGCH1Z)
2595 C==============================================================
2597 C*** TRANSFORM FORWARD JET INTO CMS
2599 C================================================================
2602 C===============================================================
2604 C*** SAMPLING OF BACKWARD CHAIN
2606 C===============================================================
2607 IF (IBPROJ) 61,62,63
2609 C================================================================
2610 C BACKWARD CHAIN OF ANTINUCLEON NUCLEON
2611 C=================================================================
2612 IF (NNCH2) 6111,6112,6113
2620 IAIBF = IABS(IBF) + 6
2621 CALL BAMJEV(IHAD,IBB,IAIBF,IBB,IBB,AMCH2,3)
2624 CALL PARJET(IHAD,ICH2)
2628 C CALL DECAY(IHAD,2)
2631 C================================================================
2632 C*** BACKWARD CHAIN OF MESON - BARYON
2633 C==================================================================
2634 IF (IBTARG) 627,628,629
2636 GO TO (621,622),ISAM3
2638 IF (NNCH2) 6211,6212,6213
2646 IAIBF = IABS(IBF) + 6
2647 CALL BAMJEV(IHAD,IBB,IAIBF,IBB,IBB,AMCH2,3)
2650 CALL PARJET(IHAD,ICH2)
2652 C CALL DECAY(IHAD,2)
2655 IF (NNCH2) 6221,6222,6223
2663 CALL BAMJEV(IHAD,IBF,IBB1,IBB2,IBF,AMCH2,4)
2666 CALL PARJET(IHAD,ICH2)
2668 C CALL DECAY(IHAD,2)
2670 C==================================================================
2672 C BACKWARD CHAIN OF MESON MESON
2674 C===================================================================
2676 C===================================================================
2678 GO TO(6218,6228),ISAM3
2680 IF (NNCH2) 62118,62128,62138
2688 IAIBF = IABS(IBF) + 6
2689 CALL BAMJEV(IHAD,IBB,IAIBF,IBB,IBB,AMCH2,3)
2692 CALL PARJET(IHAD,ICH2)
2694 C CALL DECAY(IHAD,2)
2697 IF (NNCH2) 62218,62228,62238
2705 IAIBB = IABS(IBB) + 6
2706 CALL BAMJEV(IHAD,IBF,IAIBB,IBB2,IBF,AMCH2,3)
2709 CALL PARJET(IHAD,ICH2)
2711 C CALL DECAY(IHAD,2)
2713 C================================================================
2715 C BACKWARD CHAIN OF MESON ANTIBARYON
2716 C=================================================================
2718 C=================================================================
2720 GO TO(6217,6227),ISAM3
2722 IF (NNCH2) 62117,62127,62137
2730 IAIFB = IABS(IFB) + 6
2731 *or IF (IPRI.EQ.1) WRITE(LUNOUT,997)IFF,IAIFB
2732 *or 997 FORMAT (' BAMJEV 62127',5I5)
2733 CALL BAMJEV(IHAD,IFF,IAIFB,IBB,IBB,AMCH2,3)
2736 *or IF (IPRI.EQ.1) WRITE(LUNOUT,998)ICH2
2737 *or 998 FORMAT ('PARJET 62147',5I5)
2738 CALL PARJET(IHAD,ICH2)
2740 C CALL DECAY(IHAD,2)
2743 IF (NNCH1) 62217,62227,62237
2751 IAIBB = IABS(IBB) + 6
2752 *or IF (IPR1.EQ.1) WRITE(LUNOUT,9911)IBF,IAIBB
2753 *or9911 FORMAT (' BAMJEV 62227',5I5)
2754 CALL BAMJEV(IHAD,IBF,IAIBB,IAIFB2,IBF,AMCH1,3)
2757 *or IF (IPRI .EQ. 1) WRITE(LUNOUT,9912)ICH2
2758 *or9912 FORMAT ('PARJET 62247',5I5)
2759 CALL PARJET(IHAD,ICH2)
2761 C CALL DECAY(IHAD,2)
2764 C==================================================================
2765 C*** BACKWARD CHAIN OF BARYON BARYON
2766 C==================================================================
2767 IF (NNCH2) 631,632,633
2775 CALL BAMJEV(IHAD,IBF,IBB1,IBB2,IBF,AMCH2,4)
2778 CALL PARJET(IHAD,ICH2)
2780 C CALL DECAY(IHAD,2)
2782 * We arrive here after jet creation: created particles are in
2783 * /finpar/ common (there are ihad particles)
2786 C*** TURN CHAIN AROUND IF NECESSARY
2787 IF (IBPROJ) 71,72,73
2791 GO TO (721,722),ISAM3
2801 C*** TURN JET AROUND
2806 C================================================================
2808 C*** TRANSFORM BACKWARD JET INTO CMS
2810 C=================================================================
2814 CALL LORTRA(IHAD,NAUX,GAMCH2,BGCH2X,BGCH2Y,BGCH2Z)
2815 NAUX = IHAD + NAUX - 1
2832 *or IF (IPRI.EQ.1) WRITE(LUNOUT,85)(I,NREA(I),ICHA(I),IBARA(I),
2833 *or &ANA(I)PXA(I),PYA(I),PZA(I),HEPA(I),AMA(I),I=1,NAUX)
2844 C*** TRANSFORM INTO LABSYSTEM
2845 * +-------------------------------------------------------------------*
2846 * | particles from /auxpar/ common are transformed back in the lab
2847 * | system (which is actually the system of the target nucleon with
2848 * | the projectile along the z-axis)
2849 * | and put in /hadpar/ common
2851 * | The transformation is:
2852 * | Elab = Ecms * gamma + ETAzlab * Pzcms
2853 * | Pzlab = Pzcms * gamma + ETAzlab * Ecms
2854 * | note ETAzlab = -ETAzcms!!!!
2857 HEPH(I) = GAMCM*HEPA(I) + BGCM*PZA(I)
2858 PZH(I) = GAMCM*PZA(I) + BGCM*HEPA(I)
2870 ICCU = ICCU + ICHH(I)
2871 IBBU = IBBU + IBARH(I)
2872 IJNREH = KPTOIP ( NREH (I) )
2873 IF (IJNREH .LE. 0 .OR. IJNREH .GT. 39) THEN
2874 WRITE (LUNOUT,*)' Hadevt: Ijnreh = 0, > 39 after decay!!',
2875 & IJNREH,NREH(I),I,HEPH(I)
2876 WRITE (LUNERR,*)' Hadevt: Ijnreh = 0, > 39 after decay!!',
2877 & IJNREH,NREH(I),I,HEPH(I)
2881 ISSU = ISSU + IQSCHR (MQUARK(J,IJNREH))
2886 * +-------------------------------------------------------------------*
2889 ICHTOT = ICH(KPROJ) + ICH(KTARG)
2890 IBTOT = IBPROJ + IBTARG
2893 ISTOT = ISTOT + IQSCHR(MQUARK(J,IJPROJ))
2894 & + IQSCHR(MQUARK(J,IJTARG))
2896 * +-------------------------------------------------------------------*
2898 IF (ICCU .NE. ICHTOT) THEN
2899 * | write an error message and then resample!!!
2900 WRITE(LUNOUT,*)' Hadevt: charge conservation failure: ',
2901 & ' ICCU,ICHTOT,IBBU,IBTOT,ISSU,ISTOT',
2902 & ICCU,ICHTOT,IBBU,IBTOT,ISSU,ISTOT
2903 WRITE(LUNERR,*)' Hadevt: charge conservation failure: ',
2904 & ' ICCU,ICHTOT,IBBU,IBTOT,ISSU,ISTOT',
2905 & ICCU,ICHTOT,IBBU,IBTOT,ISSU,ISTOT
2907 ELSE IF (IBBU .NE. IBTOT) THEN
2908 * | write an error message and then resample!!!
2909 WRITE(LUNOUT,*)' Hadevt: baryon conservation failure: ',
2910 & ' ICCU,ICHTOT,IBBU,IBTOT,ISSU,ISTOT',
2911 & ICCU,ICHTOT,IBBU,IBTOT,ISSU,ISTOT
2912 WRITE(LUNERR,*)' Hadevt: baryon conservation failure: ',
2913 & ' ICCU,ICHTOT,IBBU,IBTOT,ISSU,ISTOT',
2914 & ICCU,ICHTOT,IBBU,IBTOT,ISSU,ISTOT
2916 ELSE IF (ISSU .NE. ISTOT .AND. LISSU) THEN
2917 * | write an error message and then resample!!!
2918 WRITE(LUNOUT,*)' Hadevt: strangeness conservation failure: ',
2919 & ' ICCU,ICHTOT,IBBU,IBTOT,ISSU,ISTOT',
2920 & ICCU,ICHTOT,IBBU,IBTOT,ISSU,ISTOT
2921 WRITE(LUNERR,*)' Hadevt: strangeness conservation failure: ',
2922 & ' ICCU,ICHTOT,IBBU,IBTOT,ISSU,ISTOT',
2923 & ICCU,ICHTOT,IBBU,IBTOT,ISSU,ISTOT
2928 * +-------------------------------------------------------------------*
2929 EPSEPS = MAX ( 10.D+00*ANGLGB, 1.D-12 )
2930 * +-------------------------------------------------------------------*
2932 IF (ABS(EVZ-AMTAR-EPROJ)/(AMTAR+EPROJ) .GT. EPSEPS) THEN
2933 ELSE IF (ABS(PVX)/PPROJ .GT. EPSEPS) THEN
2934 ELSE IF (ABS(PVY)/PPROJ .GT. EPSEPS) THEN
2935 ELSE IF (ABS(PVZ-PPROJ)/PPROJ .GT. EPSEPS) THEN
2940 * +-------------------------------------------------------------------*
2943 C********************************************************************
2945 C*** PRINT AND TEST ENERGY CONSERVATION
2947 C********************************************************************
2956 *or PVX = PVX + PXH(I)
2957 *or PVY = PVY + PYH(I)
2958 *or PVZ = PVZ + PZH(I)
2959 *or EVZ = EVZ + HEPH(I)
2960 *or ICCU = ICCU + ICHH(I)
2961 *or IBBU = IBBU + IBARH(I)
2963 *or IF (IBTOT .NE. IBBU) GO TO 9999
2964 *or IF (ICHTOT .NE. ICCU) GO TO 9999
2965 *or IF (ABS(PVX).GE.0.01D0) GO TO 9999
2966 *or IF (ABS(PVY).GE.0.01D0) GO TO 9999
2967 *or IF ((PVZ.GT.1.02D0*PPROJ).OR.(PVZ.LT.0.98D0*PPROJ)) GO TO 9999
2968 *or IF (IPRI.NE.1) GO TO 90
2971 * If a failure occured the event is resampled!!!
2974 *or IF (IPRI.EQ.0) GO TO 8899
2975 *or WRITE(LUNOUT,83)NHAD,KPROJ,KTARG,PPROJ,EPROJ,PVX,PVY,PVZ,EVZ,
2977 *or 83 FORMAT (3I5,6F12.6,3I5)
2979 *or WRITE(LUNOUT,85)I,NREH(I),ICHH(I),IBARH(I),ANH(I),PXH(I),
2980 *or & PYH(I),PZH(I),HEPH(I),AMH(I)
2981 *or 85 FORMAT (4I5,A8,5F12.6)
2984 * If a failure occured the event is resampled!!!
2986 *or IF (IPRI.EQ.0)GO TO 8899