1
C some functions which deal with the splitorders
2
subroutine fill_needed_splittings()
3
! loop over the FKS configurations and fill the split_type_used
6
include "nexternal.inc"
7
include "nFKSconfigs.inc"
10
logical split_type_used(nsplitorders)
11
common/to_split_type_used/split_type_used
13
do j = 1, nsplitorders
14
split_type_used(j)=.false.
17
do j = 1, nsplitorders
18
split_type_used(j)=split_type_used(j).or.
22
write(*,*) 'SPLIT TYPE USED:', split_type_used
27
integer function get_orders_tag(ord)
28
C a function that assigns to a given order
29
C array an integer number
32
integer ord(nsplitorders)
36
! this is for the printout of the informations
37
logical firsttime, firsttime_contr(amp_split_size)
38
data firsttime/.true./
39
data firsttime_contr/amp_split_size * .true./
40
integer orders_to_amp_split_pos
42
! print out some extra informations
43
if (firsttime) write(*,fmt='(a)',advance="NO")
44
$ "INFO: orders_tag_plot is computed as:"
49
if (firsttime) write(*,fmt='(3a,i8)',advance="NO")
50
$ " + ", ordernames(i), " * ", step
51
get_orders_tag=get_orders_tag+step*ord(i)
59
if (firsttime_contr(orders_to_amp_split_pos(ord))) then
60
write(*,*) 'orders_tag_plot= ', get_orders_tag, ' for ',
61
# (ordernames(i),",",i=1,nsplitorders), ' = ',
62
# (ord(i),",",i=1,nsplitorders)
63
firsttime_contr(orders_to_amp_split_pos(ord)) = .false.
70
integer function get_orders_tag_from_amp_pos(iamp)
71
C calls get_orders_tag for the orders corresponding to
72
C the iamp-th amp_split
76
integer ord(nsplitorders)
77
integer get_orders_tag
79
call amp_split_pos_to_orders(iamp, ord)
80
get_orders_tag_from_amp_pos = get_orders_tag(ord)
86
integer function orders_to_amp_split_pos(ord)
87
C helper function to keep track of the different coupling order combinations
88
C given the squared orders ord, return the corresponding position into the amp_split array
91
integer ord(nsplitorders)
93
include 'amp_split_orders.inc'
95
do i=1, amp_split_size
97
if (amp_split_orders(i,j).ne.ord(j)) goto 999
99
orders_to_amp_split_pos = i
104
WRITE(*,*) 'ERROR:: Stopping function orders_to_amp_split_pos'
105
WRITE(*,*) 'Could not find orders ',(ord(i),i=1
113
subroutine amp_split_pos_to_orders(pos, orders)
114
C helper function to keep track of the different coupling order combinations
115
C given the position pos, return the corresponding order powers orders
116
C it is the inverse of orders_to_amp_split_pos
119
integer pos, orders(nsplitorders)
121
include 'amp_split_orders.inc'
124
if (pos.gt.amp_split_size.or.pos.lt.0) then
125
write(*,*) 'ERROR in amp_split_pos_to_orders'
126
write(*,*) 'Invalid pos', pos, amp_split_size
130
do i = 1, nsplitorders
131
orders(i) = amp_split_orders(pos,i)
137
integer function lo_qcd_to_amp_pos(qcdpower)
141
integer pos, orders(nsplitorders)
142
do pos = 1, amp_split_size_born
143
call amp_split_pos_to_orders(pos, orders)
144
if (orders(qcd_pos).eq.qcdpower) exit
146
lo_qcd_to_amp_pos = pos
151
integer function nlo_qcd_to_amp_pos(qcdpower)
155
integer pos, orders(nsplitorders)
156
do pos = amp_split_size_born + 1, amp_split_size
157
call amp_split_pos_to_orders(pos, orders)
158
if (orders(qcd_pos).eq.qcdpower) exit
160
nlo_qcd_to_amp_pos = pos
165
subroutine check_amp_split()
166
C check that amp_split_pos_to_orders and orders_to_amp_split_pos behave
167
C as expected (one the inverse of the other)
168
C Check also get_orders_tag vs get_orders_tag_from_amp_pos
169
C Stop the code if anything wrong is found
170
C Also, print on screen a summary of the orders in amp_split
173
integer orders_to_amp_split_pos
175
integer ord(nsplitorders)
176
integer get_orders_tag, get_orders_tag_from_amp_pos
178
do i = 1, amp_split_size
179
call amp_split_pos_to_orders(i, ord)
180
pos = orders_to_amp_split_pos(ord)
183
write(*,*) 'ERROR#1 in check amp_split', pos, i
184
write(*,*) 'ORD is ', ord
188
if (get_orders_tag(ord).ne.get_orders_tag_from_amp_pos(i)) then
189
write(*,*) 'ERROR#2 in check amp_split', get_orders_tag(ord),
190
$ get_orders_tag_from_amp_pos(i)
191
write(*,*) 'I, ORD ', i, ord
195
write(*,*) 'AMP_SPLIT: ', i, 'correspond to S.O.', ord