Delphes plotting halts after installing MadAnalysis

Asked by Maikel de Vries on 2013-06-05

After I installed Delphes and MadAnalysis (Ubuntu 13.04) in the MadGraph 1.5.10 edition, every generation of events halts after running Delphes when plots are generated, indicated by this line in the console:

Creating Plots for Delphes level

No error messages or indication what might go wrong.

Thanks in advance for any feedback,

Maikel

Question information

Language:
English Edit question
Status:
Answered
For:
MadGraph5_aMC@NLO Edit question
Assignee:
Rikkert Frederix Edit question
Last query:
2013-06-18
Last reply:
2013-09-10

Hi Maikel,

This looks like a Delphes bug to me.
So I have forward your email to Delphes author:
https://cp3.irmp.ucl.ac.be/projects/delphes/ticket/185

Cheers,

Olivier

Maikel de Vries (mdt-maikel) said : #2

Thanks for forwarding that to the Delphes team.

Is there an easy way to disable the Delphes plotting, so that I can use MadGraph again in an automatic set-up I have?

Best, Maikel

Hi Maikel,

When I reproduced your bug, the plot were just not created but the code was not crashing.
So in my case at least, I don't see why you need to disable it.

But in case one easy fix to the code is the following:

file madgraph/interface/madevent_interface.py
around line 3327:
        if any([arg in ['all','delphes'] for arg in args]):
            filename = pjoin(self.me_dir, 'Events', self.run_name,
                                        '%s_delphes_events.lhco' % self.run_tag)
            if os.path.exists(filename+'.gz'):

You replace by
        if 0 and any([arg in ['all','delphes'] for arg in args]):
            filename = pjoin(self.me_dir, 'Events', self.run_name,
                                        '%s_delphes_events.lhco' % self.run_tag)
            if os.path.exists(filename+'.gz'):

Cheers,

Olivier

Maikel de Vries (mdt-maikel) said : #4

Okay, and how do I compile these changes?

I need this since my MG version halts and stops working.

Best, Maikel

Hi Maikel,

They are no compilation in python.
So as soon as you have made the change this will work.

One subtle point. The processes that have been already generated use (sometimes) the file:
[PROC_PATH]]/bin/internal/madevent_interface.py
which is in principle a copy of
[MG5_PATH]/madgraph/interface/madevent_interface.py

the script:
[PROC_PATH]]/bin/madevent
[PROC_PATH]]/bin/generate_events
use the files=
[PROC_PATH]]/bin/internal/madevent_interface.py
while
[MG5_PATH]/bin/mg5
(with launch or launch -i)
use the file
[MG5_PATH]/madgraph/interface/madevent_interface.py

So depending on the command that you use for the generation of events, you might want to apply the same patch to the previously generated directory.

Cheers,

Olivier

Maikel de Vries (mdt-maikel) said : #6

Hello Olivier,

I tried this and the (even a new) process still hangs at "Generating Plots for Delphes level".

So it still seems to try to generate the Delphes level plots.

Best, Maikel

Hi Maikel,

Ok then, the solution should be to comment the line 3575 (of the same file):

        # Creating plots
        self.create_plot('Delphes')

Cheers,

Olivier

Pavel Demin (pavel-demin) said : #8

Hi Olivier,

At the moment I don't understand why you think that it's a Delphes bug.

I've checked the .lhco files produced by Delphes and don't see any problems.

I've also tried to run MG5 to reproduce this problem.

Here are the commands:

wget https://launchpad.net/madgraph5/trunk/1.5.0/+download/MadGraph5_v1.5.11.tar.gz
tar -zxf MadGraph5_v1.5.11.tar.gz
cd MadGraph5_v1_5_11/
./bin/mg5
install Delphes
install pythia-pgs
install MadAnalysis
generate p p > z > e+ e-
launch

then MG5 indeed hangs at

Creating Plots for Delphes level

Using 'ps' I've found what executable is actually running at this point and tried to run in manually:

/bin/bash /scratch/MG5/MadGraph5_v1_5_11/PROC_sm_0/bin/internal/plot /scratch/MG5/MadGraph5_v1_5_11/MadAnalysis /scratch/MG5/MadGraph5_v1_5_11/td

it hangs after showing the following message:

plot_events found
topdrawer found
epstosmth found
plot_card found
cp: `../../../Cards/plot_card.dat' and `./ma_card.dat' are the same file
end plot_events
PAUSE:

Looks like this plot/MadAnalysis/td combination stops at some point and waits for some user input.

Here is the contents of PROC_sm_0/Events/run_01/tag_1_delphes_events.lhco:

## Integrated weight (pb) : 717.23
   0 1 0
   1 0 -2.389 2.441 30.81 0.00 0.0 0.0 0.00 0.0 0.0
   2 1 -0.925 -1.023 40.45 0.00 1.0 0.0 0.00 0.0 0.0
   3 6 0.000 -0.480 1.06 0.00 0.0 0.0 0.00 0.0 0.0
   0 2 0
   1 1 -0.972 1.831 48.56 0.00 1.0 0.0 0.00 0.0 0.0
   2 1 -1.200 -2.011 47.22 0.00 -1.0 0.0 0.00 0.0 0.0
   3 4 0.887 -0.193 28.12 6.96 3.0 0.0 0.64 0.0 0.0
   4 6 0.000 -1.570 3.25 0.00 0.0 0.0 0.00 0.0 0.0
   0 3 0
   1 1 -0.190 -2.362 30.79 0.00 -1.0 0.0 0.00 0.0 0.0
   2 1 1.813 0.767 28.00 0.00 1.0 0.0 0.00 0.0 0.0
   3 6 0.000 1.438 2.63 0.00 0.0 0.0 0.00 0.0 0.0

I'd say that this .lhco file looks OK: 11 columns, there are electrons, photons, jets and missing transverse momentum at the end of each event.

Do you have any idea why the plotting script hangs?

Pavel Demin (pavel-demin) said : #9

I've just checked the 'plot' script and tried to runf it line by line.

The line that generates the 'PAUSE:' message is

$td/td plots.top

if I run

../../../../td/td plots.top

I get

PAUSE:

The plots.top file is empty.

Hi,

Olivier is in holiday and will be back in a week and attend your matter as soon as possible.

Cheers.

Pavel Demin (pavel-demin) said : #11

I've finally found the source of the problem. It's a MadAnalysis bug.

See Bug #1198655 for more details:

https://bugs.launchpad.net/madgraph5/+bug/1198655

Thanks so much Pavel.

I've asked rik to fix this.

Cheers,

Olivier

Daniele Barducci (db3e11) said : #13

Hi,
I have just downloaded the latest version of MG ( MadGraph5_v1_5_12 ) and Installed MadAnalysis, ExRootAnalysis, Pythia and Delphes.

I run p p > t t~ at Delphes level but seems that the problem is still there, MG hangs at

Creating Plots for Delphes level

and doesn't go further.

I read in https://bugs.launchpad.net/madgraph5/+bug/1198655 that a fixed version was realeased, so I'm wondering if is just my problem..

Thanks

D.

This should be fixed now. (after re-installing MadAnalysis and Delphes)

Cheers,

Olivier

Can you help with this problem?

Provide an answer of your own, or ask Maikel de Vries for more information if necessary.

To post a message you must log in.