2 *----------------------------------------------------------------------
6 * Author : Igor Lokhtin (Igor.Lokhtin@cern.ch)
7 * Version : PYQUEN1_5.f, v.1.5.1
8 * Last revision v.5.1 : 19-DEC-2007
9 * Last revision v.5.1.1 : 06-MAY-2010
11 *======================================================================
13 * Description : Event generator for simulation of parton rescattering
14 * and energy loss in expanding quark-gluon plasma created
15 * in ultrarelativistic heavy ion AA collisons
16 * (implemented as modification of standard Pythia jet event)
18 * Reference: I.P. Lokhtin, A.M. Snigirev, Eur. Phys. J. C 46 (2006) 211
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
28 external funbip,prhoaa,pfunc1
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,noquen
36 common /pyqpar/ T0u,tau0u,nfu,ienglu,ianglu
39 common /pythic/ PBAB(110),PTAB(110),PTAAB(110)
41 save/pyjets/,/pydat1/,/pysubs/,/plglur/,/plquar/,/pygeom/,
42 > /pythic/,/plpar1/,/parimp/,/pyqpar/,/plfpar/
43 dimension ijoik(2),ijoin(1000),ijoin0(1000),nis(500),nss(500),
46 * set initial event paramters
48 RA=1.15d0*AW**0.333333d0 ! nucleus radius in fm
50 mvisc=0 ! flag of QGP viscosity (off here)
51 TC=0.2d0 ! crutical temperature
53 if(nfu.ne.0.and.nfu.ne.1.and.nfu.ne.2.and.nfu.ne.3) nfu=0
54 nf=nfu ! number of active flavours in QGP
55 if(tau0u.lt.0.01d0.or.tau0u.gt.10.d0) tau0u=0.1d0
56 tau0=tau0u ! proper time of QGP formation
57 if(T0u.lt.0.2d0.or.T0u.gt.2.d0) T0u=1.d0
58 T0=T0u*(AW/207.d0)**0.166667d0 ! initial QGP temperatute at b=0
59 if(ienglu.ne.0.and.ienglu.ne.1.and.ienglu.ne.2) ienglu=0 ! e-loss type
60 if(ianglu.ne.0.and.ianglu.ne.1.and.ianglu.ne.2) ianglu=0 ! angular spec.
64 * avoid stopping run if pythia does not conserve energy due to collisional loss
67 * creation of arrays for tabulation of beam/target nuclear thickness function
73 CALL SIMPA(Z1,Z2,H,0.005d0,1.d-8,prhoaa,Z,RES,AIH,AIABS)
78 * calculation of beam/target nuclear overlap function at b=0
79 * if ifb=1: creation of arrays for tabulation of nuclear overlap function
87 CALL SIMPA(Z1,Z2,H,0.05d0,1.d-8,PFUNC1,X,RES,AIH,AIABS)
91 * generate impact parameter of A-A collision with jet production
94 write(6,*) 'Impact parameter less than zero!'
98 write(6,*) 'Impact parameter larger than three nuclear radius!'
103 call bipsear(fmax1,xmin1)
109 if(ff1.gt.fb) goto 11
114 * generate single event with partonic energy loss
120 * reset all in-vacuum radiated guark 4-momenta and codes to zero
129 * generate final state shower in vacuum if it was excluded before
130 nrgm=nrg ! fix number of in-medium emitted gluons
137 if(mstj(41).ne.0) goto 5
142 ip1=i ! first hard parton (line ip1)
143 kfh1=k(i,1) ! status code of first hard parton
144 qmax1=pyp(i,10) ! transverse momentum of first hard parton
147 ip2=i ! second hard parton (line ip2)
148 kfh2=k(i,1) ! status code of second hard parton
149 qmax2=pyp(i,10) ! transverse momentum of second hard parton
154 call pyshow(ip1,0,qmax1) ! vacuum showering for first hard parton
157 call pyshow(ip2,0,qmax2) ! vacuum showering for second hard parton
162 * find two leading partons after showering
164 if(k(i,3).eq.ip1) ip001=i ! first daughter of first hard parton
165 if(k(i,3).eq.ip2) ip002=i ! first daughter of second hard parton
170 if (k(i,1).eq.14) goto 3
171 if(i.ge.ip002.and.ip002.gt.0) then
173 if(ptl02.gt.ptle2.and.k(i,2).eq.k(ip2,2)) then
174 ip02=i ! leading parton in second shower (line ip02)
175 ptle2=ptl02 ! pt of the leading parton
177 elseif(ip001.gt.0) then
179 if(ptl01.gt.ptle1.and.k(i,2).eq.k(ip1,2)) then
180 ip01=i ! leading parton in first shower (line ip01)
181 ptle1=ptl01 ! pt of the leading parton
187 * replace two hard partons by two leading partons in original event record
194 * fix first/last daughter for moving entry
196 if(k(jgl,4).eq.ip01) k(jgl,4)=ip1
197 if(k(jgl,5).eq.ip01) k(jgl,5)=ip1
207 * fix first/last daughter for moving entry
209 if(k(jgl,4).eq.ip02) k(jgl,4)=ip2
210 if(k(jgl,5).eq.ip02) k(jgl,5)=ip2
215 * add final showering gluons to the list of in-medium emitted gluons,
216 * fill the list of emitted quarks by final showering quark pairs,
217 * and remove showering gluons and quarks from the event record
219 if(k(i,1).eq.14.or.i.eq.ip01.or.i.eq.ip02) goto 12
220 if(k(i,2).ne.21) then ! filling 'plquar' arrays for quarks
229 if(i.ge.ip002.and.ip002.gt.0) then
237 if(ish.ge.ishm.or.nur.le.2) goto 6 ! adding gluons in 'plglur' arrays
239 kglu(nur,j)=kglu(nur-1,j)
242 glur(nur,j)=glur(nur-1,j)
246 6 kglu(nur,1)=2 ! status code
247 kglu(nur,2)=k(i,2) ! particle identificator
248 kglu(nur,3)=k(ish,3) ! parent line number
249 kglu(nur,4)=0 ! special colour info
250 kglu(nur,5)=0 ! special colour info
251 kglu(nur,6)=ish ! associated parton number
252 glur(nur,1)=p(i,4) ! energy
253 glur(nur,2)=pyp(i,10) ! pt
254 glur(nur,3)=pyp(i,15) ! phi
255 glur(nur,4)=pyp(i,19) ! eta
257 * remove partons from event list
268 * stop generate event if there are no additional gluons
271 * define number of stirngs (ns) and number of entries in strings before
272 * in-medium radiation (nis(ns))
287 nis(ns+1)=nis(ns+1)+1
288 elseif(ks.eq.1.and.nis(ns+1).gt.0) then
289 nis(ns+1)=nis(ns+1)+1
290 nes=nes+nis(ns+1) ! nes - total number of entries
293 elseif(ks.ne.2.and.ksp.ne.2.and.ns.gt.0) then
294 i1=i1+1 ! last i1 lines not included in strings
297 i0=n-nes-i1 ! first i0 lines not included in strings
302 * move fragmented particles in bottom of event list
306 if(ks.ne.2.and.ksp.ne.2) then
313 * fix first/last daughter for moving entry
315 if(k(jgl,4).eq.i) k(jgl,4)=n
316 if(k(jgl,5).eq.i) k(jgl,5)=n
325 * fix first/last daughter for moving entry
327 if(k(jgl,4).eq.in) k(jgl,4)=in-1
328 if(k(jgl,5).eq.in) k(jgl,5)=in-1
334 if(ku.gt.i) kglu(ip,6)=ku-1
342 * define number of additional entries in strings, nas(ns)
345 if(kas.le.nss(1)) then
349 if(kas.le.nss(j).and.kas.gt.nss(j-1))
360 * add emitted gluons in event list
370 * fix first/last daughter for moving entries
372 if(k(jgl,4).eq.i) k(jgl,4)=is
373 if(k(jgl,5).eq.i) k(jgl,5)=is
379 do i=nss(ia+1)-1,nss(ia),-1
386 * fix first/last daughter for moving entries
388 if(k(jgl,4).eq.i) k(jgl,4)=is
389 if(k(jgl,5).eq.i) k(jgl,5)=is
400 if(i.le.nus(in).and.i.gt.nus(in-1))
412 p(ia,1)=ptg*dcos(phig)
413 p(ia,2)=ptg*dsin(phig)
414 p(ia,3)=dsqrt(abs(eg*eg-ptg*ptg))
415 if(etag.lt.0.d0) p(ia,3)=-1.d0*p(ia,3)
416 p(ia,4)=dsqrt(ptg*ptg+p(ia,3)**2)
420 * rearrange partons to form strings in event list
433 ijoin(j)=nss(i-1)+nus(i-1)+j
437 * re-oder additional gluons by z-coordinate along the string
443 detaj=pyp(jo1,19)-pyp(jon,19)
449 etajj=pyp(jo1+jj-1,19)
451 if(etajj.lt.etaj.and.j.ne.jj) jnum=jnum+1
453 if(etajj.gt.etaj.and.j.ne.jj) jnum=jnum+1
455 if(etajj.eq.etaj.and.j.lt.jj) jnum=jnum+1
457 ijoin(ja+jnum)=jo1+j-1
459 detas1=abs(pyp(jo1,19)-etasum)
460 detasn=abs(pyp(jon,19)-etasum)
461 if(detasn.gt.detas1) then
466 ijoin(j)=ijoin0(ja+j-2)
468 do j=nas(i)+2,njoin-1
469 ijoin(j)=ijoin0(j-nas(i))
475 call pyjoin(njoin,ijoin)
479 * add in-vacuum emitted quark pairs
489 4 ktest=k(n-1,2)+kqua(in,2)
490 if(ktest.eq.0.or.in.eq.nrq) goto 8
500 kqua(in,j)=kqua(i+1,j)
501 pqua(in,j)=pqua(i+1,j)
521 ********************************* PLINIT ***************************
522 SUBROUTINE PLINIT(ET)
523 * set time-dependence of plasma parameters
524 IMPLICIT DOUBLE PRECISION(A-H, O-Z)
526 common /plpar1/ tau0,T0,TC,sigqq,AW,RA,mvisc,nf
527 common /plpar2/ pln0,taupl,tauh,sigpl,sigh,sigplh,sigqqh,rg,rgn
528 common /plevol/ taup(5000),temp(5000),denp(5000),enep(5000)
529 save /plevol/,/plpar1/,/plpar2/
534 * set number degrees of freedom in QGP
536 rg=(16.d0+10.5d0*nf)/hgd
537 rgn=(16.d0+9.d0*nf)/hgd
539 * set 'fiction' sigma for parton rescattering in QGP
541 sigpl=2.25d0*2.25d0*sigqq*(16.d0+4.d0*nf)/(16.d0+9.d0*nf)
543 * set intial plasma temperature, density and energy density in perfect
544 * (if mvisc=0) or viscous (mvisc=1,2) QGP with PLVISC subroitine
546 if(T0.gt.1.5d0.or.mvisc.eq.2) hst=0.25d0
547 if(T0.gt.1.5d0.and.mvisc.ne.0) hst=0.9d0
550 pln0=(16.d0+9.d0*nf)*1.2d0*(T01**3)/pi2
551 ened0=pi2*(16.d0+10.5d0*nf)*(T01**4)/30.d0
553 tau=tau0 ! proper time
555 den=pln0 ! number density
556 ened=ened0 ! energy density
558 * create array of parameters to configurate QGP time evolution
560 taup(i)=tau ! proper time
561 temp(i)=T/5.06d0 ! temperature
562 denp(i)=den ! number density
563 enep(i)=ened/5.06d0 ! energy density
564 ened1=0.5d0*hh*(1.3333d0*plvisc(T)/(tau*tau)-1.3333d0
566 T1=(30.d0*ened1/((16.d0+10.5d0*nf)*pi2))**0.25d0
568 ened=hh*(1.3333d0*plvisc(T1)/(tau1*tau1)-1.3333d0
571 T=(30.d0*ened/((16.d0+10.5d0*nf)*pi2))**0.25d0
572 den=(16.d0+9.d0*nf)*1.2d0*(T**3)/pi2
574 if(TPR.gt.TC1.and.T.le.TC1) taupl=tau-0.5d0*hh ! QGP lifetime taupl
576 tauh=taupl*rg ! mixed phase lifetime
580 ******************************** END PLINIT **************************
582 ******************************* PLEVNT ******************************
583 SUBROUTINE PLEVNT(ET)
584 * generate hard parton production vertex and passing with rescattering,
585 * collisional and radiative energy loss of each parton through plasma
586 IMPLICIT DOUBLE PRECISION(A-H, O-Z)
587 IMPLICIT INTEGER(I-N)
588 INTEGER PYK,PYCHGE,PYCOMP
589 external plthik, pln, plt, pls, gauss, gluang
591 common /plpar1/ tau0,T0,TC,sigqq,AW,RA,mvisc,nf
592 common /plpar2/ pln0,taupl,tauh,sigpl,sigh,sigplh,sigqqh,rg,rgn
593 common /thikpa/ fmax,xmin
594 common /pyjets/ n,npad,k(4000,5),p(4000,5),v(4000,5)
595 common /pyqpar/ T0u,tau0u,nfu,ienglu,ianglu
596 common /plglur/ glur(1000,4),kglu(1000,6),nrg,nrgm
597 common /factor/ cfac, kf
598 common /pleave/ taul, temlev
599 common /parimp/ b1, psib1, rb1, rb2, noquen
600 common /plen/ epartc, um
601 common /plos/ elr,rsk
602 common /numje1/ nuj1, nuj2
603 save/pyjets/,/plglur/,/plpar1/,/plpar2/,/thikpa/,/factor/,
604 < /pleave/,/parimp/,/plen/,/plos/,/numje1/
608 * find minimum of nuclear thikness function with subroutine plsear
609 psib1=pi*(2.d0*pyr(0)-1.d0)
610 call plsear (fmax1,xmin1)
614 * generate vertex of jet production
620 if(ff1.gt.f.and.iv.le.100000) goto 1
622 rb1=dsqrt(abs(r0*r0+b1*b1/4.d0+r0*b1*dcos(psib1)))
623 rb2=dsqrt(abs(r0*r0+b1*b1/4.d0-r0*b1*dcos(psib1)))
626 * no quenching if noquen=1 or jet production vertex is out of effective dense zone
627 if(noquen.eq.1.or.rb1.gt.RA.or.rb2.gt.RA) goto 7
629 * find maximum of angular spectrum of radiated gluons with subroutine gluang
631 temax=0.5d0*(1.d0+dsqrt(5.d0))*0.0863d0
634 * reset all radiated gluon 4-momenta and codes to zero -------------------
645 * generate changing 4-momentum of partons due to rescattering and energy loss
646 * (for partons with |eta|<3.5 and pt>3 GeV/c)
647 nuj1=9 ! minimum line number of rescattered parton
648 nuj2=n ! maximum line number of rescattered parton
649 do 2 ip=nuj1,nuj2 ! cycle on travelling partons
652 ks=k(ip,1) ! parton status code
653 kf=k(ip,2) ! parton identificator
655 ko=k(ip,3) ! origin (parent line number)
656 epart=abs(pyp(ip,10)) ! parton transverse momentum
657 etar=pyp(ip,19) ! parton pseudorapidity
658 if(ko.gt.6.and.epart.ge.3.d0.and.abs(etar).
660 if(ka.eq.21.or.ka.eq.1.or.ka.eq.2.or.ka.eq.3.
661 > or.ka.eq.4.or.ka.eq.5.or.ka.eq.6.or.ka.eq.7.
663 if(ks.eq.2.or.ks.eq.1) then
664 phir=pyp(ip,15) ! parton azimuthal angle
665 tetr=pyp(ip,13) ! parton polar angle
666 yrr=pyp(ip,17) ! parton rapidity
667 stetr=dsin(tetr) ! parton sin(theta)
668 if(abs(stetr).le.1.d-05) then
669 if(stetr.ge.0.d0) then
680 cfac=1.d0 ! for gluon
682 cfac=0.44444444d0 ! for quark
685 * boost from laboratory system to system of hard parton
687 bet0=(r0*dcos(psib1)+0.5d0*b1)/rb1
688 if(bet0.le.-1.d0) bet0=-0.99999d0
689 if(bet0.ge.1.d0) bet0=0.99999d0
691 if(psib1.lt.0.d0) bet=-1.d0*bet
693 if(phip.gt.pi) phip=phip-2.d0*pi
694 if(phip.lt.-1.d0*pi) phip=phip+2.d0*pi
695 call pyrobo(ip,ip,0.d0,phir1,0.d0,0.d0,0.d0)
696 call pyrobo(ip,ip,tetr1,0.d0,0.d0,0.d0,0.d0)
698 * calculate proper time of parton leaving the effective dense zone
699 aphin=(r0*r0-b1*b1/4.d0)/(rb1*rb2)
700 if(aphin.le.-1.d0) aphin=-0.99999d0
701 if(aphin.ge.1.d0) aphin=0.99999d0
703 if(psib1.le.0.d0) phin=-1.d0*phin
705 if(phid.gt.pi) phid=phid-2.d0*pi
706 if(phid.lt.-1.d0*pi) phid=phid+2.d0*pi
707 taul1=abs(dsqrt(abs(RA*RA-(rb1*dsin(phip))**2))-rb1*dcos(phip))
708 taul2=abs(dsqrt(abs(RA*RA-(rb2*dsin(phid))**2))-rb2*dcos(phid))
709 taul=min(taul1,taul2) ! escape time taul
710 temlev=plt(taul,rb1,rb2,yrr) ! QGP temperature at taul
711 if(taul.le.tau0) goto 100 ! escape from QGP if taul<tau0
713 * start parton rescattering in QGP with proper time iterations
719 3 tfs=plt(tau,rj1,rj2,yrr)
720 xi=-10.d0*dlog(max(pyr(0),1.d-10))/(sigpl*pln(tau,rj1,rj2,yrr))
721 vel=abs(p(ip,3))/dsqrt(p(ip,3)**2+p(ip,5)**2) ! parton velocity
722 if(vel.lt.0.3d0) goto 4
724 xj=xj+xi*vel*dcos(phir)
725 yj=yj+xi*vel*dsin(phir)
726 rj1=sqrt(abs(yj**2+(xj+0.5d0*b1)**2))
727 rj2=sqrt(abs(yj**2+(xj-0.5d0*b1)**2))
728 if(tfs.le.TC) goto 100 ! escape if temperature drops below TC
730 * transform parton 4-momentum due to next scattering with subroutine pljetr
731 epartc=p(ip,4) ! parton energy
732 um=p(ip,5) ! parton mass
733 sigtr=pls(tfs)*cfac*((p(ip,4)/pyp(ip,8))**2)
734 prob=sigpl/(sigtr/stetr+sigpl)
737 if(irasf.gt.100000) goto 100
738 if(ran.lt.prob) goto 3
739 pltp=plt(tau,rj1,rj2,yrr)
740 if(pltp.le.TC) goto 100 ! escape if temperature drops below TC
742 pass=50.6d0/(pln(tau,rj1,rj2,yrr)*sigtr)
745 call pljetr(tau,pass,pltp,ipar,epart)
748 * set 4-momentum (in lab system) of next radiated gluon for parton number >8
749 * and fill arrays of radiated gluons in common block plglur
751 if(abs(elr).gt.0.1d0.and.ip.gt.8) then
752 * generate the angle of emitted gluon
757 if(fte1.gt.fte2) goto 6
759 elseif (ianglu.eq.1) then
760 tgl=((0.5d0*pi*epartc)**pyr(0))/epartc
764 pgl=pi*(2.d0*pyr(0)-1.d0)
766 pxgl=abs(elr)*stetr*(dcos(phir)*dcos(tgl)-
767 > dsin(phir)*dsin(tgl)*dsin(pgl))
768 pygl=abs(elr)*stetr*(dsin(phir)*dcos(tgl)+
769 > dcos(phir)*dsin(tgl)*dsin(pgl))
770 pzgl=-1.d0*abs(elr)*stetr*dsin(tgl)*dcos(pgl)
771 ptgl=dsqrt(abs(pxgl*pxgl+pygl*pygl))
772 psgl=dsqrt(abs(ptgl*ptgl+pzgl*pzgl))
773 * recalculate in lab system
774 dyg=0.5d0*dlog(max(1.d-9,(psgl+pzgl)/(psgl-pzgl)))
775 pzgl=ptgl*dsinh(yrr+dyg)
776 psgl=dsqrt(abs(ptgl*ptgl+pzgl*pzgl))
779 glur1=abs(elr) ! energy
780 glur3=datan(dpgl) ! phi
781 if(pxgl.lt.0.d0) then
782 if(pygl.ge.0.d0) then
788 glur4=0.5d0*dlog(max(1.d-9,(psgl+pzgl)/(psgl-pzgl))) ! eta
789 glur2=glur1/dcosh(glur4) ! pt
791 * put in event list radiated gluons with pt > 0.2 GeV only
792 if(glur2.ge.0.2d0) then
794 * set gluon 4-momentum
795 glur(nrg,1)=glur1 ! energy
796 glur(nrg,2)=glur2 ! pt
797 glur(nrg,3)=glur3 ! phi
798 glur(nrg,4)=glur4 ! eta
800 kglu(nrg,1)=2 ! status code
801 kglu(nrg,2)=21 ! particle identificator
802 kglu(nrg,3)=k(ipar,3) ! parent line number
803 kglu(nrg,4)=0 ! special colour info
804 kglu(nrg,5)=0 ! special colour info
805 kglu(nrg,6)=ipar ! associated parton number
809 write(6,*) 'Warning! Number of emitted gluons is too large!'
812 * set parton "thermalization" if pt<T
813 if(abs(p(ip,3)).gt.pltp3) goto 3
815 if(p(ip,3).ge.0.d0) then
821 if(iraz.gt.100000) goto 100
822 ep0=-0.15d0*(dlog(max(1.d-10,pyr(0)))+dlog(max(1.d-10,pyr(0)))+
823 > dlog(max(1.d-10,pyr(0))))
824 if(ep0.le.p(ip,5).or.ep0.ge.100.d0) goto 5
825 pp0=dsqrt(abs(ep0**2-p(ip,5)**2))
827 if(pyr(0).gt.probt) goto 5
828 ctp0=2.d0*pyr(0)-1.d0
829 stp0=dsqrt(abs(1.d0-ctp0**2))
830 php0=pi*(2.d0*pyr(0)-1.d0)
831 p(ip,1)=pp0*stp0*dcos(php0)
832 p(ip,2)=pp0*stp0*dsin(php0)
833 p(ip,3)=sigp*pp0*ctp0
834 p(ip,4)=dsqrt(p(ip,1)**2+p(ip,2)**2+p(ip,3)**2+p(ip,5)**2)
836 * boost to laboratory system
837 100 call pyrobo(ip,ip,tetr,phir,0.d0,0.d0,0.d0)
846 ******************************* END PLEVNT *************************
848 ******************************* PLJETR *****************************
849 SUBROUTINE PLJETR(tau,y,x,ip,epart)
850 * transform parton 4-momentum due to scattering in plasma at time = tau
851 IMPLICIT DOUBLE PRECISION(A-H, O-Z)
852 IMPLICIT INTEGER(I-N)
853 INTEGER PYK,PYCHGE,PYCOMP
856 common /plpar1/ tau0,T0,TC,sigqq,AW,RA,mvisc,nf
857 common /plpar2/ pln0,taupl,tauh,sigpl,sigh,sigplh,sigqqh,rg,rgn
858 common /pyjets/ n,npad,k(4000,5),p(4000,5),v(4000,5)
859 common /pyqpar/ T0u,tau0u,nfu,ienglu,ianglu
860 common /pljdat/ ej, z, ygl, alfs, um, epa
861 common /pleave/ taul, temlev
862 common /radcal/ aa, bb
863 common /factor/ cfac, kf
864 common /plos/ elr,rsk
865 save /pyjets/,/plpar1/,/plpar2/,/pyqpar/,/pljdat/,/pleave/,/plos/,
870 tauu=x ! redenote temerature tauu=x
871 i=ip ! redenote parton number i=ip
875 * boost to system of comoving plasma constituent
876 phir=pyp(i,15) ! parton phi
877 tetr=pyp(i,13) ! parton theta
880 call pyrobo(i,i,0.d0,phir1,0.d0,0.d0,0.d0)
881 call pyrobo(i,i,tetr1,0.d0,0.d0,0.d0,0.d0)
882 pp=pyp(i,8) ! parton total momentum
883 ppl=abs(p(i,3)) ! parton pz
884 um=p(i,5) ! parton mass
885 epa=p(i,4) ! parton energy
886 ppt=pyp(i,10) ! parton pt
887 pphi=pyp(i,15) ! parton phi
889 if(ppl.lt.3.d0) goto 222 ! no energy loss if pz<3 GeV/c
891 * generation hard parton-plasma scattering with momentum transfer rsk
892 221 ep0=-1.*tauu*(dlog(max(1.d-10,pyr(0)))+dlog(max(1.d-10,
893 > pyr(0)))+dlog(max(1.d-10,pyr(0)))) ! energy of 'thermal' parton
895 if(ep0.lt.1.d-10.and.iter.le.100000) goto 221
896 scm=2.*ep0*epa+um*um+ep0*ep0
897 qm2=(scm-((um+ep0)**2))*(scm-((um-ep0)**2))/scm
899 alf=6.d0*pi/((33.d0-2.d0*nf)*dlog(max(bub,1.d-10)))
900 z=abs(pi*4.d0*tauu*tauu*alf*(1.+nf/6.d0))
902 alfs=6.d0*pi/((33.d0-2.d0*nf)*dlog(max(bubs,1.d-10)))
904 phmax2=max(phmin2,qm2)
905 fqmax2=1.d0/(dlog(max(phmin2/(TC*TC),1.d-10)))**2
907 tp=1.d0/(rn1/phmax2+(1.d0-rn1)/phmin2)
908 ftp=1.d0/(dlog(max(tp/(TC*TC),1.d-10)))**2
911 if(fprob.lt.rn2) goto 12
913 if(rsk.gt.ppl) rsk=ppl
915 * calculate radiative energy loss per given scattering with subroutine plfun1
916 ygl=y*cfac ! mean gluon free path in GeV^{-1}
917 elp=ygl*z ! mimimum radiated energy in LPM regime
919 bb=ej ! maximum radiated energy
920 bbi=max(dsqrt(z),1.000001d0*elp)
921 aa=min(bb,bbi) ! minimum radiated energy
925 CALL SIMPA(aa,bb,hh,REPS,AEPS,plfun1,om,resun,AIH,AIABS)
926 * ! integral over omega for radiative loss
927 call radsear(ermax1,eomin1)
930 11 resu=eomin*pyr(0)+aa
934 if(fres.gt.fres1.and.iraz.lt.100000) goto 11
935 elr=resu*resun ! energy of radiated gluon
937 * to chancel radiative energy loss (optional case)
938 if(ienglu.eq.2) elr=0.d0
939 * to chancel collisional energy loss (optional case)
940 if(ienglu.eq.1) rsk=0.d0
942 * determine the direction of parton moving
943 if(p(i,3).ge.0.d0) then
949 * calculate new 4-momentum of hard parton
951 epan=epa-rsk*rsk/(2.d0*ep0)-abs(elr)
952 if(epan.lt.0.1d0) then
955 if(epan.lt.0.1d0) then
960 pptn=dsqrt(abs(rsk*rsk+(rsk**4)*(1.d0-epa*epa/(ppl*ppl))/
961 > (4.d0*ep0*ep0)-(rsk**4)*epa/(2.d0*ep0*ppl*ppl)-(rsk**4)/
963 ppln=dsqrt(abs(epan*epan-pptn*pptn-p(i,5)**2))
964 p(i,1)=pptn*dcos(phirs) ! px
965 p(i,2)=pptn*dsin(phirs) ! py
966 p(i,3)=sigp*ppln ! pz
967 p(i,4)=dsqrt(p(i,1)**2+p(i,2)**2+p(i,3)**2+p(i,5)**2) ! E
968 * boost to system of hard parton
969 222 call pyrobo(i,i,tetr,phir,0.d0,0.d0,0.d0)
973 ******************************* END PLJETR **************************
975 ******************************** PLSEAR ***************************
976 SUBROUTINE PLSEAR (fmax,xmin)
977 * find maximum and 'sufficient minimum' of jet production vertex distribution
978 * xm, fm are outputs.
979 IMPLICIT DOUBLE PRECISION(A-H, O-Z)
981 common /plpar1/ tau0,T0,TC,sigqq,AW,RA,mvisc,nf
994 ****************************** END PLSEAR **************************
996 ******************************** RADSEAR ***************************
997 SUBROUTINE RADSEAR (fmax,xmin)
998 * find maximum and 'sufficient minimum' of radiative energy loss distribution
999 * xm, fm are outputs.
1000 IMPLICIT DOUBLE PRECISION(A-H, O-Z)
1002 common /radcal/ aa, bb
1007 x=aa+xmin*(j-1)/999.d0
1015 ****************************** END RADSEAR **************************
1017 ********************************* BIPSEAR ***************************
1018 SUBROUTINE BIPSEAR (fmax,xmin)
1019 * find maximum and 'sufficient minimum' of jet production cross section
1020 * as a function of impact paramater (xm, fm are outputs)
1021 IMPLICIT DOUBLE PRECISION(A-H, O-Z)
1023 common /plpar1/ tau0,T0,TC,sigqq,AW,RA,mvisc,nf
1036 ****************************** END RADSEAR **************************
1038 **************************** SIMPA **********************************
1039 SUBROUTINE SIMPA (A1,B1,H1,REPS1,AEPS1,FUNCT,X,
1041 * calculate intergal of function FUNCT(X) on the interval from A1 to B1
1042 IMPLICIT DOUBLE PRECISION(A-H, O-Z)
1043 IMPLICIT INTEGER(I-N)
1044 DIMENSION F(7), P(5)
1045 H=dSIGN ( H1, B1-A1 )
1065 IF( (X0+4.d0*H-B)*S)5,5,6
1077 23 IF(F(K)-10.d16)10,11,10
1078 11 F(K)=FUNCT(X)/3.d0
1079 10 DI2=DI2+P(K)*F(K)
1080 9 DI3=DI3+P(K)*ABS(F(K))
1081 DI1=(F(1)+4.*F(3)+F(5))*2.d0*H
1085 13 IF (AEPS) 12,14,12
1086 12 EPS=ABS((AIABS+DI3)*REPS)
1087 IF(EPS-AEPS)15,16,16
1089 16 DELTA=ABS(DI2-DI1)
1090 IF(DELTA-EPS)20,21,21
1091 20 IF(DELTA-EPS/8.d0)17,14,14
1106 18 DI1=DI2+(DI2-DI1)/15.d0
1124 ************************* END SIMPA *******************************
1126 **************************** SIMPB **********************************
1127 SUBROUTINE SIMPB (A1,B1,H1,REPS1,AEPS1,FUNCT,X,
1129 * calculate intergal of function FUNCT(X) on the interval from A1 to B1
1130 IMPLICIT DOUBLE PRECISION(A-H, O-Z)
1131 IMPLICIT INTEGER(I-N)
1132 DIMENSION F(7), P(5)
1133 H=dSIGN ( H1, B1-A1 )
1153 IF( (X0+4.d0*H-B)*S)5,5,6
1165 23 IF(F(K)-10.d16)10,11,10
1166 11 F(K)=FUNCT(X)/3.d0
1167 10 DI2=DI2+P(K)*F(K)
1168 9 DI3=DI3+P(K)*ABS(F(K))
1169 DI1=(F(1)+4.*F(3)+F(5))*2.d0*H
1173 13 IF (AEPS) 12,14,12
1174 12 EPS=ABS((AIABS+DI3)*REPS)
1175 IF(EPS-AEPS)15,16,16
1177 16 DELTA=ABS(DI2-DI1)
1178 IF(DELTA-EPS)20,21,21
1179 20 IF(DELTA-EPS/8.d0)17,14,14
1194 18 DI1=DI2+(DI2-DI1)/15.d0
1212 ************************* END SIMPB *******************************
1214 ************************* PARINV **********************************
1215 SUBROUTINE PARINV(X,A,F,N,R)
1216 * gives interpolation of function F(X) with arrays A(N) and F(N)
1217 IMPLICIT DOUBLE PRECISION(A-H, O-Z)
1218 IMPLICIT INTEGER(I-N)
1220 IF(X.LT.A(1))GO TO 11
1221 IF(X.GT.A(N))GO TO 4
1240 R=B4*((X-B2)*(X-B3))/((B1-B2)*(B1-B3))+B5*((X-B1)*(X-B3))/
1241 1 ((B2-B1)*(B2-B3))+B6*((X-B1)*(X-B2))/((B3-B1)*(B3-B2))
1243 6 IF(K2.NE.N)GO TO 3
1247 IF(C.LT.0.1d-7) GO TO 5
1251 C41 FORMAT(25H X IS OUT OF THE INTERVAL,3H X=,F15.9)
1256 IF(C.LT.0.1d-7) GO TO 12
1262 C************************** END PARINV *************************************
1264 * quark-quark scattering differential cross section
1265 double precision FUNCTION PLSIGH(Z)
1266 IMPLICIT DOUBLE PRECISION(A-H, O-Z)
1267 common /plpar1/ tau0,T0,TC,sigqq,AW,RA,mvisc,nf
1270 beta=(33.d0-2.d0*nf)/(12.d0*pi)
1271 alfs=1.d0/(beta*dlog(max(1.d-10,z/(TC*TC))))
1272 PLSIGH=8.d0*pi*alfs*alfs/(9.d0*z*z)
1276 * differential radiated gluon spectrum in BDMS model
1277 double precision FUNCTION PLFUN1(or)
1278 IMPLICIT DOUBLE PRECISION(A-H, O-Z)
1279 common /plpar1/ tau0,T0,TC,sigqq,AW,RA,mvisc,nf
1280 common /pljdat/ ej, z, ygl, alfs, um, epa
1281 common /pleave/ taul, temlev
1282 common /factor/ cfac, kf
1283 save /plpar1/,/pljdat/,/pleave/,/factor/
1285 x=min((1.d0-ygl*z/or),or/ej)
1286 if(x.le.0.d0) x=0.d0
1287 if(x.ge.1.d0) x=0.9999d0
1289 if(x.ge.0.5d0) x=1.d0-x
1290 spinf=0.5d0*(1.+(1.d0-x)**4+x**4)/(1.d0-x)
1292 spinf=1.d0-x+0.5d0*x*x
1294 ak=ygl*z/(or*(1.d0-x))
1296 uu=0.5d0*al*dsqrt(abs(0.5d0*(1.d0-x+cfac*x*x)*ak*
1297 > dlog(max(16.d0/ak,1.d-10))))/ygl
1298 * if quark production outside the QGP then
1299 * arg=(((dsin(uu)*cosh(uu))**2)+((dcos(uu)*sinh(uu))**2))/(2.d0*uu*uu);
1300 * here quark production inside the QGP
1301 arg=((dcos(uu)*cosh(uu))**2)+((dsin(uu)*sinh(uu))**2)
1302 gl1=(ygl/(cfac*z))**0.3333333d0
1303 gl2=(um/epa)**1.333333d0
1304 dc=1.d0/((1.d0+((gl1*gl2*or)**1.5d0))**2) ! massive parton
1305 c dc=1.d0 !massless parton
1306 plfun1=dc*3.d0*alfs*ygl*dlog(max(arg,1.d-20))*spinf/(pi*al*or)
1310 * angular distribution of emitted gluons
1311 double precision function gluang(x)
1312 IMPLICIT DOUBLE PRECISION(A-H, O-Z)
1314 gluang=x*dexp(-1.d0*(x-s)*(x-s)/(2.d0*s*s))
1318 * temperature-dependence of parton-plasma integral cross section
1319 double precision FUNCTION PLS(X)
1320 IMPLICIT DOUBLE PRECISION(A-H, O-Z)
1322 common /plpar1/ tau0,T0,TC,sigqq,AW,RA,mvisc,nf
1323 common /plpar2/ pln0,taupl,tauh,sigpl,sigh,sigplh,sigqqh,rg,rgn
1324 common /plen/ epartc, um
1325 save /plpar1/,/plpar2/,/plen/
1329 alf=6.d0*pi/((33.d0-2.d0*nf)*dlog(max(bub,1.d-10)))
1330 ZZ0=4.d0*t*t*pi*alf*(1.d0+nf/6.d0)
1331 scm=4.d0*t*epartc+um*um+4.d0*t*t
1332 ZZ1=max((scm-((um+2.d0*t)**2))*(scm-((um-2.d0*t)**2))/scm,ZZ0)
1336 CALL SIMPA(ZZ0,ZZ1,HH1,REPS,AEPS,plsigh,ZZ,RESS,AIH,AIABS)
1337 PLS=0.39d0*2.25d0*2.25d0*RESS*(16.d0+4.d0*nf)/(16.d0+9.d0*nf)
1341 * temperature-dependence of QGP viscosity (if mvisc=1,2)
1342 double precision FUNCTION PLVISC(X)
1343 IMPLICIT DOUBLE PRECISION(A-H, O-Z)
1344 common /plpar1/ tau0,T0,TC,sigqq,AW,RA,mvisc,nf
1352 elseif(mvisc.eq.1) then
1353 a=3.4d0*(1.d0+0.12d0*(2.d0*nf+1.d0))
1354 b=15.d0*(1.d0+0.06d0*nf)
1355 c=4.d0*pi*pi*(10.5d0*nf/a+16.d0/b)/675.d0
1357 c=(1.7d0*nf+1.d0)*0.342d0/(1.d0+nf/6.d0)
1360 alf=6.d0*pi/((33.d0-2.d0*nf)*dlog(max(bub,1.d-10)))
1362 PLVISC=c*(T**3)/(alf*alf*dlog(max(1.d-10,alf1)))
1366 * space-time dependence of QGP number density
1367 double precision FUNCTION PLN(X,r1,r2,y)
1368 IMPLICIT DOUBLE PRECISION(A-H, O-Z)
1370 common /plpar1/ tau0,T0,TC,sigqq,AW,RA,mvisc,nf
1371 common /plpar2/ pln0,taupl,tauh,sigpl,sigh,sigplh,sigqqh,rg,rgn
1372 common /plevol/ taup(5000),temp(5000),denp(5000),enep(5000)
1373 common /pythic/ PBAB(110),PTAB(110),PTAAB(110)
1374 save /plpar1/,/plpar2/,/plevol/,/pythic/
1378 call parinv(t,taup,denp,5000,res)
1380 res=1.2d0*(16.d0+9.d0*nf)*((5.06d0*TC)**3)/(pi*pi)
1382 res=res*(pythik(r1)*pythik(r2)*pi*RA*RA/PTAAB(1))**0.75d0
1383 res=res*dexp(-1.d0*y*y/24.5d0)
1388 * space-time dependence of QGP temperature
1389 double precision FUNCTION PLT(X,r1,r2,y)
1390 IMPLICIT DOUBLE PRECISION(A-H, O-Z)
1391 common /plpar1/ tau0,T0,TC,sigqq,AW,RA,mvisc,nf
1392 common /plpar2/ pln0,taupl,tauh,sigpl,sigh,sigplh,sigqqh,rg,rgn
1393 common /plevol/ taup(5000),temp(5000),denp(5000),enep(5000)
1394 common /pythic/ PBAB(110),PTAB(110),PTAAB(110)
1395 save /plpar1/,/plpar2/,/plevol/,/pythic/
1399 call parinv(t,taup,temp,5000,res)
1403 res=res*(pythik(r1)*pythik(r2)*pi*RA*RA/PTAAB(1))**0.25d0
1404 res=res*(dexp(-1.d0*y*y/24.5d0))**0.333333d0
1409 * impact parameter dependence of jet production cross section
1410 double precision function funbip(x)
1411 IMPLICIT DOUBLE PRECISION(A-H, O-Z)
1413 common /pyint7/ sigt(0:6,0:6,0:5)
1416 sigin=sigt(0,0,0)-sigt(0,0,1)
1418 funbip=taa*br*(1.d0-dexp(-0.1d0*taa*sigin))
1422 * distribution over jet production vertex position
1423 double precision FUNCTION plthik(X)
1424 IMPLICIT DOUBLE PRECISION(A-H, O-Z)
1426 common /parimp/ b1, psib1, rb1, rb2, noquen
1429 r12=dsqrt(abs(bu*bu+b1*b1/4.d0+bu*b1*dcos(psib1)))
1430 r22=dsqrt(abs(bu*bu+b1*b1/4.d0-bu*b1*dcos(psib1)))
1431 PLTHIK=bu*pythik(r12)*pythik(r22)
1435 * nuclear overlap function at impact parameter b
1436 double precision function ftaa(r)
1437 IMPLICIT DOUBLE PRECISION(A-H, O-Z)
1438 common /pythic/ PBAB(110),PTAB(110),PTAAB(110)
1440 call parinv(r,PBAB,PTAAB,110,RES)
1445 double precision function PFUNC1(x)
1446 IMPLICIT DOUBLE PRECISION(A-H, O-Z)
1448 common /pynup1/ bp,xx
1449 common /plpar1/ tau0,T0,TC,sigqq,AW,RA,mvisc,nf
1456 CALL SIMPB(A,B,H,EPS,1.d-8,PFUNC2,Y,RES,AIH,AIABS)
1461 double precision function PFUNC2(y)
1462 IMPLICIT DOUBLE PRECISION(A-H, O-Z)
1464 common /pynup1/ bp,x
1465 r1=sqrt(abs(y*y+bp*bp/4.+y*bp*cos(x)))
1466 r2=sqrt(abs(y*y+bp*bp/4.-y*bp*cos(x)))
1467 PFUNC2=y*pythik(r1)*pythik(r2)
1471 * nuclear thickness function
1472 double precision function pythik(r)
1473 IMPLICIT DOUBLE PRECISION(A-H, O-Z)
1474 common /pythic/ PBAB(110),PTAB(110),PTAAB(110)
1476 call parinv(r,PBAB,PTAB,110,RES)
1481 * Wood-Saxon nucleon distrubution
1482 double precision function prhoaa(z)
1483 IMPLICIT DOUBLE PRECISION(A-H, O-Z)
1484 common /plpar1/ tau0,T0,TC,sigqq,AW,RA,mvisc,nf
1486 save /plpar1/,/pygeom/
1490 rho0=3.d0/(4.d0*pi*RA**3)/(1.d0+(pi*df/RA)**2)
1491 prhoaa=rho0/(1.d0+exp((r-RA)/df))
1495 * function to generate gauss distribution
1496 double precision function gauss(x0,sig)
1497 IMPLICIT DOUBLE PRECISION(A-H, O-Z)
1504 gauss=v1*dsqrt(-2.d0*dlog(s)/s)*sig+x0
1507 **************************************************************************