]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PHOS/reconstruction/recons_v3.f
a6e167c36e06603cb3db359bcc83764142988557
[u/mrichter/AliRoot.git] / PHOS / reconstruction / recons_v3.f
1 ************************************************************************
2
3         subroutine reconsfirst(ampshum,s1gev)
4
5         common /comgeom/igeomflag
6         include 'event_format.inc'
7         include 'comgl.for'
8         include 'comalwl.for'
9         include 'comwlgen.for'
10         include 'comgam.for'
11         include 'comggen.for'
12
13         data ifl/0/
14         if(ifl.eq.0) then
15                 call iniwl(ampshum,s1gev)
16         ifl=1
17         endif
18         igeomflag=1     ! Rectangular geometry
19
20         if( amount_of_crystals_on_Z.NE.104 .OR.
21      +      amount_of_crystals_on_PHI.NE.88 ) THEN
22            print *, 'Nz x Nphi ',amount_of_crystals_on_Z,
23      +         ' x ',amount_of_crystals_on_PHI
24          stop 'Reconstruction: Cradle size must be Nz x Nphi = 104 x 88'
25          endif
26
27         nmmmax=crystals_matrix_amount_PHOS
28         if(crystals_matrix_amount_PHOS.ne.1) then
29           write (*,*) ' WRONG GEOMETRY: WRONG NUMBER OF CRADLES '
30           stop
31         endif
32
33         call clrcompart ! nbpart=0
34
35         i=1     ! Cradle number
36         nggl=crystals_amount_with_amplitudes(i)
37         call vzero(wl,nt)
38
39         do n=1,nggl
40           eggl(n)=crystals_amplitudes_Iad(1,n,i)*crystal_amplitudes_unit
41           mggl(n)=crystals_amplitudes_Iad(2,n,i)+1
42
43           m=mggl(n)
44           ewlm=eggl(n)
45           wl(m)=ewlm
46         enddo
47
48
49         eporog =0.005
50         call extrgw(nt,wl,ipgl,mgl,egl,eporog)
51         nglw(1)=ipgl
52         call vzero(wl,nt)
53
54         call mygl
55
56         return
57         end
58
59 ************************************************************************