Merge lp:~maddevelopers/mg5amcnlo/3.2.0_leptonfromproton into lp:~maddevelopers/mg5amcnlo/3.2.1

Proposed by Olivier Mattelaer
Status: Superseded
Proposed branch: lp:~maddevelopers/mg5amcnlo/3.2.0_leptonfromproton
Merge into: lp:~maddevelopers/mg5amcnlo/3.2.1
Diff against target: 80 lines (+29/-9)
2 files modified
Template/LO/Source/PDF/pdg2pdf_lhapdf6.f (+12/-9)
madgraph/interface/common_run_interface.py (+17/-0)
To merge this branch: bzr merge lp:~maddevelopers/mg5amcnlo/3.2.0_leptonfromproton
Reviewer Review Type Date Requested Status
MadTeam Pending
Review via email: mp+410894@code.launchpad.net

Description of the change

adding the option for lepton PDF at LO
- Note that warning for the parton-shower (and automatic turning them off) are ready in another branch (since Pythia8 authors complained that we allowed that)

To post a comment you must log in.
968. By olivier-mattelaer

add check for the parton-shower since PY8 is not ready to support such type of PDF

Unmerged revisions

968. By olivier-mattelaer

add check for the parton-shower since PY8 is not ready to support such type of PDF

967. By olivier-mattelaer

first try to allow lepton from proton PDF

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Template/LO/Source/PDF/pdg2pdf_lhapdf6.f'
2--- Template/LO/Source/PDF/pdg2pdf_lhapdf6.f 2021-07-28 14:12:54 +0000
3+++ Template/LO/Source/PDF/pdg2pdf_lhapdf6.f 2021-10-28 13:37:24 +0000
4@@ -61,13 +61,13 @@
5 else if (iabs(ipart).eq.7) then
6 ipart=7
7 c This will be called for any PDG code, but we only support up to 7
8- else if(iabs(ipart).gt.7)then
9- write(*,*) 'PDF not supported for pdg ',ipdg
10- write(*,*) 'For lepton colliders, please set the lpp* '//
11- $ 'variables to 0 in the run_card'
12- open(unit=26,file='../../../error',status='unknown')
13- write(26,*) 'Error: PDF not supported for pdg ',ipdg
14- stop 1
15+c else if(iabs(ipart).gt.7)then
16+c write(*,*) 'PDF not supported for pdg ',ipdg
17+c write(*,*) 'For lepton colliders, please set the lpp* '//
18+c $ 'variables to 0 in the run_card'
19+c open(unit=26,file='../../../error',status='unknown')
20+c write(26,*) 'Error: PDF not supported for pdg ',ipdg
21+c stop 1
22 endif
23
24 iporg=ipart
25@@ -86,6 +86,9 @@
26 ireuse = 0
27 ii=i_replace
28 do i=1,20
29+ if (abs(ipart).gt.7)then
30+ exit
31+ endif
32 c Check if result can be reused since any of last twenty
33 c calls. Start checking with the last call and move back in time
34 if (ih.eq.ihlast(ii)) then
35@@ -105,7 +108,7 @@
36 enddo
37
38 c Reuse previous result, if possible
39- if (ireuse.gt.0) then
40+ if (ireuse.gt.0.and.abs(ipart).le.7) then
41 if (pdflast(ipart,ireuse).ne.-99d9) then
42 pdg2pdf = get_ion_pdf(pdflast(-7,ireuse), ipart, nb_proton(beamid), nb_neutron(beamid))/x
43 return
44@@ -120,7 +123,7 @@
45 if(ih.eq.1) then
46 if (nb_proton(beamid).eq.1.and.nb_neutron(beamid).eq.0) then
47 call evolvepart(ipart,x,xmu,pdg2pdf)
48- pdflast(ipart, i_replace)=pdg2pdf
49+ if (abs(ipart).le.7) pdflast(ipart, i_replace)=pdg2pdf
50 else
51 if (ipart.eq.1.or.ipart.eq.2) then
52 call evolvepart(1,x*nb_hadron
53
54=== modified file 'madgraph/interface/common_run_interface.py'
55--- madgraph/interface/common_run_interface.py 2021-08-20 21:40:18 +0000
56+++ madgraph/interface/common_run_interface.py 2021-10-28 13:37:24 +0000
57@@ -6095,6 +6095,23 @@
58 else:
59 logger.debug("keep SDE to %s", self.run_card['SDE_strategy'])
60
61+ # check that only quark/gluon/photon are in initial beam if lpp=+-1
62+ pdg_in_p = list(range(-6,7))+[21,22]
63+ if (self.run_card['lpp1'] and any(pdg not in pdg_in_p for pdg in proc_charac['pdg_initial1'])) \
64+ or (self.run_card['lpp2'] and any(pdg not in pdg_in_p for pdg in proc_charac['pdg_initial2'])):
65+
66+ if 'pythia_card.dat' in self.cards or 'pythia8_card.dat' in self.cards:
67+ logger.error('Parton-Shower are not yet ready for such proton component definition. Parton-shower will be switched off')
68+ if 'pythia_card.dat' in self.cards:
69+ os.remove(self.paths['pythia'])
70+ self.cards.remove('pythia_card.dat')
71+ elif 'pythia8_card.dat' in self.cards:
72+ os.remove(self.paths['pythia8'])
73+ self.cards.remove('pythia8_card.dat')
74+ else:
75+ logger.info('Remember that Parton-Shower are not yet ready for such proton component definition.', '$MG:BOLD' )
76+
77+
78 ########################################################################
79 # NLO specific check
80 ########################################################################

Subscribers

People subscribed via source and target branches

to all changes: