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
=== modified file 'Template/LO/SubProcesses/unwgt.f'
--- Template/LO/SubProcesses/unwgt.f 2015-02-18 01:33:22 +0000
+++ Template/LO/SubProcesses/unwgt.f 2016-05-05 11:23:32 +0000
@@ -138,6 +138,38 @@
138 nw = 0138 nw = 0
139 maxwgt = 0d0139 maxwgt = 0d0
140 end140 end
141C**************************************************************************
142C HELPING ROUTINE FOR PERFORMING THE Z BOOST OF THE EVENTS
143C**************************************************************************
144 double precision function get_betaz(pin,pout)
145C compute the boost for the requested transformation
146 implicit none
147 double precision pin(0:3), pout(0:3)
148 double precision denom
149
150 denom = pin(0)*pout(0) - pin(3)*pout(3)
151 if (denom.ne.0d0) then
152 get_betaz = (pin(3) * pout(0) - pout(3) * pin(0)) / denom
153 else
154 get_betaz = 0d0
155 endif
156 return
157 end
158
159 subroutine zboost_with_beta(pin, beta, pout)
160c apply the boost
161 implicit none
162 double precision pin(0:3), pout(0:3)
163 double precision beta, gamma
164
165 gamma = 1d0/DSQRT(1-beta**2)
166 pout(0) = gamma * pin(0) - gamma * beta * pin(3)
167 pout(1) = pin(1)
168 pout(2) = pin(2)
169 pout(3) = - gamma * beta * pin(0) + gamma * pin(3)
170 return
171 end
172
141173
142 SUBROUTINE unwgt(px,wgt,numproc)174 SUBROUTINE unwgt(px,wgt,numproc)
143C**************************************************************************175C**************************************************************************
@@ -436,7 +468,9 @@
436 integer ip, np, ic, nc, jpart(7,-nexternal+3:2*nexternal-3)468 integer ip, np, ic, nc, jpart(7,-nexternal+3:2*nexternal-3)
437 integer ida(2),ito(-nexternal+3:nexternal),ns,nres,ires,icloop469 integer ida(2),ito(-nexternal+3:nexternal),ns,nres,ires,icloop
438 integer iseed470 integer iseed
439 double precision pboost(0:3),pb(0:4,-nexternal+3:2*nexternal-3),eta471 double precision pboost(0:3),pb(0:4,-nexternal+3:2*nexternal-3)
472 double precision beta, get_betaz
473 double precision ebi(0:3), ebo(0:3)
440 double precision ptcltmp(nexternal), pdum(0:3)474 double precision ptcltmp(nexternal), pdum(0:3)
441475
442 integer idup(nexternal,maxproc,maxsproc)476 integer idup(nexternal,maxproc,maxsproc)
@@ -564,10 +598,21 @@
564 if (nincoming.eq.2) then598 if (nincoming.eq.2) then
565 if (xbk(1) .gt. 0d0 .and. xbk(1) .lt. 1d0 .and.599 if (xbk(1) .gt. 0d0 .and. xbk(1) .lt. 1d0 .and.
566 $ xbk(2) .gt. 0d0 .and. xbk(2) .lt. 1d0) then600 $ xbk(2) .gt. 0d0 .and. xbk(2) .lt. 1d0) then
567 eta = sqrt(xbk(1)*ebeam(1)/601 pboost(0) = -1d0 ! special flag
568 $ (xbk(2)*ebeam(2)))602 ! construct the beam momenta in each frame and compute the related (z)boost
569 pboost(0)=p(0,1)*(eta + 1d0/eta)603 ebi(0) = p(0,1)/xbk(1)
570 pboost(3)=p(0,1)*(eta - 1d0/eta)604 ebi(1) = 0
605 ebi(2) = 0
606 ebi(3) = DSQRT(ebi(0)**2-m1**2)
607 ebo(0) = ebeam(1)
608 ebo(1) = 0
609 ebo(2) = 0
610 ebo(3) = DSQRT(ebo(0)**2-m1**2)
611 beta = get_betaz(ebi, ebo)
612c eta = sqrt(xbk(1)*ebeam(1)/
613c $ (xbk(2)*ebeam(2)))
614c pboost(0)=p(0,1)*(eta + 1d0/eta)
615c pboost(3)=p(0,1)*(eta - 1d0/eta)
571 else if (xbk(1) .gt. 0d0 .and. xbk(1) .lt. 1d0 .and.616 else if (xbk(1) .gt. 0d0 .and. xbk(1) .lt. 1d0 .and.
572 $ xbk(2) .eq. 1d0) then617 $ xbk(2) .eq. 1d0) then
573 pboost(0)=xbk(1)*ebeam(1)+ebeam(2)618 pboost(0)=xbk(1)*ebeam(1)+ebeam(2)
@@ -587,12 +632,18 @@
587 $ xbk(1),xbk(2)632 $ xbk(1),xbk(2)
588 endif633 endif
589 endif634 endif
590 do j=1,nexternal635 if (pboost(0).ne.-1d0) then
591 call boostx(p(0,j),pboost,pb(0,isym(j,jsym)))636 do j=1,nexternal
592c Add mass information in pb(4)637 call boostx(p(0,j),pboost,pb(0,isym(j,jsym)))
593 pb(4,isym(j,jsym))=pmass(j)638 ! Add mass information in pb(4)
594 enddo639 pb(4,isym(j,jsym))=pmass(j)
595640 enddo
641 else
642 do j=1,nexternal
643 call zboost_with_beta(p(0,j),beta,pb(0,isym(j,jsym)))
644 pb(4,isym(j,jsym))=pmass(j)
645 enddo
646 endif
596c647c
597c Add info on resonant mothers648c Add info on resonant mothers
598c649c
599650
=== modified file 'UpdateNotes.txt'
--- UpdateNotes.txt 2016-04-06 18:45:52 +0000
+++ UpdateNotes.txt 2016-05-05 11:23:32 +0000
@@ -1,6 +1,9 @@
1Update notes for MadGraph5_aMC@NLO (in reverse time order)1Update notes for MadGraph5_aMC@NLO (in reverse time order)
22
332.4.1 (xx/xx/xx)
4 OM: Fix a bug in fix target experiment with PDF on the particle at rest.
5 The cross-section was correct but the z-boost was not performed correctly.
6
42.4.0.beta (06/04/16)72.4.0.beta (06/04/16)
5 OM: Allowing the proper NLO reweighting for NLO sample8 OM: Allowing the proper NLO reweighting for NLO sample
6 RF: For NLO processes allow for multiple PDF and scales reweighting, directy by inputting lists9 RF: For NLO processes allow for multiple PDF and scales reweighting, directy by inputting lists
710
=== modified file 'VERSION'
--- VERSION 2016-04-06 18:45:52 +0000
+++ VERSION 2016-05-05 11:23:32 +0000
@@ -1,4 +1,4 @@
1version = 2.4.0.beta1version = 2.4.1.beta
2date = 2016-04-062date = 2016-04-06
33
44
55
=== modified file 'madgraph/interface/common_run_interface.py'
--- madgraph/interface/common_run_interface.py 2016-04-15 11:14:25 +0000
+++ madgraph/interface/common_run_interface.py 2016-05-05 11:23:32 +0000
@@ -2269,19 +2269,21 @@
22692269
2270 pdfsetname=set()2270 pdfsetname=set()
2271 for lhaid in lhaid_list:2271 for lhaid in lhaid_list:
2272 try:2272 if isinstance(lhaid, (int,float)):
2273 if lhaid in self.lhapdf_pdfsets:2273 try:
2274 pdfsetname.add(self.lhapdf_pdfsets[lhaid]['filename'])2274 if lhaid in self.lhapdf_pdfsets:
2275 else:2275 pdfsetname.add(self.lhapdf_pdfsets[lhaid]['filename'])
2276 raise MadGraph5Error('lhaid %s not valid input number for the current lhapdf' % lhaid )2276 else:
2277 except KeyError:2277 raise MadGraph5Error('lhaid %s not valid input number for the current lhapdf' % lhaid )
2278 if self.lhapdf_version.startswith('5'):2278 except KeyError:
2279 raise MadGraph5Error(\2279 if self.lhapdf_version.startswith('5'):
2280 ('invalid lhaid set in th run_card: %d .\nPlease note that some sets' % lhaid) + \2280 raise MadGraph5Error(\
2281 '(eg MSTW 90%CL error sets) \nare not available in aMC@NLO + LHAPDF 5.x.x')2281 ('invalid lhaid set in th run_card: %d .\nPlease note that some sets' % lhaid) + \
2282 else:2282 '(eg MSTW 90%CL error sets) \nare not available in aMC@NLO + LHAPDF 5.x.x')
2283 logger.debug('%d not found in pdfsets.index' % lhaid)2283 else:
22842284 logger.debug('%d not found in pdfsets.index' % lhaid)
2285 else:
2286 pdfsetname.add(lhaid)
22852287
2286 # check if the file exists, otherwise install it:2288 # check if the file exists, otherwise install it:
2287 # also check that the PDFsets dir exists, otherwise create it.2289 # also check that the PDFsets dir exists, otherwise create it.

Subscribers

People subscribed via source and target branches

to all changes: