~maddevelopers/mg5amcnlo/2.9.4

« back to all changes in this revision

Viewing changes to madgraph/iolibs/template_files/driver_reweight.f

pass to v2.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
      PROGRAM DRIVER
 
2
C**************************************************************************
 
3
C     THIS IS THE DRIVER FOR CHECKING THE STANDALONE MATRIX ELEMENT.
 
4
C     IT USES A SIMPLE PHASE SPACE GENERATOR
 
5
C     Fabio Maltoni - 3rd Febraury 2007
 
6
C     Modified Version for the decay Package (Pierre Artoisenet)
 
7
C**************************************************************************
 
8
      IMPLICIT NONE
 
9
C     
 
10
C     CONSTANTS  
 
11
C     
 
12
      REAL*8 ZERO
 
13
      PARAMETER (ZERO=0D0)
 
14
C     
 
15
C     INCLUDE FILES
 
16
C     
 
17
C---  the include file with the values of the parameters and masses     
 
18
      INCLUDE "coupl.inc"
 
19
C---  integer nexternal ! number particles (incoming+outgoing) in the me 
 
20
      INCLUDE "nexternal.inc" 
 
21
C---  particle masses
 
22
      REAL*8 PMASS(NEXTERNAL)   
 
23
C---  integer    n_max_cg
 
24
      INCLUDE "ngraphs.inc"     !how many diagrams (could be useful to know...)
 
25
 
 
26
      DOUBLE PRECISION AMP2(n_max_cg)
 
27
      COMMON/TO_AMPS/  AMP2
 
28
 
 
29
 
 
30
C     
 
31
C     LOCAL
 
32
C     
 
33
      INTEGER I,J,K
 
34
      REAL*8 P(0:3,NEXTERNAL)   ! four momenta. Energy is the zeroth component.
 
35
      REAL*8 SQRTS,MATELEM           ! sqrt(s)= center of mass energy 
 
36
      REAL*8 PIN(0:3), POUT(0:3)
 
37
      CHARACTER*120 BUFF(NEXTERNAL)
 
38
      CHARACTER*200 param_card
 
39
      real*8 new_alphas
 
40
      real*8 pi
 
41
C     
 
42
C     EXTERNAL
 
43
C     
 
44
      REAL*8 DOT
 
45
      EXTERNAL DOT
 
46
      
 
47
      pi = 3.141592653589793d0
 
48
C-----
 
49
C     BEGIN CODE
 
50
C-----
 
51
C     
 
52
C---  INITIALIZATION CALLS
 
53
C     
 
54
c---  Call to initialize the values of the couplings, masses and widths 
 
55
c     used in the evaluation of the matrix element. The primary parameters of the
 
56
c     models are read from Cards/param_card.dat. The secondary parameters are calculated
 
57
c     in Source/MODEL/couplings.f. The values are stored in common blocks that are listed
 
58
c     in coupl.inc .
 
59
      read(*,*) param_card
 
60
      call setpara(param_card)  !first call to setup the paramaters
 
61
 
 
62
c      include "../parameters.inc"
 
63
      call coup()
 
64
      include "pmass.inc"             !set up masses
 
65
 
 
66
c      read phase-space point (main loop)
 
67
1     read(*,*) new_alphas
 
68
      G = 2* DSQRT(new_alphas*pi)
 
69
      call UPDATE_AS_PARAM()
 
70
      do i=1,nexternal
 
71
         read (*,*) P(0,i),P(1,i),P(2,i),P(3,i) 
 
72
      enddo
 
73
 
 
74
 
 
75
 
 
76
c     
 
77
c     Now we can call the matrix element!
 
78
c
 
79
 
 
80
      CALL SMATRIX(P,MATELEM)
 
81
c
 
82
 
 
83
c      write (*,*) "Matrix element = ", MATELEM, " GeV^",-(2*nexternal-8)       
 
84
c      write (*,*) "-----------------------------------------------------------------------------"
 
85
 
 
86
       write(*,*) MATELEM
 
87
       call flush()
 
88
       goto 1
 
89
 
 
90
      end
 
91
        
 
92
          
 
93
          
 
94
          
 
95
           double precision function dot(p1,p2)
 
96
C****************************************************************************
 
97
C     4-Vector Dot product
 
98
C****************************************************************************
 
99
      implicit none
 
100
      double precision p1(0:3),p2(0:3)
 
101
      dot=p1(0)*p2(0)-p1(1)*p2(1)-p1(2)*p2(2)-p1(3)*p2(3)
 
102
      end
 
103