91
120
%(complex_mp_format)s PL(0:3,0:NLOOPWAVEFUNCS)
92
121
common/%(proc_prefix)sMP_WL/WL,PL
123
## if(not AmplitudeReduction){
94
124
%(complex_mp_format)s LOOPCOEFS(0:LOOPMAXCOEFS-1,NSQUAREDSO,NLOOPGROUPS)
126
%(complex_mp_format)s LOOPCOEFS(0:LOOPMAXCOEFS-1,NLOOPGROUPS)
95
128
common/%(proc_prefix)sMP_LCOEFS/LOOPCOEFS
130
## if(AmplitudeReduction) {
131
C This flag is used to prevent the re-computation of the OpenLoop coefficients when changing the CTMode for the stability test.
132
LOGICAL SKIP_LOOPNUM_COEFS_CONSTRUCTION
133
COMMON/%(proc_prefix)sSKIP_COEFS/SKIP_LOOPNUM_COEFS_CONSTRUCTION
136
## if(not AmplitudeReduction){
97
137
%(complex_mp_format)s AMPL(3,NCTAMPS)
139
%(complex_mp_format)s AMPL(3,NLOOPAMPS)
98
141
common/%(proc_prefix)sMP_AMPL/AMPL
143
## if(AmplitudeReduction){
144
%(complex_dp_format)s DP_AMPL(3,NLOOPAMPS)
145
common/%(proc_prefix)sAMPL/DP_AMPL
147
%(complex_dp_format)s LOOPRES(3,NSQUAREDSO,NLOOPGROUPS)
148
LOGICAL S(NSQUAREDSO,NLOOPGROUPS)
149
common/%(proc_prefix)sLOOPRES/LOOPRES,S
152
common/%(proc_prefix)sI_SO/I_SO
100
155
INTEGER CF_D(NCOLORROWS,%(color_matrix_size)s)
101
156
INTEGER CF_N(NCOLORROWS,%(color_matrix_size)s)
102
157
common/%(proc_prefix)sCF/CF_D,CF_N
180
283
MP_UVCT_REQ_SO_DONE=.TRUE.
182
IF (.NOT.CHECKPHASE.AND.HELDOUBLECHECKED.AND.HELPICKED.EQ.-1) THEN
187
DO I=1,%(nctamps_or_nloopamps)s
188
DO J=1,%(nbornamps_or_nloopamps)s
285
## if(not AmplitudeReduction) {
189
288
CFTOT=CMPLX(CF_N(I,J)/REAL(ABS(CF_D(I,J)),KIND=16),0.0e0_16,KIND=16)
190
289
IF(CF_D(I,J).LT.0) CFTOT=CFTOT*IMAG1
290
ITEMP = %(proc_prefix)sML5SQSOINDEX(%(proc_prefix)sML5SOINDEX_FOR_LOOP_AMP(I),%(proc_prefix)sML5SOINDEX_FOR_BORN_AMP(J))
291
IF (.NOT.FILTER_SO.OR.SQSO_TARGET.EQ.ITEMP) THEN
293
TEMP2 = HEL_MULT*2.0e0_16*REAL(CFTOT*AMPL(K,I)*CONJG(AMP(J)),KIND=16)
294
ANS(K,ITEMP)=ANS(K,ITEMP)+TEMP2
295
ANS(K,0)=ANS(K,0)+TEMP2
195
302
%(mp_coef_construction)s
197
304
MP_LOOP_REQ_SO_DONE=.TRUE.
306
## if(AmplitudeReduction) {
307
## if(not LoopInduced) {
308
C Copy the multiple precision Born amplitudes computed to the AMP double precision array for its use later if necessary (i.e. color flows for example.)
314
C Copy the multiple precision CT amplitudes computed to the AMPL double precision array for its use later if necessary (i.e. color flows for example.)
317
DP_AMPL(K,I)=AMPL(K,I)
202
322
c Copy the qp wfs to the dp ones as they are used to setup the CT calls.
323
C This needs to be done once since only the momenta of these WF matters.
324
IF(.NOT.DPW_COPIED) THEN
327
DPW(J,I)=DBLE(W(J,I))
333
## if(AmplitudeReduction) {
340
C We need a dummy argument for the squared order index to conform to the
341
C structure that the call to the LOOP* subroutine takes for processes with Born diagrams.
345
CTCALL_REQ_SO_DONE=.TRUE.
347
C Copy the loop amplitudes computed (whose final result was stored in a double
348
C precision variable) to the AMPL multiple precision array.
349
DO I=NCTAMPS+1,NLOOPAMPS
351
AMPL(K,I)=DP_AMPL(K,I)
355
## if(ComputeColorFlows) {
356
IF (DIRECT_ME_COMPUTATION) THEN
359
## if(not LoopInduced) {
364
CFTOT=CMPLX(CF_N(I,J)/REAL(ABS(CF_D(I,J)),KIND=16),0.0e0_16,KIND=16)
365
IF(CF_D(I,J).LT.0) CFTOT=CFTOT*IMAG1
366
## if(not LoopInduced) {
367
ITEMP = %(proc_prefix)sML5SQSOINDEX(%(proc_prefix)sML5SOINDEX_FOR_LOOP_AMP(I),%(proc_prefix)sML5SOINDEX_FOR_BORN_AMP(J))
369
TEMP2(K) = 2.0d0*HEL_MULT*REAL(CFTOT*AMPL(K,I)*CONJG(AMP(J)),KIND=16)
372
ITEMP = %(proc_prefix)sML5SQSOINDEX(%(proc_prefix)sML5SOINDEX_FOR_LOOP_AMP(I),%(proc_prefix)sML5SOINDEX_FOR_LOOP_AMP(J))
373
TEMP2(1) = HEL_MULT*REAL(CFTOT*AMPL(1,I)*CONJG(AMPL(1,J)),KIND=16)
374
C Computing the quantities below is not strictly necessary since the result should be finite
375
C It is however a good cross-check.
376
TEMP2(2) = HEL_MULT*REAL(CFTOT*(AMPL(2,I)*CONJG(AMPL(1,J)) + AMPL(1,I)*CONJG(AMPL(2,J))),KIND=16)
377
TEMP2(3) = HEL_MULT*REAL(CFTOT*(AMPL(3,I)*CONJG(AMPL(1,J)) + AMPL(1,I)*CONJG(AMPL(3,J))+AMPL(2,I)*CONJG(AMPL(2,J))),KIND=16)
379
C To mimic the structure of the non loop-induced processes, we add here the squared counterterm contribution directly the result ANS and put the loop contributions in the LOOPRES array which will be added to ANS later
380
IF (I.LE.NCTAMPS) THEN
381
IF (.NOT.FILTER_SO.OR.SQSO_TARGET.EQ.ITEMP) THEN
383
ANS(K,ITEMP)=ANS(K,ITEMP)+TEMP2(K)
384
ANS(K,0)=ANS(K,0)+TEMP2(K)
389
C This LOOPRES array entries will be added to the main result ANS(*,*) later in the loop_matrix.f file. It is in double precision however, so the cast of the temporary variable TEMP2 is necessary.
390
LOOPRES(K,ITEMP,I-NCTAMPS)=LOOPRES(K,ITEMP,I-NCTAMPS)+DBLE(TEMP2(K))
391
C During the evaluation of the AMPL, we had stored the stability in S(1,*) so we now copy over this flag to the relevant contributing Squared orders.
392
S(ITEMP,I-NCTAMPS)=S(1,I-NCTAMPS)
398
## if(ComputeColorFlows) {
406
## if(ComputeColorFlows){
407
C We should compute the color flow either if it contributes to the final result (i.e. not used just for the filtering), or if the computation is only done from the color flows
408
IF (((.NOT.DIRECT_ME_COMPUTATION).AND.ME_COMPUTATION_FROM_JAMP).OR.(H.EQ.USERHEL.OR.USERHEL.EQ.-1)) THEN
409
C The cumulative quantities must only be computed if that helicity contributes according to user request (second argument of the subroutine below).
410
CALL %(proc_prefix)sCOMPUTE_COLOR_FLOWS(HEL_MULT,(H.EQ.USERHEL.OR.USERHEL.EQ.-1))
411
IF(ME_COMPUTATION_FROM_JAMP) THEN
412
CALL %(proc_prefix)sCOMPUTE_RES_FROM_JAMP(BUFFRES,HEL_MULT)
413
IF(((.NOT.DIRECT_ME_COMPUTATION).AND.ME_COMPUTATION_FROM_JAMP)) THEN
414
C If the computation from the color flow is the only form of computation, we directly update the answer.
417
ANS(K,I)=ANS(K,I)+REAL(BUFFRES(K,I),KIND=16)
420
C In this case, we temporarily store the compute Born ME in RES_FROM_JAMP(0,I), which will be used to set ANS(0,I) just after the call to this subroutine in loop_matrix.f
422
RES_FROM_JAMP(0,I)=RES_FROM_JAMP(0,I)+REAL(BUFFRES(0,I),KIND=16)
424
C When setting up the loop filter, it is important to set the quantitied LOOPRES.
425
C Notice that you may have a more powerful filter with the direct computation mode because it can filter vanishing loop contributions for a particular squared split order only
426
C The quantity LOOPRES defined below is not physical, but it's ok since it is only intended for the loop filtering.
427
C In principle it is no longer necessary to compute the quantity below once the loop filter is setup, but it takes a negligible amount of time compare to the quad prec computations.
431
LOOPRES(K,I,J)=LOOPRES(K,I,J)+DP_AMPL(K,NCTAMPS+J)
435
C The if statement below is not strictly necessary but makes it clear when it is executed.
436
ELSEIF(H.EQ.USERHEL.OR.USERHEL.EQ.-1) THEN
437
C If both computational method is used, then we must just update RES_FROM_JAMP
440
RES_FROM_JAMP(K,I)=RES_FROM_JAMP(K,I)+BUFFRES(K,I)