2 SUBROUTINE star(kw,mass,mt,tm,tn,tscls,lums,GB,zpars)
12 real*8 mass,mt,tm,tn,tscls(20),lums(10),gb(10),zpars(20)
13 real*8 tgb,tbagb,mch,mcmax,mc1,mc2,mcbagb,dx,am
14 real*8 lambda,tau,mtc,mass0
61 if(mass0.gt.100.d0) mass = 100.d0
63 if(kw.ge.7.and.kw.le.9) goto 90
69 if(mass.gt.0.01.and.mass.lt.8.0)
then
70 tscls(15)=43.628d0-(35.835d0*mass**1.5029d-2)*
72 tscls(15)=10.d0**tscls(15)/1.0d+06
77 tscls(1) =
tbgbf(mass)
78 tm = max(zpars(8),
thookf(mass))*tscls(1)
87 gb(1) = max(-4.8d0,min(-5.7d0+0.8d0*mass,-4.1d0+0.14d0*mass))
91 gb(3) = max(3.0d+04,500.d0 + 1.75d+04*mass**0.6d0)
96 elseif(mass.lt.2.5)
then
97 dx = zpars(6) - (0.975d0*zpars(6) - 0.18d0*2.5d0)
98 gb(4) = zpars(6) - dx*(mass - 2.d0)/(0.5d0)
99 gb(5) = 6.d0 - (mass - 2.d0)/(0.5d0)
100 gb(6) = 3.d0 - (mass - 2.d0)/(0.5d0)
102 gb(4) = max(-1.d0,0.5d0*zpars(6) - 0.06d0*mass)
103 gb(4) = max(gb(4),0.975d0*zpars(6) - 0.18d0*mass)
108 gb(7) = (gb(3)/gb(4))**(1.d0/(gb(5)-gb(6)))
111 lums(6) = gb(4)*gb(7)**gb(5)
114 lums(4) =
lheif(mass,zpars(2))
115 lums(7) =
lbagbf(mass,zpars(2))
117 if(mass.lt.0.1d0.and.kw.le.1)
then
118 tscls(2) = 1.1d0*tscls(1)
119 tscls(3) = 0.1d0*tscls(1)
120 lums(3) =
lbgbf(mass)
124 if(mass.le.zpars(3))
then
126 lums(3) =
lbgbf(mass)
128 tscls(4) = tscls(1) + (1.d0/((gb(5)-1.d0)*gb(1)*gb(4)))*
129 & ((gb(4)/lums(3))**((gb(5)-1.d0)/gb(5)))
130 tscls(6) = tscls(4) - (tscls(4) - tscls(1))*((lums(3)/lums(6))
131 & **((gb(5)-1.d0)/gb(5)))
132 tscls(5) = tscls(6) + (1.d0/((gb(6)-1.d0)*gb(1)*gb(3)))*
133 & ((gb(3)/lums(6))**((gb(6)-1.d0)/gb(6)))
135 if(lums(4).le.lums(6))
then
136 tscls(2) = tscls(4) - (1.d0/((gb(5)-1.d0)*gb(1)*gb(4)))*
137 & ((gb(4)/lums(4))**((gb(5)-1.d0)/gb(5)))
139 tscls(2) = tscls(5) - (1.d0/((gb(6)-1.d0)*gb(1)*gb(3)))*
140 & ((gb(3)/lums(4))**((gb(6)-1.d0)/gb(6)))
142 tgb = tscls(2) - tscls(1)
143 if(mass.le.zpars(2))
then
144 mc1 =
mcgbf(lums(4),gb,lums(6))
146 lums(5) =
lzahbf(mass,mc1,zpars(2))
147 tscls(3) =
thef(mass,mc1,zpars(2))
149 lums(5) =
lhef(mass)*lums(4)
150 tscls(3) =
thef(mass,1.d0,zpars(2))*tscls(1)
157 tscls(3) =
thef(mass,1.d0,zpars(2))*tscls(1)
166 if(mass.le.zpars(2))
then
167 gb(9) =
mcgbf(lums(3),gb,lums(6))
168 elseif(mass.le.zpars(3))
then
169 gb(9) =
mcheif(mass,zpars(2),zpars(9))
171 gb(9) =
mcheif(mass,zpars(2),zpars(10))
176 tbagb = tscls(2) + tscls(3)
177 tscls(7) = tbagb + (1.d0/((gb(5)-1.d0)*gb(8)*gb(4)))*
178 & ((gb(4)/lums(7))**((gb(5)-1.d0)/gb(5)))
179 tscls(9) = tscls(7) - (tscls(7) - tbagb)*((lums(7)/lums(6))
180 & **((gb(5)-1.d0)/gb(5)))
181 tscls(8) = tscls(9) + (1.d0/((gb(6)-1.d0)*gb(8)*gb(3)))*
182 & ((gb(3)/lums(6))**((gb(6)-1.d0)/gb(6)))
188 if(mc1.ge.0.8d0.and.mc1.lt.2.25d0)
then
190 mc1 = 0.44d0*mc1 + 0.448d0
194 tscls(13) = tscls(7) - (1.d0/((gb(5)-1.d0)*gb(8)*gb(4)))*
195 & (mc1**(1.d0-gb(5)))
197 tscls(13) = tscls(8) - (1.d0/((gb(6)-1.d0)*gb(8)*gb(3)))*
198 & (mc1**(1.d0-gb(6)))
204 tscls(10) = tscls(13) + (1.d0/((gb(5)-1.d0)*gb(2)*gb(4)))*
205 & ((gb(4)/lums(8))**((gb(5)-1.d0)/gb(5)))
206 tscls(12) = tscls(10) - (tscls(10) - tscls(13))*
207 & ((lums(8)/lums(6))**((gb(5)-1.d0)/gb(5)))
208 tscls(11) = tscls(12) + (1.d0/((gb(6)-1.d0)*gb(2)*gb(3)))*
209 & ((gb(3)/lums(6))**((gb(6)-1.d0)/gb(6)))
213 tscls(11) = tscls(13) + (1.d0/((gb(6)-1.d0)*gb(2)*gb(3)))*
214 & ((gb(3)/lums(8))**((gb(6)-1.d0)/gb(6)))
218 tau = tscls(2) + tscls(3)
219 mc2 =
mcgbtf(tau,gb(8),gb,tscls(7),tscls(8),tscls(9))
220 mcmax = max(max(mch,0.773d0*mcbagb - 0.35d0),1.05d0*mc2)
223 if(mcmax.le.gb(7))
then
224 tscls(14) = tscls(7) - (1.d0/((gb(5)-1.d0)*gb(8)*gb(4)))*
225 & (mcmax**(1.d0-gb(5)))
227 tscls(14) = tscls(8) - (1.d0/((gb(6)-1.d0)*gb(8)*gb(3)))*
228 & (mcmax**(1.d0-gb(6)))
233 lambda = min(0.9d0,0.3d0+0.001d0*mass**5)
234 mcmax = (mcmax - lambda*mc1)/(1.d0 - lambda)
235 if(mcmax.le.gb(7))
then
236 tscls(14) = tscls(10) - (1.d0/((gb(5)-1.d0)*gb(2)*gb(4)))*
237 & (mcmax**(1.d0-gb(5)))
239 tscls(14) = tscls(11) - (1.d0/((gb(6)-1.d0)*gb(2)*gb(3)))*
240 & (mcmax**(1.d0-gb(6)))
243 tscls(14) = max(tbagb,tscls(14))
244 if(mass.ge.100.d0)
then
256 if(abs(mt-mcbagb).lt.1.0d-14.and.kw.lt.5)
then
262 if(mt.gt.mcbagb.or.(mt.ge.mc1.and.kw.gt.4))
then
264 lambda = min(0.9d0,0.3d0+0.001d0*mass**5)
265 mc1 = (mt - lambda*mc1)/(1.d0 - lambda)
270 tn = tscls(10) - (1.d0/((gb(5)-1.d0)*gb(2)*gb(4)))*
271 & (mc1**(1.d0-gb(5)))
273 tn = tscls(11) - (1.d0/((gb(6)-1.d0)*gb(2)*gb(3)))*
274 & (mc1**(1.d0-gb(6)))
277 if(mass.gt.zpars(3))
then
278 mc1 =
mcheif(mass,zpars(2),zpars(10))
282 tn = tscls(2) + tscls(3)*((mt - mc1)/(mcbagb - mc1))
284 elseif(mass.le.zpars(2))
then
285 mc1 =
mcgbf(lums(3),gb,lums(6))
286 mc2 =
mcgbf(lums(4),gb,lums(6))
289 elseif(mt.le.mc2)
then
291 tn = tscls(4) - (1.d0/((gb(5)-1.d0)*gb(1)*gb(4)))*
294 tn = tscls(5) - (1.d0/((gb(6)-1.d0)*gb(1)*gb(3)))*
298 tn = tscls(2) + tscls(3)*((mt - mc2)/(mcbagb - mc2))
301 mc1 =
mcheif(mass,zpars(2),zpars(9))
302 mc2 =
mcheif(mass,zpars(2),zpars(10))
305 elseif(mt.le.mc2)
then
306 tn = tscls(1) + tgb*((mt - mc1)/(mc2 - mc1))
308 tn = tscls(2) + tscls(3)*((mt - mc2)/(mcbagb - mc2))
313 tn = min(tn,tscls(14))
326 lums(1) =
lzhef(mass)
327 am = max(0.d0,0.85d0-0.08d0*mass)
328 lums(2) = lums(1)*(1.d0+0.45d0+am)
334 gb(4) = 5.5d+04/(1.d0+0.4d0*mass**4)
337 gb(7) = (gb(3)/gb(4))**(1.d0/(gb(5)-gb(6)))
339 lums(6) = gb(4)*gb(7)**gb(5)
343 mc1 =
mcgbf(lums(2),gb,lums(6))
344 tscls(4) = tm + (1.d0/((gb(5)-1.d0)*gb(8)*gb(4)))*
346 tscls(6) = tscls(4) - (tscls(4) - tm)*((gb(7)/mc1)
348 tscls(5) = tscls(6) + (1.d0/((gb(6)-1.d0)*gb(8)*gb(3)))*
349 & gb(7)**(1.d0-gb(6))
352 mtc = min(mt,1.45d0*mt-0.31d0)
353 if(mtc.le.0.d0) mtc = mt
354 mcmax = min(mtc,max(mch,0.773d0*mass-0.35d0))
355 if(mcmax.le.gb(7))
then
356 tscls(14) = tscls(4) - (1.d0/((gb(5)-1.d0)*gb(8)*gb(4)))*
357 & (mcmax**(1.d0-gb(5)))
359 tscls(14) = tscls(5) - (1.d0/((gb(6)-1.d0)*gb(8)*gb(3)))*
360 & (mcmax**(1.d0-gb(6)))
362 tscls(14) = max(tscls(14),tm)