C++ Interface to Tauola
photos/demo/phodem.f
1/* copyright(c) 1991-2025 free software foundation, inc.
2 this file is part of the gnu c library.
3
4 the gnu c library is free software; you can redistribute it and/or
5 modify it under the terms of the gnu lesser general Public
6 license as published by the free software foundation; either
7 version 2.1 of the license, or(at your option) any later version.
8
9 the gnu c library is distributed in the hope that it will be useful,
10 but without any warranty; without even the implied warranty of
11 merchantability or fitness for a particular purpose. see the gnu
12 lesser general Public license for more details.
13
14 you should have received a copy of the gnu lesser general Public
15 license along with the gnu c library; if not, see
16 <https://www.gnu.org/licenses/>. */
17
18
19/* this header is separate from features.h so that the compiler can
20 include it implicitly at the start of every compilation. it must
21 not itself include <features.h> or any other header that includes
22 <features.h> because the implicit include comes before any feature
23 test macros that may be defined in a source file before it first
24 explicitly includes a system header. gcc knows the name of this
25 header in order to preinclude it. */
26
27/* glibc's intent is to support the IEC 559 math functionality, real
28 and complex. If the GCC (4.9 and later) predefined macros
29 specifying compiler intent are available, use them to determine
30 whether the overall intent is to support these features; otherwise,
31 presume an older compiler has intent to support these features and
32 define these macros by default. */
33
34
35
36/* wchar_t uses Unicode 10.0.0. Version 10.0 of the Unicode Standard is
37 synchronized with ISO/IEC 10646:2017, fifth edition, plus
38 the following additions from Amendment 1 to the fifth edition:
39 - 56 emoji characters
40 - 285 hentaigana
41 - 3 additional Zanabazar Square characters */
42
43C.----------------------------------------------------------------------
44C.
45C. PHOTOS: PHOton radiation in decays TeST program
46C.
47C. Purpose: Example of application of PHOTOS.
48C.
49C. Input Parameters: None
50C.
51C. Output Parameters: None
52C.
53C. Author(s): B. van Eijk, E. Barberio Created at: 31/05/90
54C. Last Update: 05/06/90
55C.
56C.----------------------------------------------------------------------
57 PROGRAM PHOTST
58C IMPLICIT NONE
59 INTEGER EVENT,NHEP0
60C this is the hepevt class in old style. No d_h_ class pre-name
61 INTEGER NMXHEP
62 PARAMETER (NMXHEP=10000)
63 REAL*8 phep, vhep ! to be real*4/ *8 depending on host
64 INTEGER nevhep,nhep,isthep,idhep,jmohep,
65 $ jdahep
66 COMMON /hepevt/
67 $ nevhep, ! serial number
68 $ nhep, ! number of particles
69 $ isthep(nmxhep), ! status code
70 $ idhep(nmxhep), ! particle ident KF
71 $ jmohep(2,nmxhep), ! parent particles
72 $ jdahep(2,nmxhep), ! childreen particles
73 $ phep(5,nmxhep), ! four-momentum, mass [GeV]
74 $ vhep(4,nmxhep) ! vertex [mm]
75* ----------------------------------------------------------------------
76 LOGICAL qedrad
77 COMMON /phoqed/
78 $ qedrad(nmxhep) ! Photos flag
79* ----------------------------------------------------------------------
80 SAVE hepevt,phoqed
81 INTEGER PHLUN
82 COMMON/PHOLUN/PHLUN
83C--
84C-- Initialise PHOTOS
85 CALL PHOINI
86C--
87C-- Loop over JETSET event until PHOTOS has generated one or more pho-
88C-- tons. Do this for 10 JETSET events. The event record is printed
89C-- before and after photon emission.
90 DO 20 EVENT=1,1
91 CALL LUEEVT(4,91.)
92C--
93C-- Conversion to /HEPEVT/ standard
94 CALL LUHEPC(1)
95C--
96C-- Write event record before emission...
97 NEVHEP=EVENT
98 CALL PHODMP
99 NHEP0=NHEP
100C--
101C-- Generate photon(s)... Arbitrary enforced generation.
102.EQ.C-- Normally line: IF (NHEPNHEP0) GOTO 10 must be absent!
103 10 CALL PHOTOS(1)
104.EQ. IF (NHEPNHEP0) GOTO 10
105C--
106C-- Write event record...
107 WRITE(PHLUN,9050)
108 WRITE(PHLUN,9040)
109 CALL PHODMP
110 20 CONTINUE
111 WRITE(PHLUN,9000)
112 WRITE(PHLUN,9010)
113 WRITE(PHLUN,9020)
114 WRITE(PHLUN,9030)
115 WRITE(PHLUN,9020)
116 WRITE(PHLUN,9010)
117 STOP
118 9000 FORMAT(1H1)
119 9010 FORMAT(1H ,80('*'))
120 9020 FORMAT(1H ,'*',78X,'*')
121 9030 FORMAT(1H ,'**** photos test run has successfully ended',32X,
122 &' ****')
123 9040 FORMAT(1H ,26X,'=== after photos: ===')
124 9050 FORMAT(1H0,80('='))
125 END