C ====================== SUBROUTINE BPCFIL(RUN) C ====================== C C A.Quadt, November 1997 (from Enrico's ZES 1.0 code). C T Haas, August 1998 (make compatible with 1998 datataking) C ---------------------------------------------------------- IMPLICIT NONE #include "bpc_blk.inc" #include "bpc_abs.inc" #include "bpinput.inc" #include "zescommon.inc" #include "ctrlcm.inc" REAL VTX(3) INTEGER Ierr, Ibpc, RUN REAL NOUSE DATA NOUSE / -999.99 / LOGICAL FIRST DATA FIRST /.TRUE./ c ------------------------------------------------------------------ c ----- Init c ------------------------------------------------------------------ CALL MODIN('BPCFIL', IErr) if (first) then c --- BPC init c MCFLAG = .FALSE. if (Ctrl_RUNPRD.eq.-1) then MCFLAG = .TRUE. YEAR = 1995 endif Call BpInit(ierr) if (ierr .ne. 0) then print*,'Bpinit Error. Err = ', ierr endif first = .false. endif c ------------------------------------------------------------------- c Collect BPC Information c Run --> Run number c vtx(3) --> vertex c ------------------------------------------------------------------- CALL SETVTX(VTX) ZES_Eebpc = NOUSE ZES_Xebpc = NOUSE ZES_Yebpc = NOUSE ZES_tebpc = NOUSE ZES_pxbpc = NOUSE ZES_pybpc = NOUSE ZES_pzbpc = NOUSE if (Run .ne. 12906) then !!! code crashes in this run call bploge(ibpc,vtx,Run) if (ibpc.ne.-4) then ZES_Eebpc = belen ZES_Xebpc = belxn ZES_Yebpc = belyn ZES_tebpc = beltn ZES_pxbpc = belpxn ZES_pybpc = belpyn ZES_pzbpc = belpzn else print*, 'BPC: Error in BpLoge. ibpc= ', ibpc endif endif CALL MODOUT('BPCFIL') RETURN END