Merge lp:~maddevelopers/mg5amcnlo/boost_of_events into lp:~maddevelopers/mg5amcnlo/2.4.1

Proposed by Olivier Mattelaer
Status: Merged
Merged at revision: 407
Proposed branch: lp:~maddevelopers/mg5amcnlo/boost_of_events
Merge into: lp:~maddevelopers/mg5amcnlo/2.4.1
Diff against target: 168 lines (+82/-26)
4 files modified
Template/LO/SubProcesses/unwgt.f (+62/-11)
UpdateNotes.txt (+4/-1)
VERSION (+1/-1)
madgraph/interface/common_run_interface.py (+15/-13)
To merge this branch: bzr merge lp:~maddevelopers/mg5amcnlo/boost_of_events
Reviewer Review Type Date Requested Status
Valentin Hirschi Pending
Rikkert Frederix Pending
Review via email: mp+293877@code.launchpad.net

Description of the change

This changes the boost performed
from the partonic center of mass frame to the frame requested in the run_card.
It turns out that the previous one was not correctly taken into account the mass of the beam,
which is particularly problematic if one beam is taken at rest (or his energy being of the order of his mass).

I will send you the validation plot that I have done by email.
Rik I put you as reviewer mainly to check if similar problem can occur at NLO.
(actually how much is supported the beam mass @NLO)

Cheers,

Olivier

PS: This is actually a very small review (but this touch a central piece of the code, so we need to be carefull)

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

Oops j'ai pusher cela dans 2.4.1 par erreur.

Please comment if you see any problem on this.

Cheers,

