Error in extracting lhe.gz file

Asked by Daniele Barducci

Hello,

I'm not sure if this is the right place for this question. I am running MG@NLO + Pythia + MadAnalysis to obtain some lhe events, namely events_PYTHIA8_0_BasicReco.lhe.gz

I'm trying to extract the events to obtain a *lhe file, but using gunzip I get an error such as

gzip: events_PYTHIA8_0_BasicReco.lhe.gz: unexpected end of file

and I don't get any error.

If I do

zcat events_PYTHIA8_0_BasicReco.lhe.gz > test.lhe

I get the same error, but also a test.lhe file. However the file is cut, for example the last event looks like the one below. Do you perhaps know what the problem could be and how I can extract the events without error?

Thanks a lot

<event>
13 0 2.7677507E-06 -1.0000000E+00 -1.0000000E+00 -1.0000000E+00
       21 3 0 0 0 0 0.00000000000E+00 0.00000000000E+00 0.34423923492E+02 0.34423923492E+02 0.00000000000E+00 0.00000 0.00000
        3 3 0 0 0 0 0.00000000000E+00 0.00000000000E+00 -0.42654522705E+03 0.42654522705E+03 0.00000000000E+00 0.00000 0.00000
       23 3 1 2 0 0 0.31873941422E+00 -0.28113353729E+02 -0.14891654968E+03 0.17662533569E+03 0.90718833923E+02 0.00000 0.00000
      -24 3 1 2 0 0 0.16644250870E+02 0.67551528931E+02 -0.16990155029E+03 0.19938075256E+03 0.77755439758E+02 0.00000 0.00000
        4 3 1 2 0 0 -0.16962991714E+02 -0.39438171387E+02 -0.73303192139E+02 0.84963050842E+02 0.15000000000E+01 0.00000 0.00000
      -13 1 3 3 0 0 -0.21929306030E+02 0.22582569122E+02 -0.99543045044E+02 0.10440161133E+03 0.10565836728E+00 0.00000 0.00000
       13 1 3 3 0 0 0.20285467148E+02 -0.48382904053E+02 -0.50428382874E+02 0.72769760132E+02 0.10565836728E+00 0.00000 0.00000
       11 1 4 4 0 0 0.40524415970E+01 0.74567649841E+02 -0.79941841125E+02 0.10939585876E+03 0.00051099149E+00 0.00000 0.00000
       21 1 0 0 0 0 -0.43627843857E+01 -0.56100964546E+01 -0.28922944069E+01 0.83510894775E+01 0.32967052460E+01 0.00000 0.00000
       21 1 0 0 0 0 0.60332460403E+01 -0.37988646030E+01 -0.85232992172E+01 0.11268467903E+02 0.18709118366E+01 0.00000 0.00000
       21 1 0 0 0 0 0.26462681293E+01 -0.65497899055E+01 -0.11389785767E+03 0.11413256836E+03 0.19023449421E+01 0.00000 0.00000
       21 1 0 0 0 0 -0.20213642120E+02 -0.23897468567E+02 -0.49937812805

Question information

Language:
English Edit question
Status:
Answered
For:
MadAnalysis 5 Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Benjamin Fuks (fuks) said :
#1

Hi Daniele,

I got a similar error. This is weird. It looks like the end of the file is actually missin. The produced file can be analyzed with MA5, with the fraction of it that is legit. We will investigate that more deeply. In the meantime, writing an uncompressed file works like a charm (this consists in a quick temporary way over).

Cheers,

Benj

PS: I know I still need to dig into your other e-mail ;)

Revision history for this message
Daniele Barducci (db3e11) said :
#2

Hi Benjamin,

Thanks a lot. Actually the problem I have in analyzing this events is that they correspond to a process like

generate p p > X X [NLO]
add process p p > X X j [NLO]

for which my physical xs is the one in summary.txt times the events after pythia (with FxFx merging) over the generated number of events. I do not however know the number of real events after pythia, hence I don't know the cross-section (if what I said above is correct).

With "writing an uncompressed file works like a charm" you mean writing an ASCII with the fraction of events which are readable?

Thanks again

Daniele

Revision history for this message
Benjamin Fuks (fuks) said :
#3

Hi Danieie,

You can type
  set main.outputfile = blablabla.lhe
instead. This works, most probably also in your case.

Cheers,

Benj

