~maddevelopers/mg5amcnlo/3.0.2-alpha0

« back to all changes in this revision

Viewing changes to Template/Source/hbook1.f

Added Template and HELAS into bzr

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
C-----------------------------------------------
 
2
C
 
3
C       Routine to initialize a one-independent-variable histogram
 
4
C
 
5
        subroutine hbook1(id,inlabel,nx,xmin,xmax,zinitial)
 
6
C
 
7
C               id = integer used to identify histogram to HFILL
 
8
C               inlabel = label to be written on the output by the plotting
 
9
C                               program (character of len <=40)
 
10
C               nx = number of x bins (integer)
 
11
C               xmin = min x value (real)
 
12
C               xmax = max x value (real)
 
13
C               zinitial = initial value for each bin (real)
 
14
C
 
15
        include 'hbook.inc'
 
16
        character*(*) inlabel
 
17
 
 
18
        if (nhist .eq. nhistmax) then
 
19
                print*,' Maximum number of histograms exceeded'
 
20
        else
 
21
                nhist = nhist+1
 
22
                label(nhist) = inlabel
 
23
                id number(nhist) = id
 
24
                single dim(nhist) = .true.
 
25
                k=pointer(nhist)
 
26
                pointer(nhist+1) = nx+3+k
 
27
                data(k)=nx
 
28
                data(k+1)=xmin
 
29
                data(k+2)=xmax
 
30
                do i=k+3,pointer(nhist+1)-1
 
31
                        data(i)=zinitial
 
32
                        error(i)=zinitial**2
 
33
                        end do
 
34
                end if
 
35
        return
 
36
        end