Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:21:20

0001 C*********************************************************************
0002  
0003 C...PYTUNE
0004 C...Presets for a few specific underlying-event and min-bias tunes
0005 C...Note some tunes require external pdfs to be linked (e.g. 105:QW), 
0006 C...others require particular versions of pythia (e.g. the SCI and GAL 
0007 C...models). See below for details.
0008       SUBROUTINE PYTUNE(ITUNE) 
0009 C
0010 C ITUNE    NAME (detailed descriptions below)
0011 C     0 Default : No settings changed => linked Pythia version's defaults.
0012 C ====== Old UE, Q2-ordered showers ==========================================
0013 C   100       A : Rick Field's CDF Tune A 
0014 C   101      AW : Rick Field's CDF Tune AW
0015 C   102      BW : Rick Field's CDF Tune BW
0016 C   103      DW : Rick Field's CDF Tune DW
0017 C   104     DWT : Rick Field's CDF Tune DW with slower UE energy scaling
0018 C   105      QW : Rick Field's CDF Tune QW (NB: needs CTEQ6.1M pdfs externally)
0019 C   106 ATLAS-DC2: Arthur Moraes' (old) ATLAS tune (ATLAS DC2 / Rome)
0020 C   107     ACR : Tune A modified with annealing CR
0021 C   108      D6 : Rick Field's CDF Tune D6 (NB: needs CTEQ6L pdfs externally)
0022 C   109     D6T : Rick Field's CDF Tune D6T (NB: needs CTEQ6L pdfs externally)
0023 C ====== Intermediate Models =================================================
0024 C   200    IM 1 : Intermediate model: new UE, Q2-ordered showers, annealing CR
0025 C   201     APT : Tune A modified to use pT-ordered final-state showers
0026 C ====== New UE, interleaved pT-ordered showers, annealing CR ================
0027 C   300      S0 : Sandhoff-Skands Tune 0 
0028 C   301      S1 : Sandhoff-Skands Tune 1
0029 C   302      S2 : Sandhoff-Skands Tune 2
0030 C   303     S0A : S0 with "Tune A" UE energy scaling
0031 C   304    NOCR : New UE "best try" without colour reconnections
0032 C   305     Old : New UE, original (primitive) colour reconnections
0033 C   306 ATLAS-CSC: Arthur Moraes' (new) ATLAS tune (needs CTEQ6L externally)
0034 C ======= The Uppsala models =================================================
0035 C   ( NB! must be run with special modified Pythia 6.215 version )
0036 C   ( available from http://www.isv.uu.se/thep/MC/scigal/        )
0037 C   400   GAL 0 : Generalized area-law model. Old parameters
0038 C   401   SCI 0 : Soft-Colour-Interaction model. Old parameters
0039 C   402   GAL 1 : Generalized area-law model. Tevatron MB retuned (Skands)
0040 C   403   SCI 1 : Soft-Colour-Interaction model. Tevatron MB retuned (Skands)
0041 C
0042 C More details;
0043 C
0044 C Quick Dictionary:
0045 C      BE : Bose-Einstein
0046 C      BR : Beam Remnants
0047 C      CR : Colour Reconnections
0048 C      HAD: Hadronization
0049 C      ISR/FSR: Initial-State Radiation / Final-State Radiation
0050 C      FSI: Final-State Interactions (=CR+BE)
0051 C      MB : Minimum-bias
0052 C      MI : Multiple Interactions
0053 C      UE : Underlying Event 
0054 C       
0055 C   A (100) and AW (101). Old UE model, Q2-ordered showers.
0056 C...*** NB : SHOULD BE RUN WITH PYTHIA 6.2 (e.g. 6.228) ***
0057 C...***      CAN ALSO BE RUN WITH PYTHIA 6.406+
0058 C...Key feature: extensively compared to CDF data (R.D. Field).
0059 C...* Large starting scale for ISR (PARP(67)=4)
0060 C...* AW has even more radiation due to smaller mu_R choice in alpha_s.
0061 C...* See: http://www.phys.ufl.edu/~rfield/cdf/
0062 C
0063 C   BW (102). Old UE model, Q2-ordered showers.
0064 C...*** NB : SHOULD BE RUN WITH PYTHIA 6.2 (e.g. 6.228) ***
0065 C...***      CAN ALSO BE RUN WITH PYTHIA 6.406+
0066 C...Key feature: extensively compared to CDF data (R.D. Field).
0067 C...NB: Can also be run with Pythia 6.2 or 6.312+
0068 C...* Small starting scale for ISR (PARP(67)=1)
0069 C...* BW has more radiation due to smaller mu_R choice in alpha_s.
0070 C...* See: http://www.phys.ufl.edu/~rfield/cdf/
0071 C
0072 C   DW (103) and DWT (104). Old UE model, Q2-ordered showers.
0073 C...*** NB : SHOULD BE RUN WITH PYTHIA 6.2 (e.g. 6.228) ***
0074 C...***      CAN ALSO BE RUN WITH PYTHIA 6.406+
0075 C...Key feature: extensively compared to CDF data (R.D. Field).
0076 C...NB: Can also be run with Pythia 6.2 or 6.312+
0077 C...* Intermediate starting scale for ISR (PARP(67)=2.5)
0078 C...* DWT has a different reference energy, the same as the "S" models
0079 C...  below, leading to more UE activity at the LHC, but less at RHIC.
0080 C...* See: http://www.phys.ufl.edu/~rfield/cdf/
0081 C
0082 C   QW (105). Old UE model, Q2-ordered showers.
0083 C...*** NB : SHOULD BE RUN WITH PYTHIA 6.2 (e.g. 6.228) ***
0084 C...***      CAN ALSO BE RUN WITH PYTHIA 6.406+
0085 C...Key feature: uses CTEQ61 (external pdf library must be linked)
0086 C
0087 C   ATLAS-DC2 (106). Old UE model, Q2-ordered showers.
0088 C...*** NB : SHOULD BE RUN WITH PYTHIA 6.2 (e.g. 6.228) ***
0089 C...***      CAN ALSO BE RUN WITH PYTHIA 6.406+
0090 C...Key feature: tune used by the ATLAS collaboration.
0091 C
0092 C   ACR (107). Old UE model, Q2-ordered showers, annealing CR.
0093 C...*** NB : SHOULD BE RUN WITH PYTHIA 6.412+    ***
0094 C...Key feature: Tune A modified to use annealing CR. 
0095 C...NB: PARP(85)=0D0 and amount of CR is regulated by PARP(78).
0096 C
0097 C   D6 (108) and D6T (109). Old UE model, Q2-ordered showers, CTEQ6L PDF.
0098 C...Key feature: Like DW and DWT but retuned to use CTEQ6L PDFs.
0099 C
0100 C...IM1 (200). Intermediate model, Q2-ordered showers.
0101 C...Key feature: new UE model with Q2-ordered showers and no interleaving.
0102 C...* "Rap" tune of hep-ph/0402078, modified with new annealing CR.
0103 C...* See: Sjostrand & Skands: JHEP 03(2004)053, hep-ph/0402078.
0104 C
0105 C...APT (201). Old UE model, pT-ordered final-state showers
0106 C...Key feature: Rick Field's Tune A, but with new final-state showers
0107 C
0108 C   S0 (300) and S0A (303). New UE model, pT-ordered showers. 
0109 C...Key feature: large amount of multiple interactions
0110 C...* Somewhat faster than the other colour annealing scenarios.
0111 C...* S0A has a faster energy scaling of the UE IR cutoff, borrowed 
0112 C...  from Tune A, leading to less UE at the LHC, but more at RHIC.
0113 C...* Small amount of radiation.
0114 C...* Large amount of low-pT MI
0115 C...* Low degree of proton lumpiness (broad matter dist.)
0116 C...* CR Type S (driven by free triplets), of medium strength.
0117 C...* See: Pythia6402 update notes or later.
0118 C
0119 C   S1 (301). New UE model, pT-ordered showers.
0120 C...Key feature: large amount of radiation.
0121 C...* Large amount of low-pT perturbative ISR
0122 C...* Large amount of FSR off ISR partons
0123 C...* Small amount of low-pT multiple interactions
0124 C...* Moderate degree of proton lumpiness
0125 C...* Least aggressive CR type (S+S Type I), but with large strength
0126 C...* See: Sandhoff & Skands: FERMILAB-CONF-05-518-T, in hep-ph/0604120.
0127 C
0128 C   S2 (302). New UE model, pT-ordered showers. 
0129 C...Key feature: very lumpy proton + gg string cluster formation allowed
0130 C...* Small amount of radiation
0131 C...* Moderate amount of low-pT MI
0132 C...* High degree of proton lumpiness (more spiky matter distribution)
0133 C...* Most aggressive CR type (S+S Type II), but with small strength
0134 C...* See: Sandhoff & Skands: FERMILAB-CONF-05-518-T, in hep-ph/0604120.
0135 C 
0136 C   NOCR (304). New UE model, pT-ordered showers.
0137 C...Key feature: no colour reconnections (NB: "Best fit" only).
0138 C...* NB: <pT>(Nch) problematic in this tune.
0139 C...* Small amount of radiation
0140 C...* Small amount of low-pT MI
0141 C...* Low degree of proton lumpiness
0142 C...* Large BR composite x enhancement factor
0143 C...* Most clever colour flow without CR ("Lambda ordering")
0144 C
0145 C   ATLAS-CSC (306). New UE mode, pT-ordered showers, CTEQ6L.
0146 C...Key feature: 11-parameter ATLAS tune of the new framework.
0147 C...* Old (pre-annealing) colour reconnections a la 305.
0148 C...* Uses CTEQ6 Leading Order PDFs (must be interfaced externally)
0149 C
0150 C...The GAL and SCI models (400+) are special and *SHOULD NOT* be run 
0151 C...with an unmodified Pythia distribution. 
0152 C...See http://www.isv.uu.se/thep/MC/scigal/ for more information.
0153 C
0154 C ::: + Future improvements?
0155 C        Include also QCD K-factor a la M. Heinz / ATLAS TDR ? RDF's QK?
0156 C       (problem: K-factor affects everything so only works as
0157 C        intended for min-bias, not for UE ... probably need a 
0158 C        better long-term solution to handle UE as well. Anyway,
0159 C        Mark uses MSTP(33) and PARP(31)-PARP(33).)
0160 
0161 C...Global statements
0162       IMPLICIT DOUBLE PRECISION(A-H, O-Z)
0163       INTEGER PYK,PYCHGE,PYCOMP
0164 
0165 C...Commonblocks.
0166       COMMON/PYDAT1/MSTU(200),PARU(200),MSTJ(200),PARJ(200)
0167       COMMON/PYPARS/MSTP(200),PARP(200),MSTI(200),PARI(200)
0168 
0169 C...SCI and GAL Commonblocks
0170       COMMON /SCIPAR/MSWI(2),PARSCI(2)
0171 
0172 C...Internal parameters      
0173       PARAMETER(MXTUNS=500)
0174       CHARACTER*8 CHVERS, CHDOC
0175       PARAMETER (CHVERS='1.012   ',CHDOC='Sep 2007')      
0176       CHARACTER*16 CHNAMS(0:MXTUNS), CHNAME
0177       CHARACTER*42 CHMSTJ(50), CHMSTP(51:100), CHPARP(61:100), 
0178      &    CHPARJ(41:100), CH40
0179       CHARACTER*60 CH60
0180       CHARACTER*70 CH70
0181       DATA (CHNAMS(I),I=0,1)/'Default',' '/
0182       DATA (CHNAMS(I),I=100,110)/
0183      &    'Tune A','Tune AW','Tune BW','Tune DW','Tune DWT','Tune QW',
0184      &    'ATLAS Tune','Tune ACR','Tune D6','Tune D6T',' '/
0185       DATA (CHNAMS(I),I=300,310)/
0186      &    'Tune S0','Tune S1','Tune S2','Tune S0A','NOCR','Old',
0187      5    'ATLAS-CSC Tune','Yale Tune','Yale-K Tune',2*' '/
0188       DATA (CHNAMS(I),I=200,210)/
0189      &    'IM Tune 1','Tune APT',9*' '/
0190       DATA (CHNAMS(I),I=400,410)/
0191      &    'GAL Tune 0','SCI Tune 0','GAL Tune 1','SCI Tune 1',7*' '/
0192       DATA (CHMSTJ(I),I=11,20)/
0193      &    'HAD choice of fragmentation function(s)',4*' ',
0194      &    'HAD treatment of small-mass systems',4*' '/
0195       DATA (CHMSTJ(I),I=41,50)/
0196      &    'FSR type (Q2 or pT) for old framework',9*' '/
0197       DATA (CHMSTP(I),I=51,100)/
0198      5    'PDF set','PDF set internal (=1) or pdflib (=2)',8*' ',
0199      6    'ISR master switch',6*' ',
0200      6    'ISR phase space choice & ME corrections',' ',
0201      7    'ISR IR regularization scheme',' ',
0202      7    'ISR scheme for FSR off ISR',8*' ',
0203      8    'UE model',
0204      8    'UE hadron transverse mass distribution',5*' ',
0205      8    'BR composite scheme','BR colour scheme',
0206      9    'BR primordial kT compensation',
0207      9    'BR primordial kT distribution',
0208      9    'BR energy partitioning scheme',2*' ',
0209      9    'FSI colour (re-)connection model',5*' '/  
0210       DATA (CHPARP(I),I=61,100)/
0211      6    ' ','ISR IR cutoff',' ','ISR renormalization scale prefactor',
0212      6    2*' ','ISR Q2max factor',3*' ',
0213      7    'FSR Q2max factor for non-s-channel procs',5*' ', 
0214      7    'FSI colour reconnection turnoff scale',
0215      7    'FSI colour reconnection strength',
0216      7    'BR composite x enhancement','BR breakup suppression',
0217      8    2*'UE IR cutoff at reference ecm',
0218      8    2*'UE mass distribution parameter',
0219      8    'UE gg colour correlated fraction','UE total gg fraction',
0220      8    2*' ',
0221      8    'UE IR cutoff reference ecm','UE IR cutoff ecm scaling power',
0222      9    'BR primordial kT width <|kT|>',' ',
0223      9    'BR primordial kT UV cutoff',7*' '/    
0224       DATA (CHPARJ(I),I=41,90)/
0225      4    ' ','HAD string parameter b',8*' ',
0226      5    3*' ','HAD charm parameter','HAD bottom parameter',5*' ',
0227      6    10*' ',10*' ',
0228      8    'FSR Lambda_QCD scale','FSR IR cutoff',8*' '/    
0229       SAVE /PYDAT1/,/PYPARS/
0230       SAVE /SCIPAR/
0231 
0232 C...1) Shorthand notation
0233       M13=MSTU(13)
0234       M11=MSTU(11)
0235       IF (ITUNE.LE.MXTUNS.AND.ITUNE.GE.0) THEN
0236         CHNAME=CHNAMS(ITUNE)
0237         IF (ITUNE.EQ.0) GOTO 9999
0238       ELSE
0239         CALL PYERRM(9,'(PYTUNE:) Tune number > max. Using defaults.')       
0240         GOTO 9999
0241       ENDIF
0242 
0243 C...2) Hello World 
0244       IF (M13.GE.1) WRITE(M11,5000) CHVERS, CHDOC
0245 
0246 C...3) Tune parameters
0247 
0248 C=============================================================================
0249 C...Tunes S0, S1, S2, S0A, NOCR, and RAP (by P. Skands)
0250       IF (ITUNE.GE.300.AND.ITUNE.LE.305) THEN 
0251         IF (M13.GE.1) WRITE(M11,5010) ITUNE, CHNAME
0252         IF (MSTP(181).LE.5.OR.(MSTP(181).EQ.6.AND.MSTP(182).LE.405))THEN
0253           CALL PYERRM(9,'(PYTUNE:) linked PYTHIA version incompatible'//
0254      &        ' with tune.')       
0255         ENDIF
0256 
0257 C...PDFs
0258         MSTP(52)=1
0259         MSTP(51)=7
0260 C...ISR
0261         PARP(64)=1D0
0262 C...UE on, new model.
0263         MSTP(81)=21 
0264 C...Slow IR cutoff energy scaling by default
0265         PARP(89)=1800D0
0266         PARP(90)=0.16D0
0267 C...Switch off trial joinings
0268         MSTP(96)=0
0269 C...Primordial kT cutoff
0270         PARP(93)=5D0
0271 
0272 C...S0 (300), S0A (303)
0273         IF (ITUNE.EQ.300.OR.ITUNE.EQ.303) THEN
0274           IF (M13.GE.1) THEN
0275             CH60='see P. Skands & D. Wicke, hep-ph/0703081'
0276             WRITE(M11,5030) CH60
0277             CH60='M. Sandhoff & P. Skands, in hep-ph/0604120'
0278             WRITE(M11,5030) CH60 
0279             CH60='and T. Sjostrand & P. Skands, EPJC39(2005)129'
0280             WRITE(M11,5030) CH60
0281           ENDIF
0282 C...Smooth ISR, low FSR
0283           MSTP(70)=2
0284           MSTP(72)=0
0285 C...pT0
0286           PARP(82)=1.85D0     
0287 C...Transverse density profile.
0288           MSTP(82)=5
0289           PARP(83)=1.6D0
0290 C...Colour Reconnections
0291           MSTP(95)=6
0292           PARP(78)=0.20D0
0293           PARP(77)=0.0D0
0294 C...  Reference energy for pT0 and energy scaling pace.
0295           IF (ITUNE.EQ.303) PARP(90)=0.25D0
0296 C...Lambda_FSR scale.
0297           PARJ(81)=0.14D0
0298 C...FSR activity.
0299           PARP(71)=4D0 
0300 C...Rap order, Valence qq, qq x enhc, BR-g-BR supp
0301           MSTP(89)=1
0302           MSTP(88)=0
0303           PARP(79)=2D0         
0304           PARP(80)=0.01D0
0305 
0306 C...S1 (301)
0307         ELSEIF(ITUNE.EQ.301) THEN  
0308           IF (M13.GE.1) THEN
0309             CH60='see M. Sandhoff & P. Skands, in hep-ph/0604120'
0310             WRITE(M11,5030) CH60
0311             CH60='and T. Sjostrand & P. Skands, EPJC39(2005)129'
0312             WRITE(M11,5030) CH60
0313           ENDIF
0314 C...Sharp ISR, high FSR
0315           MSTP(70)=0
0316           MSTP(72)=1 
0317 C...pT0 
0318           PARP(82)=2.1D0
0319 C...Colour Reconnections
0320           MSTP(95)=2
0321           PARP(78)=0.35D0
0322 C...Transverse density profile.
0323           MSTP(82)=5
0324           PARP(83)=1.4D0
0325 C...Lambda_FSR scale.
0326           PARJ(81)=0.14D0
0327 C...FSR activity.
0328           PARP(71)=4D0 
0329 C...Rap order, Valence qq, qq x enhc, BR-g-BR supp
0330           MSTP(89)=1
0331           MSTP(88)=0
0332           PARP(79)=2D0           
0333           PARP(80)=0.01D0
0334 
0335 C...S2 (302)
0336         ELSEIF(ITUNE.EQ.302) THEN  
0337           IF (M13.GE.1) THEN
0338             CH60='see M. Sandhoff & P. Skands, in hep-ph/0604120'
0339             WRITE(M11,5030) CH60
0340             CH60='and T. Sjostrand & P. Skands, EPJC39(2005)129'
0341             WRITE(M11,5030) CH60
0342           ENDIF
0343 C...Smooth ISR, low FSR
0344           MSTP(70)=2
0345           MSTP(72)=0
0346 C...pT0
0347           PARP(82)=1.9D0 
0348 C...Transverse density profile.
0349           MSTP(82)=5
0350           PARP(83)=1.2D0
0351 C...Colour Reconnections
0352           MSTP(95)=4
0353           PARP(78)=0.15D0
0354 C...Lambda_FSR scale.
0355           PARJ(81)=0.14D0
0356 C...FSR activity.
0357           PARP(71)=4D0 
0358 C...Rap order, Valence qq, qq x enhc, BR-g-BR supp
0359           MSTP(89)=1
0360           MSTP(88)=0
0361           PARP(79)=2D0          
0362           PARP(80)=0.01D0
0363           
0364 C...NOCR (304)
0365         ELSEIF(ITUNE.EQ.304) THEN  
0366           IF (M13.GE.1) THEN
0367             CH60='"best try" without colour reconnections'
0368             WRITE(M11,5030) CH60
0369             CH60='see P. Skands & D. Wicke, hep-ph/0703081'
0370             WRITE(M11,5030) CH60
0371             CH60='and T. Sjostrand & P. Skands, EPJC39(2005)129'
0372             WRITE(M11,5030) CH60
0373           ENDIF
0374 C...Smooth ISR, low FSR
0375           MSTP(70)=2
0376           MSTP(72)=0
0377 C...pT0
0378           PARP(82)=2.05D0 
0379 C...Transverse density profile.
0380           MSTP(82)=5
0381           PARP(83)=1.8D0
0382 C...Colour Reconnections
0383           MSTP(95)=0       
0384 C...Lambda_FSR scale.
0385           PARJ(81)=0.14D0
0386 C...FSR activity.
0387           PARP(71)=4D0 
0388 C...Lambda order, Valence qq, large qq x enhc, BR-g-BR supp
0389           MSTP(89)=2
0390           MSTP(88)=0
0391           PARP(79)=3D0
0392           PARP(80)=0.01D0
0393 
0394 C..."Lo FSR" retune (305)
0395         ELSEIF(ITUNE.EQ.305) THEN  
0396           IF (M13.GE.1) THEN
0397             CH60='"Lo FSR retune" with primitive colour reconnections'
0398             WRITE(M11,5030) CH60
0399             CH60='see T. Sjostrand & P. Skands, EPJC39(2005)129'
0400             WRITE(M11,5030) CH60
0401           ENDIF
0402 C...Smooth ISR, low FSR
0403           MSTP(70)=2
0404           MSTP(72)=0
0405 C...pT0
0406           PARP(82)=1.9D0         
0407 C...Transverse density profile.
0408           MSTP(82)=5
0409           PARP(83)=2.0D0
0410 C...Colour Reconnections
0411           MSTP(95)=1
0412           PARP(78)=1.0D0
0413 C...Lambda_FSR scale.
0414           PARJ(81)=0.14D0
0415 C...FSR activity.
0416           PARP(71)=4D0 
0417 C...Rap order, Valence qq, qq x enhc, BR-g-BR supp
0418           MSTP(89)=1
0419           MSTP(88)=0
0420           PARP(79)=2D0          
0421           PARP(80)=0.01D0          
0422         ENDIF
0423 C...Output
0424         IF (M13.GE.1) THEN 
0425           WRITE(M11,5030) ' '
0426           WRITE(M11,5040) 51, MSTP(51), CHMSTP(51)
0427           WRITE(M11,5040) 52, MSTP(52), CHMSTP(52)
0428           WRITE(M11,5050) 64, PARP(64), CHPARP(64)
0429           WRITE(M11,5040) 68, MSTP(68), CHMSTP(68)
0430           CH60='(Note: MSTP(68) is not explicitly (re-)set by PYTUNE)'
0431           WRITE(M11,5030) CH60
0432           WRITE(M11,5040) 70, MSTP(70), CHMSTP(70)
0433           WRITE(M11,5040) 72, MSTP(72), CHMSTP(72)
0434           WRITE(M11,5050) 71, PARP(71), CHPARP(71)
0435           WRITE(M11,5060) 81, PARJ(81), CHPARJ(81)
0436           WRITE(M11,5040) 81, MSTP(81), CHMSTP(81)
0437           WRITE(M11,5050) 82, PARP(82), CHPARP(82)
0438           WRITE(M11,5050) 89, PARP(89), CHPARP(89)
0439           WRITE(M11,5050) 90, PARP(90), CHPARP(90)
0440           WRITE(M11,5040) 82, MSTP(82), CHMSTP(82)
0441           WRITE(M11,5050) 83, PARP(83), CHPARP(83)
0442           WRITE(M11,5040) 88, MSTP(88), CHMSTP(88)
0443           WRITE(M11,5040) 89, MSTP(89), CHMSTP(89)
0444           WRITE(M11,5050) 79, PARP(79), CHPARP(79)
0445           WRITE(M11,5050) 80, PARP(80), CHPARP(80)
0446           WRITE(M11,5050) 93, PARP(93), CHPARP(93)          
0447           WRITE(M11,5040) 95, MSTP(95), CHMSTP(95)
0448           WRITE(M11,5050) 78, PARP(78), CHPARP(78)
0449         ENDIF
0450 
0451 C=============================================================================
0452 C...ATLAS-CSC 11-parameter tune (By A. Moraes) 
0453       ELSEIF (ITUNE.EQ.306) THEN 
0454         IF (M13.GE.1) WRITE(M11,5010) ITUNE, CHNAME
0455         IF (MSTP(181).LE.5.OR.(MSTP(181).EQ.6.AND.MSTP(182).LE.405))THEN
0456           CALL PYERRM(9,'(PYTUNE:) linked PYTHIA version incompatible'//
0457      &        ' with tune.')       
0458         ENDIF
0459 
0460 C...PDFs
0461         MSTP(52)=2
0462         MSTP(54)=2
0463         MSTP(56)=2
0464         MSTP(51)=10042
0465         MSTP(53)=10042
0466         MSTP(55)=10042
0467 C...ISR
0468 C        PARP(64)=1D0
0469 C...UE on, new model.
0470         MSTP(81)=21 
0471 C...Energy scaling
0472         PARP(89)=1800D0
0473         PARP(90)=0.22D0
0474 C...Switch off trial joinings
0475         MSTP(96)=0
0476 C...Primordial kT cutoff
0477 
0478         IF (M13.GE.1) THEN
0479           CH60='see presentations by A. Moraes (ATLAS),'
0480           WRITE(M11,5030) CH60
0481           CH60='and T. Sjostrand & P. Skands, EPJC39(2005)129'
0482           WRITE(M11,5030) CH60
0483           WRITE(M11,5030) ' '
0484           CH70='NB! This tune requires CTEQ6.1 pdfs to be '//
0485      &        'externally linked and'
0486           WRITE(M11,5035) CH70
0487           CH70='MSTP(51) should be set manually according to '//
0488      &        'the library used'
0489           WRITE(M11,5035) CH70
0490         ENDIF
0491 C...Smooth ISR, low FSR
0492         MSTP(70)=2
0493         MSTP(72)=0
0494 C...pT0
0495         PARP(82)=1.9D0     
0496 C...Transverse density profile.
0497         MSTP(82)=4
0498         PARP(83)=0.3D0
0499         PARP(84)=0.5D0
0500 C...ISR & FSR in interactions after the first (default)
0501         MSTP(84)=1
0502         MSTP(85)=1
0503 C...No double-counting (default)
0504         MSTP(86)=2
0505 C...Companion quark parent gluon (1-x) power
0506         MSTP(87)=4
0507 C...Primordial kT compensation along chaings (default = 0 : uniform)
0508         MSTP(90)=1 
0509 C...Colour Reconnections
0510         MSTP(95)=1
0511         PARP(78)=0.2D0
0512 C...Lambda_FSR scale.
0513         PARJ(81)=0.14D0
0514 C...Rap order, Valence qq, qq x enhc, BR-g-BR supp
0515         MSTP(89)=1
0516         MSTP(88)=0
0517 C   PARP(79)=2D0         
0518         PARP(80)=0.01D0
0519 C...Peterson charm frag, and c and b hadr parameters
0520         MSTJ(11)=3
0521         PARJ(54)=-0.07
0522         PARJ(55)=-0.006
0523 C...  Output
0524         IF (M13.GE.1) THEN 
0525           WRITE(M11,5030) ' '
0526           WRITE(M11,5040) 51, MSTP(51), CHMSTP(51)
0527           WRITE(M11,5040) 52, MSTP(52), CHMSTP(52)
0528           WRITE(M11,5050) 64, PARP(64), CHPARP(64)
0529           WRITE(M11,5040) 68, MSTP(68), CHMSTP(68)
0530           CH60='(Note: MSTP(68) is not explicitly (re-)set by PYTUNE)'
0531           WRITE(M11,5030) CH60
0532           WRITE(M11,5040) 70, MSTP(70), CHMSTP(70)
0533           WRITE(M11,5040) 72, MSTP(72), CHMSTP(72)
0534           WRITE(M11,5050) 71, PARP(71), CHPARP(71)
0535           WRITE(M11,5060) 81, PARJ(81), CHPARJ(81)
0536           WRITE(M11,5040) 81, MSTP(81), CHMSTP(81)
0537           WRITE(M11,5050) 82, PARP(82), CHPARP(82)
0538           WRITE(M11,5050) 89, PARP(89), CHPARP(89)
0539           WRITE(M11,5050) 90, PARP(90), CHPARP(90)
0540           WRITE(M11,5040) 82, MSTP(82), CHMSTP(82)
0541           WRITE(M11,5050) 83, PARP(83), CHPARP(83)
0542           WRITE(M11,5050) 84, PARP(84), CHPARP(84)
0543           WRITE(M11,5040) 88, MSTP(88), CHMSTP(88)
0544           WRITE(M11,5040) 89, MSTP(89), CHMSTP(89)
0545           WRITE(M11,5040) 90, MSTP(90), CHMSTP(90)
0546           WRITE(M11,5050) 79, PARP(79), CHPARP(79)
0547           WRITE(M11,5050) 80, PARP(80), CHPARP(80)
0548           WRITE(M11,5050) 93, PARP(93), CHPARP(93)          
0549           WRITE(M11,5040) 95, MSTP(95), CHMSTP(95)
0550           WRITE(M11,5050) 78, PARP(78), CHPARP(78)
0551           WRITE(M11,5070) 11, MSTJ(11), CHMSTJ(11)
0552           WRITE(M11,5060) 54, PARJ(54), CHPARJ(54)
0553           WRITE(M11,5060) 55, PARJ(55), CHPARJ(55)
0554         ENDIF
0555 
0556 C=============================================================================
0557 C...Tunes A, AW, BW, DW, DWT, QW, D6, D6T (by R.D. Field, CDF) 
0558 C...(100-105,108-109) and ATLAS-DC2 Tune (by A. Moraes, ATLAS) (106)
0559       ELSEIF ((ITUNE.GE.100.AND.ITUNE.LE.106).OR.ITUNE.EQ.108.OR.
0560      &      ITUNE.EQ.109) THEN
0561         IF (M13.GE.1.AND.ITUNE.NE.106) THEN 
0562           WRITE(M11,5010) ITUNE, CHNAME
0563           CH60='see R.D. Field (CDF), in hep-ph/0610012'
0564           WRITE(M11,5030) CH60 
0565           CH60='and T. Sjostrand & M. v. Zijl, PRD36(1987)2019'
0566           WRITE(M11,5030) CH60
0567         ENDIF
0568 C...Multiple interactions on, old framework
0569         MSTP(81)=1
0570 C...Fast IR cutoff energy scaling by default
0571         PARP(89)=1800D0
0572         PARP(90)=0.25D0
0573 C...Default CTEQ5L (internal), except for QW: CTEQ61 (external)
0574         MSTP(51)=7
0575         MSTP(52)=1
0576         IF (ITUNE.EQ.105) THEN 
0577           MSTP(51)=10150
0578           MSTP(52)=2
0579         ELSEIF(ITUNE.EQ.108.OR.ITUNE.EQ.109) THEN
0580           MSTP(52)=2
0581           MSTP(54)=2
0582           MSTP(56)=2
0583           MSTP(51)=10042
0584           MSTP(53)=10042
0585           MSTP(55)=10042
0586         ENDIF
0587 C...Double Gaussian matter distribution. 
0588         MSTP(82)=4
0589         PARP(83)=0.5D0
0590         PARP(84)=0.4D0
0591 C...FSR activity. 
0592         PARP(71)=4D0
0593 C...Lambda_FSR scale. 
0594         PARJ(81)=0.29D0     
0595 C...Fragmentation functions and c and b parameters
0596         MSTJ(11)=4
0597         PARJ(54)=-0.05
0598         PARJ(55)=-0.005
0599 
0600 C...Tune A and AW 
0601         IF(ITUNE.EQ.100.OR.ITUNE.EQ.101) THEN
0602 C...pT0.
0603           PARP(82)=2.0D0
0604 c...String drawing almost completely minimizes string length.
0605           PARP(85)=0.9D0
0606           PARP(86)=0.95D0
0607 C...ISR cutoff, muR scale factor, and phase space size
0608           PARP(62)=1D0
0609           PARP(64)=1D0
0610           PARP(67)=4D0
0611 C...Intrinsic kT, size, and max
0612           MSTP(91)=1
0613           PARP(91)=1D0
0614           PARP(93)=5D0
0615 C...AW : higher ISR IR cutoff, but also larger alpha_s and more intrinsic kT.
0616           IF (ITUNE.EQ.101) THEN
0617             PARP(62)=1.25D0
0618             PARP(64)=0.2D0
0619             PARP(91)=2.1D0
0620             PARP(92)=15.0D0
0621           ENDIF
0622           
0623 C...Tune BW (larger alpha_s, more intrinsic kT. Smaller ISR phase space.)
0624         ELSEIF (ITUNE.EQ.102) THEN
0625 C...pT0.
0626           PARP(82)=1.9D0
0627 c...String drawing completely minimizes string length.
0628           PARP(85)=1.0D0
0629           PARP(86)=1.0D0
0630 C...ISR cutoff, muR scale factor, and phase space size
0631           PARP(62)=1.25D0
0632           PARP(64)=0.2D0
0633           PARP(67)=1D0
0634 C...Intrinsic kT, size, and max
0635           MSTP(91)=1
0636           PARP(91)=2.1D0
0637           PARP(93)=15D0
0638 
0639 C...Tune DW
0640         ELSEIF (ITUNE.EQ.103) THEN
0641 C...pT0.
0642           PARP(82)=1.9D0
0643 c...String drawing completely minimizes string length.
0644           PARP(85)=1.0D0
0645           PARP(86)=1.0D0
0646 C...ISR cutoff, muR scale factor, and phase space size
0647           PARP(62)=1.25D0
0648           PARP(64)=0.2D0
0649           PARP(67)=2.5D0
0650 C...Intrinsic kT, size, and max
0651           MSTP(91)=1
0652           PARP(91)=2.1D0
0653           PARP(93)=15D0
0654 
0655 C...Tune DWT
0656         ELSEIF (ITUNE.EQ.104) THEN
0657 C...pT0.
0658           PARP(82)=1.9409D0
0659 C...Run II ref scale and slow scaling
0660           PARP(89)=1960D0
0661           PARP(90)=0.16D0
0662 c...String drawing completely minimizes string length.
0663           PARP(85)=1.0D0
0664           PARP(86)=1.0D0
0665 C...ISR cutoff, muR scale factor, and phase space size
0666           PARP(62)=1.25D0
0667           PARP(64)=0.2D0
0668           PARP(67)=2.5D0
0669 C...Intrinsic kT, size, and max
0670           MSTP(91)=1
0671           PARP(91)=2.1D0
0672           PARP(93)=15D0
0673 
0674 C...Tune QW
0675         ELSEIF(ITUNE.EQ.105) THEN
0676           IF (M13.GE.1) THEN 
0677             WRITE(M11,5030) ' '
0678             CH70='NB! This tune requires CTEQ6.1 pdfs to be '//
0679      &           'externally linked and'
0680             WRITE(M11,5035) CH70
0681             CH70='MSTP(51) should be set manually according to '//
0682      &          'the library used'
0683             WRITE(M11,5035) CH70
0684           ENDIF
0685 C...pT0.
0686           PARP(82)=1.1D0
0687 c...String drawing completely minimizes string length.
0688           PARP(85)=1.0D0
0689           PARP(86)=1.0D0
0690 C...ISR cutoff, muR scale factor, and phase space size
0691           PARP(62)=1.25D0
0692           PARP(64)=0.2D0
0693           PARP(67)=2.5D0
0694 C...Intrinsic kT, size, and max
0695           MSTP(91)=1
0696           PARP(91)=2.1D0
0697           PARP(93)=15D0
0698 
0699 C...Tune D6 and D6T
0700         ELSEIF(ITUNE.EQ.108.OR.ITUNE.EQ.109) THEN
0701           IF (M13.GE.1) THEN 
0702             WRITE(M11,5030) ' '
0703             CH70='NB! This tune requires CTEQ6L pdfs to be '//
0704      &           'externally linked and'
0705             WRITE(M11,5035) CH70
0706             CH70='MSTP(51) should be set manually according to '//
0707      &          'the library used'
0708             WRITE(M11,5035) CH70
0709           ENDIF
0710 C...The "Rick" proton, double gauss with 0.5/0.4
0711           MSTP(82)=4
0712           PARP(83)=0.5D0
0713           PARP(84)=0.4D0
0714 c...String drawing completely minimizes string length.
0715           PARP(85)=1.0D0
0716           PARP(86)=1.0D0
0717           IF (ITUNE.EQ.108) THEN
0718 C...D6: pT0, Run I ref scale, and fast energy scaling
0719             PARP(82)=1.8D0
0720             PARP(89)=1800D0
0721             PARP(90)=0.25D0
0722           ELSE
0723 C...D6T: pT0, Run II ref scale, and slow energy scaling
0724             PARP(82)=1.8387D0
0725             PARP(89)=1960D0
0726             PARP(90)=0.16D0
0727           ENDIF
0728 C...ISR cutoff, muR scale factor, and phase space size
0729           PARP(62)=1.25D0
0730           PARP(64)=0.2D0
0731           PARP(67)=2.5D0
0732 C...Intrinsic kT, size, and max
0733           MSTP(91)=1
0734           PARP(91)=2.1D0
0735           PARP(93)=15D0
0736           
0737 C...Old ATLAS-DC2 5-parameter tune
0738         ELSEIF(ITUNE.EQ.106) THEN
0739           IF (M13.GE.1) THEN 
0740             WRITE(M11,5010) ITUNE, CHNAME
0741             CH60='see A. Moraes et al., SN-ATLAS-2006-057'
0742             WRITE(M11,5030) CH60
0743             CH60='and T. Sjostrand & M. v. Zijl, PRD36(1987)2019'
0744             WRITE(M11,5030) CH60
0745           ENDIF
0746 C...  pT0.
0747           PARP(82)=1.8D0
0748 C...  Different ref and rescaling pacee
0749           PARP(89)=1000D0
0750           PARP(90)=0.16D0
0751 C...  Parameters of mass distribution
0752           PARP(83)=0.5D0
0753           PARP(84)=0.5D0
0754 C...  Old default string drawing
0755           PARP(85)=0.33D0
0756           PARP(86)=0.66D0
0757 C...  ISR, phase space equivalent to Tune B
0758           PARP(62)=1D0
0759           PARP(64)=1D0
0760           PARP(67)=1D0
0761 C...  FSR
0762           PARP(71)=4D0
0763           PARJ(81)=0.29D0
0764 C...  Intrinsic kT
0765           MSTP(91)=1
0766           PARP(91)=1D0
0767           PARP(93)=5D0
0768         ENDIF
0769         
0770 C...  Output
0771         IF (M13.GE.1) THEN 
0772           WRITE(M11,5030) ' '
0773           WRITE(M11,5040) 51, MSTP(51), CHMSTP(51)
0774           WRITE(M11,5040) 52, MSTP(52), CHMSTP(52)
0775           WRITE(M11,5050) 62, PARP(62), CHPARP(62)
0776           WRITE(M11,5050) 64, PARP(64), CHPARP(64)
0777           WRITE(M11,5050) 67, PARP(67), CHPARP(67)
0778           WRITE(M11,5040) 68, MSTP(68), CHMSTP(68)
0779           CH60='(Note: MSTP(68) is not explicitly (re-)set by PYTUNE)'
0780           WRITE(M11,5030) CH60
0781           WRITE(M11,5050) 71, PARP(71), CHPARP(71)
0782           WRITE(M11,5060) 81, PARJ(81), CHPARJ(81)
0783           WRITE(M11,5040) 81, MSTP(81), CHMSTP(81)
0784           WRITE(M11,5050) 82, PARP(82), CHPARP(82)
0785           WRITE(M11,5050) 89, PARP(89), CHPARP(89)
0786           WRITE(M11,5050) 90, PARP(90), CHPARP(90)
0787           WRITE(M11,5040) 82, MSTP(82), CHMSTP(82)
0788           WRITE(M11,5050) 83, PARP(83), CHPARP(83)
0789           WRITE(M11,5050) 84, PARP(84), CHPARP(84)
0790           WRITE(M11,5050) 85, PARP(85), CHPARP(85)
0791           WRITE(M11,5050) 86, PARP(86), CHPARP(86)
0792           WRITE(M11,5040) 91, MSTP(91), CHMSTP(91)
0793           WRITE(M11,5050) 91, PARP(91), CHPARP(91)
0794           WRITE(M11,5050) 93, PARP(93), CHPARP(93)          
0795           WRITE(M11,5070) 11, MSTJ(11), CHMSTJ(11)
0796           WRITE(M11,5060) 54, PARJ(54), CHPARJ(54)
0797           WRITE(M11,5060) 55, PARJ(55), CHPARJ(55)
0798         ENDIF     
0799 
0800 C=============================================================================
0801 C... ACR, tune A with new CR (107)
0802       ELSEIF(ITUNE.EQ.107) THEN
0803         IF (M13.GE.1) THEN 
0804           WRITE(M11,5010) ITUNE, CHNAME
0805           CH60='Tune A modified with new colour reconnections'
0806           WRITE(M11,5030) CH60
0807           CH60='PARP(85)=0D0 and amount of CR is regulated by PARP(78)'
0808           WRITE(M11,5030) CH60 
0809           CH60='see P. Skands & D. Wicke, hep-ph/0703081,'
0810           WRITE(M11,5030) CH60 
0811           CH60='R.D. Field (CDF), in hep-ph/0610012 (Tune A)'
0812           WRITE(M11,5030) CH60 
0813           CH60='and T. Sjostrand & M. v. Zijl, PRD36(1987)2019'
0814           WRITE(M11,5030) CH60
0815         ENDIF
0816         IF (MSTP(181).LE.5.OR.(MSTP(181).EQ.6.AND.MSTP(182).LE.406))THEN
0817           CALL PYERRM(9,'(PYTUNE:) linked PYTHIA version incompatible'//
0818      &        ' with tune. Using defaults.')       
0819           GOTO 9998
0820         ENDIF
0821         MSTP(81)=1
0822         PARP(89)=1800D0
0823         PARP(90)=0.25D0
0824         MSTP(82)=4
0825         PARP(83)=0.5D0
0826         PARP(84)=0.4D0
0827         MSTP(51)=7
0828         MSTP(52)=1
0829         PARP(71)=4D0
0830         PARJ(81)=0.29D0
0831         PARP(82)=2.0D0
0832         PARP(85)=0.0D0
0833         PARP(86)=0.66D0
0834         PARP(62)=1D0
0835         PARP(64)=1D0
0836         PARP(67)=4D0
0837         MSTP(91)=1
0838         PARP(91)=1D0
0839         PARP(93)=5D0
0840         MSTP(95)=6
0841         PARP(78)=0.25D0
0842 C...Fragmentation functions and c and b parameters
0843         MSTJ(11)=4
0844         PARJ(54)=-0.05
0845         PARJ(55)=-0.005
0846 C...Output
0847         IF (M13.GE.1) THEN 
0848           WRITE(M11,5030) ' '
0849           WRITE(M11,5040) 51, MSTP(51), CHMSTP(51)
0850           WRITE(M11,5040) 52, MSTP(52), CHMSTP(52)
0851           WRITE(M11,5050) 62, PARP(62), CHPARP(62)
0852           WRITE(M11,5050) 64, PARP(64), CHPARP(64)
0853           WRITE(M11,5050) 67, PARP(67), CHPARP(67)
0854           WRITE(M11,5040) 68, MSTP(68), CHMSTP(68)
0855           CH60='(Note: MSTP(68) is not explicitly (re-)set by PYTUNE)'
0856           WRITE(M11,5030) CH60
0857           WRITE(M11,5050) 71, PARP(71), CHPARP(71)
0858           WRITE(M11,5060) 81, PARJ(81), CHPARJ(81)
0859           WRITE(M11,5040) 81, MSTP(81), CHMSTP(81)
0860           WRITE(M11,5050) 82, PARP(82), CHPARP(82)
0861           WRITE(M11,5050) 89, PARP(89), CHPARP(89)
0862           WRITE(M11,5050) 90, PARP(90), CHPARP(90)
0863           WRITE(M11,5040) 82, MSTP(82), CHMSTP(82)
0864           WRITE(M11,5050) 83, PARP(83), CHPARP(83)
0865           WRITE(M11,5050) 84, PARP(84), CHPARP(84)
0866           WRITE(M11,5050) 85, PARP(85), CHPARP(85)
0867           WRITE(M11,5050) 86, PARP(86), CHPARP(86)
0868           WRITE(M11,5040) 91, MSTP(91), CHMSTP(91)
0869           WRITE(M11,5050) 91, PARP(91), CHPARP(91)
0870           WRITE(M11,5050) 93, PARP(93), CHPARP(93)          
0871           WRITE(M11,5040) 95, MSTP(95), CHMSTP(95)
0872           WRITE(M11,5050) 78, PARP(78), CHPARP(78)
0873           WRITE(M11,5070) 11, MSTJ(11), CHMSTJ(11)
0874           WRITE(M11,5060) 54, PARJ(54), CHPARJ(54)
0875           WRITE(M11,5060) 55, PARJ(55), CHPARJ(55)
0876         ENDIF
0877 
0878 C=============================================================================
0879 C...  Intermediate model. Rap tune (retuned to post-6.406 IR factorization)
0880       ELSEIF(ITUNE.EQ.200) THEN
0881         IF (M13.GE.1) THEN 
0882           WRITE(M11,5010) ITUNE, CHNAME
0883           CH60='see T. Sjostrand & P. Skands, JHEP03(2004)053'
0884           WRITE(M11,5030) CH60
0885         ENDIF
0886         IF (MSTP(181).LE.5.OR.(MSTP(181).EQ.6.AND.MSTP(182).LE.405))THEN
0887           CALL PYERRM(9,'(PYTUNE:) linked PYTHIA version incompatible'//
0888      &        ' with tune.')       
0889         ENDIF
0890 C...PDF
0891         MSTP(51)=7
0892         MSTP(52)=1
0893 C...ISR 
0894         PARP(62)=1D0
0895         PARP(64)=1D0
0896         PARP(67)=4D0
0897 C...FSR
0898         PARP(71)=4D0
0899         PARJ(81)=0.29D0
0900 C...UE
0901         MSTP(81)=11
0902         PARP(82)=2.25D0
0903         PARP(89)=1800D0
0904         PARP(90)=0.25D0
0905 C...  ExpOfPow(1.8) overlap profile
0906         MSTP(82)=5
0907         PARP(83)=1.8D0
0908 C...  Valence qq
0909         MSTP(88)=0
0910 C...  Rap Tune
0911         MSTP(89)=1
0912 C...  Default diquark, BR-g-BR supp
0913         PARP(79)=2D0           
0914         PARP(80)=0.01D0
0915 C...  Final state reconnect.
0916         MSTP(95)=1
0917         PARP(78)=0.55D0 
0918 C...Fragmentation functions and c and b parameters
0919         MSTJ(11)=4
0920         PARJ(54)=-0.05
0921         PARJ(55)=-0.005
0922 C...  Output
0923         IF (M13.GE.1) THEN 
0924           WRITE(M11,5030) ' '
0925           WRITE(M11,5040) 51, MSTP(51), CHMSTP(51)
0926           WRITE(M11,5040) 52, MSTP(52), CHMSTP(52)
0927           WRITE(M11,5050) 62, PARP(62), CHPARP(62)
0928           WRITE(M11,5050) 64, PARP(64), CHPARP(64)
0929           WRITE(M11,5050) 67, PARP(67), CHPARP(67)
0930           WRITE(M11,5040) 68, MSTP(68), CHMSTP(68)
0931           CH60='(Note: MSTP(68) is not explicitly (re-)set by PYTUNE)'
0932           WRITE(M11,5030) CH60
0933           WRITE(M11,5050) 71, PARP(71), CHPARP(71)
0934           WRITE(M11,5060) 81, PARJ(81), CHPARJ(81)
0935           WRITE(M11,5040) 81, MSTP(81), CHMSTP(81)
0936           WRITE(M11,5050) 82, PARP(82), CHPARP(82)
0937           WRITE(M11,5050) 89, PARP(89), CHPARP(89)
0938           WRITE(M11,5050) 90, PARP(90), CHPARP(90)
0939           WRITE(M11,5040) 82, MSTP(82), CHMSTP(82)
0940           WRITE(M11,5050) 83, PARP(83), CHPARP(83)
0941           WRITE(M11,5040) 88, MSTP(88), CHMSTP(88)
0942           WRITE(M11,5040) 89, MSTP(89), CHMSTP(89)
0943           WRITE(M11,5050) 79, PARP(79), CHPARP(79)
0944           WRITE(M11,5050) 80, PARP(80), CHPARP(80)
0945           WRITE(M11,5050) 93, PARP(93), CHPARP(93)          
0946           WRITE(M11,5040) 95, MSTP(95), CHMSTP(95)
0947           WRITE(M11,5050) 78, PARP(78), CHPARP(78)
0948           WRITE(M11,5070) 11, MSTJ(11), CHMSTJ(11)
0949           WRITE(M11,5060) 54, PARJ(54), CHPARJ(54)
0950           WRITE(M11,5060) 55, PARJ(55), CHPARJ(55)
0951         ENDIF
0952 
0953 C...APT. Tune A modified to use new pT-ordered FSR.
0954       ELSEIF(ITUNE.EQ.201) THEN
0955         IF (M13.GE.1) THEN 
0956           WRITE(M11,5010) ITUNE, CHNAME
0957           CH60='see P. Skands & D. Wicke, hep-ph/0703081 (Tune APT),'
0958           WRITE(M11,5030) CH60 
0959           CH60='R.D. Field (CDF), in hep-ph/0610012 (Tune A)'
0960           WRITE(M11,5030) CH60
0961           CH60='T. Sjostrand & M. v. Zijl, PRD36(1987)2019'
0962           WRITE(M11,5030) CH60
0963           CH60='and T. Sjostrand & P. Skands, EPJC39(2005)129'
0964           WRITE(M11,5030) CH60
0965         ENDIF
0966         IF (MSTP(181).LE.5.OR.(MSTP(181).EQ.6.AND.MSTP(182).LE.411))THEN
0967           CALL PYERRM(9,'(PYTUNE:) linked PYTHIA version incompatible'//
0968      &        ' with tune.')       
0969         ENDIF
0970 C...First set as if Pythia tune A
0971 C...Multiple interactions on, old framework
0972         MSTP(81)=1
0973 C...Fast IR cutoff energy scaling by default
0974         PARP(89)=1800D0
0975         PARP(90)=0.25D0
0976 C...Default CTEQ5L (internal)
0977         MSTP(51)=7
0978         MSTP(52)=1
0979 C...Double Gaussian matter distribution. 
0980         MSTP(82)=4
0981         PARP(83)=0.5D0
0982         PARP(84)=0.4D0
0983 C...FSR activity. 
0984         PARP(71)=4D0
0985 c...String drawing almost completely minimizes string length.
0986         PARP(85)=0.9D0
0987         PARP(86)=0.95D0
0988 C...ISR cutoff, muR scale factor, and phase space size
0989         PARP(62)=1D0
0990         PARP(64)=1D0
0991         PARP(67)=4D0
0992 C...Intrinsic kT, size, and max
0993         MSTP(91)=1
0994         PARP(91)=1D0
0995         PARP(93)=5D0
0996 C...Use pT-ordered FSR
0997         MSTJ(41)=12
0998 C...Lambda_FSR scale for pT-ordering 
0999         PARJ(81)=0.14D0
1000 C...Retune pT0
1001         PARP(82)=2.1D0
1002 C...Fragmentation functions and c and b parameters
1003         MSTJ(11)=4
1004         PARJ(54)=-0.05
1005         PARJ(55)=-0.005
1006 
1007 C...  Output
1008         IF (M13.GE.1) THEN 
1009           WRITE(M11,5030) ' '
1010           WRITE(M11,5040) 51, MSTP(51), CHMSTP(51)
1011           WRITE(M11,5040) 52, MSTP(52), CHMSTP(52)
1012           WRITE(M11,5050) 62, PARP(62), CHPARP(62)
1013           WRITE(M11,5050) 64, PARP(64), CHPARP(64)
1014           WRITE(M11,5050) 67, PARP(67), CHPARP(67)
1015           WRITE(M11,5040) 68, MSTP(68), CHMSTP(68)
1016           CH60='(Note: MSTP(68) is not explicitly (re-)set by PYTUNE)'
1017           WRITE(M11,5030) CH60
1018           WRITE(M11,5070) 41, MSTJ(41), CHMSTJ(41)
1019           WRITE(M11,5050) 71, PARP(71), CHPARP(71)
1020           WRITE(M11,5060) 81, PARJ(81), CHPARJ(81)
1021           WRITE(M11,5040) 81, MSTP(81), CHMSTP(81)
1022           WRITE(M11,5050) 82, PARP(82), CHPARP(82)
1023           WRITE(M11,5050) 89, PARP(89), CHPARP(89)
1024           WRITE(M11,5050) 90, PARP(90), CHPARP(90)
1025           WRITE(M11,5040) 82, MSTP(82), CHMSTP(82)
1026           WRITE(M11,5050) 83, PARP(83), CHPARP(83)
1027           WRITE(M11,5050) 84, PARP(84), CHPARP(84)
1028           WRITE(M11,5050) 85, PARP(85), CHPARP(85)
1029           WRITE(M11,5050) 86, PARP(86), CHPARP(86)
1030           WRITE(M11,5040) 91, MSTP(91), CHMSTP(91)
1031           WRITE(M11,5050) 91, PARP(91), CHPARP(91)
1032           WRITE(M11,5050) 93, PARP(93), CHPARP(93)          
1033           WRITE(M11,5070) 11, MSTJ(11), CHMSTJ(11)
1034           WRITE(M11,5060) 54, PARJ(54), CHPARJ(54)
1035           WRITE(M11,5060) 55, PARJ(55), CHPARJ(55)
1036         ENDIF     
1037 
1038 C=============================================================================
1039 C...Uppsala models: Generalized Area Law and Soft Colour Interactions
1040       ELSEIF(CHNAME.EQ.'GAL Tune 0'.OR.CHNAME.EQ.'GAL Tune 1') THEN
1041         IF (M13.GE.1) THEN 
1042           WRITE(M11,5010) ITUNE, CHNAME
1043           CH60='see J. Rathsman, PLB452(1999)364'
1044           WRITE(M11,5030) CH60
1045 C ?         CH60='A. Edin, G. Ingelman, J. Rathsman, hep-ph/9912539,'
1046 C ?         WRITE(M11,5030)
1047           CH60='and T. Sjostrand & M. v. Zijl, PRD36(1987)2019'
1048           WRITE(M11,5030) CH60          
1049           WRITE(M11,5030) ' '    
1050           CH70='NB! The GAL model must be run with modified '//
1051      &        'Pythia v6.215:'
1052           WRITE(M11,5035) CH70
1053           CH70='available from http://www.isv.uu.se/thep/MC/scigal/'
1054           WRITE(M11,5035) CH70
1055           WRITE(M11,5030) ' '
1056         ENDIF
1057 C...GAL Recommended settings from Uppsala web page (as per 22/08 2006)
1058         MSWI(2) = 3
1059         PARSCI(2) = 0.10
1060         MSWI(1) = 2
1061         PARSCI(1) = 0.44
1062         MSTJ(16) = 0
1063         PARJ(42) = 0.45
1064         PARJ(82) = 2.0
1065         PARP(62) = 2.0  
1066         MSTP(81) = 1
1067         MSTP(82) = 1
1068         PARP(81) = 1.9
1069         MSTP(92) = 1
1070         IF(CHNAME.EQ.'GAL Tune 1') THEN
1071 C...GAL retune (P. Skands) to get better min-bias <Nch> at Tevatron
1072           MSTP(82)=4
1073           PARP(83)=0.25D0
1074           PARP(84)=0.5D0
1075           PARP(82) = 1.75
1076           IF (M13.GE.1) THEN 
1077             WRITE(M11,5040) 81, MSTP(81), CHMSTP(81)
1078             WRITE(M11,5050) 82, PARP(82), CHPARP(82)
1079             WRITE(M11,5040) 82, MSTP(82), CHMSTP(82)
1080             WRITE(M11,5050) 83, PARP(83), CHPARP(83)
1081             WRITE(M11,5050) 84, PARP(84), CHPARP(84)
1082           ENDIF
1083         ELSE
1084           IF (M13.GE.1) THEN
1085             WRITE(M11,5040) 81, MSTP(81), CHMSTP(81)
1086             WRITE(M11,5050) 81, PARP(81), CHPARP(81)
1087             WRITE(M11,5040) 82, MSTP(82), CHMSTP(82)
1088           ENDIF
1089         ENDIF
1090 C...Output
1091         IF (M13.GE.1) THEN
1092           WRITE(M11,5050) 62, PARP(62), CHPARP(62)
1093           WRITE(M11,5060) 82, PARJ(82), CHPARJ(82)
1094           WRITE(M11,5040) 92, MSTP(92), CHMSTP(92)
1095           CH40='FSI SCI/GAL selection'
1096           WRITE(M11,6040) 1, MSWI(1), CH40
1097           CH40='FSI SCI/GAL sea quark treatment'
1098           WRITE(M11,6040) 2, MSWI(2), CH40
1099           CH40='FSI SCI/GAL sea quark treatment parm'
1100           WRITE(M11,6050) 1, PARSCI(1), CH40
1101           CH40='FSI SCI/GAL string reco probability R_0'
1102           WRITE(M11,6050) 2, PARSCI(2), CH40 
1103           WRITE(M11,5060) 42, PARJ(42), CHPARJ(42)
1104           WRITE(M11,5070) 16, MSTJ(16), CHMSTJ(16)
1105         ENDIF
1106       ELSEIF(CHNAME.EQ.'SCI Tune 0'.OR.CHNAME.EQ.'SCI Tune 1') THEN
1107         IF (M13.GE.1) THEN 
1108           WRITE(M11,5010) ITUNE, CHNAME
1109           CH60='see A.Edin et al, PLB366(1996)371, Z.Phys.C75(1997)57,'
1110           WRITE(M11,5030) CH60
1111           CH60='and T. Sjostrand & M. v. Zijl, PRD36(1987)2019'
1112           WRITE(M11,5030) CH60          
1113           WRITE(M11,5030) ' '    
1114           CH70='NB! The SCI model must be run with modified '//
1115      &        'Pythia v6.215:'
1116           WRITE(M11,5035) CH70
1117           CH70='available from http://www.isv.uu.se/thep/MC/scigal/'
1118           WRITE(M11,5035) CH70
1119           WRITE(M11,5030) ' '
1120         ENDIF
1121 C...SCI Recommended settings from Uppsala web page (as per 22/08 2006)
1122         MSTP(81)=1
1123         MSTP(82)=1
1124         PARP(81)=2.2
1125         MSTP(92)=1        
1126         MSWI(2)=2               
1127         PARSCI(2)=0.50          
1128         MSWI(1)=2               
1129         PARSCI(1)=0.44          
1130         MSTJ(16)=0              
1131         IF (CHNAME.EQ.'SCI Tune 1') THEN
1132 C...SCI retune (P. Skands) to get better min-bias <Nch> at Tevatron
1133           MSTP(81) = 1
1134           MSTP(82) = 3
1135           PARP(82) = 2.4
1136           PARP(83) = 0.5D0
1137           PARP(62) = 1.5
1138           PARP(84)=0.25D0        
1139           IF (M13.GE.1) THEN 
1140             WRITE(M11,5040) 81, MSTP(81), CHMSTP(81)
1141             WRITE(M11,5050) 82, PARP(82), CHPARP(82)
1142             WRITE(M11,5040) 82, MSTP(82), CHMSTP(82)
1143             WRITE(M11,5050) 83, PARP(83), CHPARP(83)
1144             WRITE(M11,5050) 62, PARP(62), CHPARP(62)
1145           ENDIF
1146         ELSE
1147           IF (M13.GE.1) THEN
1148             WRITE(M11,5040) 81, MSTP(81), CHMSTP(81)
1149             WRITE(M11,5050) 81, PARP(81), CHPARP(81)
1150             WRITE(M11,5040) 82, MSTP(82), CHMSTP(82)
1151           ENDIF
1152         ENDIF
1153 C...Output
1154         IF (M13.GE.1) THEN 
1155           WRITE(M11,5040) 92, MSTP(92), CHMSTP(92)
1156           CH40='FSI SCI/GAL selection'
1157           WRITE(M11,6040) 1, MSWI(1), CH40
1158           CH40='FSI SCI/GAL sea quark treatment'
1159           WRITE(M11,6040) 2, MSWI(2), CH40
1160           CH40='FSI SCI/GAL sea quark treatment parm'
1161           WRITE(M11,6050) 1, PARSCI(1), CH40
1162           CH40='FSI SCI/GAL string reco probability R_0'
1163           WRITE(M11,6050) 2, PARSCI(2), CH40 
1164           WRITE(M11,5070) 16, MSTJ(16), CHMSTJ(16)
1165         ENDIF
1166 
1167       ELSE
1168         IF (MSTU(13).GE.1) WRITE(M11,5020) ITUNE
1169 
1170       ENDIF   
1171  
1172  9998 IF (MSTU(13).GE.1) WRITE(M11,6000) 
1173 
1174  9999 RETURN 
1175 
1176  5000 FORMAT(1x,78('*')/' *',76x,'*'/' *',3x,'PYTUNE v',A6,' : ',
1177      &    'Presets for underlying-event (and min-bias)',13x,'*'/' *',
1178      &    20x,'Last Change : ',A8,' - P. Skands',22x,'*'/' *',76x,'*')
1179  5010 FORMAT(' *',3x,I4,1x,A16,52x,'*')
1180  5020 FORMAT(' *',3x,'Tune ',I4, ' not recognized. Using defaults.')
1181  5030 FORMAT(' *',3x,10x,A60,3x,'*')
1182  5035 FORMAT(' *',3x,A70,3x,'*')
1183  5040 FORMAT(' *',5x,'MSTP(',I2,') = ',I12,3x,A42,3x,'*')
1184  5050 FORMAT(' *',5x,'PARP(',I2,') = ',F12.4,3x,A40,5x,'*')
1185  5060 FORMAT(' *',5x,'PARJ(',I2,') = ',F12.4,3x,A40,5x,'*')
1186  5070 FORMAT(' *',5x,'MSTJ(',I2,') = ',I12,3x,A40,5x,'*')
1187  5140 FORMAT(' *',5x,'MSTP(',I3,')= ',I12,3x,A40,5x,'*')
1188  5150 FORMAT(' *',5x,'PARP(',I3,')= ',F12.4,3x,A40,5x,'*')
1189  6000 FORMAT(' *',76x,'*'/1x,32('*'),1x,'END OF PYTUNE',1x,31('*')) 
1190  6040 FORMAT(' *',5x,'MSWI(',I1,')  = ',I12,3x,A40,5x,'*')
1191  6050 FORMAT(' *',5x,'PARSCI(',I1,')= ',F12.4,3x,A40,5x,'*')
1192 
1193       END