~maddevelopers/mg5amcnlo/nlo_reweighting

« back to all changes in this revision

Viewing changes to madgraph/iolibs/template_files/loop/loop_matrix_standalone.inc

  • Committer: olivier Mattelaer
  • Date: 2016-02-27 14:33:01 UTC
  • mfrom: (256.19.84 2.3.4)
  • Revision ID: olivier.mattelaer@uclouvain.be-20160227143301-zjhafyh7cjw3eamq
merge with 2.3.4 (including spin2/ninja branch)

Show diffs side-by-side

added added

removed removed

Lines of Context:
155
155
          DATA NEXTREF/ZERO/
156
156
          INTEGER NPSPOINTS
157
157
          DATA NPSPOINTS/0/
 
158
      LOGICAL FOUND_VALID_REDUCTION_METHOD
 
159
      DATA FOUND_VALID_REDUCTION_METHOD/.FALSE./
158
160
 
159
161
          %(real_dp_format)s ACC
160
162
          %(real_dp_format)s DP_RES(3,MAXSTABILITYLENGTH)
190
192
      LOGICAL %(proc_prefix)sISZERO
191
193
C  
192
194
C GLOBAL VARIABLES
193
 
C  
 
195
 
196
      include 'process_info.inc'
194
197
      include 'coupl.inc'
195
198
          include 'mp_coupl.inc'
196
199
          include 'MadLoopParams.inc'
283
286
          LOGICAL ML_INIT
284
287
          common/ML_INIT/ML_INIT
285
288
 
 
289
C     This variable controls the *local* initialization of this particular SubProcess.
 
290
C     For example, the reading of the filters must be done independently by each SubProcess.
 
291
      LOGICAL LOCAL_ML_INIT
 
292
          data LOCAL_ML_INIT/.TRUE./
 
293
 
 
294
C     Variables related to turning off the Lorentz rotation test when spin-2 particles are external
 
295
      LOGICAL WARNED_LORENTZ_STAB_TEST_OFF
 
296
          data WARNED_LORENTZ_STAB_TEST_OFF/.FALSE./
 
297
          INTEGER NROTATIONS_DP_BU,NROTATIONS_QP_BU
 
298
 
286
299
C ----------
287
300
C BEGIN CODE
288
301
C ----------
297
310
    DoubleCheckHelicityFilter = .False. 
298
311
  ENDIF
299
312
  ML_INIT = .FALSE.
 
313
C For now only CutTools is interfaced in the default mode. Samurai could follow.
 
314
  DO I=1,SIZE(MLReductionLib)
 
315
    if (MLReductionLib(I).eq.1) then
 
316
          FOUND_VALID_REDUCTION_METHOD = .TRUE.
 
317
        endif
 
318
  ENDDO
 
319
  if (.not.FOUND_VALID_REDUCTION_METHOD) THEN
 
320
    WRITE(*,*) 'ERROR:: For now, only CutTools is interfaced to MadLoop in the non-optimized output.'
 
321
    WRITE(*,*) 'ERROR:: Make sure to include 1 in the parameter MLReductionLib of the card MadLoopParams.dat'
 
322
        STOP 1
 
323
  ENDIF
300
324
ENDIF
301
 
 
 
325
IF (LOCAL_ML_INIT) THEN
302
326
C Setup the file paths
303
327
  CALL JOINPATH(MLPATH,PARAMFNAME,PARAMFN)
304
328
  CALL JOINPATH(MLPATH,PROC_PREFIX,TMP)
308
332
  CALL JOINPATH(TMP,COLORDENOMFNAME,COLORDENOMFN)
309
333
  CALL JOINPATH(TMP,HELFILTERFNAME,HELFILTERFN)
310
334
 
 
335
C Make sure that the loop filter is disabled when there is spin-2 particles for 2>1 or 1>2 processes
 
336
  if(MAX_SPIN_EXTERNAL_PARTICLE.gt.3.AND.(NEXTERNAL.LE.3.AND.HelicityFilterLevel.NE.0)) THEN
 
337
    WRITE(*,*) '##INFO: Helicity filter deactivated for 2>1 processes involving spin 2 particles.'
 
338
    HelicityFilterLevel = 0     
 
339
C   We write a dummy filter for structural reasons here
 
340
    OPEN(1, FILE=HelFilterFN, err=6116, status='NEW',action='WRITE')
 
341
    DO I=1,NCOMB
 
342
      WRITE(1,*) 'T' 
 
343
    ENDDO
 
344
6116  CONTINUE
 
345
    CLOSE(1)
 
346
  ENDIF
 
347
 
311
348
OPEN(1, FILE=ColorNumFN, err=104, status='OLD',           action='READ')
312
349
  DO I=1,NLOOPAMPS
313
350
    READ(1,*,END=105) (CF_N(I,J),J=1,%(color_matrix_size)s)
339
376
  WRITE(*,*) '##Stopped by user request.'
340
377
  STOP
341
378
ENDIF
 
379
LOCAL_ML_INIT = .FALSE.
 
380
ENDIF
 
381
 
 
382
C Make sure that lorentz rotation tests are not used if there is external loop wavefunction of spin 2 and that one specific helicity is asked
 
383
NROTATIONS_DP_BU = NROTATIONS_DP
 
384
NROTATIONS_QP_BU = NROTATIONS_QP
 
385
if(MAX_SPIN_EXTERNAL_PARTICLE.gt.3.AND.USERHEL.NE.-1) THEN
 
386
   if(.NOT.WARNED_LORENTZ_STAB_TEST_OFF) THEN
 
387
     WRITE(*,*) '##WARNING: Evaluation of a specific helicity was asked for this PS point, and there is a spin-2 (or higher) particle in the external states.'
 
388
         WRITE(*,*) '##WARNING: As a result, MadLoop disabled the Lorentz rotation test for this phase-space point only.'
 
389
         WRITE(*,*) '##WARNING: Further warning of that type suppressed.'
 
390
     WARNED_LORENTZ_STAB_TEST_OFF = .FALSE. 
 
391
   ENDIF
 
392
   NROTATIONS_QP=0
 
393
   NROTATIONS_DP=0
 
394
ENDIF
342
395
 
343
396
IF(NTRY.EQ.0) THEN
344
397
  CALL %(proc_prefix)sSET_N_EVALS(N_DP_EVAL,N_QP_EVAL)
782
835
  CTMODEINIT=CTMODEINIT_BU  
783
836
ENDIF
784
837
 
 
838
C Reinitialize the Lorentz test if it had been disabled because spin-2 particles are in the external states.
 
839
NROTATIONS_DP = NROTATIONS_DP_BU
 
840
NROTATIONS_QP = NROTATIONS_QP_BU
 
841
 
785
842
C Conform to the returned synthax of split orders even though the default output does not support it (this then done only for compatibility purpose).
786
843
ANSRETURNED(0,0)=ANS(0)
787
844
ANSRETURNED(1,0)=ANS(1)