~maddevelopers/mg5amcnlo/2.9.4

« back to all changes in this revision

Viewing changes to vendor/StdHEP/src/stdhep/std3to4.F

pass to v2.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
      subroutine std3to4(mconv)
 
2
 
 
3
C...Purpose: to convert StdHep 3.04 event record contents to or from
 
4
C...the new numbering scheme.
 
5
C...convert (mconv=1) from StdHep 3.04 numbering scheme to StdHep 4.06 numbering scheme
 
6
C...     or (mconv=2) from StdHep 4.06 numbering scheme to StdHep 3.04 numbering scheme
 
7
 
 
8
C...Only IDHEP needs to be changed
 
9
 
 
10
#include "stdhep.inc"
 
11
 
 
12
      integer itmp,std3to4tran,mconv,i,j
 
13
      external std3to4tran
 
14
 
 
15
      logical lfirst
 
16
      data lfirst/.true./
 
17
      save lfirst
 
18
 
 
19
C...print version number if this is the first call
 
20
      if(lfirst)then
 
21
        call stdversn
 
22
        lfirst=.false.
 
23
      endif
 
24
C...Conversion from old to new numbering scheme
 
25
      if(mconv.EQ.1) then
 
26
        do i=1,nhep
 
27
            itmp=idhep(i)
 
28
            idhep(i) = std3to4tran(itmp,1)
 
29
        enddo
 
30
C...Conversion from new to old numbering scheme
 
31
      elseif(mconv.eq.2)then
 
32
        do i=1,nhep
 
33
            itmp=idhep(i)
 
34
            idhep(i) = std3to4tran(itmp,2)
 
35
        enddo
 
36
      endif
 
37
      return
 
38
      end