Merge lp:~maddevelopers/mg5amcnlo/MadSpin_fix_bug_iconfig into lp:~maddevelopers/mg5amcnlo/2.1.3

Proposed by Pierre Artoisenet
Status: Merged
Merged at revision: 283
Proposed branch: lp:~maddevelopers/mg5amcnlo/MadSpin_fix_bug_iconfig
Merge into: lp:~maddevelopers/mg5amcnlo/2.1.3
Diff against target: 113 lines (+31/-5)
2 files modified
MadSpin/decay.py (+4/-0)
MadSpin/src/driver.f (+27/-5)
To merge this branch: bzr merge lp:~maddevelopers/mg5amcnlo/MadSpin_fix_bug_iconfig
Reviewer Review Type Date Requested Status
Olivier Mattelaer Approve
Review via email: mp+231573@code.launchpad.net

Description of the change

To post a comment you must log in.
Revision history for this message
Pierre Artoisenet (partois) wrote :
Revision history for this message
Olivier Mattelaer (olivier-mattelaer) wrote :

Thanks a lot, I'm making the merging.

Olivier

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'MadSpin/decay.py'
2--- MadSpin/decay.py 2014-07-11 14:14:47 +0000
3+++ MadSpin/decay.py 2014-08-20 14:32:38 +0000
4@@ -2201,6 +2201,10 @@
5 event_map, momenta_in_decay,use_mc_masses, helicities)
6
7
8+ # Treat the case we get too many failures for the PS generation.
9+ if failed > 500 :
10+ logger.debug('Got a production event with %s failures for the phase-space generation generation ' % failed)
11+
12 # Treat the case that we ge too many overweight.
13 if weight > decay_me['max_weight']:
14 report['over_weight'] += 1
15
16=== modified file 'MadSpin/src/driver.f'
17--- MadSpin/src/driver.f 2014-05-06 12:19:33 +0000
18+++ MadSpin/src/driver.f 2014-08-20 14:32:38 +0000
19@@ -35,7 +35,7 @@
20 double precision qmass(-nexternal:0),qwidth(-nexternal:0),jac
21 double precision M_PROD, M_FULL
22 logical notpass
23- integer counter,mode,nbpoints, counter2
24+ integer counter,mode,nbpoints, counter2, counter3
25 double precision mean, variance, maxweight,weight,std
26 double precision temp
27 double precision Pprod(0:3,nexternal_prod)
28@@ -212,6 +212,7 @@
29 c max_jac=0d0
30
31 counter2=0
32+ counter3=0
33 do i=1,nbpoints
34 jac=1d0
35 ivar=0
36@@ -227,7 +228,16 @@
37 call generate_momenta_conf(jac,x,itree,qmass,qwidth,pfull,pprod,map_external2res)
38 if (jac.lt.0d0) then
39 counter2=counter2+1
40- if (counter2.ge.3) then ! use another topology to generate PS points
41+ counter3=counter3+1
42+c if (counter3.gt.500) then
43+c write(*,*) "500_pts_failed_stop_executation"
44+c stop
45+c endif
46+ if (counter2.ge.8) then ! use another topology to generate PS points
47+ do k=1,n_max_cg
48+ amp2(k)=0d0
49+ enddo
50+ CALL SMATRIX_PROD(P,M_PROD)
51 call get_config(iconfig)
52 do k=-nexternal_prod+2,-1
53 do j=1,2
54@@ -240,6 +250,7 @@
55 qwidth(k)=prwidth(k,iconfig)
56 enddo
57 call merge_itree(itree,qmass,qwidth, p,map_external2res)
58+ counter2=0
59 endif
60
61 cycle
62@@ -314,6 +325,7 @@
63 notpass=.true.
64 counter=0
65 counter2=0
66+ counter3=0
67 do while (notpass)
68 maxBW=0d0
69 counter=counter+1
70@@ -327,7 +339,16 @@
71 call generate_momenta_conf(jac,x,itree,qmass,qwidth,pfull,pprod,map_external2res)
72 if (jac.lt.0d0) then
73 counter2=counter2+1
74- if (counter2.ge.3) then ! use another topology to generate PS points
75+ counter3=counter3+1
76+c if (counter3.gt.500) then
77+c write(*,*) "500_pts_failed_stop_executation"
78+c stop
79+c endif
80+ if (counter2.ge.8) then ! use another topology to generate PS points
81+ do k=1,n_max_cg
82+ amp2(k)=0d0
83+ enddo
84+ CALL SMATRIX_PROD(P,M_PROD)
85 call get_config(iconfig)
86 do i=-nexternal_prod+2,-1
87 do j=1,2
88@@ -340,6 +361,7 @@
89 qwidth(i)=prwidth(i,iconfig)
90 enddo
91 call merge_itree(itree,qmass,qwidth, p,map_external2res)
92+ counter2=0
93 endif
94
95 cycle
96@@ -365,7 +387,7 @@
97 call generate_momenta_conf(jac,x,itree,qmass,qwidth,ptrial,pprod,map_external2res)
98
99 if (jac.lt.0d0) then
100- write(*,*) nexternal, counter, maxBW, weight, counter2, 0
101+ write(*,*) nexternal, counter, maxBW, weight, counter3, 0
102 do i=1,nexternal
103 write (*,*) (pfull(j,i), j=0,3)
104 enddo
105@@ -492,7 +514,7 @@
106 !write(*,*) random
107 !write(*,*) cumulweight(i-1)
108 !write(*,*) cumulweight(i)
109- if (random.ge.cumulweight(i-1).and.random.le.cumulweight(i)) then
110+ if (random.le.cumulweight(i)) then
111 iconfig=i
112 return
113 endif

Subscribers

People subscribed via source and target branches

to all changes: