File indexing completed on 2024-04-06 12:14:07
0001 #ifdef __QGSJETII03__
0002 #define __QGSJETII__
0003 #elif __QGSJETII04__
0004 #define __QGSJETII__
0005 #endif
0006
0007 subroutine NumberModel(cmodel,model)
0008 character cmodel*21
0009 n=index(cmodel,' ')-1
0010 if(cmodel(1:n).eq.'epos' ) model=1
0011 if(cmodel(1:n).eq.'qgsjet' )then
0012 #ifndef __QGSJET01__
0013 stop'please compile with requested model'
0014 #endif
0015 model=2
0016 endif
0017 if(cmodel(1:n).eq.'gheisha' )then
0018 #ifndef __GHEISHA__
0019 stop'please compile with requested model'
0020 #endif
0021 model=3
0022 endif
0023 if(cmodel(1:n).eq.'pythia' )then
0024 #ifndef __PYTHIA__
0025 stop'please compile with requested model'
0026 #endif
0027 model=4
0028 endif
0029 if(cmodel(1:n).eq.'hijing' )then
0030 #ifndef __HIJING__
0031 stop'please compile with requested model'
0032 #endif
0033 model=5
0034 endif
0035 if(cmodel(1:n).eq.'sibyll' )then
0036 #ifndef __SIBYLL__
0037 stop'please compile with requested model'
0038 #endif
0039 model=6
0040 endif
0041 if(cmodel(1:n).eq.'IIqgsjet' )then
0042 #ifndef __QGSJETII__
0043 stop'please compile with requested model.'
0044 #endif
0045 model=7
0046 endif
0047 if(cmodel(1:n).eq.'phojet' )then
0048 #ifndef __PHOJET__
0049 stop'please compile with requested model'
0050 #endif
0051 model=8
0052 endif
0053 if(cmodel(1:n).eq.'fluka' )then
0054 #ifndef __FLUKA__
0055 stop'please compile with requested model'
0056 #endif
0057 model=9
0058 endif
0059 end
0060
0061 subroutine IniModel(model)
0062 if(model.eq.2) then
0063 #ifndef __QGSJET01__
0064 stop'please compile with requested model'
0065 #else
0066 call IniQGSjet
0067 #endif
0068 endif
0069 if(model.eq.3) then
0070 #ifndef __GHEISHA__
0071 stop'please compile with requested model'
0072 #else
0073 call IniGheisha
0074 #endif
0075 endif
0076 if(model.eq.4) then
0077 #ifndef __PYTHIA__
0078 stop'please compile with requested model'
0079 #else
0080 call IniPythia
0081 #endif
0082 endif
0083 if(model.eq.5) then
0084 #ifndef __HIJING__
0085 stop'please compile with requested model'
0086 #else
0087 call IniHijing
0088 #endif
0089 endif
0090 if(model.eq.6) then
0091 #ifndef __SIBYLL__
0092 stop'please compile with requested model'
0093 #else
0094 call IniSibyll
0095 #endif
0096 endif
0097 if(model.eq.7) then
0098 #ifndef __QGSJETII04__
0099 stop'please compile with requested model.'
0100 #else
0101 call IniQGSJetII
0102 #endif
0103 endif
0104 if(model.eq.11) then
0105 #ifndef __QGSJETII03__
0106 stop'please compile with requested model .'
0107 #else
0108 call IniQGSJetII
0109 #endif
0110 endif
0111 if(model.eq.8) then
0112 #ifndef __PHOJET__
0113 stop'please compile with requested model'
0114 #else
0115 call IniPHOJET
0116 #endif
0117 endif
0118 if(model.eq.9) then
0119 #ifndef __FLUKA__
0120 stop'please compile with requested model'
0121 #else
0122 call IniFluka
0123 #endif
0124 endif
0125 end
0126
0127 subroutine IniEvtModel
0128 include 'epos.inc'
0129 iclegy=1 !to avoid crash in plots
0130 if(model.eq.2)then
0131 #ifndef __QGSJET01__
0132 stop'please compile with requested model'
0133 #else
0134 call IniEvtQGS
0135 #endif
0136 endif
0137 if(model.eq.3)then
0138 #ifndef __GHEISHA__
0139 stop'please compile with requested model'
0140 #else
0141 call IniEvtGhe
0142 #endif
0143 endif
0144 if(model.eq.4)then
0145 #ifndef __PYTHIA__
0146 stop'please compile with requested model'
0147 #else
0148 engysave=engy
0149 if(engy.lt.egymin)engy=egymin
0150 call IniEvtPyt
0151 engy=engysave
0152 #endif
0153 endif
0154 if(model.eq.5)then
0155 #ifndef __HIJING__
0156 stop'please compile with requested model'
0157 #else
0158 engysave=engy
0159 if(engy.lt.egymin)engy=egymin
0160 call IniEvtHij
0161 engy=engysave
0162 #endif
0163 endif
0164 if(model.eq.6)then
0165 #ifndef __SIBYLL__
0166 stop'please compile with requested model'
0167 #else
0168 call IniEvtSib
0169 #endif
0170 endif
0171 if(model.eq.7)then
0172 #ifndef __QGSJETII04__
0173 stop'please compile with requested model'
0174 #else
0175 call IniEvtQGSII
0176 #endif
0177 endif
0178 if(model.eq.11)then
0179 #ifndef __QGSJETII03__
0180 stop'please compile with requested model'
0181 #else
0182 call IniEvtQGSII
0183 #endif
0184 endif
0185 if(model.eq.8)then
0186 #ifndef __PHOJET__
0187 stop'please compile with requested model'
0188 #else
0189 call IniEvtPho
0190 #endif
0191 endif
0192 if(model.eq.9)then
0193 #ifndef __FLUKA__
0194 stop'please compile with requested model'
0195 #else
0196 call IniEvtFlu
0197 #endif
0198 endif
0199 end
0200
0201 subroutine emsaaaModel(model,id,iret)
0202 if (0.eq.1) print *, id, iret !get rid of unused warning
0203 if(model.eq.2) then
0204 #ifndef __QGSJET01__
0205 stop'please compile with requested model'
0206 #else
0207 if(id.eq.0)call IniEvtQGS
0208 call emsqgs(iret)
0209 #endif
0210 endif
0211 if(model.eq.3) then
0212 #ifndef __GHEISHA__
0213 stop'please compile with requested model'
0214 #else
0215 call emsghe(iret)
0216 #endif
0217 endif
0218 if(model.eq.4) then
0219 #ifndef __PYTHIA__
0220 stop'please compile with requested model'
0221 #else
0222 call emspyt(iret,0)
0223 #endif
0224 endif
0225 if(model.eq.5) then
0226 #ifndef __HIJING__
0227 stop'please compile with requested model'
0228 #else
0229 call emshij(iret)
0230 #endif
0231 endif
0232 if(model.eq.6) then
0233 #ifndef __SIBYLL__
0234 stop'please compile with requested model'
0235 #else
0236 call emssib(iret)
0237 #endif
0238 endif
0239 if(model.eq.7) then
0240 #ifndef __QGSJETII04__
0241 stop'please compile with requested model'
0242 #else
0243 if(id.eq.0)call IniEvtQGSII
0244 call emsqgsII(iret)
0245 #endif
0246 endif
0247 if(model.eq.11) then
0248 #ifndef __QGSJETII03__
0249 stop'please compile with requested model'
0250 #else
0251 if(id.eq.0)call IniEvtQGSII
0252 call emsqgsII(iret)
0253 #endif
0254 endif
0255 if(model.eq.8) then
0256 #ifndef __PHOJET__
0257 stop'please compile with requested model'
0258 #else
0259 call emspho(iret)
0260 #endif
0261 endif
0262 if(model.eq.9) then
0263 #ifndef __FLUKA__
0264 stop'please compile with requested model'
0265 #else
0266 call emsflu(iret)
0267 #endif
0268 endif
0269 end
0270
0271
0272 subroutine crseaaModel(sigt,sigi,sigc,sige)
0273 include 'epos.inc'
0274 sigt=0.
0275 sigc=0.
0276 sigi=0.
0277 sige=0.
0278 if(model.eq.3.or.model.eq.4.or.model.eq.8)return !no AA with Gheisha, Pythia, Phojet
0279 if(idtarg.eq.0.and.model.ne.9)then
0280 kmax=3
0281 if(model.eq.6)kmax=2 !no Argon with SIBYLL
0282 do k=1,kmax
0283 matarg=int(airanxs(k))
0284 call crseaaModel0(xsigt,xsigi,xsigc,xsige)
0285 sigt=sigt+airwnxs(k)*xsigt
0286 sigi=sigi+airwnxs(k)*xsigi
0287 sigc=sigc+airwnxs(k)*xsigc
0288 sige=sige+airwnxs(k)*xsige
0289 enddo
0290 else
0291 call crseaaModel0(sigt,sigi,sigc,sige)
0292 endif
0293 end
0294
0295 subroutine crseaaModel0(sigt,sigi,sigc,sige)
0296 include 'epos.inc'
0297
0298 double precision GTOT,GPROD,GABS,GDD,GQEL,GCOH
0299 double precision e0
0300 dimension dumdif(3)
0301 if(model.eq.2)then
0302 #ifndef __QGSJET01__
0303 stop'please compile with requested model'
0304 print *, GTOT,GPROD,GABS,GDD,GQEL,GCOH,sigt,sigi,sigc,sige,e0 !get rid of unused warning
0305 #else
0306 NITER=5000
0307 if(idtarg.eq.0)then
0308 e0=dble(elab)
0309 icp=idtrafo('nxs','qgs',idproj)
0310 call xxaini(e0,icp,maproj,matarg)
0311 endif
0312 CALL CROSSC(NITER,GTOT,GPROD,GABS,GDD,GQEL,GCOH)
0313 sigt=sngl(GTOT)
0314 sigi=sngl(GPROD)
0315 sigc=sngl(GABS)
0316 sige=sigt-sigi
0317 #endif
0318 elseif(model.eq.3)then
0319 #ifndef __GHEISHA__
0320 stop'please compile with requested model'
0321 #else
0322 idtar=idtarg
0323 if(idtarg.eq.0)idtar=1120
0324 call ghecrse(ekin,idproj,idtar,latarg,matarg,sigi,sige)
0325 sigt=sigi+sige
0326 sigc=sigi
0327 #endif
0328 elseif(model.eq.5)then
0329 #ifndef __HIJING__
0330 stop'please compile with requested model'
0331 #else
0332 call hjcrossc(sigi,sigt)
0333 #endif
0334 elseif(model.eq.6.and.maproj.eq.1)then
0335 #ifndef __SIBYLL__
0336 stop'please compile with requested model'
0337 print *, dumdif(3)!get rid of unused warning
0338 #else
0339 K=1
0340 if(iclpro.eq.1)then
0341 K=2
0342 elseif(iclpro.eq.3)then
0343 K=3
0344 endif
0345 CALL SIB_SIGMA_HP(K,engy,SSIG,dum0,dum1,dumdif,SLOPE,RHO)
0346 CALL GLAUBER(matarg,SSIG,SLOPE,RHO,sigt,sige,sigqel)
0347 sigi=sigt-sigqel
0348 sigc=sigi
0349 #endif
0350 elseif(model.eq.7.or.model.eq.11)then
0351 #ifndef __QGSJETII__
0352 stop'please compile with requested model'
0353 #else
0354 NITER=5000
0355 if(idtarg.eq.0)then
0356 e0=dble(elab)
0357 icp=idtrafo('nxs','qgs',idproj)
0358 call qgini(e0,icp,maproj,matarg)
0359 endif
0360 CALL qgcrossc(NITER,GTOT,GPROD,GABS,GDD,GQEL,GCOH)
0361 sigt=sngl(GTOT)
0362 sigi=sngl(GPROD)
0363 sigc=sngl(GABS)
0364 sige=sigt-sigi
0365 #endif
0366 elseif(model.eq.9)then
0367 #ifndef __FLUKA__
0368 stop'please compile with requested model'
0369 #else
0370 sigt=0.
0371 sige=0.
0372 sigc=0.
0373 sigi=flucrse(ekin,maproj,matarg,idtargin)
0374 #endif
0375 else
0376 sigt=0.
0377 sigi=0.
0378 sige=0.
0379 sigc=0.
0380 endif
0381 end
0382
0383
0384 subroutine m2XXFZ( a,b)
0385 double precision a,b
0386 #ifndef __QGSJET01__
0387 stop'please compile with requested model'
0388 print *, a, b !get rid of unused warning
0389 #else
0390 CALL XXFZ(a,b)
0391 #endif
0392 end
0393
0394 subroutine m3SIGMA(ek,idpro,idtar,latar,matar,sigi,sige)
0395 #ifndef __GHEISHA__
0396 stop'please compile with requested model'
0397 print *, ek,idpro,idtar,latar,matar,sigi,sige !get rid of unused warning
0398 #else
0399 call ghecrse(ek,idpro,idtar,latar,matar,sigi,sige)
0400 #endif
0401 end
0402
0403 subroutine m6SIGMA(icl,engy,stot,sela,sine,sdifr,slela,Rho)
0404 dimension sdifr0(3)
0405 #ifndef __SIBYLL__
0406 stop'please compile with requested model'
0407 print *, icl,engy,stot,sela,sine,sdifr,slela,Rho,sdifr0 !get rid of unused warning
0408 #else
0409 if(icl.eq.1)then
0410 L=2
0411 elseif(icl.eq.2)then
0412 L=1
0413 else
0414 L=3
0415 endif
0416 call SIB_SIGMA_HP(L,engy,stot,sela,sine,sdifr0,slela,Rho)
0417 sdifr=sdifr0(1)+sdifr0(2)+sdifr0(3)
0418 #endif
0419 end
0420
0421
0422 subroutine m7SIGMA(stot,scut,sine,slela)
0423 double precision bmsave
0424 double precision GzZ0(5),pi,bm,amws
0425 common /qgarr1/ ia(2),icz,icp
0426 common /qgarr6/ pi,bm,amws
0427 #ifndef __QGSJETII__
0428 stop'please compile with requested model QII'
0429 print *, stot,scut,sine,slela,bmsave,GzZ0(5),pi,bm,amws !get rid of unused warning
0430 #else
0431 ia2save=ia(2)
0432 bmsave=bm
0433 ia(2)=1
0434 call qgfz(0.d0,gzz0,0,0)
0435 scut=sngl(gzz0(2))/2. !cut pomerons cross-section
0436 stot=sngl(gzz0(1)) !tot cross-section
0437 sine=sngl(gzz0(2)+gzz0(3)+gzz0(4))/2. !inelastic cross section
0438 slela=sngl(gzz0(5))
0439 ia(2)=ia2save
0440 bm=bmsave
0441 #endif
0442 end
0443
0444 subroutine m8SIGMA(stot,scut,sine,sela,slela,ssd)
0445
0446 INTEGER IPFIL,IFAFIL,IFBFIL
0447 DOUBLE PRECISION SIGTOT,SIGELA,SIGVM,SIGINE,SIGNDF,SIGDIR,
0448 & SIGLSD,SIGHSD,SIGLDD,SIGHDD,SIGCDF,
0449 & SIGPOM,SIGREG,SIGHAR,SIGTR1,SIGTR2,SIGLOO,
0450 & SIGDPO,SIG1SO,SIG1HA,SLOEL,SLOVM,SIGCOR,
0451 & FSUP,FSUD,FSUH,ECMFIL,P2AFIL,P2BFIL
0452 COMMON /POCSEC/ SIGTOT,SIGELA,SIGVM(0:4,0:4),SIGINE,SIGNDF,SIGDIR,
0453 & SIGLSD(2),SIGHSD(2),SIGLDD,SIGHDD,SIGCDF(0:4),
0454 & SIGPOM,SIGREG,SIGHAR,SIGTR1(2),SIGTR2(2),SIGLOO,
0455 & SIGDPO(4),SIG1SO,SIG1HA,SLOEL,SLOVM(4,4),SIGCOR,
0456 & FSUP(2),FSUD(2),FSUH(2),ECMFIL,P2AFIL,P2BFIL,
0457 & IPFIL,IFAFIL,IFBFIL
0458 #ifndef __PHOJET__
0459 stop'please compile with requested model'
0460 print *, stot,scut,sine,sela,slela,ssd !get rid of unused warning
0461 #else
0462 stot=sngl(SIGTOT)
0463 sine=sngl(SIGTOT-SIGELA)
0464 sela=sngl(SIGELA)
0465 slela=sngl(SLOEL)
0466 ssd=sngl(SIGLSD(1)+SIGHSD(1)+SIGLSD(2)+SIGHSD(2))
0467 sdd=sngl(SIGLDD+SIGHDD)
0468 scut=sine-ssd-sdd-sngl(SIGCDF(0))
0469 #endif
0470 end
0471
0472 subroutine m9SIGMA(stot,sine,sela)
0473 include "epos.inc"
0474 double precision PLA,EKIN1,SHPTOT,SHPINE,ZZ,AA,Sel,Zl
0475 #ifndef __FLUKA__
0476 stop'please compile with requested model'
0477 print *, stot,sine,sela
0478 * ,PLA,EKIN1,SHPTOT,SHPINE,ZZ,AA,Sel,Zl !get rid of unused warning
0479 #else
0480 if(iclpro.eq.1)then
0481 IP=13
0482 elseif(iclpro.eq.2)then
0483 IP=1
0484 else
0485 IP=15
0486 endif
0487 PLA=dble(pnll)
0488 EKIN1=dble(ekin)
0489 ZZ=1
0490 AA=1
0491 stot=SHPTOT(IP,PLA)
0492 sine=SHPINE(IP,PLA)
0493 call SIGELH(IP,ZZ,AA,EKIN1,PLA,Sel,Zl)
0494 sela=sngl(Sel)
0495 #endif
0496 end
0497
0498 subroutine decaymod(ip,iret)
0499 include 'epos.inc'
0500 if(model.eq.4)then
0501 #ifndef __PYTHIA__
0502 stop'please compile with requested model'
0503 print *, ip,iret !get rid of unused warning
0504 #else
0505 call emspyt(iret,ip)
0506 #endif
0507 endif
0508 end