Merge lp:~maddevelopers/mg5amcnlo/2.1.2-lhapdf6 into lp:~maddevelopers/mg5amcnlo/2.2.0

Proposed by marco zaro
Status: Merged
Merged at revision: 308
Proposed branch: lp:~maddevelopers/mg5amcnlo/2.1.2-lhapdf6
Merge into: lp:~maddevelopers/mg5amcnlo/2.2.0
Diff against target: 292 lines (+62/-55)
8 files modified
Template/LO/Source/PDF/makefile (+0/-2)
Template/NLO/SubProcesses/ajob_template (+0/-1)
UpdateNotes.txt (+4/-0)
madgraph/interface/amcatnlo_run_interface.py (+0/-6)
madgraph/interface/common_run_interface.py (+31/-35)
madgraph/interface/madevent_interface.py (+5/-4)
madgraph/iolibs/template_files/madevent_makefile_source (+3/-3)
madgraph/various/banner.py (+19/-4)
To merge this branch: bzr merge lp:~maddevelopers/mg5amcnlo/2.1.2-lhapdf6
Reviewer Review Type Date Requested Status
Olivier Mattelaer Approve
Rikkert Frederix Approve
Juan Rojo Pending
Review via email: mp+231731@code.launchpad.net

Description of the change

lhapdf6 is enabled

To post a comment you must log in.
Revision history for this message
Rikkert Frederix (frederix) wrote :

Hi Marco,

It's not working correctly on my machine:

INFO: Starting run
INFO: Compiling the code
INFO: Using LHAPDF v6.1.4 interface for PDFs
INFO: Trying to download NNPDF23_nlo_as_0119
ERROR: Could not write to /usr/local/share/LHAPDF/NNPDF23_nlo_as_0119.tar.gz
ERROR: Could not write to /usr/local/share/LHAPDF/NNPDF23_nlo_as_0119.tar.gz
ERROR: Could not write to /usr/local/share/LHAPDF/NNPDF23_nlo_as_0119.tar.gz
WARNING: Could not download NNPDF23_nlo_as_0119 into /usr/local/share/LHAPDF. Trying to save it locally
INFO: Trying to download NNPDF23_nlo_as_0119
ERROR: Could not write to /usr/local/share/LHAPDF/NNPDF23_nlo_as_0119.tar.gz
ERROR: Could not write to /usr/local/share/LHAPDF/NNPDF23_nlo_as_0119.tar.gz
ERROR: Could not write to /usr/local/share/LHAPDF/NNPDF23_nlo_as_0119.tar.gz
WARNING: Could not download NNPDF23_nlo_as_0119 into /Users/frederix/Documents/Physics/aMCatNLO/2.1.2-lhapdf6/PROCNLO_sm_1/lib/PDFsets. Trying to save it locally
INFO: Trying to download NNPDF23_nlo_as_0119
ERROR: Could not write to /usr/local/share/LHAPDF/NNPDF23_nlo_as_0119.tar.gz
ERROR: Could not write to /usr/local/share/LHAPDF/NNPDF23_nlo_as_0119.tar.gz
ERROR: Could not write to /usr/local/share/LHAPDF/NNPDF23_nlo_as_0119.tar.gz
WARNING: Could not download NNPDF23_nlo_as_0119 into /Users/frederix/Documents/Physics/aMCatNLO/2.1.2-lhapdf6/PROCNLO_sm_1/lib/PDFsets. Trying to save it locally
INFO: Trying to download NNPDF23_nlo_as_0119
ERROR: Could not write to /usr/local/share/LHAPDF/NNPDF23_nlo_as_0119.tar.gz
ERROR: Could not write to /usr/local/share/LHAPDF/NNPDF23_nlo_as_0119.tar.gz
ERROR: Could not write to /usr/local/share/LHAPDF/NNPDF23_nlo_as_0119.tar.gz
WARNING: Could not download NNPDF23_nlo_as_0119 into /Users/frederix/Documents/Physics/aMCatNLO/2.1.2-lhapdf6/PROCNLO_sm_1/lib/PDFsets. Trying to save it locally

and it keeps doing this. I have the NNPDF set installed, so I don't understand why he cannot find it.

Cheers,
Rik

