]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TEvtGen/EvtGenModels/continuumCDF.F
added a histogram
[u/mrichter/AliRoot.git] / TEvtGen / EvtGenModels / continuumCDF.F
CommitLineData
da0e9ce3 1C--------------------------------------------------------------------------
2C
3C Environment:
4C This software is part of the EvtGen package developed jointly
5C for the BaBar and CLEO collaborations. If you use all or part
6C of it, please give an appropriate acknowledgement.
7C
8C Copyright Information: See EvtGen/COPYRIGHT
9C Copyright (C) 1998 Caltech, UCSB
10C
11C Module: continuum.F
12C
13C Description:
14C
15C Modification history:
16C
17C DJL/RYD August 11, 1998 Module created
18C
19C------------------------------------------------------------------------
20 subroutine continuumcdf(energy,flavor,ndaug,kf,px,py,pz,e)
21
22 implicit none
23
24 common/lyjets/n,k(4000,5),p(4000,5),v(4000,5)
25
26 integer n,k
27 real p,v
28
29 real*8 pxsum,pysum,pzsum
30
31 real*8 energy
32
33 real senergy
34
35 integer lycomp
36 external lycomp
37
38 integer flavor,kf(100),i,ndaug,istart
39 real*8 px(100),py(100),pz(100),e(100)
40
41 senergy=energy
42
43C if(flavor.ne.0) kf_user=flavor
44C flavor = kf_user
45
46
47C call lyeevt(kf_user,senergy) ! e+e- --> qq shower parton model
48 4 call lyeevt(flavor,senergy) ! e+e- --> qq shower parton model
49
50C call lylist(1)
51
52 ndaug=0
53
54C--- Save the primary quarks
55
56 do 1,i=1,n
57 if(abs(k(i,2)).gt.6) goto 1
58 if(k(i,2).eq.0) goto 1
59 if(k(i,3).ne.0) goto 1
60 ndaug=ndaug+1
61 kf(ndaug)=k(i,2)
62 px(ndaug)=p(i,1)
63 py(ndaug)=p(i,2)
64 pz(ndaug)=p(i,3)
65 e(ndaug) =p(i,4)
661 continue
67
68C sum to check that we preserve momentum
69 pxsum=0.0
70 pysum=0.0
71 pzsum=0.0
72
73 istart=0
74
75 do 2, i=1,n
76 if(k(i,3).le.0.and.k(i,2).ne.22) goto 2
77c if particle is jet or cluster
78
79 if (k(i,2).eq.22.and.istart.eq.0) goto 22
80 if ( k(i,3).le.0) goto 2
81
82 if(k(k(i,3),2).eq.92.or.k(k(i,3),2).eq.91) goto 22
83
84 goto 2
85
86 22 continue
87C Copy particle. If parent is cluster or string or photon if
88C before first cluster or string. Uggly...
89 if (k(i,2).ne.22) istart=1
90 ndaug = ndaug + 1
91 kf(ndaug)=k(i,2)
92 px(ndaug)=p(i,1)
93 py(ndaug)=p(i,2)
94 pz(ndaug)=p(i,3)
95 pxsum=pxsum+px(ndaug)
96 pysum=pysum+py(ndaug)
97 pzsum=pzsum+pz(ndaug)
98 e(ndaug) =p(i,4)
99 2 continue
100
101
102 if (abs(pxsum).gt.0.001.or.
103 + abs(pysum).gt.0.001.or.
104 + abs(pzsum).gt.0.001) then
105
106
107 print *, 'Momentum not conserved in jetset fragmentation:'
108 print *,'dPx:',pxsum,' dPy:',pysum,' dPz:',pzsum
109
110 call lylist(1)
111
112 goto 4
113
114 endif
115
116 return
117 end
118
119
120
121
122
123