]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PYTHIA/jetset/lu1ent.F
Coding convention rules obeyed
[u/mrichter/AliRoot.git] / PYTHIA / jetset / lu1ent.F
CommitLineData
fe4da5cc 1C*********************************************************************
2C*********************************************************************
3C* **
4C* December 1993 **
5C* **
6C* The Lund Monte Carlo for Jet Fragmentation and e+e- Physics **
7C* **
8C* JETSET version 7.4 **
9C* **
10C* Torbjorn Sjostrand **
11C* Department of theoretical physics 2 **
12C* University of Lund **
13C* Solvegatan 14A, S-223 62 Lund, Sweden **
14C* E-mail torbjorn@thep.lu.se **
15C* phone +46 - 46 - 222 48 16 **
16C* **
17C* LUSHOW is written together with Mats Bengtsson **
18C* **
19C* The latest program version and documentation is found on WWW **
20C* http://thep.lu.se/tf2/staff/torbjorn/Welcome.html **
21C* **
22C* Copyright Torbjorn Sjostrand and CERN, Geneva 1993 **
23C* **
24C*********************************************************************
25C*********************************************************************
26C *
27C List of subprograms in order of appearance, with main purpose *
28C (S = subroutine, F = function, B = block data) *
29C *
30C S LU1ENT to fill one entry (= parton or particle) *
31C S LU2ENT to fill two entries *
32C S LU3ENT to fill three entries *
33C S LU4ENT to fill four entries *
34C S LUJOIN to connect entries with colour flow information *
35C S LUGIVE to fill (or query) commonblock variables *
36C S LUEXEC to administrate fragmentation and decay chain *
37C S LUPREP to rearrange showered partons along strings *
38C S LUSTRF to do string fragmentation of jet system *
39C S LUINDF to do independent fragmentation of one or many jets *
40C S LUDECY to do the decay of a particle *
41C S LUKFDI to select parton and hadron flavours in fragm *
42C S LUPTDI to select transverse momenta in fragm *
43C S LUZDIS to select longitudinal scaling variable in fragm *
44C S LUSHOW to do timelike parton shower evolution *
45C S LUBOEI to include Bose-Einstein effects (crudely) *
46C F ULMASS to give the mass of a particle or parton *
47C S LUNAME to give the name of a particle or parton *
48C F LUCHGE to give three times the electric charge *
49C F LUCOMP to compress standard KF flavour code to internal KC *
50C S LUERRM to write error messages and abort faulty run *
51C F ULALEM to give the alpha_electromagnetic value *
52C F ULALPS to give the alpha_strong value *
53C F ULANGL to give the angle from known x and y components *
54C F RLU to provide a random number generator *
55C S RLUGET to save the state of the random number generator *
56C S RLUSET to set the state of the random number generator *
57C S LUROBO to rotate and/or boost an event *
58C S LUEDIT to remove unwanted entries from record *
59C S LULIST to list event record or particle data *
60C S LULOGO to write a logo for JETSET and PYTHIA *
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 COMMON/LUJETS/N,K(4000,5),P(4000,5),V(4000,5)
92 COMMON/LUDAT1/MSTU(200),PARU(200),MSTJ(200),PARJ(200)
93 COMMON/LUDAT2/KCHG(500,3),PMAS(500,4),PARF(2000),VCKM(4,4)
94 SAVE /LUJETS/,/LUDAT1/,/LUDAT2/
95
96C...Standard checks.
97 MSTU(28)=0
98 IF(MSTU(12).GE.1) CALL LULIST(0)
99 IPA=MAX(1,IABS(IP))
100 IF(IPA.GT.MSTU(4)) CALL LUERRM(21,
101 &'(LU1ENT:) writing outside LUJETS memory')
102 KC=LUCOMP(KF)
103 IF(KC.EQ.0) CALL LUERRM(12,'(LU1ENT:) unknown flavour code')
104
105C...Find mass. Reset K, P and V vectors.
106 PM=0.
107 IF(MSTU(10).EQ.1) PM=P(IPA,5)
108 IF(MSTU(10).GE.2) PM=ULMASS(KF)
109 DO 100 J=1,5
110 K(IPA,J)=0
111 P(IPA,J)=0.
112 V(IPA,J)=0.
113 100 CONTINUE
114
115C...Store parton/particle in K and P vectors.
116 K(IPA,1)=1
117 IF(IP.LT.0) K(IPA,1)=2
118 K(IPA,2)=KF
119 P(IPA,5)=PM
120 P(IPA,4)=MAX(PE,PM)
121 PA=SQRT(P(IPA,4)**2-P(IPA,5)**2)
122 P(IPA,1)=PA*SIN(THE)*COS(PHI)
123 P(IPA,2)=PA*SIN(THE)*SIN(PHI)
124 P(IPA,3)=PA*COS(THE)
125
126C...Set N. Optionally fragment/decay.
127 N=IPA
128 IF(IP.EQ.0) CALL LUEXEC
129
130 RETURN
131 END