]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PHOS/shaker/lu1ent.f
Syntax problems on HP-UX corrected
[u/mrichter/AliRoot.git] / PHOS / shaker / lu1ent.f
CommitLineData
fe4da5cc 1*CMZ : 17/07/98 15.44.31 by Federico Carminati
2*-- Author :
3C*********************************************************************
4C*********************************************************************
5C* **
6C* May 1990 **
7C* **
8C* The Lund Monte Carlo for Jet Fragmentation and e+e- Physics **
9C* **
10C* JETSET version 7.3 **
11C* **
12C* Torbjorn Sjostrand **
13C* **
14C* CERN/TH, CH-1211 Geneva 23 **
15C* BITNET/EARN address TORSJO@CERNVM **
16C* Tel. +22 - 767 28 20 **
17C* **
18C* LUSHOW is written together with Mats Bengtsson **
19C* **
20C* A complete manual exists on a separate file **
21C* Please report any program errors to the author! **
22C* **
23C* Copyright Torbjorn Sjostrand **
24C* **
25C* Modified by F. Antinori 5.12.91 for high multiplicity **
26C*********************************************************************
27C*********************************************************************
28C *
29C List of subprograms in order of appearance, with main purpose *
30C (S = subroutine, F = function, B = block data) *
31C *
32C S LU1ENT to fill one entry (= parton or particle) *
33C S LU2ENT to fill two entries *
34C S LU3ENT to fill three entries *
35C S LU4ENT to fill four entries *
36C S LUJOIN to connect entries with colour flow information *
37C S LUGIVE to fill (or query) commonblock variables *
38C S LUEXEC to administrate fragmentation and decay chain *
39C S LUPREP to rearrange showered partons along strings *
40C S LUSTRF to do string fragmentation of jet system *
41C S LUINDF to do independent fragmentation of one or many jets *
42C S LUDECY to do the decay of a particle *
43C S LUKFDI to select parton and hadron flavours in fragm *
44C S LUPTDI to select transverse momenta in fragm *
45C S LUZDIS to select longitudinal scaling variable in fragm *
46C S LUSHOW to do timelike parton shower evolution *
47C S LUBOEI to include Bose-Einstein effects (crudely) *
48C F ULMASS to give the mass of a particle or parton *
49C S LUNAME to give the name of a particle or parton *
50C F LUCHGE to give three times the electric charge *
51C F LUCOMP to compress standard KF flavour code to internal KC *
52C S LUERRM to write error messages and abort faulty run *
53C F ULALPS to give the alpha_strong value *
54C F ULANGL to give the angle from known x and y components *
55C F RLU to provide a random number generator *
56C S RLUGET to save the state of the random number generator *
57C S RLUSET to set the state of the random number generator *
58C S LUROBO to rotate and/or boost an event *
59C S LUEDIT to remove unwanted entries from record *
60C S LULIST to list event record or particle data *
61C S LUUPDA to update particle data *
62C F KLU to provide integer-valued event information *
63C F PLU to provide real-valued event information *
64C S LUSPHE to perform sphericity analysis *
65C S LUTHRU to perform thrust analysis *
66C S LUCLUS to perform three-dimensional cluster analysis *
67C S LUCELL to perform cluster analysis in (eta, phi, E_T) *
68C S LUJMAS to give high and low jet mass of event *
69C S LUFOWO to give Fox-Wolfram moments *
70C S LUTABU to analyze events, with tabular output *
71C *
72C S LUEEVT to administrate the generation of an e+e- event *
73C S LUXTOT to give the total cross-section at given CM energy *
74C S LURADK to generate initial state photon radiation *
75C S LUXKFL to select flavour of primary qqbar pair *
76C S LUXJET to select (matrix element) jet multiplicity *
77C S LUX3JT to select kinematics of three-jet event *
78C S LUX4JT to select kinematics of four-jet event *
79C S LUXDIF to select angular orientation of event *
80C S LUONIA to perform generation of onium decay to gluons *
81C *
82C S LUHEPC to convert between /LUJETS/ and /HEPEVT/ records *
83C S LUTEST to test the proper functioning of the package *
84C B LUDATA to contain default values and particle data *
85C *
86C*********************************************************************
87
88 SUBROUTINE LU1ENT(IP,KF,PE,THE,PHI)
89
90C...Purpose: to store one parton/particle in commonblock LUJETS.
91*KEEP,LUJETS.
92 COMMON /LUJETS/ N,K(200000,5),P(200000,5),V(200000,5)
93 SAVE /LUJETS/
94*KEEP,LUDAT1.
95 COMMON /LUDAT1/ MSTU(200),PARU(200),MSTJ(200),PARJ(200)
96 SAVE /LUDAT1/
97*KEEP,LUDAT2.
98 COMMON /LUDAT2/ KCHG(500,3),PMAS(500,4),PARF(2000),VCKM(4,4)
99 SAVE /LUDAT2/
100*KEND.
101
102C...Standard checks.
103 MSTU(28)=0
104 IF(MSTU(12).GE.1) CALL LULIST(0)
105 IPA=MAX(1,IABS(IP))
106 IF(IPA.GT.MSTU(4)) CALL LUERRM(21,
107 &'(LU1ENT:) writing outside LUJETS memory')
108 KC=LUCOMP(KF)
109 IF(KC.EQ.0) CALL LUERRM(12,'(LU1ENT:) unknown flavour code')
110
111C...Find mass. Reset K, P and V vectors.
112 PM=0.
113 IF(MSTU(10).EQ.1) PM=P(IPA,5)
114 IF(MSTU(10).GE.2) PM=ULMASS(KF)
115 DO 100 J=1,5
116 K(IPA,J)=0
117 P(IPA,J)=0.
118 100 V(IPA,J)=0.
119
120C...Store parton/particle in K and P vectors.
121 K(IPA,1)=1
122 IF(IP.LT.0) K(IPA,1)=2
123 K(IPA,2)=KF
124 P(IPA,5)=PM
125 P(IPA,4)=MAX(PE,PM)
126 PA=SQRT(P(IPA,4)**2-P(IPA,5)**2)
127 P(IPA,1)=PA*SIN(THE)*COS(PHI)
128 P(IPA,2)=PA*SIN(THE)*SIN(PHI)
129 P(IPA,3)=PA*COS(THE)
130
131C...Set N. Optionally fragment/decay.
132 N=IPA
133 IF(IP.EQ.0) CALL LUEXEC
134
135 RETURN
136 END