1 *----------------------------------------------------------------------
5 * Author : Igor Lokhtin
6 * Version : PYQUEN1_1.f
7 * Last revision : 26-APR-2006
9 *======================================================================
11 * Description : Event generator for simulation of parton rescattering
12 * and energy loss in quark-gluon plasma created in heavy
13 * ion AA collisons at LHC
14 * (implemented as modification of standard pythia jet event)
16 * Method : I.P.Lokhtin, A.M.Snigirev, Eur.Phys.J. C16 (2000) 527-536;
17 * I.P.Lokhtin, A.M.Snigirev, e-print hep-ph/0406038.
20 *======================================================================
22 SUBROUTINE PYQUEN(A,ifb,bfix)
23 IMPLICIT DOUBLE PRECISION(A-H, O-Z)
25 INTEGER PYK,PYCHGE,PYCOMP
27 external pyp,pyr,pyk,pyjoin,pyshow
29 common /pyjets/ n,npad,k(4000,5),p(4000,5),v(4000,5)
30 common /pydat1/ mstu(200),paru(200),mstj(200),parj(200)
31 common /pysubs/ msel,mselpd,msub(500),kfin(2,-40:40),ckin(200)
32 common /plpar1/ tau0,T0,TC,sigqq,AW,RA,mvisc,nf
33 common /plglur/ glur(1000,4),kglu(1000,6),nrg,nrgm
34 common /plquar/ pqua(1000,5),kqua(1000,5),nrq
35 common /parimp/ b1,psib1,rb1,rb2
38 save /pyjets/, /pydat1/, /pysubs/, /plglur/, /plquar/
39 dimension ijoik(2),ijoin(1000),nis(500),nss(500),nas(500),nus(500)
41 * set initial event paramters
43 RA=1.15d0*AW**0.333333d0 ! nucleus radius in fm
45 nf=0 ! number of active flavours in QGP
46 TC=0.2d0 ! crutical temperature
47 tau0=0.1d0 ! proper time of QGP formation
48 mvisc=0 ! flag of QGP viscosity (off here)
52 * avoid stopping run if pythia does not conserve energy due to collisional loss
55 * generate impact parameter of A-A collision with jet production
58 write(6,*) 'Impact parameter less than zero!'
62 write(6,*) 'Impact parameter larger than two nuclear radius!'
67 call bipsear(fmax1,xmin1)
78 * calculate initial QGP temperature as function of centrality
80 sb=RA*RA*(pi-2.d0*dasin(0.5d0*b1/RA))-b1*dsqrt(abs(RA*RA-
82 rtaa0=9.d0*AW*AW/(8.d0*sb0)
83 br=max(1.d-10,b1*b1/(4.d0*RA*RA))
84 call simpa(0.d0,20.d0,0.001d0,0.001d0,1.d-08,ftaa,xx,rest,
86 rtaa=rtaa0*(1.d0-br*(1.d0+(1.d0-0.25d0*br)*dlog(1.d0/br)+
88 T00=((rtaa*sb0)/(rtaa0*sb))**0.25d0
89 T0=T00*(AW/207.d0)**0.166667d0
91 * generate single event with partonic energy loss
94 if(b1.le.1.85d0*RA) then
99 * reset all in-vacuum radiated guark 4-momenta and codes to zero
108 * generate final state shower in vacuum if it was excluded before
109 nrgm=nrg ! fix number of in-medium emitted gluons
116 if(mstj(41).ne.0) goto 5
121 ip1=i ! first hard parton (line ip1)
122 kfh1=k(i,1) ! status code of first hard parton
123 qmax1=pyp(i,10) ! transverse momentum of first hard parton
126 ip2=i ! second hard parton (line ip2)
127 kfh2=k(i,1) ! status code of second hard parton
128 qmax2=pyp(i,10) ! transverse momentum of second hard parton
133 call pyshow(ip1,0,qmax1) ! vacuum showering for first hard parton
136 call pyshow(ip2,0,qmax2) ! vacuum showering for second hard parton
141 * find two leading partons after showering
143 if(k(i,3).eq.ip1) ip001=i ! first daughter of first hard parton
144 if(k(i,3).eq.ip2) ip002=i ! first daughter of second hard parton
149 if (k(i,1).eq.14) goto 3
150 if(i.ge.ip002.and.ip002.gt.0) then
152 if(ptl02.gt.ptle2.and.k(i,2).eq.k(ip2,2)) then
153 ip02=i ! leading parton in second shower (line ip02)
154 ptle2=ptl02 ! pt of the leading parton
156 elseif(ip001.gt.0) then
158 if(ptl01.gt.ptle1.and.k(i,2).eq.k(ip1,2)) then
159 ip01=i ! leading parton in first shower (line ip01)
160 ptle1=ptl01 ! pt of the leading parton
166 * replace two hard partons by two leading partons in original event record
173 * fix first/last daughter for moving entry
175 if(k(jgl,4).eq.ip01) k(jgl,4)=ip1
176 if(k(jgl,5).eq.ip01) k(jgl,5)=ip1
186 * fix first/last daughter for moving entry
188 if(k(jgl,4).eq.ip02) k(jgl,4)=ip2
189 if(k(jgl,5).eq.ip02) k(jgl,5)=ip2
194 * add final showering gluons to the list of in-medium emitted gluons,
195 * fill the list of emitted quarks by final showering quark pairs,
196 * and remove showering gluons and quarks from the event record
198 if(k(i,1).eq.14.or.i.eq.ip01.or.i.eq.ip02) goto 12
199 if(k(i,2).ne.21) then ! filling 'plquar' arrays for quarks
208 if(i.ge.ip002.and.ip002.gt.0) then
216 if(ish.ge.ishm.or.nur.le.2) goto 6 ! adding gluons in 'plglur' arrays
218 kglu(nur,j)=kglu(nur-1,j)
221 glur(nur,j)=glur(nur-1,j)
225 6 kglu(nur,1)=2 ! status code
226 kglu(nur,2)=k(i,2) ! particle identificator
227 kglu(nur,3)=k(ish,3) ! parent line number
228 kglu(nur,4)=0 ! special colour info
229 kglu(nur,5)=0 ! special colour info
230 kglu(nur,6)=ish ! associated parton number
231 glur(nur,1)=p(i,4) ! energy
232 glur(nur,2)=pyp(i,10) ! pt
233 glur(nur,3)=pyp(i,15) ! phi
234 glur(nur,4)=pyp(i,19) ! eta
236 do j=1,5 ! remove partons from event list
246 * stop generate event if there are no additional gluons
249 * define number of stirngs (ns) and number of entries in strings before
250 * in-medium radiation (nis(ns))
265 nis(ns+1)=nis(ns+1)+1
266 elseif(ks.eq.1.and.nis(ns+1).gt.0) then
267 nis(ns+1)=nis(ns+1)+1
268 nes=nes+nis(ns+1) ! nes - total number of entries
271 elseif(ks.ne.2.and.ksp.ne.2.and.ns.gt.0) then
272 i1=i1+1 ! last i1 lines not included in strings
275 i0=n-nes-i1 ! first i0 lines not included in strings
280 * move fragmented particles in bottom of event list
284 if(ks.ne.2.and.ksp.ne.2) then
291 * fix first/last daughter for moving entry
293 if(k(jgl,4).eq.i) k(jgl,4)=n
294 if(k(jgl,5).eq.i) k(jgl,5)=n
303 * fix first/last daughter for moving entry
305 if(k(jgl,4).eq.in) k(jgl,4)=in-1
306 if(k(jgl,5).eq.in) k(jgl,5)=in-1
312 if(ku.gt.i) kglu(ip,6)=ku-1
320 * define number of additional entries in strings, nas(ns)
323 if(kas.le.nss(1)) then
327 if(kas.le.nss(j).and.kas.gt.nss(j-1))
338 * add emitted gluons in event list
348 * fix first/last daughter for moving entries
350 if(k(jgl,4).eq.i) k(jgl,4)=is
351 if(k(jgl,5).eq.i) k(jgl,5)=is
356 do i=nss(ia+1)-1,nss(ia),-1
363 * fix first/last daughter for moving entries
365 if(k(jgl,4).eq.i) k(jgl,4)=is
366 if(k(jgl,5).eq.i) k(jgl,5)=is
377 if(i.le.nus(in).and.i.gt.nus(in-1))
389 p(ia,1)=ptg*dcos(phig)
390 p(ia,2)=ptg*dsin(phig)
391 p(ia,3)=dsqrt(abs(eg*eg-ptg*ptg))
392 if(etag.lt.0.d0) p(ia,3)=-1.d0*p(ia,3)
393 p(ia,4)=dsqrt(ptg*ptg+p(ia,3)**2)
397 * rearrange partons to form strings in event list
409 ijoin(j)=nss(i-1)+nus(i-1)+j
412 call pyjoin(njoin,ijoin)
415 * add in-vacuum emitted quark pairs
425 4 ktest=k(n-1,2)+kqua(in,2)
426 if(ktest.eq.0.or.in.eq.nrq) goto 8
436 kqua(in,j)=kqua(i+1,j)
437 pqua(in,j)=pqua(i+1,j)
457 ********************************* PLINIT ***************************
458 SUBROUTINE PLINIT(ET)
459 * set nucleus thikness and plasma parameters
460 IMPLICIT DOUBLE PRECISION(A-H, O-Z)
461 IMPLICIT INTEGER(I-N)
462 INTEGER PYK,PYCHGE,PYCOMP
464 common /plpar1/ tau0,T0,TC,sigqq,AW,RA,mvisc,nf
465 common /plpar2/ pln0,taupl,tauh,sigpl,sigh,sigplh,sigqqh,rg,rgn
466 common /plevol/ taup(5000),temp(5000),denp(5000),enep(5000)
472 * set number degrees of freedom in QGP
474 rg=(16.d0+10.5d0*nf)/hgd
475 rgn=(16.d0+9.d0*nf)/hgd
477 * set 'fiction' sigma for parton rescattering in QGP
479 sigpl=2.25d0*2.25d0*sigqq*(16.d0+4.d0*nf)/(16.d0+9.d0*nf)
481 * set intial plasma temperature, density and energy density in perfect
482 * (if mvisc=0) or viscous (mvisc=1,2) QGP with PLVISC subroitine
484 if(mvisc.eq.2.and.T0.gt.0.6d0) hst=0.25d0
487 pln0=(16.d0+9.d0*nf)*1.2d0*(T01**3)/pi2
488 ened0=pi2*(16.d0+10.5d0*nf)*(T01**4)/30.d0
490 tau=tau0 ! proper time
492 den=pln0 ! number density
493 ened=ened0 ! energy density
495 * create array of parameters to configurate QGP time evolution
497 taup(i)=tau ! proper time
498 temp(i)=T/5.06d0 ! temperature
499 denp(i)=den ! number density
500 enep(i)=ened/5.06d0 ! energy density
501 ened1=0.5d0*hh*(1.3333d0*plvisc(T)/(tau*tau)-1.3333d0
503 T1=(30.d0*ened1/((16.d0+10.5d0*nf)*pi2))**0.25d0
505 ened=hh*(1.3333d0*plvisc(T1)/(tau1*tau1)-1.3333d0
508 T=(30.d0*ened/((16.d0+10.5d0*nf)*pi2))**0.25d0
509 den=(16.d0+9.d0*nf)*1.2d0*(T**3)/pi2
511 if(TPR.gt.TC1.and.T.le.TC1) taupl=tau-0.5d0*hh ! QGP lifetime taupl
513 tauh=taupl*rg ! mixed phase lifetime
517 ******************************** END PLINIT **************************
519 ******************************* PLEVNT ******************************
520 SUBROUTINE PLEVNT(ET)
521 * generate hard parton production vertex and passing with rescattering,
522 * collisional and radiative energy loss of each parton through plasma
523 IMPLICIT DOUBLE PRECISION(A-H, O-Z)
524 IMPLICIT INTEGER(I-N)
525 INTEGER PYK,PYCHGE,PYCOMP
526 external plthik, pln, plt, pls, gauss, gluang
528 common /plpar1/ tau0,T0,TC,sigqq,AW,RA,mvisc,nf
529 common /plpar2/ pln0,taupl,tauh,sigpl,sigh,sigplh,sigqqh,rg,rgn
530 common /thikpa/ fmax,xmin
531 common /pyjets/ n,npad,k(4000,5),p(4000,5),v(4000,5)
532 common /plglur/ glur(1000,4),kglu(1000,6),nrg,nrgm
533 common /factor/ cfac, kf
534 common /pleave/ taul, temlev
535 common /parimp/ b1, psib1, rb1, rb2
536 common /plen/ epartc, um
537 common /plos/ elr,rsk
538 common /numje1/ nuj1, nuj2
539 save /pyjets/, /plglur/
543 * find minimum of nuclear thikness function with subroutine plsear
544 psib1=pi*(2.d0*pyr(0)-1.d0)
545 call plsear (fmax1,xmin1)
549 * generate vertex of jet production
555 if(ff1.gt.f.and.iv.le.100000) goto 1
557 rb1=dsqrt(abs(r0*r0+b1*b1/4.d0+r0*b1*dcos(psib1)))
558 rb2=dsqrt(abs(r0*r0+b1*b1/4.d0-r0*b1*dcos(psib1)))
562 * find maximum of angular spectrum of radiated gluons with subroutine gluang
564 temax=0.5d0*(1.d0+dsqrt(5.d0))*0.0863d0
567 * reset all radiated gluon 4-momenta and codes to zero -------------------
578 * generate changing 4-momentum of partons due to rescattering and energy loss
579 * (for partons with |eta|<3.5 and pt>3 GeV/c)
580 nuj1=9 ! minimum line number of rescattered parton
581 nuj2=n ! maximum line number of rescattered parton
582 do 2 ip=nuj1,nuj2 ! cycle on travelling partons
585 ks=k(ip,1) ! parton status code
586 kf=k(ip,2) ! parton identificator
588 ko=k(ip,3) ! origin (parent line number)
589 epart=abs(pyp(ip,10)) ! parton transverse momentum
590 etar=pyp(ip,19) ! parton pseudorapidity
591 if(ko.gt.6.and.epart.ge.3.d0.and.abs(etar).
593 if(ka.eq.21.or.ka.eq.1.or.ka.eq.2.or.ka.eq.3.
594 > or.ka.eq.4.or.ka.eq.5.or.ka.eq.6.or.ka.eq.7.
596 if(ks.eq.2.or.ks.eq.1.or.ks.eq.21) then
597 phir=pyp(ip,15) ! parton azimuthal angle
598 tetr=pyp(ip,13) ! parton polar angle
599 yrr=pyp(ip,17) ! parton rapidity
600 stetr=max(dsin(tetr),1.d-04) ! parton sin(theta)
606 cfac=1.d0 ! for gluon
608 cfac=0.44444444d0 ! for quark
611 * boost from laboratory system to system of hard parton
613 bet0=(r0*dcos(psib1)+0.5d0*b1)/rb1
614 if(bet0.le.-1.d0) bet0=-0.99999d0
615 if(bet0.ge.1.d0) bet0=0.99999d0
617 if(psib1.lt.0.d0) bet=-1.d0*bet
619 if(phip.gt.pi) phip=phip-2.d0*pi
620 if(phip.lt.-1.d0*pi) phip=phip+2.d0*pi
621 call pyrobo(0,0,0.d0,phir1,0.d0,0.d0,0.d0)
622 call pyrobo(0,0,tetr1,0.d0,0.d0,0.d0,0.d0)
624 * calculate proper time of parton leaving QGP
625 aphin=(r0*r0-b1*b1/4.d0)/(rb1*rb2)
626 if(aphin.le.-1.d0) aphin=-0.99999d0
627 if(aphin.ge.1.d0) aphin=0.99999d0
629 if(psib1.le.0.d0) phin=-1.d0*phin
631 if(phid.gt.pi) phid=phid-2.d0*pi
632 if(phid.lt.-1.d0*pi) phid=phid+2.d0*pi
633 taul1=abs(dsqrt(abs(RA*RA-(rb1*dsin(phip))**2))-rb1*dcos(phip))
634 taul2=abs(dsqrt(abs(RA*RA-(rb2*dsin(phid))**2))-rb2*dcos(phid))
635 taul=min(taul1,taul2) ! escape time taul
636 temlev=plt(taul) ! QGP temperature at taul
637 if(taul.le.tau0) goto 100 ! escape from QGP if taul<tau0
639 * start parton rescattering in QGP with proper time iterations
642 xi=-10.d0*dlog(max(pyr(0),1.d-10))/(sigpl*pln(tau))
643 vel=abs(p(ip,3))/dsqrt(p(ip,3)**2+p(ip,5)**2) ! parton velocity
644 if(vel.lt.0.3d0) goto 4
646 if(tau.ge.taul.or.tfs.le.TC) goto 100 ! escape if tau>taul or >taupl
648 * transform parton 4-momentum due to next scattering with subroutine pljetr
649 epartc=p(ip,4) ! parton energy
650 um=p(ip,5) ! parton mass
651 sigtr=pls(tfs)*cfac*((p(ip,4)/pyp(ip,8))**2)
652 prob=sigpl/(sigtr/stetr+sigpl)
655 if(irasf.gt.100000) goto 100
656 if(ran.lt.prob) goto 3
659 pass=50.6d0/(pln(tau)*sigtr)
662 call pljetr(tau,pass,pltp,ipar,epart)
665 * set 4-momentum (in lab system) of next radiated gluon for parton number >8
666 * and fill arrays of radiated gluons in common block plglur
668 if(abs(elr).gt.0.1d0.and.ip.gt.8) then
672 if(fte1.gt.fte2) goto 6
673 tgl=te1 ! gaussian angular spectrum
674 c tgl=0.d0 ! collinear angular spectrum
675 c tgl=((0.5d0*pi*epartc)**pyr(0))/epartc ! broad-angular spectrum
676 pgl=pi*(2.d0*pyr(0)-1.d0)
678 pxgl=abs(elr)*stetr*(dcos(phir)*dcos(tgl)-
679 > dsin(phir)*dsin(tgl)*dsin(pgl))
680 pygl=abs(elr)*stetr*(dsin(phir)*dcos(tgl)+
681 > dcos(phir)*dsin(tgl)*dsin(pgl))
682 pzgl=-1.d0*abs(elr)*stetr*dsin(tgl)*dcos(pgl)
683 ptgl=dsqrt(abs(pxgl*pxgl+pygl*pygl))
684 psgl=dsqrt(abs(ptgl*ptgl+pzgl*pzgl))
685 * recalculate in lab system
686 dyg=0.5d0*dlog(max(1.d-9,(psgl+pzgl)/(psgl-pzgl)))
687 pzgl=ptgl*dsinh(yrr+dyg)
688 psgl=dsqrt(abs(ptgl*ptgl+pzgl*pzgl))
691 glur1=abs(elr) ! energy
692 glur3=datan(dpgl) ! phi
693 if(pxgl.lt.0.d0) then
694 if(pygl.ge.0.d0) then
700 glur4=0.5d0*dlog(max(1.d-9,(psgl+pzgl)/(psgl-pzgl))) ! eta
701 glur2=glur1/dcosh(glur4) ! pt
703 * put in event list radiated gluons with pt > 0.2 GeV only
704 if(glur2.ge.0.2d0) then
706 * set gluon 4-momentum
707 glur(nrg,1)=glur1 ! energy
708 glur(nrg,2)=glur2 ! pt
709 glur(nrg,3)=glur3 ! phi
710 glur(nrg,4)=glur4 ! eta
712 kglu(nrg,1)=2 ! status code
713 kglu(nrg,2)=21 ! particle identificator
714 kglu(nrg,3)=k(ipar,3) ! parent line number
715 kglu(nrg,4)=0 ! special colour info
716 kglu(nrg,5)=0 ! special colour info
717 kglu(nrg,6)=ipar ! associated parton number
721 write(6,*) 'Warning! Number of emitted gluons is too large!'
724 * set parton "thermalization" if pt<T
725 if(abs(p(ip,3)).gt.pltp3) goto 3
727 if(p(ip,3).ge.0.d0) then
733 if(iraz.gt.100000) goto 100
734 ep0=-0.15d0*(dlog(max(1.d-10,pyr(0)))+dlog(max(1.d-10,pyr(0)))+
735 > dlog(max(1.d-10,pyr(0))))
736 if(ep0.le.p(ip,5).or.ep0.ge.100.d0) goto 5
737 pp0=dsqrt(abs(ep0**2-p(ip,5)**2))
739 if(pyr(0).gt.probt) goto 5
740 ctp0=2.d0*pyr(0)-1.d0
741 stp0=dsqrt(abs(1.d0-ctp0**2))
742 php0=pi*(2.d0*pyr(0)-1.d0)
743 p(ip,1)=pp0*stp0*dcos(php0)
744 p(ip,2)=pp0*stp0*dsin(php0)
745 p(ip,3)=sigp*pp0*ctp0
746 p(ip,4)=dsqrt(p(ip,1)**2+p(ip,2)**2+p(ip,3)**2+p(ip,5)**2)
748 * boost to laboratory system
749 100 call pyrobo(0,0,tetr,phir,0.d0,0.d0,0.d0)
757 ******************************* END PLEVNT *************************
759 ******************************* PLJETR *****************************
760 SUBROUTINE PLJETR(tau,y,x,ip,epart)
761 * transform parton 4-momentum due to scattering in plasma at time = tau
762 IMPLICIT DOUBLE PRECISION(A-H, O-Z)
763 IMPLICIT INTEGER(I-N)
764 INTEGER PYK,PYCHGE,PYCOMP
767 common /plpar1/ tau0,T0,TC,sigqq,AW,RA,mvisc,nf
768 common /plpar2/ pln0,taupl,tauh,sigpl,sigh,sigplh,sigqqh,rg,rgn
769 common /pyjets/ n,npad,k(4000,5),p(4000,5),v(4000,5)
770 common /pljdat/ ej, z, ygl, alfs, um, epa
771 common /pleave/ taul, temlev
772 common /radcal/ aa, bb
773 common /factor/ cfac, kf
774 common /plos/ elr,rsk
779 tauu=x ! redenote temerature tauu=x
780 i=ip ! redenote parton number i=ip
784 * boost to system of comoving plasma constituent
785 phir=pyp(i,15) ! parton phi
786 tetr=pyp(i,13) ! parton theta
787 stetr=max(dsin(tetr),1.d-08) ! parton sin(theta)
790 call pyrobo(0,0,0.d0,phir1,0.d0,0.d0,0.d0)
791 call pyrobo(0,0,tetr1,0.d0,0.d0,0.d0,0.d0)
792 pp=pyp(i,8) ! parton total momentum
793 ppl=abs(p(i,3)) ! parton pz
794 um=p(i,5) ! parton mass
795 epa=p(i,4) ! parton energy
796 ppt=pyp(i,10) ! parton pt
797 pphi=pyp(i,15) ! parton phi
799 if(ppl.lt.3.d0) goto 222 ! no energy loss if pz<3 GeV/c
801 * generation hard parton-plasma scattering with momentum transfer rsk
802 221 ep0=-1.*tauu*(dlog(max(1.d-10,pyr(0)))+dlog(max(1.d-10,
803 > pyr(0)))+dlog(max(1.d-10,pyr(0)))) ! energy of 'thermal' parton
805 if(ep0.lt.1.d-10.and.iter.le.100000) goto 221
806 scm=2.*ep0*epa+um*um+ep0*ep0
807 qm2=(scm-((um+ep0)**2))*(scm-((um-ep0)**2))/scm
809 alf=6.d0*pi/((33.d0-2.d0*nf)*dlog(max(bub,1.d-10)))
810 z=pi*4.d0*tauu*tauu*alf*(1.+nf/6.d0)
811 bubs=dsqrt(abs(z))/TC
812 alfs=6.d0*pi/((33.d0-2.d0*nf)*dlog(max(bubs,1.d-10)))
814 phmax2=max(phmin2,qm2)
815 fqmax2=1.d0/(dlog(max(phmin2/(TC*TC),1.d-10)))**2
817 tp=1.d0/(rn1/phmax2+(1.d0-rn1)/phmin2)
818 ftp=1.d0/(dlog(max(tp/(TC*TC),1.d-10)))**2
821 if(fprob.lt.rn2) goto 12
823 if(rsk.gt.ppl) rsk=ppl
825 * calculate radiative energy loss per given scattering with subroutin plfun1
826 ygl=y*cfac ! mean gluon free path in GeV^{-1}
827 elp=ygl*z ! mimimum radiated energy in LPM regime
829 bb=ej ! maximum radiated energy
830 bbi=max(dsqrt(abs(z)),1.000001d0*elp)
831 aa=min(bb,bbi) ! minimum radiated energy
835 CALL SIMPA(aa,bb,hh,REPS,AEPS,plfun1,om,resun,AIH,AIABS)
836 * ! integral over omega for radiative loss
837 call radsear(ermax1,eomin1)
840 11 resu=eomin*pyr(0)+aa
844 if(fres.gt.fres1.and.iraz.lt.100000) goto 11
845 elr=resu*resun ! energy of radiated gluon
847 * to chancel radiative energy loss (optional case)
849 * to chancel collisional energy loss (optional case)
852 * determine the direction of parton moving
853 if(p(i,3).ge.0.d0) then
859 * calculate new 4-momentum of hard parton
861 epan=epa-rsk*rsk/(2.d0*ep0)-abs(elr)
862 if(epan.lt.0.1d0) then
865 if(epan.lt.0.1d0) then
870 pptn=dsqrt(abs(rsk*rsk+(rsk**4)*(1.d0-epa*epa/(ppl*ppl))/
871 > (4.d0*ep0*ep0)-(rsk**4)*epa/(2.d0*ep0*ppl*ppl)-(rsk**4)/
873 ppln=dsqrt(abs(epan*epan-pptn*pptn-p(i,5)**2))
874 p(i,1)=pptn*dcos(phirs) ! px
875 p(i,2)=pptn*dsin(phirs) ! py
876 p(i,3)=sigp*ppln ! pz
877 p(i,4)=dsqrt(p(i,1)**2+p(i,2)**2+p(i,3)**2+p(i,5)**2) ! E
878 * boost to system of hard parton
879 222 call pyrobo(0,0,tetr,phir,0.d0,0.d0,0.d0)
883 ******************************* END PLJETR **************************
885 ******************************** PLSEAR ***************************
886 SUBROUTINE PLSEAR (fmax,xmin)
887 * finding maximum and 'sufficient minimum of nucleus thikness function.
888 * xm, fm are outputs.
889 IMPLICIT DOUBLE PRECISION(A-H, O-Z)
890 IMPLICIT INTEGER(I-N)
891 INTEGER PYK,PYCHGE,PYCOMP
893 common /parimp/ b1, psib1, rb1, rb2
894 common /plpar1/ tau0,T0,TC,sigqq,AW,RA,mvisc,nf
896 rm1=dsqrt(abs(RA*RA-b1*b1/4.d0*(dsin(psib1)**2)))+
897 > b1*dcos(psib1)/2.d0
898 rm2=dsqrt(abs(RA*RA-b1*b1/4.d0*(dsin(psib1)**2)))-
899 > b1*dcos(psib1)/2.d0
912 ****************************** END PLSEAR **************************
914 ******************************** RADSEAR ***************************
915 SUBROUTINE RADSEAR (fmax,xmin)
916 * find maximum and 'sufficient minimum of radiative energy loss distribution
917 * xm, fm are outputs.
918 IMPLICIT DOUBLE PRECISION(A-H, O-Z)
919 IMPLICIT INTEGER(I-N)
920 INTEGER PYK,PYCHGE,PYCOMP
922 common /radcal/ aa, bb
927 x=aa+xmin*(j-1)/999.d0
936 ****************************** END RADSEAR **************************
938 ********************************* BIPSEAR ***************************
939 SUBROUTINE BIPSEAR (fmax,xmin)
940 * find maximum and 'sufficient minimum' of jet production cross section
941 * as a function of impact paramater (xm, fm are outputs)
942 IMPLICIT DOUBLE PRECISION(A-H, O-Z)
943 IMPLICIT INTEGER(I-N)
944 INTEGER PYK,PYCHGE,PYCOMP
946 common /plpar1/ tau0,T0,TC,sigqq,AW,RA,mvisc,nf
960 ****************************** END RADSEAR **************************
962 **************************** SIMPA **********************************
963 SUBROUTINE SIMPA (A1,B1,H1,REPS1,AEPS1,FUNCT,X,
965 * calculate intergal of function FUNCT(X) on the interval from A1 to B1
966 IMPLICIT DOUBLE PRECISION(A-H, O-Z)
967 IMPLICIT INTEGER(I-N)
969 H=dSIGN ( H1, B1-A1 )
989 IF( (X0+4.d0*H-B)*S)5,5,6
1001 23 IF(F(K)-10.d16)10,11,10
1002 11 F(K)=FUNCT(X)/3.d0
1003 10 DI2=DI2+P(K)*F(K)
1004 9 DI3=DI3+P(K)*ABS(F(K))
1005 DI1=(F(1)+4.*F(3)+F(5))*2.d0*H
1009 13 IF (AEPS) 12,14,12
1010 12 EPS=ABS((AIABS+DI3)*REPS)
1011 IF(EPS-AEPS)15,16,16
1013 16 DELTA=ABS(DI2-DI1)
1014 IF(DELTA-EPS)20,21,21
1015 20 IF(DELTA-EPS/8.d0)17,14,14
1030 18 DI1=DI2+(DI2-DI1)/15.d0
1048 ************************* END SIMPA *******************************
1050 ************************* PARINV **********************************
1051 SUBROUTINE PARINV(X,A,F,N,R)
1052 * gives interpolation of function F(X) with arrays A(N) and F(N)
1053 IMPLICIT DOUBLE PRECISION(A-H, O-Z)
1054 IMPLICIT INTEGER(I-N)
1056 IF(X.LT.A(1))GO TO 11
1057 IF(X.GT.A(N))GO TO 4
1076 R=B4*((X-B2)*(X-B3))/((B1-B2)*(B1-B3))+B5*((X-B1)*(X-B3))/
1077 1 ((B2-B1)*(B2-B3))+B6*((X-B1)*(X-B2))/((B3-B1)*(B3-B2))
1079 6 IF(K2.NE.N)GO TO 3
1083 IF(C.LT.0.1d-7) GO TO 5
1087 C41 FORMAT(25H X IS OUT OF THE INTERVAL,3H X=,F15.9)
1092 IF(C.LT.0.1d-7) GO TO 12
1098 C************************** END PARINV *************************************
1100 * function to calculate quark-quark scattering differential cross section
1101 double precision FUNCTION PLSIGH(Z)
1102 IMPLICIT DOUBLE PRECISION(A-H, O-Z)
1103 IMPLICIT INTEGER(I-N)
1104 INTEGER PYK,PYCHGE,PYCOMP
1105 common /plpar1/ tau0,T0,TC,sigqq,AW,RA,mvisc,nf
1107 beta=(33.d0-2.d0*nf)/(12.d0*pi)
1108 alfs=1.d0/(beta*dlog(max(1.d-10,z/(TC*TC))))
1109 PLSIGH=8.d0*pi*alfs*alfs/(9.d0*z*z)
1113 * function to calculate differential radiated gluon spectrum in BDMS model
1114 double precision FUNCTION PLFUN1(or)
1115 IMPLICIT DOUBLE PRECISION(A-H, O-Z)
1116 IMPLICIT INTEGER(I-N)
1117 INTEGER PYK,PYCHGE,PYCOMP
1118 common /plpar1/ tau0,T0,TC,sigqq,AW,RA,mvisc,nf
1119 common /pljdat/ ej, z, ygl, alfs, um, epa
1120 common /pleave/ taul, temlev
1121 common /factor/ cfac, kf
1123 x=min((1.d0-ygl*z/or),or/ej)
1124 if(x.le.0.d0) x=0.d0
1125 if(x.ge.1.d0) x=0.9999d0
1127 if(x.ge.0.5d0) x=1.-x
1128 spinf=0.5*(1.+(1.d0-x)**4+x**4)/(1.d0-x)
1130 spinf=1.d0-x+0.5d0*x*x
1132 ak=ygl*z/(or*(1.d0-x))
1134 uu=0.5d0*al*dsqrt(abs(0.5d0*(1.d0-x+cfac*x*x)*ak*
1135 > dlog(max(16.d0/ak,1.d-10))))/ygl
1136 * if quark production outside the QGP then
1137 * arg=(((dsin(uu)*cosh(uu))**2)+((dcos(uu)*sinh(uu))**2))/(2.d0*uu*uu);
1138 * here quark production inside the QGP
1139 arg=((dcos(uu)*cosh(uu))**2)+((dsin(uu)*sinh(uu))**2)
1140 gl1=(ygl/(cfac*z))**0.3333333d0
1141 gl2=(um/epa)**1.333333d0
1142 dc=1.d0/((1.d0+((gl1*gl2*or)**1.5d0))**2) ! massive parton
1143 c dc=1.d0 !massless parton
1144 plfun1=dc*3.d0*alfs*ygl*dlog(max(arg,1.d-20))*spinf/(pi*al*or)
1148 * function to calculate time-dependence of QGP viscosity (if mvisc=1,2)
1149 double precision FUNCTION PLVISC(X)
1150 IMPLICIT DOUBLE PRECISION(A-H, O-Z)
1151 IMPLICIT INTEGER(I-N)
1152 INTEGER PYK,PYCHGE,PYCOMP
1153 common /plpar1/ tau0,T0,TC,sigqq,AW,RA,mvisc,nf
1160 elseif(mvisc.eq.1) then
1161 a=3.4d0*(1.d0+0.12d0*(2.d0*nf+1.d0))
1162 b=15.d0*(1.d0+0.06d0*nf)
1163 c=4.d0*pi*pi*(10.5d0*nf/a+16.d0/b)/675.d0
1165 c=(1.7d0*nf+1.d0)*0.342d0/(1.d0+nf/6.d0)
1168 alf=6.d0*pi/((33.d0-2.d0*nf)*dlog(max(bub,1.d-10)))
1170 PLVISC=c*(T**3)/(alf*alf*dlog(max(1.d-10,alf1)))
1174 * function to calculate time-dependence of QGP number density
1175 double precision FUNCTION PLN(X)
1176 IMPLICIT DOUBLE PRECISION(A-H, O-Z)
1177 IMPLICIT INTEGER(I-N)
1178 INTEGER PYK,PYCHGE,PYCOMP
1179 common /plpar1/ tau0,T0,TC,sigqq,AW,RA,mvisc,nf
1180 common /plpar2/ pln0,taupl,tauh,sigpl,sigh,sigplh,sigqqh,rg,rgn
1181 common /plevol/ taup(5000),temp(5000),denp(5000),enep(5000)
1183 pi2=3.14159d0*3.14159d0
1186 call parinv(t,taup,denp,5000,res)
1188 res=1.2d0*(16.d0+9.d0*nf)*((5.06d0*TC)**3)/pi2
1194 * function to calculate time-dependence of QGP temperature
1195 double precision FUNCTION PLT(X)
1196 IMPLICIT DOUBLE PRECISION(A-H, O-Z)
1197 IMPLICIT INTEGER(I-N)
1198 INTEGER PYK,PYCHGE,PYCOMP
1199 common /plpar1/ tau0,T0,TC,sigqq,AW,RA,mvisc,nf
1200 common /plpar2/ pln0,taupl,tauh,sigpl,sigh,sigplh,sigqqh,rg,rgn
1201 common /plevol/ taup(5000),temp(5000),denp(5000),enep(5000)
1205 call parinv(t,taup,temp,5000,res)
1213 * function to caculate time-dependence of parton-plasma integral cross section
1214 double precision FUNCTION PLS(X)
1215 IMPLICIT DOUBLE PRECISION(A-H, O-Z)
1216 IMPLICIT INTEGER(I-N)
1217 INTEGER PYK,PYCHGE,PYCOMP
1219 common /plpar1/ tau0,T0,TC,sigqq,AW,RA,mvisc,nf
1220 common /plpar2/ pln0,taupl,tauh,sigpl,sigh,sigplh,sigqqh,rg,rgn
1221 common /plen/ epartc, um
1225 alf=6.d0*pi/((33.d0-2.d0*nf)*dlog(max(bub,1.d-10)))
1226 ZZ0=4.d0*t*t*pi*alf*(1.d0+nf/6.d0)
1227 scm=4.d0*t*epartc+um*um+4.d0*t*t
1228 ZZ1=max((scm-((um+2.d0*t)**2))*(scm-((um-2.d0*t)**2))/scm,ZZ0)
1232 CALL SIMPA(ZZ0,ZZ1,HH1,REPS,AEPS,plsigh,ZZ,RESS,AIH,AIABS)
1233 PLS=0.39d0*2.25d0*2.25d0*RESS*(16.d0+4.d0*nf)/(16.d0+9.d0*nf)
1237 * function to calculate nuclear thikness function
1238 double precision FUNCTION PLTHIK(X)
1239 IMPLICIT DOUBLE PRECISION(A-H, O-Z)
1240 IMPLICIT INTEGER(I-N)
1241 INTEGER PYK,PYCHGE,PYCOMP
1242 common /parimp/ b1, psib1, rb1, rb2
1243 common /plpar1/ tau0,T0,TC,sigqq,AW,RA,mvisc,nf
1245 r12=bu*bu+b1*b1/4.d0+bu*b1*dcos(psib1)
1246 r22=bu*bu+b1*b1/4.d0-bu*b1*dcos(psib1)
1247 PLTHIK=dsqrt(abs((RA*RA-r12)*(RA*RA-r22)))*bu
1251 * function to generate gauss distribution
1252 double precision function gauss(x0,sig)
1253 IMPLICIT DOUBLE PRECISION(A-H, O-Z)
1254 IMPLICIT INTEGER(I-N)
1261 gauss=v1*dsqrt(-2.d0*dlog(s)/s)*sig+x0
1265 * function to calculate angular distribution of emitted gluons
1266 double precision function gluang(x)
1267 IMPLICIT DOUBLE PRECISION(A-H, O-Z)
1268 IMPLICIT INTEGER(I-N)
1270 gluang=x*dexp(-1.d0*(x-s)*(x-s)/(2.d0*s*s))
1274 * function to calculate jet production vs. centrality
1275 double precision function funbip(x)
1276 IMPLICIT DOUBLE PRECISION(A-H, O-Z)
1277 IMPLICIT INTEGER(I-N)
1278 INTEGER PYK,PYCHGE,PYCOMP
1279 common /plpar1/ tau0,T0,TC,sigqq,AW,RA,mvisc,nf
1280 dimension bip(15), bipr(15), pjet(15)
1281 data bip/0.d0,0.5d0,1.5d0,2.5d0,3.5d0,4.5d0,5.5d0,6.5d0,7.5d0,
1282 > 8.5d0,9.5d0,10.5d0,11.5d0,12.5d0,13.5d0/
1283 data pjet/200000.d0,217558.d0,625570.d0,949850.d0,1.17128d+06,
1284 > 1.30123d+06,1.32297d+06,1.18483d+06,1.02584d+06,839982.d0,
1285 > 621238.d0,399300.d0,227456.d0,113982.d0,41043.d0/
1288 bipr(i)=bip(i)*RA/6.8d0
1290 call parinv (bu,bipr,pjet,15,res)
1295 * function integrated at calculation of initial QGP temperature vs. centrality
1296 double precision function ftaa(x)
1297 IMPLICIT DOUBLE PRECISION(A-H, O-Z)
1298 IMPLICIT INTEGER(I-N)
1299 INTEGER PYK,PYCHGE,PYCOMP
1302 ftaa=(1.d0-br*x*x/a)*dlog(1.d0+x*x*(1.d0-br))/(a*a)
1305 **************************************************************************