Revision history for this message
Rikkert Frederix (frederix) :
review: Needs Fixing
Revision history for this message
marco zaro (marco-zaro) wrote :

Ciao Rik,
thanks for trying
ehm,
the problem is the following:
while for lhapdf5 the lhapdf-getdata tries to install the dataset in the current working dir, the corresponding command (lhapdf install, or lhapdf get) for v6 always tries to store it in the shared directory, which, in your case, is write protected…
for v5 mg tries first to install it system-wise, then, if the lhapdf/.../PDFsets dir is not writable it saves it locally (lib/PDFsets).
I am not aware of a way to solve this problem still using lhapdf -related commands for v6.
Of course, one way to solve is either to have a local installation of lhapdf6, or to get write permissions in the /usr/local/share/LHAPDF dir.

Cheers,

Marco

On 23 Aug 2014, at 22:03, Rikkert Frederix <email address hidden> wrote:

> Review: Needs Fixing
>
>
> --
> https://code.launchpad.net/~maddevelopers/mg5amcnlo/2.1.2-lhapdf6/+merge/231731
> Your team MadDevelopers is subscribed to branch lp:~maddevelopers/mg5amcnlo/2.2.0.

Revision history for this message
Rikkert Frederix (frederix) wrote :

Hi Marco,

Ok, I understand. It looks like it is indeed no longer possible to have a local download of a PDFset for LHAPDF6. Maybe we could ask Andy if this will become available in future versions. Anyway, for now there should be a proper message explaining this when the code is trying, because the code goes into an infinite loop now.

Cheers,
Rik

review: Needs Fixing
272. By marco zaro

the pdf set is installed locally only for v5 (for v6 an error is raised)

Revision history for this message
marco zaro (marco-zaro) wrote :

Ciao Rik,
I have added an error message for the moment.
I’ll write Andy and ask him.
Cheers,

Marco

On 23 Aug 2014, at 23:08, Rikkert Frederix <email address hidden> wrote:

> Review: Needs Fixing
>
> Hi Marco,
>
> Ok, I understand. It looks like it is indeed no longer possible to have a local download of a PDFset for LHAPDF6. Maybe we could ask Andy if this will become available in future versions. Anyway, for now there should be a proper message explaining this when the code is trying, because the code goes into an infinite loop now.
>
> Cheers,
> Rik
>
> --
> https://code.launchpad.net/~maddevelopers/mg5amcnlo/2.1.2-lhapdf6/+merge/231731
> Your team MadDevelopers is subscribed to branch lp:~maddevelopers/mg5amcnlo/2.2.0.

Revision history for this message
Rikkert Frederix (frederix) wrote :

Thanks Marco. I approve this merge.

review: Approve
Revision history for this message
Olivier Mattelaer (olivier-mattelaer) wrote :

Just for completion of this review, here is the crash that we need to fix asap (reported in the wrong thread):

generate p p > e+ e-
launch
set pdlabel cteq6l1
launch
set pdlabel lhapd
set lhaid 70251

Cheers,

Olivier

review: Needs Fixing
273. By marco zaro

fixed bug related to madevent

the commands
    generate p p > e+ e-
    launch
    set pdlabel cteq6l1
    launch
    set pdlabel lhapdf
    set lhaid 21100
now work

274. By marco zaro

merged with 2.2.0 r307

Revision history for this message
marco zaro (marco-zaro) wrote :

It should be working now.
Cheers,

M
On 05 Sep 2014, at 13:19, Olivier Mattelaer <email address hidden> wrote:

> Review: Needs Fixing
>
> Just for completion of this review, here is the crash that we need to fix asap (reported in the wrong thread):
>
> generate p p > e+ e-
> launch
> set pdlabel cteq6l1
> launch
> set pdlabel lhapd
> set lhaid 70251
>
> Cheers,
>
> Olivier
>
> --
> https://code.launchpad.net/~maddevelopers/mg5amcnlo/2.1.2-lhapdf6/+merge/231731
> Your team MadDevelopers is subscribed to branch lp:~maddevelopers/mg5amcnlo/2.2.0.

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) wrote :

Hi Marco,

I'm sorry but this is still not working for me :-(

Olivier

