Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:07:24

0001  
0002 C*********************************************************************
0003  
0004 C...PYEVWT
0005 C...Dummy routine, which the user can replace in order to multiply the
0006 C...standard PYTHIA differential cross-section by a process- and
0007 C...kinematics-dependent factor WTXS. For MSTP(142)=1 this corresponds
0008 C...to generation of weighted events, with weight 1/WTXS, while for
0009 C...MSTP(142)=2 it corresponds to a modification of the underlying
0010 C...physics.
0011  
0012       SUBROUTINE PYEVWT(WTXS)
0013  
0014 C...Double precision and integer declarations.
0015       IMPLICIT DOUBLE PRECISION(A-H, O-Z)
0016       IMPLICIT INTEGER(I-N)
0017 C...Commonblocks.
0018       COMMON/PYDAT1/MSTU(200),PARU(200),MSTJ(200),PARJ(200)
0019       COMMON/PYPARS/MSTP(200),PARP(200),MSTI(200),PARI(200)
0020       COMMON/PYINT1/MINT(400),VINT(400)
0021       COMMON/PYINT2/ISET(500),KFPR(500,2),COEF(500,20),ICOL(40,4,2)
0022       COMMON/PYSUBS/MSEL,MSELPD,MSUB(500),KFIN(2,-40:40),CKIN(200)
0023       SAVE /PYDAT1/,/PYINT1/,/PYINT2/,/PYSUBS/
0024 C... CSA specific 
0025       integer CSAMODE
0026       integer pad
0027       double precision  MUONRW, GAMMAJRW, ZJRW, ZPRW, HLTRW,
0028      &  SUSYRW, WWRW, PTPOWER
0029       common /EXPAR/ pad, CSAMODE,MUONRW, GAMMAJRW, ZJRW, ZPRW, 
0030      &  HLTRW, SUSYRW, WWRW, PTPOWER
0031  
0032 C...Set default weight for WTXS.
0033 
0034 C      write(*,*) 'Reweighting event ...'
0035       WTXS=1D0
0036  
0037 C...Read out subprocess number.
0038       ISUB=MINT(1)
0039       ISTSB=ISET(ISUB)
0040  
0041 C...Read out tau, y*, cos(theta), tau' (where defined, else =0).
0042       TAU=VINT(21)
0043       YST=VINT(22)
0044       CTH=0D0
0045       IF(ISTSB.EQ.2.OR.ISTSB.EQ.4) CTH=VINT(23)
0046       TAUP=0D0
0047       IF(ISTSB.GE.3.AND.ISTSB.LE.5) TAUP=VINT(26)
0048  
0049 C...Read out x_1, x_2, x_F, shat, that, uhat, p_T^2.
0050       X1=VINT(41)
0051       X2=VINT(42)
0052       XF=X1-X2
0053       SHAT=VINT(44)
0054       THAT=VINT(45)
0055       UHAT=VINT(46)
0056       PT2=VINT(48)
0057 
0058       PTHAT = SQRT(PT2)  
0059  
0060  
0061 C     CSAMODE  :   selection of reweighting algorithm for CSA06 production
0062 C                  1 for QCD dijet
0063 C                  2 for EWK soup 
0064 C                  3 for HLT soup
0065 C                  4 for soft muon soup
0066 C                  5 for exotics soup ?
0067 C                  6 for cross-section reweighted quarkonia production
0068 
0069  
0070       IF (CSAMODE.LE.0.OR.CSAMODE.GT.7) THEN
0071          write (*,*) ' CSAMODE not properly set !! No reweighting!! '
0072          write (*,*) ' CSAMODE = ', CSAMODE
0073       ENDIF      
0074 
0075  
0076  
0077 C...Optional printout
0078  
0079 C      write (*,*) ' CSAMODE = ', CSAMODE
0080 C      write (*,*) ' MUONRW = ', MUONRW
0081 C      write (*,*) ' GAMMAJRW = ', GAMMAJRW
0082 C      write (*,*) ' ZJRW = ', ZJRW
0083  
0084 C...Weights for QCD dijet sample
0085       
0086       IF (CSAMODE.EQ.1) THEN
0087 
0088       IF (ISUB.EQ.11.OR.ISUB.EQ.68.OR.ISUB.EQ.28.OR.ISUB.EQ.53
0089      & .OR.ISUB.EQ.12.OR.ISUB.EQ.13) THEN 
0090        IF(PTHAT.GE.0.AND.PTHAT.LT.15) WTXS = 0.025 
0091        IF(PTHAT.GE.15.AND.PTHAT.LT.20) WTXS = 1.8405931
0092        IF(PTHAT.GE.20.AND.PTHAT.LT.30) WTXS = 8.60482502 
0093        IF(PTHAT.GE.30.AND.PTHAT.LT.50) WTXS = 35.4135551 
0094        IF(PTHAT.GE.50.AND.PTHAT.LT.80) WTXS = 263.720733 
0095        IF(PTHAT.GE.80.AND.PTHAT.LT.120) WTXS = 936.023193
0096        IF(PTHAT.GE.120.AND.PTHAT.LT.170) WTXS = 5525.80176
0097        IF(PTHAT.GE.170.AND.PTHAT.LT.230) WTXS = 27337.9121
0098        IF(PTHAT.GE.230.AND.PTHAT.LT.300) WTXS = 115738.633
0099        IF(PTHAT.GE.300.AND.PTHAT.LT.380) WTXS = 432008.344
0100        IF(PTHAT.GE.380.AND.PTHAT.LT.470) WTXS = 1461105.62
0101        IF(PTHAT.GE.470.AND.PTHAT.LT.600) WTXS = 3999869.75
0102        IF(PTHAT.GE.600.AND.PTHAT.LT.800) WTXS = 8180579.5
0103        IF(PTHAT.GE.800.AND.PTHAT.LT.1000) WTXS = 46357008.
0104        IF(PTHAT.GE.1000.AND.PTHAT.LT.1400) WTXS = 152645456.
0105        IF(PTHAT.GE.1400.AND.PTHAT.LT.1800) WTXS = 1.56872026D9
0106        IF(PTHAT.GE.1800.AND.PTHAT.LT.2200) WTXS = 1.14387118D10
0107        IF(PTHAT.GE.2200.AND.PTHAT.LT.2600) WTXS = 6.9543682D10
0108        IF(PTHAT.GE.2600.AND.PTHAT.LT.3000) WTXS = 3.86604466D11
0109        IF(PTHAT.GE.3000.AND.PTHAT.LT.3500) WTXS = 1.96279625D12
0110        IF(PTHAT.GE.3500.AND.PTHAT.LT.4000) WTXS = 1.70783513D13
0111 
0112       ENDIF
0113 
0114       IF (ISUB.EQ.14.OR.ISUB.EQ.29) THEN
0115        IF(PTHAT.GE.9.AND.PTHAT.LT.44) WTXS = 36
0116        IF(PTHAT.GE.44.AND.PTHAT.LT.220) WTXS = 7500
0117        IF (GAMMAJRW.GT.(1.0D-14)) WTXS = WTXS * GAMMAJRW
0118       ENDIF
0119 
0120       IF (ISUB.EQ.15.OR.ISUB.EQ.30) THEN
0121        IF(PTHAT.GE.9.AND.PTHAT.LT.44) WTXS = 10.6
0122        IF(PTHAT.GE.44.AND.PTHAT.LT.220) WTXS = 90
0123        IF (ZJRW.GT.(1.0D-14)) WTXS = WTXS * ZJRW
0124       ENDIF
0125 
0126      
0127 
0128 C... Fit function form
0129 C      WTXS = (150.564d0*(PT2/25.0d0)**(6.28335d0)*
0130 C     & exp(-6.28335d0*(PT2/25.0d0))
0131 C     & + 0.035313d0*PT2-0.00628d0*log(PT2+1)*log(PT2+1))/
0132 C     & (1.04992d0*exp(-0.245*PT2)) 
0133 
0134       ENDIF
0135  
0136  
0137 C...Weights for EWK sample
0138     
0139       IF (CSAMODE.EQ.2) THEN
0140  
0141       IF (ISUB.EQ.2) WTXS=0.2
0142       IF (ISUB.EQ.102) WTXS=400.    
0143       IF (ISUB.EQ.123) WTXS=400.    
0144       IF (ISUB.EQ.124) WTXS=400.  
0145       
0146       IF (ISUB.EQ.25) WTXS = WWRW 
0147             
0148       ENDIF
0149       
0150 C... Weights for HLT sample
0151 
0152       IF (CSAMODE.EQ.3) THEN
0153       
0154 c      IF (ISUB.EQ.2) WTXS=0.2 
0155       IF (ISUB.EQ.11.OR.ISUB.EQ.68.OR.ISUB.EQ.28.OR.ISUB.EQ.53
0156      & .OR.ISUB.EQ.12.OR.ISUB.EQ.13) THEN 
0157         IF(PTHAT.LT.350) THEN 
0158          WTXS=1.0D-8 
0159          IF (HLTRW.GT.(1.0D-14)) WTXS = WTXS * HLTRW
0160         ENDIF
0161         IF(PTHAT.GE.350) WTXS=1.0       
0162       ENDIF
0163 c      IF (ISUB.EQ.81.OR.ISUB.EQ.82) WTXS=100. 
0164        
0165       ENDIF      
0166 
0167 C...Weights for Soft Muon sample
0168 
0169       IF (CSAMODE.EQ.4) THEN
0170       
0171        IF (ISUB.EQ.86) THEN
0172          WTXS = 1.25D7       
0173          IF (MUONRW.GT.(1.0D-14)) WTXS = WTXS * MUONRW
0174        ENDIF
0175       
0176       ENDIF
0177 
0178 C...Optional weights for zprime and susy (exotics soup?)
0179 
0180       IF (CSAMODE.GE.1.OR.CSAMODE.LE.3.OR.CSAMODE.EQ.5) THEN
0181       
0182       
0183         IF (ISUB.EQ.141) THEN
0184           IF (ZPRW.GT.(1.0D-14)) WTXS = ZPRW 
0185         ENDIF
0186        
0187         IF (ISUB.GE.201.AND.ISUB.LE.296) THEN
0188           IF (SUSYRW.GT.(1.0D-14)) WTXS = SUSYRW 
0189         ENDIF
0190 
0191       ENDIF 
0192 
0193 
0194 C...Weights for cross-section reweighted quarkonia      
0195 
0196       IF (CSAMODE.EQ.6) THEN
0197 
0198 C...Copy form for pT0 as used in multiple interactions.
0199       PT0=PARP(82)*(VINT(1)/PARP(89))**PARP(90)
0200       PT20=PT0**2
0201 
0202 C...Introduce dampening factor. 
0203       WTXS=(PT2/(PT20+PT2))**2
0204 
0205 C...Also dampen alpha_strong by using larger Q2 scale.
0206       Q2=VINT(52)
0207       WTXS=WTXS*(PYALPS(PT20+Q2)/PYALPS(Q2))**3
0208 
0209       ENDIF 
0210 
0211       IF (CSAMODE.EQ.7) THEN
0212         WTXS=(PTHAT/CKIN(3))**PTPOWER
0213       ENDIF
0214        
0215 
0216       RETURN
0217       END