Olivier

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Template/LO/SubProcesses/unwgt.f'
2--- Template/LO/SubProcesses/unwgt.f 2015-02-18 01:33:22 +0000
3+++ Template/LO/SubProcesses/unwgt.f 2016-05-05 11:23:32 +0000
4@@ -138,6 +138,38 @@
5 nw = 0
6 maxwgt = 0d0
7 end
8+C**************************************************************************
9+C HELPING ROUTINE FOR PERFORMING THE Z BOOST OF THE EVENTS
10+C**************************************************************************
11+ double precision function get_betaz(pin,pout)
12+C compute the boost for the requested transformation
13+ implicit none
14+ double precision pin(0:3), pout(0:3)
15+ double precision denom
16+
17+ denom = pin(0)*pout(0) - pin(3)*pout(3)
18+ if (denom.ne.0d0) then
19+ get_betaz = (pin(3) * pout(0) - pout(3) * pin(0)) / denom
20+ else
21+ get_betaz = 0d0
22+ endif
23+ return
24+ end
25+
26+ subroutine zboost_with_beta(pin, beta, pout)
27+c apply the boost
28+ implicit none
29+ double precision pin(0:3), pout(0:3)
30+ double precision beta, gamma
31+
32+ gamma = 1d0/DSQRT(1-beta**2)
33+ pout(0) = gamma * pin(0) - gamma * beta * pin(3)
34+ pout(1) = pin(1)
35+ pout(2) = pin(2)
36+ pout(3) = - gamma * beta * pin(0) + gamma * pin(3)
37+ return
38+ end
39+
40
41 SUBROUTINE unwgt(px,wgt,numproc)
42 C**************************************************************************
43@@ -436,7 +468,9 @@
44 integer ip, np, ic, nc, jpart(7,-nexternal+3:2*nexternal-3)
45 integer ida(2),ito(-nexternal+3:nexternal),ns,nres,ires,icloop
46 integer iseed
47- double precision pboost(0:3),pb(0:4,-nexternal+3:2*nexternal-3),eta
48+ double precision pboost(0:3),pb(0:4,-nexternal+3:2*nexternal-3)
49+ double precision beta, get_betaz
50+ double precision ebi(0:3), ebo(0:3)
51 double precision ptcltmp(nexternal), pdum(0:3)
52
53 integer idup(nexternal,maxproc,maxsproc)
54@@ -564,10 +598,21 @@
55 if (nincoming.eq.2) then
56 if (xbk(1) .gt. 0d0 .and. xbk(1) .lt. 1d0 .and.
57 $ xbk(2) .gt. 0d0 .and. xbk(2) .lt. 1d0) then
58- eta = sqrt(xbk(1)*ebeam(1)/
59- $ (xbk(2)*ebeam(2)))
60- pboost(0)=p(0,1)*(eta + 1d0/eta)
61- pboost(3)=p(0,1)*(eta - 1d0/eta)
62+ pboost(0) = -1d0 ! special flag
63+ ! construct the beam momenta in each frame and compute the related (z)boost
64+ ebi(0) = p(0,1)/xbk(1)
65+ ebi(1) = 0
66+ ebi(2) = 0
67+ ebi(3) = DSQRT(ebi(0)**2-m1**2)
68+ ebo(0) = ebeam(1)
69+ ebo(1) = 0
70+ ebo(2) = 0
71+ ebo(3) = DSQRT(ebo(0)**2-m1**2)
72+ beta = get_betaz(ebi, ebo)
73+c eta = sqrt(xbk(1)*ebeam(1)/
74+c $ (xbk(2)*ebeam(2)))
75+c pboost(0)=p(0,1)*(eta + 1d0/eta)
76+c pboost(3)=p(0,1)*(eta - 1d0/eta)
77 else if (xbk(1) .gt. 0d0 .and. xbk(1) .lt. 1d0 .and.
78 $ xbk(2) .eq. 1d0) then
79 pboost(0)=xbk(1)*ebeam(1)+ebeam(2)
80@@ -587,12 +632,18 @@
81 $ xbk(1),xbk(2)
82 endif
83 endif
84- do j=1,nexternal
85- call boostx(p(0,j),pboost,pb(0,isym(j,jsym)))
86-c Add mass information in pb(4)
87- pb(4,isym(j,jsym))=pmass(j)
88- enddo
89-
90+ if (pboost(0).ne.-1d0) then
91+ do j=1,nexternal
92+ call boostx(p(0,j),pboost,pb(0,isym(j,jsym)))
93+ ! Add mass information in pb(4)
94+ pb(4,isym(j,jsym))=pmass(j)
95+ enddo
96+ else
97+ do j=1,nexternal
98+ call zboost_with_beta(p(0,j),beta,pb(0,isym(j,jsym)))
99+ pb(4,isym(j,jsym))=pmass(j)
100+ enddo
101+ endif
102 c
103 c Add info on resonant mothers
104 c
105
106=== modified file 'UpdateNotes.txt'
107--- UpdateNotes.txt 2016-04-06 18:45:52 +0000
108+++ UpdateNotes.txt 2016-05-05 11:23:32 +0000
109@@ -1,6 +1,9 @@
110 Update notes for MadGraph5_aMC@NLO (in reverse time order)
111
112-
113+2.4.1 (xx/xx/xx)
114+ OM: Fix a bug in fix target experiment with PDF on the particle at rest.
115+ The cross-section was correct but the z-boost was not performed correctly.
116+
117 2.4.0.beta (06/04/16)
118 OM: Allowing the proper NLO reweighting for NLO sample
119 RF: For NLO processes allow for multiple PDF and scales reweighting, directy by inputting lists
120
121=== modified file 'VERSION'
122--- VERSION 2016-04-06 18:45:52 +0000
123+++ VERSION 2016-05-05 11:23:32 +0000
124@@ -1,4 +1,4 @@
125-version = 2.4.0.beta
126+version = 2.4.1.beta
127 date = 2016-04-06
128
129
130
131=== modified file 'madgraph/interface/common_run_interface.py'
132--- madgraph/interface/common_run_interface.py 2016-04-15 11:14:25 +0000
133+++ madgraph/interface/common_run_interface.py 2016-05-05 11:23:32 +0000
134@@ -2269,19 +2269,21 @@
135
136 pdfsetname=set()
137 for lhaid in lhaid_list:
138- try:
139- if lhaid in self.lhapdf_pdfsets:
140- pdfsetname.add(self.lhapdf_pdfsets[lhaid]['filename'])
141- else:
142- raise MadGraph5Error('lhaid %s not valid input number for the current lhapdf' % lhaid )
143- except KeyError:
144- if self.lhapdf_version.startswith('5'):
145- raise MadGraph5Error(\
146- ('invalid lhaid set in th run_card: %d .\nPlease note that some sets' % lhaid) + \
147- '(eg MSTW 90%CL error sets) \nare not available in aMC@NLO + LHAPDF 5.x.x')
148- else:
149- logger.debug('%d not found in pdfsets.index' % lhaid)
150-
151+ if isinstance(lhaid, (int,float)):
152+ try:
153+ if lhaid in self.lhapdf_pdfsets:
154+ pdfsetname.add(self.lhapdf_pdfsets[lhaid]['filename'])
155+ else:
156+ raise MadGraph5Error('lhaid %s not valid input number for the current lhapdf' % lhaid )
157+ except KeyError:
158+ if self.lhapdf_version.startswith('5'):
159+ raise MadGraph5Error(\
160+ ('invalid lhaid set in th run_card: %d .\nPlease note that some sets' % lhaid) + \
161+ '(eg MSTW 90%CL error sets) \nare not available in aMC@NLO + LHAPDF 5.x.x')
162+ else:
163+ logger.debug('%d not found in pdfsets.index' % lhaid)
164+ else:
165+ pdfsetname.add(lhaid)
166
167 # check if the file exists, otherwise install it:
168 # also check that the PDFsets dir exists, otherwise create it.

Subscribers

People subscribed via source and target branches

to all changes: