EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
example_4.f
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file example_4.f
1 C****************************************************************************
2 C Program # 3 from Comp. Phys. Commun. 83 (1994) 307
3 C by M. Gyulassy and X-.N. Wang
4 C Modified by V.Uzhinsky, CERN, Oct. 2003
5 C***************************************************************************
6 
7  CHARACTER frame*8,proj*8,targ*8
8 
9  common/hiparnt/hipr1(100),ihpr2(50),hint1(100),ihnt2(50)
10  SAVE /hiparnt/
11 
12  common/ranseed/nseed
13  SAVE /ranseed/
14 
15  CHARACTER *1 key
16 
17  nseed=0
18 
19 C....switch on triggered jet production:
20  ihpr2(3)=1
21 
22  frame='CMS'
23 
24  write(6,*)'===================================================='
25  write(6,*)' Simulation of events with triggered hard processes '
26  write(6,*)' in hh-, hA- and AA-collisions '
27  write(6,*)' Calculation will be performed in CM System '
28  write(6,*)'===================================================='
29 
30  write(6,*)
31  write(6,*)'Enter the energy per NN-collision (GeV)'
32  read(5,*) efrm
33 
34  write(6,*)
35  write(6,*)'Enter a type of the "projectile" particle'
36  write(6,*)
37  write(6,*)' P proton, PBAR anti-proton,'
38  write(6,*)' N neutron, NBAR anti-neutron,'
39  write(6,*)' PI+ - positive pion, PI- negative pion,'
40  write(6,*)' K+ positive kaon, K- negative kaon'
41  write(6,*)
42  write(6,*)' A - nucleus --------------------------'
43 
44  read(5,1) proj
45 1 format(a8)
46 
47  if(proj.ne.'A') then
48  iap=1
49  if(proj.eq.'P' ) izp= 1
50  if(proj.eq.'PBAR') izp=-1
51  if(proj.eq.'N' ) izp= 0
52  if(proj.eq.'NBAR') izp= 0
53  if(proj.eq.'PI+' ) izp= 1
54  if(proj.eq.'PI-' ) izp=-1
55  if(proj.eq.'K+' ) izp= 1
56  if(proj.eq.'K-' ) izp=-1
57  else
58  write(6,*)
59  write(6,*)'Enter mass number and charge of the proj. nucleus'
60  read(5,*) iap, izp
61  endif
62 
63  write(6,*)
64  write(6,*)'Enter a type of the "target" particle (same notations)'
65  read(5,1) targ
66 
67  if(targ.ne.'A') then
68  iat=1
69  if(targ.eq.'P' ) izt= 1
70  if(targ.eq.'PBAR') izt=-1
71  if(targ.eq.'N' ) izt= 0
72  if(targ.eq.'NBAR') izt= 0
73  if(targ.eq.'PI+' ) izt= 1
74  if(targ.eq.'PI-' ) izt=-1
75  if(targ.eq.'K+' ) izt= 1
76  if(targ.eq.'K-' ) izt=-1
77  else
78  write(6,*)
79  write(6,*)'Enter mass number and charge of the target nucleus'
80  read(5,*) iat, izt
81  endif
82 
83  if(proj.eq.'A'.or.targ.eq.'A') then
84  write(6,*)'Enter Min. and Max. values of impact parameter (fm)'
85  read(5,*) bmin, bmax
86  else
87  bmin=0.0
88  bmax=0.0
89  endif
90 
91  if(proj.eq.'A'.or.targ.eq.'A') then
92  write(6,*)
93  write(6,*)' Would you like to take jet quenching into account?'
94  write(6,*)' Y - Yes, N - No? '
95 
96  read(5,2) key
97 2 format(a1)
98 
99  if(key.eq.'Y'.or.key.eq.'y') then
100  ihpr2(4)=1
101  else
102  ihpr2(4)=0
103  endif
104  endif
105 
106 C....set the pt range of the triggered jets:
107  write(6,*)
108  write(6,*)' Set the Pt of triggered jets (in GeV/c)'
109  read(5,*) pt_trigger
110 
111  write(6,*)
112  write(6,*)'Enter number of events'
113  read(5,*) n_events
114 
115 C....initialize HIJING for requested interactions
116  CALL hijset(efrm,frame,proj,targ,iap,izp,iat,izt)
117 
118  write(6,*)' Simulation of interactions with'
119  write(6,*)
120  write(6,*)' Proj = ',proj,' and Targ = ',targ
121  write(6,*)' IAP =',iap ,' IAT =',iat
122  write(6,*)' IZP =',izp ,' IZT =',izt
123  write(6,*)
124  write(6,*)' Reference frame - ',frame
125  write(6,*)' ENERGY ',efrm,' GeV'
126  write(6,*)' Number of generated events',n_events
127  write(6,*)' Triggered jets Pt =>',pt_trigger,' (GeV/c)'
128  write(6,*)
129 
130  DO 100 i_event=1,n_events
131 
132  write(6,*)'Event # ',i_event,' -------------------------'
133  write(6,*)
134 
135  hipr1(10)=-pt_trigger
136 
137  CALL hijing(frame,bmin,bmax)
138 
139 C....print out flavor code of the first jet:
140  write(6,*)'Flavor code of the first jet: ',ihnt2(9)
141 
142 C....and its four momentum:
143  write(6,*)' Px Py Pz',
144  ,' E (GeV/c, GeV)'
145  write(6,3)hint1(21),hint1(22),hint1(23),hint1(24)
146 3 format(4(e11.4,2x))
147  write(6,*)
148 
149 C....print out flavor code of the second jet:
150  write(6,*)'Flavor code of the second jet:',ihnt2(10)
151 
152 C....and its four momentum:
153  write(6,*)' Px Py Pz',
154  ,' E (GeV/c, GeV)'
155  write(6,3)hint1(31),hint1(32),hint1(33),hint1(34)
156  write(6,*)
157 
158  pause
159 100 CONTINUE
160 
161  stop
162  END
163 
164  FUNCTION ran(NSEED)
165  ran=rlu(nseed)
166  RETURN
167  END