~maddevelopers/mg5amcnlo/2.9.4

« back to all changes in this revision

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

pass to v2.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
      character*(*) function stdexpname(IT,LMX)
 
3
 
 
4
C...Purpose: get the padded particle name
 
5
C
 
6
C      IT = index to HEPEVT common block
 
7
C      LMX = lenght of character variable to be filled
 
8
C
 
9
 
 
10
#include "stdhep.inc"
 
11
 
 
12
      integer LMX,IP,IT
 
13
 
 
14
      character CHAP*20,CHAC*20,CHDL(4)*4
 
15
      data CHDL/' ','()','!!','<>'/
 
16
      save CHDL
 
17
 
 
18
C...Get particle name, pad it and check it is not too long.
 
19
      CHAP = CHDL(1)
 
20
      IP = IDHEP(IT)
 
21
      if(IP.NE.0) call HEPNAM(IP,CHAP)
 
22
      LEN=0
 
23
      do 100 LEM=1,18
 
24
 100    if(CHAP(LEM:LEM).NE.' ') LEN=LEM
 
25
      if(ISTHEP(IT).EQ.1) then
 
26
        CHAC=CHAP
 
27
        if(LEN.GT.LMX) CHAC(LMX:LMX)='?'
 
28
      else
 
29
        ICHR = 3
 
30
        if(ISTHEP(IT).EQ.2) ICHR = 2
 
31
C... This is for isajet partons
 
32
        if(ISTHEP(IT).EQ.21 .OR. ISTHEP(IT).EQ.22) ICHR = 4
 
33
        if(LEN.EQ.0) then
 
34
          CHAC=CHDL(ICHR)(1:2)//' '
 
35
        else
 
36
          CHAC=CHDL(ICHR)(1:1)//CHAP(1:MIN(LEN,LMX-2))//
 
37
     &      CHDL(ICHR)(2:2)//' '
 
38
          if(LEN+2.GT.LMX) CHAC(LMX:LMX)='?'
 
39
        endif
 
40
      endif
 
41
      stdexpname = CHAC
 
42
      return
 
43
      end