next up previous
: MGDRAW : The user routines to : USRINI

HISTIN

The main attention in the case of the use of HBOOK is that it makes use of REAL*4 variables, while the FLUKA environment is by default in double precision (REAL*8). For our example we intend to book a simple disk-resident ntupla opening the hbk.his file, having 8 variables: the muon charge, the residual energy, the 3 coordinates and the 3 direction cosines at boundary crossing. Notice that we have chosen to assign the logic unit 63 to the HBOOK file. Any number larger than 30 is good, provided that it not already used by the user himself for other scoring purposes.

*$ CREATE HISTIN.FOR
*COPY HISTIN
*
*=== HISTIN ===========================================================*
*
C!------------------------------------------------------------
      SUBROUTINE HISTIN
C!------------------------------------------------------------
C     
C     HBOOK HISTOGRAM BOOKING
C
      INCLUDE '(DIMPAR)'
      INCLUDE '(CTITLE)'
      PARAMETER (NNTUPLE=8)
      COMMON/PAWC/HMEMOR(200000)
      REAL*4 HMEMOR
      COMMON/QUEST/IQUEST(100)
      CHARACTER*8 CHTAG(NNTUPLE)
      DATA CHTAG /'MUTYP' ,'ERES' ,'XMU'  ,'YMU', 'ZMU', 'THX',
     $     'THY', 'THZ'/ 
      WRITE(*,*) 'ENTER IN HIST INIT.'
      ITSAV = ITEXPI
      IQUEST(10)=65000
      call hlimit(200000)
C
      NLUNI1 = 63
      CALL HROPEN(NLUNI1, 'Muons',
     &  'hbk.his','N',
     &  1024,ISTAT)
      WRITE(*,*) 'HROPEN: ISTAT=',ISTAT
      CALL HBOOKN(100,'Muons',nntuple,'//Muons',nntuple*100,CHTAG)
C
      ITEXPI = ITSAV
      RETURN
      END



Giuseppe Battistoni 平成17年3月7日