~madteam/mg5amcnlo/series2.0

« back to all changes in this revision

Viewing changes to madgraph/iolibs/template_files/split_orders_helping_functions.inc

  • Committer: olivier Mattelaer
  • Date: 2015-03-05 00:14:16 UTC
  • mfrom: (258.1.9 2.3)
  • mto: (258.8.1 2.3)
  • mto: This revision was merged to the branch mainline in revision 259.
  • Revision ID: olivier.mattelaer@uclouvain.be-20150305001416-y9mzeykfzwnl9t0j
partial merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
      INTEGER I, SQORDERS(NSO)
24
24
      INTEGER AMPSPLITORDERS(NAMPSO,NSO)
25
25
          %(ampsplitorders)s
 
26
          COMMON/%(proc_prefix)sAMPSPLITORDERS%(proc_id)s/AMPSPLITORDERS
26
27
C
27
28
C FUNCTION
28
29
C
55
56
      INTEGER I,J
56
57
          INTEGER SQSPLITORDERS(NSQSO,NSO)
57
58
          %(sqsplitorders)s
 
59
          COMMON/%(proc_prefix)sSQPLITORDERS%(proc_id)s/SQPLITORDERS
58
60
C
59
61
C BEGIN CODE
60
62
C
67
69
1009    CONTINUE
68
70
          ENDDO
69
71
 
70
 
          WRITE(*,*) 'ERROR:: Stopping function %(proc_prefix)sSOINDEX_FOR_SQUARED_ORDERS'
 
72
          WRITE(*,*) 'ERROR:: Stopping in function' 
 
73
          WRITE(*,*) '%(proc_prefix)sSOINDEX_FOR_SQUARED_ORDERS%(proc_id)s'
71
74
          WRITE(*,*) 'Could not find squared orders ',(ORDERS(I),I=1,NSO)
72
75
          STOP
73
76
 
87
90
      NSQSO=NSQUAREDSO
88
91
 
89
92
      END
 
93
 
 
94
C This is the inverse subroutine of SOINDEX_FOR_SQUARED_ORDERS. Not directly useful, but provided nonetheless.
 
95
      SUBROUTINE %(proc_prefix)sGET_SQUARED_ORDERS_FOR_SOINDEX%(proc_id)s(SOINDEX,ORDERS)
 
96
C
 
97
C This functions returns the orders identified by the squared split order index in argument. Order values correspond to following list of couplings (and in this order):
 
98
C %(split_order_str_list)s
 
99
C
 
100
C CONSTANTS
 
101
C
 
102
      INTEGER    NSO, NSQSO
 
103
          PARAMETER (NSO=%(nSplitOrders)d, NSQSO=%(nSqAmpSplitOrders)d)
 
104
C
 
105
C ARGUMENTS
 
106
C
 
107
      INTEGER SOINDEX, ORDERS(NSO)
 
108
C
 
109
C LOCAL VARIABLES
 
110
C
 
111
      INTEGER I
 
112
          INTEGER SQPLITORDERS(NSQSO,NSO)
 
113
          COMMON/%(proc_prefix)sSQPLITORDERS%(proc_id)s/SQPLITORDERS      
 
114
C
 
115
C BEGIN CODE
 
116
C
 
117
      IF (SOINDEX.gt.0.and.SOINDEX.le.NSQSO) THEN
 
118
        DO I=1,NSO
 
119
          ORDERS(I) =  SQPLITORDERS(SOINDEX,I)
 
120
        ENDDO
 
121
        RETURN
 
122
      ENDIF
 
123
 
 
124
          WRITE(*,*) 'ERROR:: Stopping function %(proc_prefix)sGET_SQUARED_ORDERS_FOR_SOINDEX%(proc_id)s'
 
125
          WRITE(*,*) 'Could not find squared orders index ',SOINDEX
 
126
          STOP
 
127
 
 
128
      END SUBROUTINE
 
129
 
 
130
C This is the inverse subroutine of getting amplitude SO orders. Not directly useful, but provided nonetheless.
 
131
      SUBROUTINE %(proc_prefix)sGET_ORDERS_FOR_AMPSOINDEX%(proc_id)s(SOINDEX,ORDERS)
 
132
C
 
133
C This functions returns the orders identified by the split order index in argument. Order values correspond to following list of couplings (and in this order):
 
134
C %(split_order_str_list)s
 
135
C
 
136
C CONSTANTS
 
137
C
 
138
      INTEGER    NSO, NAMPSO
 
139
          PARAMETER (NSO=%(nSplitOrders)d, NAMPSO=%(nAmpSplitOrders)d)
 
140
C
 
141
C ARGUMENTS
 
142
C
 
143
      INTEGER SOINDEX, ORDERS(NSO)
 
144
C
 
145
C LOCAL VARIABLES
 
146
C
 
147
      INTEGER I
 
148
      INTEGER AMPSPLITORDERS(NAMPSO,NSO)
 
149
          COMMON/%(proc_prefix)sAMPSPLITORDERS%(proc_id)s/AMPSPLITORDERS
 
150
C
 
151
C BEGIN CODE
 
152
C
 
153
      IF (SOINDEX.gt.0.and.SOINDEX.le.NAMPSO) THEN
 
154
        DO I=1,NSO
 
155
          ORDERS(I) =  AMPSPLITORDERS(SOINDEX,I)
 
156
        ENDDO
 
157
        RETURN
 
158
      ENDIF
 
159
 
 
160
          WRITE(*,*) 'ERROR:: Stopping function %(proc_prefix)sGET_ORDERS_FOR_AMPSOINDEX%(proc_id)s'
 
161
          WRITE(*,*) 'Could not find amplitude split orders index ',SOINDEX
 
162
          STOP
 
163
 
 
164
      END SUBROUTINE
 
165
 
 
166
C This function is not directly useful, but included for completeness
 
167
      INTEGER FUNCTION %(proc_prefix)sSOINDEX_FOR_AMPORDERS%(proc_id)s(ORDERS)
 
168
C
 
169
C This functions returns the integer index identifying the amplitude split orders passed in argument which correspond to the values of the following list of couplings (and in this order):
 
170
C %(split_order_str_list)s
 
171
C
 
172
C CONSTANTS
 
173
C
 
174
      INTEGER    NSO, NAMPSO
 
175
          PARAMETER (NSO=%(nSplitOrders)d, NAMPSO=%(nAmpSplitOrders)d)
 
176
C
 
177
C ARGUMENTS
 
178
C
 
179
      INTEGER ORDERS(NSO)
 
180
C
 
181
C LOCAL VARIABLES
 
182
C
 
183
      INTEGER I,J
 
184
      INTEGER AMPSPLITORDERS(NAMPSO,NSO)
 
185
          COMMON/%(proc_prefix)sAMPSPLITORDERS%(proc_id)s/AMPSPLITORDERS
 
186
C
 
187
C BEGIN CODE
 
188
C
 
189
      DO I=1,NAMPSO
 
190
            DO J=1,NSO
 
191
                  IF (ORDERS(J).NE.AMPSPLITORDERS(I,J)) GOTO 1009
 
192
                ENDDO
 
193
                %(proc_prefix)sSOINDEX_FOR_AMPORDERS%(proc_id)s = I
 
194
                RETURN
 
195
1009    CONTINUE
 
196
          ENDDO
 
197
 
 
198
          WRITE(*,*) 'ERROR:: Stopping function %(proc_prefix)sSOINDEX_FOR_AMPORDERS%(proc_id)s'
 
199
          WRITE(*,*) 'Could not find squared orders ',(ORDERS(I),I=1,NSO)
 
200
          STOP
 
201
 
 
202
      END