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
=== modified file 'MadSpin/decay.py'
--- MadSpin/decay.py 2014-07-11 14:14:47 +0000
+++ MadSpin/decay.py 2014-08-20 14:32:38 +0000
@@ -2201,6 +2201,10 @@
2201 event_map, momenta_in_decay,use_mc_masses, helicities)2201 event_map, momenta_in_decay,use_mc_masses, helicities)
2202 2202
2203 2203
2204 # Treat the case we get too many failures for the PS generation.
2205 if failed > 500 :
2206 logger.debug('Got a production event with %s failures for the phase-space generation generation ' % failed)
2207
2204 # Treat the case that we ge too many overweight.2208 # Treat the case that we ge too many overweight.
2205 if weight > decay_me['max_weight']:2209 if weight > decay_me['max_weight']:
2206 report['over_weight'] += 12210 report['over_weight'] += 1
22072211
=== modified file 'MadSpin/src/driver.f'
--- MadSpin/src/driver.f 2014-05-06 12:19:33 +0000
+++ MadSpin/src/driver.f 2014-08-20 14:32:38 +0000
@@ -35,7 +35,7 @@
35 double precision qmass(-nexternal:0),qwidth(-nexternal:0),jac35 double precision qmass(-nexternal:0),qwidth(-nexternal:0),jac
36 double precision M_PROD, M_FULL36 double precision M_PROD, M_FULL
37 logical notpass37 logical notpass
38 integer counter,mode,nbpoints, counter238 integer counter,mode,nbpoints, counter2, counter3
39 double precision mean, variance, maxweight,weight,std39 double precision mean, variance, maxweight,weight,std
40 double precision temp40 double precision temp
41 double precision Pprod(0:3,nexternal_prod)41 double precision Pprod(0:3,nexternal_prod)
@@ -212,6 +212,7 @@
212c max_jac=0d0212c max_jac=0d0
213213
214 counter2=0214 counter2=0
215 counter3=0
215 do i=1,nbpoints216 do i=1,nbpoints
216 jac=1d0217 jac=1d0
217 ivar=0218 ivar=0
@@ -227,7 +228,16 @@
227 call generate_momenta_conf(jac,x,itree,qmass,qwidth,pfull,pprod,map_external2res) 228 call generate_momenta_conf(jac,x,itree,qmass,qwidth,pfull,pprod,map_external2res)
228 if (jac.lt.0d0) then229 if (jac.lt.0d0) then
229 counter2=counter2+1 230 counter2=counter2+1
230 if (counter2.ge.3) then ! use another topology to generate PS points231 counter3=counter3+1
232c if (counter3.gt.500) then
233c write(*,*) "500_pts_failed_stop_executation"
234c stop
235c endif
236 if (counter2.ge.8) then ! use another topology to generate PS points
237 do k=1,n_max_cg
238 amp2(k)=0d0
239 enddo
240 CALL SMATRIX_PROD(P,M_PROD)
231 call get_config(iconfig)241 call get_config(iconfig)
232 do k=-nexternal_prod+2,-1242 do k=-nexternal_prod+2,-1
233 do j=1,2243 do j=1,2
@@ -240,6 +250,7 @@
240 qwidth(k)=prwidth(k,iconfig)250 qwidth(k)=prwidth(k,iconfig)
241 enddo251 enddo
242 call merge_itree(itree,qmass,qwidth, p,map_external2res)252 call merge_itree(itree,qmass,qwidth, p,map_external2res)
253 counter2=0
243 endif254 endif
244255
245 cycle256 cycle
@@ -314,6 +325,7 @@
314 notpass=.true.325 notpass=.true.
315 counter=0326 counter=0
316 counter2=0327 counter2=0
328 counter3=0
317 do while (notpass) 329 do while (notpass)
318 maxBW=0d0330 maxBW=0d0
319 counter=counter+1331 counter=counter+1
@@ -327,7 +339,16 @@
327 call generate_momenta_conf(jac,x,itree,qmass,qwidth,pfull,pprod,map_external2res) 339 call generate_momenta_conf(jac,x,itree,qmass,qwidth,pfull,pprod,map_external2res)
328 if (jac.lt.0d0) then340 if (jac.lt.0d0) then
329 counter2=counter2+1 341 counter2=counter2+1
330 if (counter2.ge.3) then ! use another topology to generate PS points342 counter3=counter3+1
343c if (counter3.gt.500) then
344c write(*,*) "500_pts_failed_stop_executation"
345c stop
346c endif
347 if (counter2.ge.8) then ! use another topology to generate PS points
348 do k=1,n_max_cg
349 amp2(k)=0d0
350 enddo
351 CALL SMATRIX_PROD(P,M_PROD)
331 call get_config(iconfig)352 call get_config(iconfig)
332 do i=-nexternal_prod+2,-1353 do i=-nexternal_prod+2,-1
333 do j=1,2354 do j=1,2
@@ -340,6 +361,7 @@
340 qwidth(i)=prwidth(i,iconfig)361 qwidth(i)=prwidth(i,iconfig)
341 enddo362 enddo
342 call merge_itree(itree,qmass,qwidth, p,map_external2res)363 call merge_itree(itree,qmass,qwidth, p,map_external2res)
364 counter2=0
343 endif365 endif
344366
345 cycle367 cycle
@@ -365,7 +387,7 @@
365 call generate_momenta_conf(jac,x,itree,qmass,qwidth,ptrial,pprod,map_external2res) 387 call generate_momenta_conf(jac,x,itree,qmass,qwidth,ptrial,pprod,map_external2res)
366 388
367 if (jac.lt.0d0) then389 if (jac.lt.0d0) then
368 write(*,*) nexternal, counter, maxBW, weight, counter2, 0390 write(*,*) nexternal, counter, maxBW, weight, counter3, 0
369 do i=1,nexternal391 do i=1,nexternal
370 write (*,*) (pfull(j,i), j=0,3) 392 write (*,*) (pfull(j,i), j=0,3)
371 enddo393 enddo
@@ -492,7 +514,7 @@
492 !write(*,*) random514 !write(*,*) random
493 !write(*,*) cumulweight(i-1)515 !write(*,*) cumulweight(i-1)
494 !write(*,*) cumulweight(i)516 !write(*,*) cumulweight(i)
495 if (random.ge.cumulweight(i-1).and.random.le.cumulweight(i)) then 517 if (random.le.cumulweight(i)) then
496 iconfig=i518 iconfig=i
497 return519 return
498 endif 520 endif

Subscribers

People subscribed via source and target branches

to all changes: