Skip to content

Fix check for MG event_norm

Spyros Argyropoulos requested to merge fixLP into master

Description of bug

Currently for the event_norm MG check logParser just loops through the lines in log.generate and it would throw a warning as soon as it encounters event_norm = sum. In some cases event_norm = sum is the default and is only changed later in the log.

Example from ATLMCPROD-8252:

01:24:20 Py:MadGraphUtils     INFO Setting event_norm = sum

and further down

01:24:23 Py:MadGraphUtils     INFO Setting event_norm = average

Changes introduced

Use

Py:MadGraphUtils     INFO Setting event_norm

to extract how MG normalisation is set and read the last occurrence of the relevant dictionary entry.

Tests

Before fix with jO used in !438 (merged)

python scripts/logParser.py -i 501xxx/501138/log.generate

-------------------------
Generator specific tests: MadGraph(v.2.8.1p3.atlas6)+Pythia8(v.244p3.rangefix)+EvtGen(v.1.7.0)
-------------------------
INFO: Pythia 8 checks: Passed
WARNING: The use of event_norm=sum will almost always result in the sample having the wrong total cross section -- please double check that event_norm=average is set in the param_card.dat.
INFO: MadGraph checks: Passed

After fix

python scripts/logParser.py -i 501xxx/501138/log.generate

-------------------------
Generator specific tests: MadGraph(v.2.8.1p3.atlas6)+Pythia8(v.244p3.rangefix)+EvtGen(v.1.7.0)
-------------------------
INFO: Pythia 8 checks: Passed
INFO: MadGraph checks: Passed

@hmildner @zmarshal it is a bit "annoying" that MadGraphUtils prints out stuff twice.

I didn't think this would happen so it is quite likely that other checks in logParser might be broken.
@zmarshal @hmildner Is it possible to only do the printout at the end after all parameters are set?
We can also change the checks in logParser however it would seem cleaner to only have 1 printout.

Issues resolved

Closes #129 (closed)

Edited by Spyros Argyropoulos

Merge request reports