Merge lp:~maddevelopers/mg5amcnlo/2.0.0beta4 into lp:~maddevelopers/mg5amcnlo/2.0.0GoldenMaster

Proposed by Olivier Mattelaer
Status: Merged
Merged at revision: 356
Proposed branch: lp:~maddevelopers/mg5amcnlo/2.0.0beta4
Merge into: lp:~maddevelopers/mg5amcnlo/2.0.0GoldenMaster
Diff against target: 232 lines (+167/-12)
4 files modified
Template/LO/bin/internal/merge.pl (+6/-0)
Template/NLO/MCatNLO/HWAnalyzer/mcatnlo_hwan_rates.f (+139/-0)
Template/NLO/Utilities/check_events.f (+19/-12)
UpdateNotes.txt (+3/-0)
To merge this branch: bzr merge lp:~maddevelopers/mg5amcnlo/2.0.0beta4
Reviewer Review Type Date Requested Status
Olivier Mattelaer Approve
Review via email: mp+198726@code.launchpad.net

Description of the change

changes reviewed by Paolo already (the changes were done By Stefano in fact) --but the last small fix (which is harmless and linked to MadEvent only)

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

Sounds good!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Template/LO/bin/internal/merge.pl'
2--- Template/LO/bin/internal/merge.pl 2012-06-14 21:21:24 +0000
3+++ Template/LO/bin/internal/merge.pl 2013-12-12 12:26:57 +0000
4@@ -252,6 +252,12 @@
5 } elsif ($stage == 4) {
6 $gzline =~ s/^\s+//;
7 @gzparam = split(/\s+/, $gzline);
8+ # Keep weight sign from original LHE file
9+ $signed_uwgt = $uwgt;
10+ if ($gzparam[2] < 0) {
11+ $signed_uwgt = -1 * $signed_uwgt;
12+ }
13+ $gzline = " $gzparam[0] $gzparam[1] $signed_uwgt $gzparam[3] $gzparam[4] $gzparam[5]\n";
14 if ($#gzparam != 5) { die "Not right number of param in first line of event"; }
15 $gzline = " $gzparam[0] $gzparam[1] $uwgt $gzparam[3] $gzparam[4] $gzparam[5]\n";
16
17
18=== added file 'Template/NLO/MCatNLO/HWAnalyzer/mcatnlo_hwan_rates.f'
19--- Template/NLO/MCatNLO/HWAnalyzer/mcatnlo_hwan_rates.f 1970-01-01 00:00:00 +0000
20+++ Template/NLO/MCatNLO/HWAnalyzer/mcatnlo_hwan_rates.f 2013-12-12 12:26:57 +0000
21@@ -0,0 +1,139 @@
22+C----------------------------------------------------------------------
23+ SUBROUTINE RCLOS()
24+C DUMMY IF HBOOK IS USED
25+C----------------------------------------------------------------------
26+ END
27+
28+
29+C----------------------------------------------------------------------
30+ SUBROUTINE HWABEG
31+C USER'S ROUTINE FOR INITIALIZATION
32+C----------------------------------------------------------------------
33+ INCLUDE 'HERWIG65.INC'
34+ include 'reweight0.inc'
35+ integer i,kk,l
36+ character*5 cc(2)
37+ data cc/' ',' '/
38+ integer nwgt,max_weight,nwgt_analysis
39+ common/cnwgt/nwgt
40+ common/c_analysis/nwgt_analysis
41+ parameter (max_weight=maxscales*maxscales+maxpdfs+1)
42+ character*15 weights_info(max_weight)
43+ common/cwgtsinfo/weights_info
44+c
45+ call inihist
46+ nwgt_analysis=nwgt
47+ do i=1,1
48+ do kk=1,nwgt_analysis
49+ l=(kk-1)*2+(i-1)*1
50+ call mbook(l+ 1,'total rate '//weights_info(kk)//cc(i)
51+ & ,1.d0,0.d0,1.d0)
52+ enddo
53+ enddo
54+ 999 END
55+C----------------------------------------------------------------------
56+ SUBROUTINE HWAEND
57+C USER'S ROUTINE FOR TERMINAL CALCULATIONS, HISTOGRAM OUTPUT, ETC
58+C----------------------------------------------------------------------
59+ INCLUDE 'HERWIG65.INC'
60+ REAL*8 XNORM
61+ INTEGER I,KK,l,nwgt_analysis
62+ integer NPL
63+ parameter(NPL=15000)
64+ common/c_analysis/nwgt_analysis
65+ OPEN(UNIT=99,FILE='HERWIG.TOP',STATUS='UNKNOWN')
66+C XNORM IS SUCH THAT THE CROSS SECTION PER BIN IS IN PB, SINCE THE HERWIG
67+C WEIGHT IS IN NB, AND CORRESPONDS TO THE AVERAGE CROSS SECTION
68+ XNORM=1.D3/DFLOAT(NEVHEP)
69+ DO I=1,NPL
70+ CALL MFINAL3(I)
71+ CALL MCOPY(I,I+NPL)
72+ CALL MOPERA(I+NPL,'F',I+NPL,I+NPL,(XNORM),0.D0)
73+ CALL MFINAL3(I+NPL)
74+ ENDDO
75+C
76+ do i=1,1
77+ do kk=1,nwgt_analysis
78+ l=(kk-1)*2+(i-1)*1
79+ call multitop(NPL+l+ 1,NPL-1,3,2,'total rate ',' ','LIN')
80+ enddo
81+ enddo
82+ CLOSE(99)
83+ END
84+
85+C----------------------------------------------------------------------
86+ SUBROUTINE HWANAL
87+C USER'S ROUTINE TO ANALYSE DATA FROM EVENT
88+C----------------------------------------------------------------------
89+ INCLUDE 'HERWIG65.INC'
90+ include 'reweight0.inc'
91+ INTEGER KK,i,l
92+ real*8 tot
93+ data tot/0.5d0/
94+ integer nwgt_analysis,max_weight
95+ common/c_analysis/nwgt_analysis
96+ parameter (max_weight=maxscales*maxscales+maxpdfs+1)
97+ double precision ww(max_weight),www(max_weight)
98+ common/cww/ww
99+c
100+ IF (IERROR.NE.0) RETURN
101+ IF (WW(1).EQ.0D0) THEN
102+ WRITE(*,*)'WW(1) = 0. Stopping'
103+ STOP
104+ ENDIF
105+c
106+C INCOMING PARTONS MAY TRAVEL IN THE SAME DIRECTION: IT'S A POWER-SUPPRESSED
107+C EFFECT, SO THROW THE EVENT AWAY
108+ IF(SIGN(1.D0,PHEP(3,4)).EQ.SIGN(1.D0,PHEP(3,5)))THEN
109+ CALL HWWARN('HWANAL',111)
110+ GOTO 999
111+ ENDIF
112+ DO I=1,nwgt_analysis
113+ WWW(I)=EVWGT*ww(i)/ww(1)
114+ ENDDO
115+C
116+ do i=1,1
117+ do kk=1,nwgt_analysis
118+ l=(kk-1)*2+(i-1)*1
119+ call mfill(l+1,tot,WWW(kk))
120+ enddo
121+ enddo
122+C
123+ 999 END
124+
125+
126+ function getrapidity(en,pl)
127+ implicit none
128+ real*8 getrapidity,en,pl,tiny,xplus,xminus,y
129+ parameter (tiny=1.d-5)
130+c
131+ xplus=en+pl
132+ xminus=en-pl
133+ if(xplus.gt.tiny.and.xminus.gt.tiny)then
134+ if( (xplus/xminus).gt.tiny )then
135+ y=0.5d0*log( xplus/xminus )
136+ else
137+ y=sign(1.d0,pl)*1.d8
138+ endif
139+ else
140+ y=sign(1.d0,pl)*1.d8
141+ endif
142+ getrapidity=y
143+ return
144+ end
145+
146+ function getpseudorap(en,ptx,pty,pl)
147+ implicit none
148+ real*8 getpseudorap,en,ptx,pty,pl,tiny,pt,eta,th
149+ parameter (tiny=1.d-5)
150+c
151+ pt=sqrt(ptx**2+pty**2)
152+ if(pt.lt.tiny.and.abs(pl).lt.tiny)then
153+ eta=sign(1.d0,pl)*1.d8
154+ else
155+ th=atan2(pt,pl)
156+ eta=-log(tan(th/2.d0))
157+ endif
158+ getpseudorap=eta
159+ return
160+ end
161
162=== modified file 'Template/NLO/Utilities/check_events.f'
163--- Template/NLO/Utilities/check_events.f 2013-12-12 05:47:22 +0000
164+++ Template/NLO/Utilities/check_events.f 2013-12-12 12:26:57 +0000
165@@ -104,7 +104,7 @@
166 endif
167
168 write (*,*) 'Enter 0 to study decays'
169- write (*,*) ' 1 othewise'
170+ write (*,*) ' 1 otherwise'
171 read (*,*) idec
172 if(idec.eq.0)call setdecmat()
173
174@@ -496,8 +496,8 @@
175 err_wgt=sum_abs_wgt/sqrt(dfloat(maxevt))
176 write(*,*)' '
177 write (*,*) 'The total number of events is:',i
178- write (*,*) 'Sum of the weights is :',sum_wgt,' +-',err_wgt
179- write (*,*) 'Sum of the abs weights is:',sum_abs_wgt,' +-',err_wgt
180+ write (*,*) 'Sum of weights is :',sum_wgt,' +-',err_wgt
181+ write (*,*) 'Sum of abs weights is:',sum_abs_wgt,' +-',err_wgt
182
183 if(iuseres_1.eq.0)then
184 toterr=sqrt(xinterr**2+err_wgt**2)
185@@ -510,17 +510,24 @@
186 write(44,*)'Integral:',xint,' +-',xinterr
187 write(44,*)'Weights: ',sum_wgt,' +-',err_wgt
188 write(44,*)' '
189- write(44,*)'Sigmas: ',abs(xint-sum_wgt)/sqrt(xinterr**2+err_wgt**2)
190+ write(44,*)'Sigmas: ',abs(xint-sum_wgt)/
191+ # sqrt(xinterr**2+err_wgt**2)
192 endif
193- write (51,*) 'Xsec (check_events) = ',sum_wgt,' +-',err_wgt
194- write (51,*) 'Xsec (res_1.txt) = ',xint ,' +-',xinterr
195- write (51,*) ' '
196- write (51,*) 'Xsec ABS (check_events) = ',sum_abs_wgt,' +-',err_wgt
197- write (51,*) 'Xsec ABS (res_1.txt) = ',xinta,' +-',xintaerr
198+ write (51,*)'Xsec (check_events) = ',
199+ # sum_wgt,' +-',err_wgt
200+ write (51,*)'Xsec (res_1.txt) = ',
201+ # xint ,' +-',xinterr
202+ write (51,*)' '
203+ write (51,*)'Xsec ABS (check_events) = ',
204+ # sum_abs_wgt,' +-',err_wgt
205+ write (51,*)'Xsec ABS (res_1.txt) = ',
206+ # xinta,' +-',xintaerr
207 elseif(iuseres_1.eq.1)then
208- write (51,*) 'Xsec (check_events) = ',sum_wgt,' +-',err_wgt
209- write (51,*) ' '
210- write (51,*) 'Xsec ABS (check_events) = ',sum_abs_wgt,' +-',err_wgt
211+ write (51,*)'Xsec (check_events) = ',
212+ # sum_wgt,' +-',err_wgt
213+ write (51,*)' '
214+ write (51,*)'Xsec ABS (check_events) = ',
215+ # sum_abs_wgt,' +-',err_wgt
216 else
217 write(*,*)'No such option for iuseres_1'
218 stop
219
220=== modified file 'UpdateNotes.txt'
221--- UpdateNotes.txt 2013-11-29 07:28:53 +0000
222+++ UpdateNotes.txt 2013-12-12 12:26:57 +0000
223@@ -48,6 +48,9 @@
224 OM: Improved check for unresponsive of PBS cluster (thanks J. Mc Fayden)
225 OM: implement a maximum number (2500) of jobs which can be submitted at the same time
226 by the PBS cluster. This number is currently not editable via configuration file.
227+ OM: Fix a bug for multi_run sample in presence of negative weights (possible if NLO pdf)
228+ The negative weights were not propagated to the merge sample.
229+ (thanks to Sebastien Brochet for the fix)
230
231 2.0.0.beta3(13/02/13) OM: Merge with 1.5.7+1.5.8 (See information below)
232 OM: Allow the customize_model to be scriptable in a

Subscribers

People subscribed via source and target branches

to all changes: