Running Pythia on a LHE sample produced with MG

Asked by Jose David Ruiz Alvarez

Dear MG team,

How can I run over an LHE file at parton levels run pythia hadronization produced with MG? In the production process were done all the decays, so I only need the hadronization. Additionally I don't have access to any of the cards of the production process.

Thanks,
Jose

Question information

Language:
English Edit question
Status:
Answered
For:
MadGraph5_aMC@NLO Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#1

If you have the full directory ( I'm afraid that you don't)
then you can do:
./bin/madevent pythia run_0X

Cheers,

Olivier

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#2

If you have the full directory ( I'm afraid that you don't)
then you can do:
./bin/madevent pythia run_0X

Cheers,

Olivier

Revision history for this message
Jose David Ruiz Alvarez (jose-ruiz-3) said :
#3

Hi Olivier,

You are right, I don't have the directory. I only hav e the LHE file in parton level produced by someone else, but I'm sure it was produced in MG.

Cheers,
Jose
________________________________________
From: <email address hidden> [<email address hidden>] on behalf of Olivier Mattelaer [<email address hidden>]
Sent: 19 June 2013 17:36
To: Jose David Ruiz Alvarez
Subject: Re: [Question #231011]: Running Pythia on a LHE sample produced with MG

Your question #231011 on MadGraph5 changed:
https://answers.launchpad.net/madgraph5/+question/231011

Olivier Mattelaer proposed the following answer:
If you have the full directory ( I'm afraid that you don't)
then you can do:
./bin/madevent pythia run_0X

Cheers,

Olivier

--
If this answers your question, please go to the following page to let us
know that it is solved:
https://answers.launchpad.net/madgraph5/+question/231011/+confirm?answer_id=1

If you still need help, you can reply to this email or go to the
following page to enter your feedback:
https://answers.launchpad.net/madgraph5/+question/231011

You received this question notification because you asked the question.

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#4

Hi Jose,

In principle, you can do the following:

./bin/mg5
generate p p > e+ e-
output FAKERUN

cd FAKERUN/Events
mkdir run_01
mv FILE.lhe.gz run_01/unweighted_events.lhe.gz
cd ../
./bin/madevent pythia run_01

But such pythia command crash in such case in version 1.5.10.
This is however working on version 1.5.11, which will be at the end of this week.

Cheers,

Olivier

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#5

Here you can find the bug report where we discussed the problem that I was referring to:
This link also contains a patch if you don't want to wait for the official version.
https://bugs.launchpad.net/madgraph5/+bug/1185288

Cheers,

Olivier

Revision history for this message
Jose David Ruiz Alvarez (jose-ruiz-3) said :
#6

Hi Olivier,

In this bug report I did all the production, so I had the full directory structure.

Cheers,
Jose
________________________________________
From: <email address hidden> [<email address hidden>] on behalf of Olivier Mattelaer [<email address hidden>]
Sent: 20 June 2013 07:06
To: Jose David Ruiz Alvarez
Subject: Re: [Question #231011]: Running Pythia on a LHE sample produced with MG

Your question #231011 on MadGraph5 changed:
https://answers.launchpad.net/madgraph5/+question/231011

Olivier Mattelaer proposed the following answer:
Here you can find the bug report where we discussed the problem that I was referring to:
This link also contains a patch if you don't want to wait for the official version.
https://bugs.launchpad.net/madgraph5/+bug/1185288

Cheers,

Olivier

--
If this answers your question, please go to the following page to let us
know that it is solved:
https://answers.launchpad.net/madgraph5/+question/231011/+confirm?answer_id=4

If you still need help, you can reply to this email or go to the
following page to enter your feedback:
https://answers.launchpad.net/madgraph5/+question/231011

You received this question notification because you asked the question.

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#7

Yes indeed,

The solution is to create a fake run (the process actually doesn't matter). and put inside that fake run structure your events file.
When this is done, you can run pythia as if this was a events sample generated by the fake run.

Cheers,

Olivier

Revision history for this message
Jose David Ruiz Alvarez (jose-ruiz-3) said :
#8

Hi Olivier,

I tried your suggestion for making a fake directoy, but I had the following output:

Running Pythia
Fail to produce pythia output. More info in
     /home/bockelman/jruizalv/CMSSW_5_3_8_patch3/src/TOP/MadGraph5_v1_5_10/FAKERUN/Events/run_01/tag_1_pythia.log

And the content of the log file is:

No pythia_card.dat found. Quitting...

That is very weird cause I checked and in the Cards directory there is a pythia_card.dat, the default one, with the following content:

!...Parton showering on or off
      MSTP(61)=1
      MSTP(71)=1

!...Fragmentation/hadronization on or off
      MSTJ(1)=1

!...Multiple interactions on or off
      MSTP(81)=20

!...Don't stop execution after 10 errors
      MSTU(21)=1

Cheers,
Jose

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#9

Hi Jose,

The only point on which I'm sure is that I have test this in 1.5.11 and this is working.
So you can either download this version (via bazaar: bzr branch lp:~maddevelopers/madgraph5/11.5.11)
or wait this version to be released.

Otherwise try to run pythia in standalone.

Cheers,

Olivier

On Jun 20, 2013, at 2:41 AM, Jose Daivd Ruiz Alvarez <email address hidden> wrote:

> Question #231011 on MadGraph5 changed:
> https://answers.launchpad.net/madgraph5/+question/231011
>
> Status: Answered => Open
>
> Jose Daivd Ruiz Alvarez is still having a problem:
> Hi Olivier,
>
> I tried your suggestion for making a fake directoy, but I had the
> following output:
>
> Running Pythia
> Fail to produce pythia output. More info in
> /home/bockelman/jruizalv/CMSSW_5_3_8_patch3/src/TOP/MadGraph5_v1_5_10/FAKERUN/Events/run_01/tag_1_pythia.log
>
> And the content of the log file is:
>
> No pythia_card.dat found. Quitting...
>
> That is very weird cause I checked and in the Cards directory there is a
> pythia_card.dat, the default one, with the following content:
>
> !...Parton showering on or off
> MSTP(61)=1
> MSTP(71)=1
>
> !...Fragmentation/hadronization on or off
> MSTJ(1)=1
>
> !...Multiple interactions on or off
> MSTP(81)=20
>
> !...Don't stop execution after 10 errors
> MSTU(21)=1
>
> Cheers,
> Jose
>
> --
> You received this question notification because you are a member of
> MadTeam, which is an answer contact for MadGraph5.

Revision history for this message
Ofek Gila (ofekih) said :
#10

Hey, I generated events using multi run, and I told multi run to do pythia6 + Delphes.

I named my multi_run "main", and had 20 iterations, so it created main_0 - main_19. When it was done, it also just made a "main", containing the combined lhe file. All the main_XX runs have pythia/Delphes, but only the combined one doesn't.

When I run ./bin/madgraph pythia main to generate pythia/Delphes on the combined one, I get the same keyerror "KeyError : 'mgruncard'".

I don't want to do ./bin/madgraph pythia main_X, I want to run pythia/Delphes on my combined file, ./bin/madgraph pythia main

Any ideas why it isn't working, when pythia/Delphes successfully ran on all the individual iterations?

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#11

Hi,

This is actually by design, pythia6 output are actually quite heavy and having a huge stdhep is not
recommended in general.
This is partly historical since that format was not allowing file bigger than 4Gb.
This is not a real limitation since we have change the format to allow a 64 bit formatting within pythia-pgs
but we still kept the limitation to not shower the full file.

This is actually not a real limitation since you should be able to import multiple file in any analysis program.

Cheers,

Olivier

PS: Note that pythia6 (and pythia-pgs) are not supported anymore (neither by their original author or by us --even for the interface--)

> On 22 Jul 2018, at 22:02, Ofek Gila <email address hidden> wrote:
>
> Question #231011 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/231011
>
> Ofek Gila requested more information:
> Hey, I generated events using multi run, and I told multi run to do
> pythia6 + Delphes.
>
> I named my multi_run "main", and had 20 iterations, so it created main_0
> - main_19. When it was done, it also just made a "main", containing the
> combined lhe file. All the main_XX runs have pythia/Delphes, but only
> the combined one doesn't.
>
> When I run ./bin/madgraph pythia main to generate pythia/Delphes on the
> combined one, I get the same keyerror "KeyError : 'mgruncard'".
>
> I don't want to do ./bin/madgraph pythia main_X, I want to run
> pythia/Delphes on my combined file, ./bin/madgraph pythia main
>
> Any ideas why it isn't working, when pythia/Delphes successfully ran on
> all the individual iterations?
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Can you help with this problem?

Provide an answer of your own, or ask Jose David Ruiz Alvarez for more information if necessary.

To post a message you must log in.