]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - JETAN/ua1_jet_finder.F
Modified constructor to better suit AliMUONTrackK
[u/mrichter/AliRoot.git] / JETAN / ua1_jet_finder.F
index 06eeaa06243e6ccb1690e4f79c9a93ce779617f7..2b0a74fd3be4b346f23fdf0047c856988f85d4b3 100755 (executable)
@@ -38,10 +38,10 @@ c:>------------------------------------------------------------------
       integer kpri
       data    kpri /0/
       integer njet, ncellj
-      real    etj, etaj, phij
+      real    etj, etaj, phij, etavg
 *    Results
       COMMON /UA1JETS/ NJET, ETJ(100), ETAJ(100,2), PHIJ(100,2), 
-     +     NCELLJ(100)
+     +     NCELLJ(100), ETAVG
 *    Cell Geometry
       COMMON /UA1CELL/ etaCellSize, phiCellSize
 *    Parameters
@@ -81,9 +81,7 @@ c:>------------------------------------------------------------------
      +      ,' ncell_tot ', i6)
         endif 
       endif
-      call hf1(idPerfomance, 1., 1.)
       occupationAll = float(ncell) / float(ncell_tot)
-      call hf1(111, occupationAll, 1.)
 ! print parameter - 27-sep-2001 by PAI
       ierror =0
       n_iter =0
@@ -116,7 +114,6 @@ c*-Initiator cell is the one with highest Et of not yet used ones
       j=index(i)
       if(i.eq.1. and. etc(j).lt.et_seed) then
         if(mode.eq.0 .or. (mode.eq.1 .and. n_iter.eq.1)) then
-          call hf1(idPerfomance, 2., 1.)
           print *,' no cell with Et higher than et_seed ->', etc(j)       
           return
         endif
@@ -230,26 +227,26 @@ c*-sum up unused cells within required distance of given eta/phi
             
 c*-reject cluster below minimum Ej_min
 c* protection (am)
-            etas=eta+etas/ets
-            arg = 0.
-            if (ets .ne. 0.) then
-               if (abs(etas/ets) .lt. 23.719) then
-                  arg = ets * cosh(etas/ets)
-               else
-                  arg = 1.e10
-               endif
-            endif
+
+c            arg = 0.
+c            if (ets .ne. 0.) then
+c               if (abs(etas/ets) .lt. 23.719) then
+c                  arg = ets * cosh(etas/ets)
+c               else
+c                  arg = 1.e10
+c               endif
+c            endif
             
-            if(arg .lt. ej_min) then
+            if(ets .lt. ej_min) then
                do k=1,ncell
                   if(flag(k).le.0) flag(k)=0
                enddo
-               if(njet.eq.0) call hf1(idPerfomance, 3., 1.)
             else
 c*-eles, store flags and jet variables
                do k=1,ncell
                   if(flag(k).eq.-1) flag(k)=1
                enddo
+               etas=eta+etas/ets
                phi=phi+phis/ets
                do while(phi .ge. C_2PI)
                   phi=phi-C_2PI
@@ -264,7 +261,7 @@ c*-eles, store flags and jet variables
                etaj(njet,2)=etas
                phij(njet,2)=phi
                ncellj(njet)=nc
-               call hf1(112, float(nc)/float(maxTowerInJet), 1.) ! 8-oct-2001
+               etavg = et_ave
             endif 
          endif
          i=i+1
@@ -297,7 +294,6 @@ c*-after 10 iteration, stop working and finish
 c*-Watch out!!! Here is a big jump!!! 
          endif
          occupationInJet = float(ncell) / float(ncell_tot)
-         call hf1(111, occupationInJet, 1.)
          write(*,*) njet,' jet found in ',n_iter,
      +     ' iteration(s) : EtSum, EtAve =',
      +     et_sum,et_sum/float(ncell_tot-nc)