~maddevelopers/mg5amcnlo/2.9.4

« back to all changes in this revision

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

pass to v2.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
      subroutine stdquarklst(iq,nqrk,lsize,lqrk)
 
3
 
 
4
C...Search the HEPEVT common block for all mesons and baryons with
 
5
C...quark content IQ
 
6
C
 
7
C     IQ  = quark type
 
8
C     NQRK = number of particles with quark type IQ
 
9
C     LQRK(LSIZE) = list of particles with quark type IQ
 
10
 
 
11
      implicit none
 
12
 
 
13
      integer iq,nqrk,lsize
 
14
      integer lqrk(lsize)
 
15
 
 
16
#include "stdhep.inc"
 
17
#include "stdlun.inc"
 
18
 
 
19
      integer i,kq,kqa,kq1,kq2,kq3,kqx,kqj,kql,kqr
 
20
 
 
21
      nqrk = 0
 
22
      do i=1,nhep
 
23
        kq=idhep(i)
 
24
        kqa=iabs(kq)
 
25
 
 
26
        if(kqa.gt.99.and.kqa.lt.10000000) then
 
27
C...Subdivide standard ID code into constituent pieces.
 
28
          call stdquarks(i,kq1,kq2,kq3,kql,kqj,kqr,kqx)
 
29
          if(kq1.eq.iq .or. kq2.eq.iq .or. kq3.eq.iq)then
 
30
            nqrk = nqrk + 1
 
31
            if(nqrk.le.lsize) lqrk(nqrk) = i
 
32
          endif
 
33
        endif
 
34
      enddo
 
35
      if(nqrk.gt.lsize) write(lnhout,1001) nqrk,lsize
 
36
      return
 
37
1001  format(' stdquarklst: found ',i4,
 
38
     1        ' particles, but the list only allows ',i4)
 
39
      end