![]() |
|
|||
File indexing completed on 2025-08-05 08:21:21
0001 0002 C...Old example: handles a simple Pythia 6.4 event file. 0003 0004 c SUBROUTINE UPEVNT 0005 0006 C...Double precision and integer declarations. 0007 c IMPLICIT DOUBLE PRECISION(A-H, O-Z) 0008 c IMPLICIT INTEGER(I-N) 0009 0010 C...Commonblocks. 0011 c COMMON/PYDAT1/MSTU(200),PARU(200),MSTJ(200),PARJ(200) 0012 c COMMON/PYPARS/MSTP(200),PARP(200),MSTI(200),PARI(200) 0013 c SAVE /PYDAT1/,/PYPARS/ 0014 0015 C...User process event common block. 0016 c INTEGER MAXNUP 0017 c PARAMETER (MAXNUP=500) 0018 c INTEGER NUP,IDPRUP,IDUP,ISTUP,MOTHUP,ICOLUP 0019 c DOUBLE PRECISION XWGTUP,SCALUP,AQEDUP,AQCDUP,PUP,VTIMUP,SPINUP 0020 c COMMON/HEPEUP/NUP,IDPRUP,XWGTUP,SCALUP,AQEDUP,AQCDUP,IDUP(MAXNUP), 0021 c &ISTUP(MAXNUP),MOTHUP(2,MAXNUP),ICOLUP(2,MAXNUP),PUP(5,MAXNUP), 0022 c &VTIMUP(MAXNUP),SPINUP(MAXNUP) 0023 c SAVE /HEPEUP/ 0024 0025 C...Read info from file. 0026 c IF(MSTP(162).GT.0) THEN 0027 c READ(MSTP(162),*,END=110,ERR=110) NUP,IDPRUP,XWGTUP,SCALUP, 0028 c & AQEDUP,AQCDUP 0029 c DO 100 I=1,NUP 0030 c READ(MSTP(162),*,END=110,ERR=110) IDUP(I),ISTUP(I), 0031 c & MOTHUP(1,I),MOTHUP(2,I),ICOLUP(1,I),ICOLUP(2,I), 0032 c & (PUP(J,I),J=1,5),VTIMUP(I),SPINUP(I) 0033 c 100 CONTINUE 0034 c RETURN 0035 C...Special when reached end of file or other error. 0036 c 110 NUP=0 0037 0038 C...Else not implemented. 0039 c ELSE 0040 c WRITE(MSTU(11),5000) 0041 c STOP 0042 c ENDIF 0043 0044 C...Format for error printout. 0045 c 5000 FORMAT(1X,'Error: You have not implemented UPEVNT routine'/ 0046 c &1X,'Dummy routine in PYTHIA file called instead.'/ 0047 c &1X,'Execution stopped!') 0048 0049 c RETURN 0050 c END 0051 0052 C********************************************************************* 0053 0054 C...UPVETO 0055 C...Dummy routine, to be replaced by user, to veto event generation 0056 C...on the parton level, after parton showers but before multiple 0057 C...interactions, beam remnants and hadronization is added. 0058 C...If resonances like W, Z, top, Higgs and SUSY particles are handed 0059 C...undecayed from UPEVNT, or are generated by PYTHIA, they will also 0060 C...be undecayed at this stage; if decayed their decay products will 0061 C...have been allowed to shower. 0062 0063 C...All partons at the end of the shower phase are stored in the 0064 C...HEPEVT commonblock. The interesting information is 0065 C...NHEP = the number of such partons, in entries 1 <= i <= NHEP, 0066 C...IDHEP(I) = the particle ID code according to PDG conventions, 0067 C...PHEP(J,I) = the (p_x, p_y, p_z, E, m) of the particle. 0068 C...All ISTHEP entries are 1, while the rest is zeroed. 0069 0070 C...The user decision is to be conveyed by the IVETO value. 0071 C...IVETO = 0 : retain current event and generate in full; 0072 C... = 1 : abort generation of current event and move to next. 0073 0074 SUBROUTINE UPVETO(IVETO) 0075 0076 C...HEPEVT commonblock. 0077 PARAMETER (NMXHEP=4000) 0078 COMMON/HEPEVT/NEVHEP,NHEP,ISTHEP(NMXHEP),IDHEP(NMXHEP), 0079 &JMOHEP(2,NMXHEP),JDAHEP(2,NMXHEP),PHEP(5,NMXHEP),VHEP(4,NMXHEP) 0080 DOUBLE PRECISION PHEP,VHEP 0081 SAVE /HEPEVT/ 0082 0083 C...Next few lines allow you to see what info PYVETO extracted from 0084 C...the full event record for the first two events. 0085 C...Delete if you don't want it. 0086 DATA NLIST/0/ 0087 SAVE NLIST 0088 IF(NLIST.LE.2) THEN 0089 WRITE(*,*) ' Full event record at time of UPVETO call:' 0090 CALL PYLIST(1) 0091 WRITE(*,*) ' Part of event record made available to UPVETO:' 0092 CALL PYLIST(5) 0093 NLIST=NLIST+1 0094 ENDIF 0095 0096 C...Make decision here. 0097 IVETO = 0 0098 0099 RETURN 0100 END
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |