Commits

Anonymous committed de2b461

remove dependency to HBOOK

Comments (0)

Files changed (2)

acerdet_src/acerdet.f

 c....min E_T for energy in cell to count unused cell
       READ(NINP,'(F10.4)') YPAR(90)
 C------------------------------------->>>>>
- 
       ENDIF
 C     ====
 
       NBETA=NINT(2*ETACEL/DBETA)
       NBPHI=NINT(6.4/DBPHI)
 
-
       WRITE(NOUT,BXOPE)
       WRITE(NOUT,BXTXT) '*********************************'
       WRITE(NOUT,BXTXT) '*     *****************         *'
       NBINA = 50
       TMAXA = 500.0
       TMINA = 0.0
-      CALL HBOOK1(IDENT+1,'ACDCEL: cells multiplicity $',
-     #                                     NBINA,TMINA,TMAXA,0.0)       
+c      CALL HBOOK1(IDENT+1,'ACDCEL: cells multiplicity $',
+c     #                                     NBINA,TMINA,TMAXA,0.0)       
 
       IEVENT = 0
  
       ENDIF 
   140 CONTINUE
 c.....histogram NCELL
-      CALL HF1(IDENT+1,REAL(NCELL),1.0)
+c      CALL HF1(IDENT+1,REAL(NCELL),1.0)
 C>>>>
 
 C
       
       WRITE(NOUT,BXCLO)
       
-      CALL HPRINT(IDENT+1)
+c      CALL HPRINT(IDENT+1)
 
       ENDIF
 C     =====
       NBINA = 10
       TMAXA = 10.0
       TMINA = 0.0
-      CALL HBOOK1(IDENT+1,'ACDCLU: clusters multiplicity $',
-     #                                     NBINA,TMINA,TMAXA,0.0)       
+c      CALL HBOOK1(IDENT+1,'ACDCLU: clusters multiplicity $',
+c     #                                     NBINA,TMINA,TMAXA,0.0)       
       NBINA = 50
       TMAXA =   0.5
       TMINA =  -0.5
-      CALL HBOOK1(IDENT+11,'ACDCLU: delta phi clu-barycentre $',
-     #                                     NBINA,TMINA,TMAXA,0.)       
-      CALL HBOOK1(IDENT+12,'ACDCLU: delta eta clu-barycentre  $',
-     #                                     NBINA,TMINA,TMAXA,0.)       
+c      CALL HBOOK1(IDENT+11,'ACDCLU: delta phi clu-barycentre $',
+c     #                                     NBINA,TMINA,TMAXA,0.)       
+c      CALL HBOOK1(IDENT+12,'ACDCLU: delta eta clu-barycentre  $',
+c     #                                     NBINA,TMINA,TMAXA,0.)       
       NBINA = 50
       TMAXA =   0.5
       TMINA =   0.0
-      CALL HBOOK1(IDENT+13,'ACDCLU: delta r clu-barycentre $',
-     #                                     NBINA,TMINA,TMAXA,0.)       
-      CALL HBOOK1(IDENT+23,'ACDCLU: delta r clu-parton $',
-     #                                     NBINA,TMINA,TMAXA,0.)       
+c      CALL HBOOK1(IDENT+13,'ACDCLU: delta r clu-barycentre $',
+c     #                                     NBINA,TMINA,TMAXA,0.)       
+c      CALL HBOOK1(IDENT+23,'ACDCLU: delta r clu-parton $',
+c     #                                     NBINA,TMINA,TMAXA,0.)       
       NBINA = 50
       TMAXA =   2.0
       TMINA =   0.0
-      CALL HBOOK1(IDENT+14,'ACDCLU: pTclu/SumpTparticle $',
-     #                                     NBINA,TMINA,TMAXA,0.)       
-      CALL HBOOK1(IDENT+24,'ACDCLU: pTclu/pTparton $',
-     #                                     NBINA,TMINA,TMAXA,0.)       
+c      CALL HBOOK1(IDENT+14,'ACDCLU: pTclu/SumpTparticle $',
+c     #                                     NBINA,TMINA,TMAXA,0.)       
+c      CALL HBOOK1(IDENT+24,'ACDCLU: pTclu/pTparton $',
+c     #                                     NBINA,TMINA,TMAXA,0.)       
 
       IEVENT = 0
  
 
 
 c.....histogram NCLU
-      CALL HF1(IDENT+1,REAL(NCLU),1.0)
+c      CALL HF1(IDENT+1,REAL(NCLU),1.0)
 
 c....reconstruct baricenter of particles
       DO ICLU=1,NCLU
       ETAREC=ETAREC/PTREC
       PHIREC=PHIREC/PTREC
       DETR=SQRT((ETAREC-PCLU(ICLU,3))**2+(PHIREC-PCLU(ICLU,4))**2)
-      CALL HF1(IDENT+11,ETAREC-PCLU(ICLU,3),1.0)
-      CALL HF1(IDENT+12,PHIREC-PCLU(ICLU,4),1.0)
-      CALL HF1(IDENT+13,DETR,1.0)
-      CALL HF1(IDENT+14,PCLU(ICLU,5)/PTREC,1.0)
+c      CALL HF1(IDENT+11,ETAREC-PCLU(ICLU,3),1.0)
+c      CALL HF1(IDENT+12,PHIREC-PCLU(ICLU,4),1.0)
+c      CALL HF1(IDENT+13,DETR,1.0)
+c      CALL HF1(IDENT+14,PCLU(ICLU,5)/PTREC,1.0)
       ENDDO
 
       DO ICLU=1,NCLU
  1020 CONTINUE
       ENDDO
       IF(PTREC.NE.0) THEN
-         CALL HF1(IDENT+23,DETRMIN,1.0)
-         CALL HF1(IDENT+24,PCLU(ICLU,5)/PTREC,1.0)
+c         CALL HF1(IDENT+23,DETRMIN,1.0)
+c         CALL HF1(IDENT+24,PCLU(ICLU,5)/PTREC,1.0)
       ENDIF
       ENDDO
 
       
       WRITE(NOUT,BXCLO)
 
-      CALL HPRINT(IDENT+ 1)
-      CALL HPRINT(IDENT+11)
-      CALL HPRINT(IDENT+12)
-      CALL HPRINT(IDENT+13)
-      CALL HPRINT(IDENT+14)
-      CALL HPRINT(IDENT+23)
-      CALL HPRINT(IDENT+24)
+c      CALL HPRINT(IDENT+ 1)
+c      CALL HPRINT(IDENT+11)
+c      CALL HPRINT(IDENT+12)
+c      CALL HPRINT(IDENT+13)
+c      CALL HPRINT(IDENT+14)
+c      CALL HPRINT(IDENT+23)
+c      CALL HPRINT(IDENT+24)
 
       ENDIF
 C     =====
       NBINA = 10
       TMAXA = 10.0
       TMINA = 0.0
-      CALL HBOOK1(IDENT+10,'ACDMUO: muon multiplicity NOISOLATED$',
-     #                                     NBINA,TMINA,TMAXA,0.0)       
-      CALL HBOOK1(IDENT+11,'ACDMUO: muon multiplicity ISOLATED$',
-     #                                     NBINA,TMINA,TMAXA,0.0)       
-      CALL HBOOK1(IDENT+21,'ACDMUO: muon multiplicity HARD$',
-     #                                     NBINA,TMINA,TMAXA,0.0)       
-      CALL HBOOK1(IDENT+31,'ACDMUO: muon multiplicity HARD+isol$',
-     #                                     NBINA,TMINA,TMAXA,0.0)       
+c      CALL HBOOK1(IDENT+10,'ACDMUO: muon multiplicity NOISOLATED$',
+c     #                                     NBINA,TMINA,TMAXA,0.0)       
+c      CALL HBOOK1(IDENT+11,'ACDMUO: muon multiplicity ISOLATED$',
+c     #                                     NBINA,TMINA,TMAXA,0.0)       
+c      CALL HBOOK1(IDENT+21,'ACDMUO: muon multiplicity HARD$',
+c     #                                     NBINA,TMINA,TMAXA,0.0)       
+c      CALL HBOOK1(IDENT+31,'ACDMUO: muon multiplicity HARD+isol$',
+c     #                                     NBINA,TMINA,TMAXA,0.0)       
 
       IEVENT = 0
 
  110   CONTINUE
        ENDDO
 
-       CALL HF1(IDENT+11,REAl(NMUO),1.0)
-       CALL HF1(IDENT+10,REAl(NMUOX),1.0)
+c       CALL HF1(IDENT+11,REAl(NMUO),1.0)
+c       CALL HF1(IDENT+10,REAl(NMUOX),1.0)
 
 c....cross-check with partons
           IMUO=0
      #         IMUOISO=IMUOISO+1 
           ENDIF
           ENDDO
-        CALL HF1(IDENT+21,REAL(IMUO),1.0)
-        CALL HF1(IDENT+31,REAL(IMUOISO),1.0)
+c        CALL HF1(IDENT+21,REAL(IMUO),1.0)
+c        CALL HF1(IDENT+31,REAL(IMUOISO),1.0)
 C
       ELSEIF(MODE.EQ.1) THEN
 C     =========================
       WRITE(NOUT,BXTXT) '*********************************'
       WRITE(NOUT,BXCLO)
 
-      CALL HPRINT(IDENT+10)
-      CALL HPRINT(IDENT+11)
-      CALL HPRINT(IDENT+21)
-      CALL HPRINT(IDENT+31)
+c      CALL HPRINT(IDENT+10)
+c      CALL HPRINT(IDENT+11)
+c      CALL HPRINT(IDENT+21)
+c      CALL HPRINT(IDENT+31)
 
       ENDIF
 C     =====
       NBINA = 10
       TMAXA = 10.0
       TMINA = 0.0
-      CALL HBOOK1(IDENT+11,'ACDELE: electron multiplicity ISOLATED$',
-     #                                     NBINA,TMINA,TMAXA,0.0)       
-      CALL HBOOK1(IDENT+21,'ACDELE: electron multiplicity HARD$',
-     #                                     NBINA,TMINA,TMAXA,0.0)       
-      CALL HBOOK1(IDENT+31,'ACDELE: electron multiplicity HARD+isol$',
-     #                                     NBINA,TMINA,TMAXA,0.0)       
+c      CALL HBOOK1(IDENT+11,'ACDELE: electron multiplicity ISOLATED$',
+c     #                                     NBINA,TMINA,TMAXA,0.0)       
+c      CALL HBOOK1(IDENT+21,'ACDELE: electron multiplicity HARD$',
+c     #                                     NBINA,TMINA,TMAXA,0.0)       
+c      CALL HBOOK1(IDENT+31,'ACDELE: electron multiplicity HARD+isol$',
+c     #                                     NBINA,TMINA,TMAXA,0.0)       
 
       IEVENT = 0
 
  110   CONTINUE
        ENDDO
 
-       CALL HF1(IDENT+11,REAL(NELE),1.0)
+c       CALL HF1(IDENT+11,REAL(NELE),1.0)
 c.....arrange electrons in falling E_T sequence
       DO 150 IDU=1,NELE
       ETMAX=0
            ENDIF
          ENDIF
          ENDDO
-         CALL HF1(IDENT+21,REAL(IELE),1.0)
-         CALL HF1(IDENT+31,REAL(IELEISO),1.0)
+c         CALL HF1(IDENT+21,REAL(IELE),1.0)
+c         CALL HF1(IDENT+31,REAL(IELEISO),1.0)
 C
       ELSEIF(MODE.EQ.1) THEN
 C     =======================
       WRITE(NOUT,BXTXT) '*********************************'
       WRITE(NOUT,BXCLO)
 
-      CALL HPRINT(IDENT+11)
-      CALL HPRINT(IDENT+21)
-      CALL HPRINT(IDENT+31)
+c      CALL HPRINT(IDENT+11)
+c      CALL HPRINT(IDENT+21)
+c      CALL HPRINT(IDENT+31)
 
       ENDIF
 C     =====
       NBINA = 10
       TMAXA = 10.0
       TMINA = 0.0
-      CALL HBOOK1(IDENT+11,'ACDPHO: photon multiplicity ISOLATED$',
-     #                                     NBINA,TMINA,TMAXA,0.)       
-      CALL HBOOK1(IDENT+21,'ACDPHO: photon multiplicity HARD$',
-     #                                     NBINA,TMINA,TMAXA,0.)       
-      CALL HBOOK1(IDENT+31,'ACDPHO: photon multiplicity HARD+ISO$',
-     #                                     NBINA,TMINA,TMAXA,0.)       
+c      CALL HBOOK1(IDENT+11,'ACDPHO: photon multiplicity ISOLATED$',
+c     #                                     NBINA,TMINA,TMAXA,0.)       
+c      CALL HBOOK1(IDENT+21,'ACDPHO: photon multiplicity HARD$',
+c     #                                     NBINA,TMINA,TMAXA,0.)       
+c      CALL HBOOK1(IDENT+31,'ACDPHO: photon multiplicity HARD+ISO$',
+c     #                                     NBINA,TMINA,TMAXA,0.)       
 
       IEVENT = 0     
 
 c.............
  110   CONTINUE
        ENDDO
-       CALL HF1(IDENT+11,REAL(NPHO),1.0)
+c       CALL HF1(IDENT+11,REAL(NPHO),1.0)
 c.....arrange photons in falling E_T sequence
       DO 150 IDU=1,NPHO
       ETMAX=0
      #       IPHISO=IPHISO+1
           ENDIF
           ENDDO
-       CALL HF1(IDENT+21,REAL(IPHO),1.0)
-       CALL HF1(IDENT+31,REAL(IPHISO),1.0)
+c       CALL HF1(IDENT+21,REAL(IPHO),1.0)
+c       CALL HF1(IDENT+31,REAL(IPHISO),1.0)
 
 
 
       WRITE(NOUT,BXTXT) '*********************************'
       WRITE(NOUT,BXCLO)
 
-      CALL HPRINT(IDENT+11)
-      CALL HPRINT(IDENT+21)
-      CALL HPRINT(IDENT+31)
+c      CALL HPRINT(IDENT+11)
+c      CALL HPRINT(IDENT+21)
+c      CALL HPRINT(IDENT+31)
 
 
       ENDIF
       NBINA = 10
       TMAXA = 10.0
       TMINA = 0.0
-      CALL HBOOK1(IDENT+1,'ACDJET: jets multiplicity $',
-     #                                     NBINA,TMINA,TMAXA,0.0)       
+c      CALL HBOOK1(IDENT+1,'ACDJET: jets multiplicity $',
+c     #                                     NBINA,TMINA,TMAXA,0.0)       
 
       NBINA = 50
       TMAXA =   0.5
       TMINA =  -0.5
-      CALL HBOOK1(IDENT+11,'ACDJET: delta phi jet-barycentre $',
-     #                                     NBINA,TMINA,TMAXA,0.)       
-      CALL HBOOK1(IDENT+12,'ACDJET: delta eta jet-barycentre  $',
-     #                                     NBINA,TMINA,TMAXA,0.)       
+c      CALL HBOOK1(IDENT+11,'ACDJET: delta phi jet-barycentre $',
+c     #                                     NBINA,TMINA,TMAXA,0.)       
+c      CALL HBOOK1(IDENT+12,'ACDJET: delta eta jet-barycentre  $',
+c     #                                     NBINA,TMINA,TMAXA,0.)       
       NBINA = 50
       TMAXA =   0.5
       TMINA =   0.0
-      CALL HBOOK1(IDENT+13,'ACDJET: delta r jet-barycentre $',
-     #                                     NBINA,TMINA,TMAXA,0.)       
-      CALL HBOOK1(IDENT+23,'ACDJET: delta r jet-parton $',
-     #                                     NBINA,TMINA,TMAXA,0.)       
+c      CALL HBOOK1(IDENT+13,'ACDJET: delta r jet-barycentre $',
+c     #                                     NBINA,TMINA,TMAXA,0.)       
+c      CALL HBOOK1(IDENT+23,'ACDJET: delta r jet-parton $',
+c     #                                     NBINA,TMINA,TMAXA,0.)       
       NBINA = 50
       TMAXA =   2.0
       TMINA =   0.0
-      CALL HBOOK1(IDENT+14,'ACDJET: pTjet/SumpTparticle $',
-     #                                     NBINA,TMINA,TMAXA,0.)       
-      CALL HBOOK1(IDENT+24,'ACDJET: pTjet/pTparton $',
-     #                                     NBINA,TMINA,TMAXA,0.)       
+c      CALL HBOOK1(IDENT+14,'ACDJET: pTjet/SumpTparticle $',
+c     #                                     NBINA,TMINA,TMAXA,0.)       
+c      CALL HBOOK1(IDENT+24,'ACDJET: pTjet/pTparton $',
+c     #                                     NBINA,TMINA,TMAXA,0.)       
 
       IEVENT = 0
 
       ENDDO   
 
 c.....histogram NJET
-      CALL HF1(IDENT+1,REAL(NJET),1.0)
+c      CALL HF1(IDENT+1,REAL(NJET),1.0)
 c.....arrange jets in falling E_T sequence
       DO 150 IDU=1,NJET
       ETMAX=0
       ETAREC=ETAREC/PTREC
       PHIREC=PHIREC/PTREC
       DETR=SQRT((ETAREC-PJET(IJET,3))**2+(PHIREC-PJET(IJET,4))**2)
-      CALL HF1(IDENT+11,ETAREC-PJET(IJET,3),1.0)
-      CALL HF1(IDENT+12,PHIREC-PJET(IJET,4),1.0)
-      CALL HF1(IDENT+13,DETR,1.0)
-      CALL HF1(IDENT+14,PJET(IJET,5)/PTREC,1.0)
+c      CALL HF1(IDENT+11,ETAREC-PJET(IJET,3),1.0)
+c      CALL HF1(IDENT+12,PHIREC-PJET(IJET,4),1.0)
+c      CALL HF1(IDENT+13,DETR,1.0)
+c      CALL HF1(IDENT+14,PJET(IJET,5)/PTREC,1.0)
       ENDDO
 
       DO IJET=1,NJET
       DETRMIN=DETR
  1020 CONTINUE
       ENDDO
-      IF(PTREC.NE.0)CALL HF1(IDENT+23,DETRMIN,1.0)
-      IF(PTREC.NE.0)CALL HF1(IDENT+24,PJET(IJET,5)/PTREC,1.0)
+c      IF(PTREC.NE.0)CALL HF1(IDENT+23,DETRMIN,1.0)
+c      IF(PTREC.NE.0)CALL HF1(IDENT+24,PJET(IJET,5)/PTREC,1.0)
       ENDDO
 
 
       
       WRITE(NOUT,BXCLO)
 
-      CALL HPRINT(IDENT+1)
-      CALL HPRINT(IDENT+11)
-      CALL HPRINT(IDENT+12)
-      CALL HPRINT(IDENT+13)
-      CALL HPRINT(IDENT+14)
-      CALL HPRINT(IDENT+23)
-      CALL HPRINT(IDENT+24)
+c      CALL HPRINT(IDENT+1)
+c      CALL HPRINT(IDENT+11)
+c      CALL HPRINT(IDENT+12)
+c      CALL HPRINT(IDENT+13)
+c      CALL HPRINT(IDENT+14)
+c      CALL HPRINT(IDENT+23)
+c      CALL HPRINT(IDENT+24)
 
       ENDIF
 C     =====
       NBINA = 50
       TMAXA = 200.0
       TMINA = 0.0
-      CALL HBOOK1(IDENT+11,'ACDMIS: reconstructed p_T $',
-     #                     NBINA,TMINA,TMAXA,0.0)       
-      CALL HBOOK1(IDENT+12,'ACDMIS: reconstructed p_T +cells$',
-     #                     NBINA,TMINA,TMAXA,0.0)       
-      CALL HBOOK1(IDENT+13,'ACDMIS: pTmiss$',
-     #                     NBINA,TMINA,TMAXA,0.0)       
-      CALL HBOOK1(IDENT+21,'ACDMIS: p_T nu $',NBINA,TMINA,TMAXA,0.0)       
+c      CALL HBOOK1(IDENT+11,'ACDMIS: reconstructed p_T $',
+c     #                     NBINA,TMINA,TMAXA,0.0)       
+c      CALL HBOOK1(IDENT+12,'ACDMIS: reconstructed p_T +cells$',
+c     #                     NBINA,TMINA,TMAXA,0.0)       
+c      CALL HBOOK1(IDENT+13,'ACDMIS: pTmiss$',
+c     #                     NBINA,TMINA,TMAXA,0.0)       
+c      CALL HBOOK1(IDENT+21,'ACDMIS: p_T nu $',NBINA,TMINA,TMAXA,0.0)       
 
 
       IEVENT = 0
          SUMET=SUMET+PPHO(I,5)
       ENDDO
       ETREC=SQRT(PXREC**2+PYREC**2)
-      CALL HF1(IDENT+11,ETREC,1.0)
+c      CALL HF1(IDENT+11,ETREC,1.0)
 c.......smear cells energy not used for reconstruction
 c.......remove cells below threshold
 c.......add momenta in cells not used for reconstruction
       PXSUM=PXSUM+PXREC
       PYSUM=PYSUM+PYREC
       ETSUM=SQRT(PXSUM**2+PYSUM**2)
-      CALL HF1(IDENT+12,ETSUM,1.0)
+c      CALL HF1(IDENT+12,ETSUM,1.0)
       PXXMISS=-PXSUM
       PYYMISS=-PYSUM
       PTMISS=SQRT(PXXMISS**2+PYYMISS**2)
-      CALL HF1(IDENT+13,PTMISS,1.0)
+c      CALL HF1(IDENT+13,PTMISS,1.0)
 c......sum up momenta  of neutrinos 
       PXXNUES=0.0
       PYYNUES=0.0
          ENDIF
       ENDDO
       PTNUES=SQRT(PXXNUES**2+PYYNUES**2)
-      CALL HF1(IDENT+21,PTNUES,1.0)
+c      CALL HF1(IDENT+21,PTNUES,1.0)
 c.......
 C
       ELSEIF(MODE.EQ.1) THEN
       WRITE(NOUT,BXTXT) '*********************************'
       WRITE(NOUT,BXCLO)
 
-      CALL HPRINT(IDENT+11)
-      CALL HPRINT(IDENT+12)
-      CALL HPRINT(IDENT+13)
-      CALL HPRINT(IDENT+21)
+c      CALL HPRINT(IDENT+11)
+c      CALL HPRINT(IDENT+12)
+c      CALL HPRINT(IDENT+13)
+c      CALL HPRINT(IDENT+21)
 
       ENDIF
 C     =====
       NBINA = 10
       TMAXA = 10.0
       TMINA = 0.0
-      CALL HBOOK1(IDENT+11,'ACDBJE: b-jets multiplicity$',
-     #                                     NBINA,TMINA,TMAXA,0.0) 
-      CALL HBOOK1(IDENT+21,'ACDBJE: b-quarks HARD multiplicity$',
-     #                                     NBINA,TMINA,TMAXA,0.0)       
+c      CALL HBOOK1(IDENT+11,'ACDBJE: b-jets multiplicity$',
+c     #                                     NBINA,TMINA,TMAXA,0.0) 
+c      CALL HBOOK1(IDENT+21,'ACDBJE: b-quarks HARD multiplicity$',
+c     #                                     NBINA,TMINA,TMAXA,0.0)       
 
       NBINA = 50
       TMAXA =   0.5
       TMINA =   0.0
-      CALL HBOOK1(IDENT+23,'ACDJET: delta r bjet-bquark $',
-     #                                     NBINA,TMINA,TMAXA,0.)       
+c      CALL HBOOK1(IDENT+23,'ACDJET: delta r bjet-bquark $',
+c     #                                     NBINA,TMINA,TMAXA,0.)       
 
       NBINA = 50
       TMAXA =   2.0
       TMINA =   0.0
-      CALL HBOOK1(IDENT+24,'ACDJET: pTbjet/pTbquark $',
-     #                                     NBINA,TMINA,TMAXA,0.)       
+c      CALL HBOOK1(IDENT+24,'ACDJET: pTbjet/pTbquark $',
+c     #                                     NBINA,TMINA,TMAXA,0.)       
 
       ENDIF
 
          ENDIF 
        ENDDO
 
-       CALL HF1(IDENT+11,REAL(NJETB),1.0)
+c       CALL HF1(IDENT+11,REAL(NJETB),1.0)
 
 c === check partons
           IQUAB=0
            ENDIF
          ENDIF
          ENDDO
-         CALL HF1(IDENT+21,REAL(IQUAB),1.0)
+c         CALL HF1(IDENT+21,REAL(IQUAB),1.0)
 
       DO IJET=1,NJET
       PTREC=0
  1030   CONTINUE
         ENDDO
       ENDIF
-      IF(PTREC.NE.0)CALL HF1(IDENT+23,DETRMIN,1.0)
-      IF(PTREC.NE.0)CALL HF1(IDENT+24,PJET(IJET,5)/PTREC,1.0)
+c      IF(PTREC.NE.0)CALL HF1(IDENT+23,DETRMIN,1.0)
+c      IF(PTREC.NE.0)CALL HF1(IDENT+24,PJET(IJET,5)/PTREC,1.0)
       ENDDO
 
 
       WRITE(NOUT,BXCLO)
 
 
-      CALL HPRINT(IDENT+11)
-      CALL HPRINT(IDENT+21)
+c      CALL HPRINT(IDENT+11)
+c      CALL HPRINT(IDENT+21)
 
       ENDIF
 C     =====
       NBINA = 10
       TMAXA = 10.0
       TMINA = 0.0
-      CALL HBOOK1(IDENT+11,'ACDCJE: c-jets multiplicity$',
-     #                                     NBINA,TMINA,TMAXA,0.0)       
-      CALL HBOOK1(IDENT+21,'ACDCJE: c-quarks HARD multiplicity$',
-     #                                     NBINA,TMINA,TMAXA,0.0)       
+c      CALL HBOOK1(IDENT+11,'ACDCJE: c-jets multiplicity$',
+c     #                                     NBINA,TMINA,TMAXA,0.0)       
+c      CALL HBOOK1(IDENT+21,'ACDCJE: c-quarks HARD multiplicity$',
+c     #                                     NBINA,TMINA,TMAXA,0.0)       
 
       NBINA = 50
       TMAXA =   0.5
       TMINA =   0.0
-      CALL HBOOK1(IDENT+23,'ACDJET: delta r cjet-cquark $',
-     #                                     NBINA,TMINA,TMAXA,0.)       
+c      CALL HBOOK1(IDENT+23,'ACDJET: delta r cjet-cquark $',
+c     #                                     NBINA,TMINA,TMAXA,0.)       
 
       NBINA = 50
       TMAXA =   2.0
       TMINA =   0.0
-      CALL HBOOK1(IDENT+24,'ACDJET: pTcjet/pTcquark $',
-     #                                     NBINA,TMINA,TMAXA,0.)       
+c      CALL HBOOK1(IDENT+24,'ACDJET: pTcjet/pTcquark $',
+c     #                                     NBINA,TMINA,TMAXA,0.)       
 
       ENDIF
       IEVENT = 0
         ENDIF
        ENDDO
 
-       CALL HF1(IDENT+11,REAL(NJETC),1.0)
+c       CALL HF1(IDENT+11,REAL(NJETC),1.0)
 
 c === check partons
           IQUAC=0
            ENDIF
          ENDIF
          ENDDO
-         CALL HF1(IDENT+21,REAL(IQUAC),1.0)
+c         CALL HF1(IDENT+21,REAL(IQUAC),1.0)
 
       DO IJET=1,NJET
       PTREC=0
  1030   CONTINUE
         ENDDO
       ENDIF
-      IF(PTREC.NE.0)CALL HF1(IDENT+23,DETRMIN,1.0)
-      IF(PTREC.NE.0)CALL HF1(IDENT+24,PJET(IJET,5)/PTREC,1.0)
+c      IF(PTREC.NE.0)CALL HF1(IDENT+23,DETRMIN,1.0)
+c      IF(PTREC.NE.0)CALL HF1(IDENT+24,PJET(IJET,5)/PTREC,1.0)
       ENDDO
 
 C......
       WRITE(NOUT,BXCLO)
 
 
-      CALL HPRINT(IDENT+11)
-      CALL HPRINT(IDENT+21)
-      CALL HPRINT(IDENT+23)
-      CALL HPRINT(IDENT+24)
+c      CALL HPRINT(IDENT+11)
+c      CALL HPRINT(IDENT+21)
+c      CALL HPRINT(IDENT+23)
+c      CALL HPRINT(IDENT+24)
 
       ENDIF
 C     =====
       NBINA = 10
       TMAXA = 10.0
       TMINA = 0.0
-      CALL HBOOK1(IDENT+11,'ACDTAU: tau-jets multiplicity$',
-     #                                     NBINA,TMINA,TMAXA,0.0)       
-      CALL HBOOK1(IDENT+21,'ACDTAU: taus  multiplicity$',
-     #                                     NBINA,TMINA,TMAXA,0.0)       
+c      CALL HBOOK1(IDENT+11,'ACDTAU: tau-jets multiplicity$',
+c     #                                     NBINA,TMINA,TMAXA,0.0)       
+c      CALL HBOOK1(IDENT+21,'ACDTAU: taus  multiplicity$',
+c     #                                     NBINA,TMINA,TMAXA,0.0)       
 
       ENDIF
 
        ENDIF
  9999  CONTINUE
        ENDDO
-       CALL HF1(IDENT+11,REAL(NJETTAU),1.0)
-       CALL HF1(IDENT+21,REAL(NTAU),1.0)
+c       CALL HF1(IDENT+11,REAL(NJETTAU),1.0)
+c       CALL HF1(IDENT+21,REAL(NTAU),1.0)
 
 C......
 
       WRITE(NOUT,BXCLO)
 
 
-      CALL HPRINT(IDENT+11)
-      CALL HPRINT(IDENT+21)
+c      CALL HPRINT(IDENT+11)
+c      CALL HPRINT(IDENT+21)
 
       ENDIF
 C     =====
       NBINA = 50
       TMAXA = 300.0
       TMINA = 0.0
-      CALL HBOOK1(IDENT+10,'ACDCAL: calibration entry$',
-     #                                     NBINA,TMINA,TMAXA,0.0)       
-      CALL HBOOK1(IDENT+11,'ACDCAL: calibration factor$',
-     #                                     NBINA,TMINA,TMAXA,0.0)       
+c      CALL HBOOK1(IDENT+10,'ACDCAL: calibration entry$',
+c     #                                     NBINA,TMINA,TMAXA,0.0)       
+c      CALL HBOOK1(IDENT+11,'ACDCAL: calibration factor$',
+c     #                                     NBINA,TMINA,TMAXA,0.0)       
 
       NBINA = 50
       TMAXA =   2.0
       TMINA =   0.0
       DO I=0,8
-      CALL HBOOK1(IDENT+20+I,'ACDCAL: pTjetCALIB/pTparton $',
-     #                                     NBINA,TMINA,TMAXA,0.)       
-      CALL HBOOK1(IDENT+30+I,'ACDCAL: pTjetNONCALIB/pTparton $',
-     #                                     NBINA,TMINA,TMAXA,0.)       
+c      CALL HBOOK1(IDENT+20+I,'ACDCAL: pTjetCALIB/pTparton $',
+c     #                                     NBINA,TMINA,TMAXA,0.)       
+c      CALL HBOOK1(IDENT+30+I,'ACDCAL: pTjetNONCALIB/pTparton $',
+c     #                                     NBINA,TMINA,TMAXA,0.)       
       ENDDO
 
       IEVENT = 0
            A2 =    .44414E-05   
            CORE = A0+A1*XX+A2*XX**2
         ENDIF
-        CALL HF1(IDENT+11,X,CORE)
-        CALL HF1(IDENT+10,X,1.0)
+c        CALL HF1(IDENT+11,X,CORE)
+c        CALL HF1(IDENT+10,X,1.0)
         PJET(I,5) = PJET(I,5) * CORE
       ENDDO
 
       DETRMIN=DETR
  1040 CONTINUE
       ENDDO 
-      IF(PTREC.NE.0) THEN
-         CALL HF1(IDENT+20,PJET(IJET,5)/PTREC,1.0)
-         IF(PTJETCRU(IJET).LT.20)
-     #        CALL HF1(IDENT+21,PJET(IJET,5)/PTREC,1.0)
-         IF(PTJETCRU(IJET).GE.20.AND.PTJETCRU(IJET).LT.25)
-     #        CALL HF1(IDENT+22,PJET(IJET,5)/PTREC,1.0)
-         IF(PTJETCRU(IJET).GE.25.AND.PTJETCRU(IJET).LT.30)
-     #        CALL HF1(IDENT+23,PJET(IJET,5)/PTREC,1.0)
-         IF(PTJETCRU(IJET).GE.30.AND.PTJETCRU(IJET).LT.40)
-     #        CALL HF1(IDENT+24,PJET(IJET,5)/PTREC,1.0)
-         IF(PTJETCRU(IJET).GE.40.AND.PTJETCRU(IJET).LT.60)
-     #        CALL HF1(IDENT+25,PJET(IJET,5)/PTREC,1.0)
-         IF(PTJETCRU(IJET).GE.60.AND.PTJETCRU(IJET).LT.100)
-     #        CALL HF1(IDENT+26,PJET(IJET,5)/PTREC,1.0)
-         IF(PTJETCRU(IJET).GE.100.AND.PTJETCRU(IJET).LT.200)
-     #        CALL HF1(IDENT+27,PJET(IJET,5)/PTREC,1.0)
-         IF(PTJETCRU(IJET).GT.200)
-     #        CALL HF1(IDENT+28,PJET(IJET,5)/PTREC,1.0)
-         CALL HF1(IDENT+30,PTJETCRU(IJET)/PTREC,1.0)
-         IF(PTJETCRU(IJET).LT.30)
-     #        CALL HF1(IDENT+31,PTJETCRU(IJET)/PTREC,1.0)
-         IF(PTJETCRU(IJET).GE.20.AND.PTJETCRU(IJET).LT.25)
-     #        CALL HF1(IDENT+32,PTJETCRU(IJET)/PTREC,1.0)
-         IF(PTJETCRU(IJET).GE.25.AND.PTJETCRU(IJET).LT.30)
-     #        CALL HF1(IDENT+33,PTJETCRU(IJET)/PTREC,1.0)
-         IF(PTJETCRU(IJET).GE.30.AND.PTJETCRU(IJET).LT.40)
-     #        CALL HF1(IDENT+34,PTJETCRU(IJET)/PTREC,1.0)
-         IF(PTJETCRU(IJET).GE.40.AND.PTJETCRU(IJET).LT.60)
-     #        CALL HF1(IDENT+35,PTJETCRU(IJET)/PTREC,1.0)
-         IF(PTJETCRU(IJET).GE.60.AND.PTJETCRU(IJET).LT.100)
-     #        CALL HF1(IDENT+36,PTJETCRU(IJET)/PTREC,1.0)
-         IF(PTJETCRU(IJET).GE.100.AND.PTJETCRU(IJET).LT.200)
-     #        CALL HF1(IDENT+37,PTJETCRU(IJET)/PTREC,1.0)
-         IF(PTJETCRU(IJET).GT.200)
-     #        CALL HF1(IDENT+38,PTJETCRU(IJET)/PTREC,1.0)
-      ENDIF
+c      IF(PTREC.NE.0) THEN
+c         CALL HF1(IDENT+20,PJET(IJET,5)/PTREC,1.0)
+c         IF(PTJETCRU(IJET).LT.20)
+c     #        CALL HF1(IDENT+21,PJET(IJET,5)/PTREC,1.0)
+c         IF(PTJETCRU(IJET).GE.20.AND.PTJETCRU(IJET).LT.25)
+c     #        CALL HF1(IDENT+22,PJET(IJET,5)/PTREC,1.0)
+c         IF(PTJETCRU(IJET).GE.25.AND.PTJETCRU(IJET).LT.30)
+c     #        CALL HF1(IDENT+23,PJET(IJET,5)/PTREC,1.0)
+c         IF(PTJETCRU(IJET).GE.30.AND.PTJETCRU(IJET).LT.40)
+c     #        CALL HF1(IDENT+24,PJET(IJET,5)/PTREC,1.0)
+c         IF(PTJETCRU(IJET).GE.40.AND.PTJETCRU(IJET).LT.60)
+c     #        CALL HF1(IDENT+25,PJET(IJET,5)/PTREC,1.0)
+c         IF(PTJETCRU(IJET).GE.60.AND.PTJETCRU(IJET).LT.100)
+c     #        CALL HF1(IDENT+26,PJET(IJET,5)/PTREC,1.0)
+c         IF(PTJETCRU(IJET).GE.100.AND.PTJETCRU(IJET).LT.200)
+c     #        CALL HF1(IDENT+27,PJET(IJET,5)/PTREC,1.0)
+c         IF(PTJETCRU(IJET).GT.200)
+c     #        CALL HF1(IDENT+28,PJET(IJET,5)/PTREC,1.0)
+c         CALL HF1(IDENT+30,PTJETCRU(IJET)/PTREC,1.0)
+c         IF(PTJETCRU(IJET).LT.30)
+c     #        CALL HF1(IDENT+31,PTJETCRU(IJET)/PTREC,1.0)
+c         IF(PTJETCRU(IJET).GE.20.AND.PTJETCRU(IJET).LT.25)
+c     #        CALL HF1(IDENT+32,PTJETCRU(IJET)/PTREC,1.0)
+c         IF(PTJETCRU(IJET).GE.25.AND.PTJETCRU(IJET).LT.30)
+c     #        CALL HF1(IDENT+33,PTJETCRU(IJET)/PTREC,1.0)
+c         IF(PTJETCRU(IJET).GE.30.AND.PTJETCRU(IJET).LT.40)
+c     #        CALL HF1(IDENT+34,PTJETCRU(IJET)/PTREC,1.0)
+c         IF(PTJETCRU(IJET).GE.40.AND.PTJETCRU(IJET).LT.60)
+c     #        CALL HF1(IDENT+35,PTJETCRU(IJET)/PTREC,1.0)
+c         IF(PTJETCRU(IJET).GE.60.AND.PTJETCRU(IJET).LT.100)
+c     #        CALL HF1(IDENT+36,PTJETCRU(IJET)/PTREC,1.0)
+c         IF(PTJETCRU(IJET).GE.100.AND.PTJETCRU(IJET).LT.200)
+c     #        CALL HF1(IDENT+37,PTJETCRU(IJET)/PTREC,1.0)
+c         IF(PTJETCRU(IJET).GT.200)
+c     #        CALL HF1(IDENT+38,PTJETCRU(IJET)/PTREC,1.0)
+c      ENDIF
       ENDDO
 
 
       WRITE(NOUT,BXTXT) '*********************************'
       WRITE(NOUT,BXCLO)
 
-      CALL HOPERA(IDENT+11,'/',IDENT+10,IDENT+11,1.0,1.0)
-      CALL HPRINT(IDENT+11)
-      CALL HPRINT(IDENT+23)
-      CALL HPRINT(IDENT+24)
+c      CALL HOPERA(IDENT+11,'/',IDENT+10,IDENT+11,1.0,1.0)
+c      CALL HPRINT(IDENT+11)
+c      CALL HPRINT(IDENT+23)
+c      CALL HPRINT(IDENT+24)
 
 
       ENDIF
     obj = ctx(
         features='fc fcshlib',
         name ='f-acerdet',
-        source='acerdet_src/acerdet.f acerdet_src/acerdet_ntup.f',
+        source=[
+            'acerdet_src/acerdet.f',
+            'acerdet_src/acerdet_ntup.f',
+            'acerdet_src/acerdet_io.f',
+            ],
         target='f-acerdet',
         includes=['.'],
-        use=cernlibs,
+        use=cernlibs+['gfortran',],
+        lib=['gfortran','m',]
         )
     obj.env.FCFLAGS = [
         '-Wall', '-W', '-O2',