~maddevelopers/mg5amcnlo/simple_unlops

« back to all changes in this revision

Viewing changes to tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_nogroup/matrix.f

  • Committer: olivier-mattelaer
  • Date: 2021-11-12 09:29:31 UTC
  • mfrom: (967.1.15 3.3.0)
  • Revision ID: olivier-mattelaer-20211112092931-4ec9qfzgxkeovqog
versionĀ 3.3.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
122
122
          IF (GOODHEL(I) .OR. NTRY .LE. MAXTRIES.OR.(ISUM_HEL.NE.0))
123
123
     $      THEN
124
124
            T=MATRIX(P ,NHEL(1,I),JC(1))
 
125
 
125
126
            DO JJ=1,NINCOMING
126
127
              IF(POL(JJ).NE.1D0.AND.NHEL(JJ,I).EQ.INT(SIGN(1D0,POL(JJ))
127
128
     $         )) THEN
128
 
                T=T*ABS(POL(JJ))*NB_SPIN_STATE(JJ)/2D0  ! NB_SPIN_STATE(JJ)/2d0 is added for polarised beam
 
129
                T=T*ABS(POL(JJ))
129
130
              ELSE IF(POL(JJ).NE.1D0)THEN
130
 
                T=T*(2D0-ABS(POL(JJ)))*NB_SPIN_STATE(JJ)/2D0
 
131
                T=T*(2D0-ABS(POL(JJ)))
131
132
              ENDIF
132
133
            ENDDO
 
134
 
133
135
            IF (ISUM_HEL.NE.0) THEN
134
136
              CALL DS_ADD_ENTRY('Helicity',I,T)
135
137
            ENDIF
141
143
          CALL RESET_CUMULATIVE_VARIABLE()  ! avoid biais of the initialization
142
144
        ENDIF
143
145
        IF (ISUM_HEL.NE.0) THEN
144
 
            !         We set HEL_PICKED to -1 here so that later on, the call to DS_add_point in dsample.f does not add anything to the grid since it was already done here.
145
 
          HEL_PICKED = -1
 
146
            !         We set HEL_PICKED to -HEL_PICKED here so that later on, the call to DS_add_point in dsample.f does not add anything to the grid since it was already done here.
 
147
          HEL_PICKED = -IABS(HEL_PICKED)
146
148
            !         For safety, hardset the helicity sampling jacobian to 0.0d0 to make sure it is not .
147
149
          HEL_JACOBIAN   = 1.0D0
148
150
          IF(DS_GET_DIM_STATUS('Helicity').EQ.1) THEN
175
177
        I = HEL_PICKED
176
178
 
177
179
        T=MATRIX(P ,NHEL(1,I),JC(1))
 
180
 
178
181
        DO JJ=1,NINCOMING
179
182
          IF(POL(JJ).NE.1D0.AND.NHEL(JJ,I).EQ.INT(SIGN(1D0,POL(JJ))))
180
183
     $      THEN
183
186
            T=T*(2D0-ABS(POL(JJ)))
184
187
          ENDIF
185
188
        ENDDO
 
189
 
186
190
C       Always one helicity at a time
187
191
        ANS = T
188
192
C       Include the Jacobian from helicity sampling
189
193
        ANS = ANS * HEL_JACOBIAN
190
194
        WRITE(HEL_BUFF,'(20i5)')(NHEL(II,I),II=1,NEXTERNAL)
191
195
      ENDIF
192
 
      IF (ISUM_HEL .NE. 1.OR.(HEL_PICKED.EQ.-1)) THEN
 
196
      IF (ISUM_HEL .NE. 1.OR.(HEL_PICKED.LE.0)) THEN
193
197
        R=XRAN1(IDUM)*ANS
194
198
        SUMHEL=0D0
195
199
        DO I=1,NCOMB