> On 3 Oct 2018, at 10:03 , Daniele Barducci <email address hidden> wrote:
>
> Question #674599 on MadAnalysis 5 changed:
> https://answers.launchpad.net/madanalysis5/+question/674599
>
> Daniele Barducci posted a new comment:
> Hi Benjamin,
>
> Thanks a lot. Actually the problem I have in analyzing this events is
> that they correspond to a process like
>
> generate p p > X X [NLO]
> add process p p > X X j [NLO]
>
> for which my physical xs is the one in summary.txt times the events
> after pythia (with FxFx merging) over the generated number of events. I
> do not however know the number of real events after pythia, hence I
> don't know the cross-section (if what I said above is correct).
>
> With "writing an uncompressed file works like a charm" you mean writing
> an ASCII with the fraction of events which are readable?
>
> Thanks again
>
> Daniele
>
> --
> You received this question notification because you are subscribed to
> the question.

Revision history for this message
Daniele Barducci (db3e11) said :
#4

Thanks, I'll try this!

Revision history for this message
Daniele Barducci (db3e11) said :
#5

Hi Benj,

Sorry for the really naive question, but I'm not sure were to write that string. I am using the built-in MG chain of MG+Pythia8+MA5 with a madanalysis_hadron_card.dat which has inside, among the others these strings,

@MG5aMC inputs = *.hepmc, *.hep, *.stdhep, *.lhco, *.fifo

# Reconstruction using FastJet
@MG5aMC reconstruction_name = BasicReco
@MG5aMC reco_output = lhe

As output I get a file which is called

events_PYTHIA8_0_BasicReco.lhe.gz

I tried to play a bit around with the strings along the lines of your suggestion, but I didn't succeed in getting a pure .lhe output. Am I missing something?

Thanks again

Daniele

Revision history for this message
Benjamin Fuks (fuks) said :
#6

Hi Daniele,

please try to add:
  set main.outputfile = blablabla.lhe
in the card.

Cheers,

Benjamin

> On 3 Oct 2018, at 13:13 , Daniele Barducci <email address hidden> wrote:
>
> Question #674599 on MadAnalysis 5 changed:
> https://answers.launchpad.net/madanalysis5/+question/674599
>
> Daniele Barducci posted a new comment:
> Hi Benj,
>
> Sorry for the really naive question, but I'm not sure were to write that
> string. I am using the built-in MG chain of MG+Pythia8+MA5 with a
> madanalysis_hadron_card.dat which has inside, among the others these
> strings,
>
> @MG5aMC inputs = *.hepmc, *.hep, *.stdhep, *.lhco, *.fifo
>
> # Reconstruction using FastJet
> @MG5aMC reconstruction_name = BasicReco
> @MG5aMC reco_output = lhe
>
> As output I get a file which is called
>
> events_PYTHIA8_0_BasicReco.lhe.gz
>
> I tried to play a bit around with the strings along the lines of your
> suggestion, but I didn't succeed in getting a pure .lhe output. Am I
> missing something?
>
> Thanks again
>
> Daniele
>
> --
> You received this question notification because you are subscribed to
> the question.

Revision history for this message
Daniele Barducci (db3e11) said :
#7

Hi Benj,

It works. Not many events are lost in a test I made (940 vs 944) but the funny things is that the events looks reordered (I didn't check all of them, just the first and last).

In particular the event cut in the lhe.gz is the second event in the file that you told me how to create, and also there are (tiny) difference in the 4-momenta. I don't know if this will help you, but in case I can send the events

Daniele

Revision history for this message
Benjamin Fuks (fuks) said :
#8

Hi Daniele,

We are on it. We don't need the events (at least for now) :)

Cheers,

Benj

> On 3 Oct 2018, at 18:07 , Daniele Barducci <email address hidden> wrote:
>
> Question #674599 on MadAnalysis 5 changed:
> https://answers.launchpad.net/madanalysis5/+question/674599
>
> Daniele Barducci posted a new comment:
> Hi Benj,
>
> It works. Not many events are lost in a test I made (940 vs 944) but the
> funny things is that the events looks reordered (I didn't check all of
> them, just the first and last).
>
> In particular the event cut in the lhe.gz is the second event in the
> file that you told me how to create, and also there are (tiny)
> difference in the 4-momenta. I don't know if this will help you, but in
> case I can send the events
>
> Daniele
>
> --
> You received this question notification because you are subscribed to
> the question.

Revision history for this message
Daniele Barducci (db3e11) said :
#9

Perfect, thanks a lot

Cheers

Daniele

Can you help with this problem?

Provide an answer of your own, or ask Daniele Barducci for more information if necessary.

To post a message you must log in.