Fork me on GitHub

Opened 11 years ago

Closed 11 years ago

#185 closed Bug (fixed)

lhco format output seems to be invalid in madgraph framework

Reported by: mattelaer Owned by:
Priority: minor Milestone:
Component: Delphes code Version: Delphes 3
Keywords: Cc:

Description

Hi guys,

Maikel report on the MG5 track a problem with the plotting of events created by Delphes:
https://answers.launchpad.net/madgraph5/+question/230244
I've generated p p > e+ e- j
and reproduced the problem. By looking at the log of MA4, you will see:

----------------------------------------------

events information

----------------------------------------------


Events in file : 0
Integrated weight (pb) : 294.89999999999998
Max wgt : -1.0000000000000000
Average wgt : NaN


Passing the cuts (plotted)
--------------------------


Events : 0
Integrated weight (pb) : 0.0000000000000000
Max wgt : -1.0000000000000000
Average wgt : Infinity

So I think that some part of the lhco information are not pass anymore correctly to the lhco output. Could you look at that?

Cheers,

Olivier

PS: I always have problem with Delphes email notification, so if you ask me a question and that I don't react, just send me a direct email. (I hope that adding madgraph in the title of the email, will trigger the correct filter of my email but we will see)

Change History (8)

comment:1 by Pavel Demin, 11 years ago

Hi Olivier,

I'm afraid that we don't have enough information to fix this problem.

We need to know what exactly makes MadAnalysis4 unhappy.

Could you attach an example of .lhco file?

Cheers,

Pavel

comment:2 by mattelaer, 11 years ago

Hi Pavel,

Your lhco file is just empty:

(end of the file:)
## In case FROG event display allowed
#NEvents_Frog 100
## Number of events to process
#NEvents -1 -1 means 'all'
#
## input PDG tables
#PdgTableFilename DELPHESDIR/data/particle.tbl
table with particle pid,mass,charge,...
#</mgdelphescard>
#</header>
#</LesHouchesEvents>
## Integrated weight (pb) : 294.975

You can see the end of the header. and then no event!

Cheers,

Olivier

Version 0, edited 11 years ago by mattelaer (next)

comment:3 by mattelaer, 11 years ago

Just to point that one people more complains about this:
https://answers.launchpad.net/madgraph5/+question/231928
(And this is other question raised on this point)

As a reminder, the problem is that Delphes didn't write any output events.
Even for the Standard Model (see the example above)
How is this possible?
What should I do? Advice them to use Delphes2? PGS? Did you fix this and forget to report it?

Cheers,

Olivier

comment:4 by Pavel Demin, 11 years ago

Hi Olivier,

I'm afraid that we don't have enough information about this problem.

Could you, please send a list of commands to reproduce this problem?

Is it possible that the problem is in the MG5 scripts?

I don't see any problem with the root2lhco converter.

I run it as

./root2lhco test.root test.lhco

Thanks,

Pavel

comment:5 by Pavel Demin, 11 years ago

I've tried to run MG5 to reproduce the 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.

PROC_sm_0/Events/run_01/tag_1_delphes_events.lhco file looks OK:

##  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 would say that it's up to the MG5 developers to tell us what is the problem.

comment:6 by Pavel Demin, 11 years ago

Finally, it look like a bug (or even 2 bugs) in MadAnalysis.

Here is my test LHCO file:

##  Integrated weight (pb)  : 717.23
   #  typ      eta      phi      pt    jmas   ntrk   btag  had/em   dum1   dum2
   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
   0             4        0
   1    1   -1.185    2.883   44.47    0.00   -1.0    0.0    0.00    0.0    0.0
   2    1   -0.422   -0.603   40.57    0.00    1.0    0.0    0.00    0.0    0.0
   3    6    0.000    1.370    4.97    0.00    0.0    0.0    0.00    0.0    0.0

It contains 4 events and 2 comment lines.

If I run MadAnalysis/plot_events with this file, it seems to work but only finds 3 events out of 4:

 input name of event file:
 -------------------------
test.lhco
Found LHC Olympics (PGS4) Event File
    output file: plots.top                                                                                                                                      
 Classes will be read from file: ./ma_card.dat
 Found the following classes in input classes file:
  class # 0 is   mET   12 -12  14 -14  16 -16 122
  class # 1 is   jet    1  -1   2  -2   3  -3   4  -4  21
  class # 2 is   b      5  -5
 Now start parsing events a first time
 created new class a   for particle          22
 created new class e+  for particle         -11
 created new class e-  for particle          11
 Setting up graphs
          28  plots set up
 Setting up acceptance cuts
 Cuts set up
 SEE plots.log FOR MORE INFO
 Now parsing events to fill histograms

 ----------------------------------------------
               events information
 ----------------------------------------------

   Events in file               :             3
   Integrated weight (pb)       :     717.230000000000
   Max wgt                      :     1.00000000000000
   Average wgt                  :     1.00000000000000

   Passing the cuts (plotted)
   --------------------------

   Events                       :             3
   Integrated weight (pb)       :     717.230000000000
   Max wgt                      :     1.00000000000000
   Average wgt                  :     1.00000000000000

Now I just remove the second comment line:

##  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
   0             4        0
   1    1   -1.185    2.883   44.47    0.00   -1.0    0.0    0.00    0.0    0.0
   2    1   -0.422   -0.603   40.57    0.00    1.0    0.0    0.00    0.0    0.0
   3    6    0.000    1.370    4.97    0.00    0.0    0.0    0.00    0.0    0.0

If I run MadAnalysis/plot_events with this new file, it does not find any event:

 input name of event file:
 -------------------------
test.lhco
Found LHC Olympics (PGS4) Event File
    output file: plots.top                                                                                                                                      
 Classes will be read from file: ./ma_card.dat
 Found the following classes in input classes file:
  class # 0 is   mET   12 -12  14 -14  16 -16 122
  class # 1 is   jet    1  -1   2  -2   3  -3   4  -4  21
  class # 2 is   b      5  -5
 Now start parsing events a first time
 Setting up graphs
           3  plots set up
 Setting up acceptance cuts
 Cuts set up
 SEE plots.log FOR MORE INFO
 Now parsing events to fill histograms

 ----------------------------------------------
               events information
 ----------------------------------------------

   Events in file               :             0
   Integrated weight (pb)       :     717.230000000000
   Max wgt                      :    -1.00000000000000
   Average wgt                  :                       NaN

   Passing the cuts (plotted)
   --------------------------

   Events                       :             0
   Integrated weight (pb)       :     0.00000000000000
   Max wgt                      :    -1.00000000000000
   Average wgt                  :                       NaN

comment:7 by Pavel Demin, 11 years ago

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

The bug is at line 2907 in MadAnalysis/plot_events.f

         do while(index(buff,"  #  typ ") .eq. 0)

MadAnalysis requires " # typ " in the beginning of the file with at least 2 spaces before the '#' sign and exactly 2 spaces between '#' and 'typ'.

See MG5 bug #1198655 for more details:

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

comment:8 by Pavel Demin, 11 years ago

Resolution: fixed
Status: newclosed

Workaround for this MadAnalysis bug is in trunk now and will be available in Delphes 3.0.10.

Note: See TracTickets for help on using tickets.