review: Needs Fixing
Revision history for this message
Olivier Mattelaer (olivier-mattelaer) wrote :

Hi Marco,

so this was indeed my fault.
I have put a nice message error for the kind of stupid error that I did.

I still can not compile lhapdf6. So I will abstain on that part but lhapdf5 works very well now :-)
So please take a quick look at my fix and go ahead for the merge.

Cheers and thanks,

Olivier

review: Approve
275. By Olivier Mattelaer

add a nice error message if the pdlabel is not valid (doesn't need to dig into the fortran log file anymore).

Revision history for this message
marco zaro (marco-zaro) wrote :

ok thanks!
shall we wait for any comment from juan?

Marco Zaro

On Fri, Sep 5, 2014 at 2:34 PM, Olivier Mattelaer <
<email address hidden>> wrote:

> Review: Approve
>
> Hi Marco,
>
> so this was indeed my fault.
> I have put a nice message error for the kind of stupid error that I did.
>
> I still can not compile lhapdf6. So I will abstain on that part but
> lhapdf5 works very well now :-)
> So please take a quick look at my fix and go ahead for the merge.
>
> Cheers and thanks,
>
> Olivier
>
> --
>
> https://code.launchpad.net/~maddevelopers/mg5amcnlo/2.1.2-lhapdf6/+merge/231731
> Your team MadDevelopers is subscribed to branch
> lp:~maddevelopers/mg5amcnlo/2.2.0.
>

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) wrote :

Hi Marco,

You can ask him by email if he wants to react on that.

Cheers,

Olivier

On Sep 5, 2014, at 1:36 PM, marco zaro <email address hidden> wrote:

> ok thanks!
> shall we wait for any comment from juan?
>
>
> Marco Zaro
>
>
> On Fri, Sep 5, 2014 at 2:34 PM, Olivier Mattelaer <
> <email address hidden>> wrote:
>
>> Review: Approve
>>
>> Hi Marco,
>>
>> so this was indeed my fault.
>> I have put a nice message error for the kind of stupid error that I did.
>>
>> I still can not compile lhapdf6. So I will abstain on that part but
>> lhapdf5 works very well now :-)
>> So please take a quick look at my fix and go ahead for the merge.
>>
>> Cheers and thanks,
>>
>> Olivier
>>
>> --
>>
>> https://code.launchpad.net/~maddevelopers/mg5amcnlo/2.1.2-lhapdf6/+merge/231731
>> Your team MadDevelopers is subscribed to branch
>> lp:~maddevelopers/mg5amcnlo/2.2.0.
>>
>
> --
> https://code.launchpad.net/~maddevelopers/mg5amcnlo/2.1.2-lhapdf6/+merge/231731
> You are reviewing the proposed merge of lp:~maddevelopers/mg5amcnlo/2.1.2-lhapdf6 into lp:~maddevelopers/mg5amcnlo/2.2.0.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Template/LO/Source/PDF/makefile'
2--- Template/LO/Source/PDF/makefile 2014-02-23 03:15:09 +0000
3+++ Template/LO/Source/PDF/makefile 2014-09-05 12:34:28 +0000
4@@ -23,7 +23,5 @@
5 $(LIBDIR)$(LIBRARY): $(PDF)
6 $(call CREATELIB, $@, $^)
7
8-clean_lhapdf:
9- rm -f $(LIBDIR)$(LIBRARY)
10 clean:
11 $(RM) *.o $(LIBDIR)$(LIBRARY)
12
13=== modified file 'Template/NLO/SubProcesses/ajob_template'
14--- Template/NLO/SubProcesses/ajob_template 2014-06-12 16:12:08 +0000
15+++ Template/NLO/SubProcesses/ajob_template 2014-09-05 12:34:28 +0000
16@@ -84,7 +84,6 @@
17 # link1up MadLoop5_resources
18 link1up OLE_order.olc
19 link1up param_card.dat
20- link1up libLHAPDF.so
21
22 # check where is the basic file for the creation of input_app.txt
23 #
24
25=== modified file 'UpdateNotes.txt'
26--- UpdateNotes.txt 2014-08-23 13:57:35 +0000
27+++ UpdateNotes.txt 2014-09-05 12:34:28 +0000
28@@ -16,6 +16,10 @@
29 PT: Redesigned shower_card.dat and eliminated modbos options for Herwig6
30 RF: Change the SPINUP information in the NLO LHEF from 0 to 9 (i.e. sum over helicities)
31 RF: Fixed a bug in the check on the determination of the conflicting BWs.
32+ PT: Redesigned shower_card.dat and eliminated modbos options for Herwig6
33+ RF: Change the SPINUP information in the NLO LHEF from 0 to 9 (i.e. sum over helicities)
34+ RF: Fixed a bug in the check on the determination of the conflicting BWs.
35+ MZ: enabled LHAPDF6 interface
36
37 2.1.2(03/07/14) OM: Fix a bug in ALOHA in presence of customized propagator (Thanks Saurabh)
38 OM: Fixing some compilation issue with MadWeight (Thanks A. Pin)
39
40=== modified file 'madgraph/interface/amcatnlo_run_interface.py'
41--- madgraph/interface/amcatnlo_run_interface.py 2014-08-28 13:45:22 +0000
42+++ madgraph/interface/amcatnlo_run_interface.py 2014-09-05 12:34:28 +0000
43@@ -3212,12 +3212,6 @@
44 if os.path.exists(pjoin(self.me_dir,'SubProcesses','OLE_order.olc')):
45 input_files.append(pjoin(cwd, 'OLE_order.olc'))
46
47- # LHAPDF dynamic libraries (needed for lhapdf6)
48- lhalibs = ['libLHAPDF.dylib', 'libLHAPDF.so']
49- for lib in [pjoin(self.me_dir, 'lib', l) for l in lhalibs \
50- if os.path.exists(pjoin(self.me_dir, 'lib', l))]:
51- input_files.append(lib)
52-
53 # File for the loop (might not be present if MadLoop is not used)
54 if os.path.exists(pjoin(cwd,'MadLoop5_resources')):
55 tf=tarfile.open(pjoin(cwd,'MadLoop5_resources.tar'),'w',
56
57=== modified file 'madgraph/interface/common_run_interface.py'
58--- madgraph/interface/common_run_interface.py 2014-07-25 20:20:42 +0000
59+++ madgraph/interface/common_run_interface.py 2014-09-05 12:34:28 +0000
60@@ -1629,33 +1629,18 @@
61
62 if lhapdf_version.startswith('5.'):
63 pdfsetsdir = subprocess.Popen([self.options['lhapdf'], '--pdfsets-path'],
64- stdout = subprocess.PIPE).stdout.read().strip()
65- self.lhapdf_pdfsets = self.get_lhapdf_pdfsets_list(pdfsetsdir)
66- # link the static library in lib
67- lhalib = 'libLHAPDF.a'
68-
69- elif lhapdf_version.startswith('6.'):
70+ stdout = subprocess.PIPE).stdout.read().strip()
71+ else:
72 pdfsetsdir = subprocess.Popen([self.options['lhapdf'], '--datadir'],
73- stdout = subprocess.PIPE).stdout.read().strip()
74- self.lhapdf_pdfsets = self.get_lhapdf_pdfsets_list(pdfsetsdir)
75- # link the dynamic library in lib
76- if os.path.exists(pjoin(lhalibdir, 'libLHAPDF.so')):
77- lhalib = 'libLHAPDF.so'
78- elif os.path.exists(pjoin(lhalibdir, 'libLHAPDF.dylib')):
79- lhalib = 'libLHAPDF.dylib'
80- else:
81- raise MadGraph5Error('Dynamic library not found for LHAPDF6')
82-
83- else:
84- raise MadGraph5Error('Not valid LHAPDF version: %s' % lhapdf_version)
85+ stdout = subprocess.PIPE).stdout.read().strip()
86+
87+ self.lhapdf_pdfsets = self.get_lhapdf_pdfsets_list(pdfsetsdir)
88+ # link the static library in lib
89+ lhalib = 'libLHAPDF.a'
90
91 if os.path.exists(pjoin(libdir, lhalib)):
92 files.rm(pjoin(libdir, lhalib))
93 files.ln(pjoin(lhalibdir, lhalib), libdir)
94- # link the dynamic library for v6 in extra_dirs
95- if lhapdf_version.startswith('6.'):
96- for d in extra_dirs:
97- files.ln(pjoin(libdir, lhalib), pjoin(self.me_dir, d))
98 # just create the PDFsets dir, the needed PDF set will be copied at run time
99 if not os.path.isdir(pjoin(libdir, 'PDFsets')):
100 os.mkdir(pjoin(libdir, 'PDFsets'))
101@@ -1682,9 +1667,12 @@
102 'lhaid and PDF_set_min/max in the run_card do not correspond to the' + \
103 'same PDF set. Please check the run_card.')
104 except KeyError:
105- raise MadGraph5Error(\
106+ if self.lhapdf_version.startswith('5'):
107+ raise MadGraph5Error(\
108 ('invalid lhaid set in th run_card: %d .\nPlease note that some sets' % lhaid) + \
109- '(eg MSTW 90%CL error sets) \nare not available in aMC@NLO + LHAPDF 5.x.x')
110+ '(eg MSTW 90%CL error sets) \nare not available in aMC@NLO + LHAPDF 5.x.x')
111+ else:
112+ logger.debug('%d not found in pdfsets.index' % lhaid)
113
114
115 # check if the file exists, otherwise install it:
116@@ -1696,13 +1684,17 @@
117 except OSError:
118 pdfsets_dir = pjoin(self.me_dir, 'lib', 'PDFsets')
119
120- if pdfsetname and not os.path.exists(pjoin(pdfsets_dir, pdfsetname)):
121- self.install_lhapdf_pdfset(pdfsets_dir, pdfsetname)
122-
123- if os.path.exists(pjoin(pdfsets_dir, pdfsetname)):
124- files.cp(pjoin(pdfsets_dir, pdfsetname), pjoin(self.me_dir, 'lib', 'PDFsets'))
125- elif os.path.exists(pjoin(os.path.dirname(pdfsets_dir), pdfsetname)):
126- files.cp(pjoin(os.path.dirname(pdfsets_dir), pdfsetname), pjoin(self.me_dir, 'lib', 'PDFsets'))
127+ #check that the pdfset is not already there
128+ if not os.path.exists(pjoin(self.me_dir, 'lib', 'PDFsets', pdfsetname)) and \
129+ not os.path.isdir(pjoin(self.me_dir, 'lib', 'PDFsets', pdfsetname)):
130+
131+ if pdfsetname and not os.path.exists(pjoin(pdfsets_dir, pdfsetname)):
132+ self.install_lhapdf_pdfset(pdfsets_dir, pdfsetname)
133+
134+ if os.path.exists(pjoin(pdfsets_dir, pdfsetname)):
135+ files.cp(pjoin(pdfsets_dir, pdfsetname), pjoin(self.me_dir, 'lib', 'PDFsets'))
136+ elif os.path.exists(pjoin(os.path.dirname(pdfsets_dir), pdfsetname)):
137+ files.cp(pjoin(os.path.dirname(pdfsets_dir), pdfsetname), pjoin(self.me_dir, 'lib', 'PDFsets'))
138
139
140 def install_lhapdf_pdfset(self, pdfsets_dir, filename):
141@@ -1731,11 +1723,15 @@
142 os.path.isdir(pjoin(pdfsets_dir, filename)):
143 logger.info('%s successfully downloaded and stored in %s' \
144 % (filename, pdfsets_dir))
145- #otherwise save it locally
146- else:
147+ #otherwise (if v5) save it locally
148+ elif lhapdf_version.startswith('5.'):
149 logger.warning('Could not download %s into %s. Trying to save it locally' \
150 % (filename, pdfsets_dir))
151 self.install_lhapdf_pdfset(pjoin(self.me_dir, 'lib', 'PDFsets'), filename)
152+ else:
153+ raise MadGraph5Error, \
154+ 'Could not download %s into %s. Please try to install it manually.' \
155+ % (filename, pdfsets_dir)
156
157
158 def get_lhapdf_pdfsets_list(self, pdfsets_dir):
159@@ -1787,8 +1783,8 @@
160 stdout = subprocess.PIPE).stdout.read().strip()
161
162 # this will be removed once some issues in lhapdf6 will be fixed
163- if self.lhapdf_version.startswith('6.'):
164- raise MadGraph5Error('LHAPDF 6 not yet supported. Please use v5.x.x')
165+ if self.lhapdf_version.startswith('6.0'):
166+ raise MadGraph5Error('LHAPDF 6.0.x not supported. Please use v6.1 or later')
167
168 return self.lhapdf_version
169
170
171=== modified file 'madgraph/interface/madevent_interface.py'
172--- madgraph/interface/madevent_interface.py 2014-07-02 13:51:34 +0000
173+++ madgraph/interface/madevent_interface.py 2014-09-05 12:34:28 +0000
174@@ -3524,20 +3524,21 @@
175 # limit the number of event to 100k
176 self.check_nb_events()
177
178+ # this is in order to avoid conflicts between runs with and without
179+ # lhapdf
180+ misc.compile(['clean4pdf'], cwd = pjoin(self.me_dir, 'Source'))
181+
182 # set environment variable for lhapdf.
183 if self.run_card['pdlabel'] == "lhapdf":
184 os.environ['lhapdf'] = 'True'
185 self.link_lhapdf(pjoin(self.me_dir,'lib'))
186- pdfsetsdir = subprocess.Popen('%s --pdfsets-path' % self.options['lhapdf'],
187- shell = True, stdout = subprocess.PIPE).stdout.read().strip()
188+ pdfsetsdir = self.get_lhapdf_pdfsetsdir()
189 lhaid_list = [int(self.run_card['lhaid'])]
190 self.copy_lhapdf_set(lhaid_list, pdfsetsdir)
191 elif 'lhapdf' in os.environ.keys():
192 del os.environ['lhapdf']
193 if self.run_card['pdlabel'] != "lhapdf":
194 self.pdffile = None
195- #remove lhapdf stuff
196- self.compile(arg=['clean_lhapdf'], cwd=os.path.join(self.me_dir, 'Source'))
197
198 # set random number
199 if self.run_card['iseed'] != '0':
200
201=== modified file 'madgraph/iolibs/template_files/madevent_makefile_source'
202--- madgraph/iolibs/template_files/madevent_makefile_source 2013-11-22 13:16:07 +0000
203+++ madgraph/iolibs/template_files/madevent_makefile_source 2014-09-05 12:34:28 +0000
204@@ -68,9 +68,9 @@
205 run_card.inc: ../Cards/run_card.dat
206 ../bin/madevent treatcards run
207
208-clean_lhapdf:
209- rm -f $(LIBDIR)libgeneric.$(libext)
210- cd PDF; make clean_lhapdf
211+clean4pdf:
212+ rm -f ../lib/libpdf.$(libext)
213+ rm -f ../lib/libgeneric.$(libext)
214
215 clean:
216 $(RM) *.o $(LIBRARIES) $(BINARIES)
217
218=== modified file 'madgraph/various/banner.py'
219--- madgraph/various/banner.py 2014-07-25 20:20:42 +0000
220+++ madgraph/various/banner.py 2014-09-05 12:34:28 +0000
221@@ -25,7 +25,7 @@
222 import madgraph.iolibs.file_writers as file_writers
223 import madgraph.iolibs.files as files
224 import models.check_param_card as param_card_reader
225- from madgraph import MG5DIR
226+ from madgraph import MG5DIR, InvalidCmd
227 MADEVENT = False
228 except ImportError:
229 MADEVENT = True
230@@ -33,6 +33,7 @@
231 import internal.files as files
232 import internal.check_param_card as param_card_reader
233 import internal.misc as misc
234+ from internal import InvalidCmd
235
236 MEDIR = os.path.split(os.path.dirname(os.path.realpath( __file__ )))[0]
237 MEDIR = os.path.split(MEDIR)[0]
238@@ -535,7 +536,8 @@
239
240
241
242-
243+class InvalidRunCard(InvalidCmd):
244+ pass
245
246 class RunCard(dict):
247 """A class object for the run_card"""
248@@ -650,7 +652,7 @@
249
250 self.add_line('maxjetflavor', 'int', 4)
251 if int(self['maxjetflavor']) > 6:
252- raise Exception, 'maxjetflavor should be lower than 5! (6 is partly supported)'
253+ raise InvalidRunCard, 'maxjetflavor should be lower than 5! (6 is partly supported)'
254 self.add_line('auto_ptj_mjj', 'bool', True)
255 self.add_line('cut_decays', 'bool', True)
256 # minimum pt
257@@ -822,7 +824,7 @@
258 logger.warning('Since use_syst=T, We change the value of \'alpsfact\' to 1')
259 self['alpsfact'] = 1.0
260 if int(self['maxjetflavor']) == 6:
261- raise Exception, 'maxjetflavor at 6 is NOT supported for matching!'
262+ raise InvalidRUnCard, 'maxjetflavor at 6 is NOT supported for matching!'
263 self.add_line('alpsfact', 'float', 1.0)
264 self.add_line('pdfwgt', 'bool', True)
265 self.add_line('clusinfo', 'bool', False)
266@@ -860,6 +862,12 @@
267 self.add_line('bwcutoff', 'float', 15.0)
268 # Collider pdf
269 self.add_line('pdlabel','str','cteq6l1')
270+
271+ # check validity of the pdf set
272+ possible_set = ['lhapdf','mrs02nl','mrs02nn', 'mrs0119','mrs0117','mrs0121','mrs01_j', 'mrs99_1','mrs99_2','mrs99_3','mrs99_4','mrs99_5','mrs99_6', 'mrs99_7','mrs99_8','mrs99_9','mrs9910','mrs9911','mrs9912', 'mrs98z1','mrs98z2','mrs98z3','mrs98z4','mrs98z5','mrs98ht', 'mrs98l1','mrs98l2','mrs98l3','mrs98l4','mrs98l5', 'cteq3_m','cteq3_l','cteq3_d', 'cteq4_m','cteq4_d','cteq4_l','cteq4a1','cteq4a2', 'cteq4a3','cteq4a4','cteq4a5','cteq4hj','cteq4lq', 'cteq5_m','cteq5_d','cteq5_l','cteq5hj','cteq5hq', 'cteq5f3','cteq5f4','cteq5m1','ctq5hq1','cteq5l1', 'cteq6_m','cteq6_d','cteq6_l','cteq6l1', 'nn23lo','nn23lo1','nn23nlo']
273+ if self['pdlabel'] not in possible_set:
274+ raise InvalidRunCard, 'Invalid PDF set (argument of pdlabel) possible choice are:\n %s' % ','.join(possible_set)
275+
276 if self['pdlabel'] == 'lhapdf':
277 self.add_line('lhaid', 'int', 10042)
278 else:
279@@ -974,6 +982,13 @@
280 self.add_line('isoEM', 'bool', True)
281 # Collider pdf
282 self.add_line('pdlabel','str','cteq6_m')
283+ # check validity of the pdf set
284+ possible_set = ['lhapdf','mrs02nl','mrs02nn', 'mrs0119','mrs0117','mrs0121','mrs01_j', 'mrs99_1','mrs99_2','mrs99_3','mrs99_4','mrs99_5','mrs99_6', 'mrs99_7','mrs99_8','mrs99_9','mrs9910','mrs9911','mrs9912', 'mrs98z1','mrs98z2','mrs98z3','mrs98z4','mrs98z5','mrs98ht', 'mrs98l1','mrs98l2','mrs98l3','mrs98l4','mrs98l5', 'cteq3_m','cteq3_l','cteq3_d', 'cteq4_m','cteq4_d','cteq4_l','cteq4a1','cteq4a2', 'cteq4a3','cteq4a4','cteq4a5','cteq4hj','cteq4lq', 'cteq5_m','cteq5_d','cteq5_l','cteq5hj','cteq5hq', 'cteq5f3','cteq5f4','cteq5m1','ctq5hq1','cteq5l1', 'cteq6_m','cteq6_d','cteq6_l','cteq6l1', 'nn23lo','nn23lo1','nn23nlo']
285+ if self['pdlabel'] not in possible_set:
286+ raise InvalidRunCard, 'Invalid PDF set (argument of pdlabel) possible choice are:\n %s' % ','.join(possible_set)
287+
288+
289+
290 if self['pdlabel'] == 'lhapdf':
291 self.add_line('lhaid', 'int', 21100)
292 else:

Subscribers

People subscribed via source and target branches

to all changes: