how to run a standalone event production including showering, and hadronisation

Asked by pietro govoni

Dear Madgraph experts,

I would like to run not interactively a test production on a single machine, single core, of a process with Madgraph, including showering, hadronisation and if possible jet reconstruction.

From my experience and tutorials I found online I did manage to prepare a working setup on the CERN lxplus resources to run up to the LHE level, as follows:

source /cvmfs/sft.cern.ch/lcg/views/setupViews.sh LCG_102 x86_64-centos9-gcc11-opt
wget https://launchpad.net/mg5amcnlo/3.0/3.5.x/+download/MG5_aMC_v3.5.4.tar.gz
tar xzf MG5_aMC_v3.5.4.tar.gz
rm MG5_aMC_v3.5.4.tar.gz
cp ~govoni/public/mg5_configuration_LCG102_x86_64-centos9-gcc11-opt.txt .
cd MG5_aMC_v3_5_4/input
mv mg5_configuration.txt mg5_configuration_default.txt
ln -s ../../mg5_configuration_LCG102_x86_64-centos9-gcc11-opt.txt ./mg5_configuration.txt
cd ../
./bin/mg5_aMC
install mg5amc_py8_interface
(exit madgraph)
generate p p > z j j QCD=0
output zjj_ewk
cd zjj_ewk
./bin/generate_events

Unfortunately, I find it way harder to understand how to turn on showering, as all the tutorials I found usually stop at parton level.
Would you please point me to the instructions on how to turn on the showering in the proper config file, and then to run the event production?
Incidentally, I have a generic question about config files. Is is correct to state that, when a variable is not set in the config file present in the process folder (zjj_ewk in my case), then the reference value is the one in the main Madgraph folder? For example, in my case if nb_core is not set in zjj_ewk/Cards/me5_configuration.txt, then what counts is the one set in MG5_aMC_v3_5_4/input/mg5_configuration.txt?

Best regards,

pietro

Question information

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

How is installed pythia8 in your setup?
I guess that this is part of the mg5_configuration_LCG102_x86_64-centos9-gcc11-opt.txt
file that you copy. Is that correct?
But I see that you have to install mg5amc_py8_interface, that sounds weird (but possible if they install pythia8 externally and do not care about running at LO).

my suggestion would be:
echo "generate p p > z j j QCD=0" > cmd
echo "output zjj_ewk" >> cmd
echo "launch zjj_ewk" >> cmd
echo "shower=PY8" >> cmd
./bin/mg5_aMC cmd

Obviously it will only work if the pythia8 is corectly setup. (which is needed anyway to have the install of the mg5amc_py8_interface working).

Now note that we had a recent bug for pythia when running it in single core.
So if you see an error with "unset" this means that such patch is not life yet.

> Incidentally, I have a generic question about config files.

The config file are read in the following order:
when running from ./bin/mg5_aMC executable:
0) value default (hardcoded in the code)
1) system-wide config file (need environment variable MADGRAPH_BASE)
2) home config file (need environment variable HOME)
3) input/mg5_configuration.txt

When running from "process" directory:
0) value default (hardcoded in the code)
1) system-wide config file (need environment variable MADGRAPH_BASE)
2) home config file (need environment variable HOME)
3) Cards/me5_configuration.txt
4) input/mg5_configuration.txt (need that of the previous step defines mg5_dir=)
5) Cards/me5_configuration.txt (rerun only if "mg5_dir" was set)

So yes, if you specify something in Cards/me5_configuration.txt this has always priority.
If you do not, then we try to use MG5_aMC_v3_5_4/input/mg5_configuration.txt
but this is possible only if a mg5_dir is specified in one configuration file (and point to a valid madgraph directory)

Cheers,

Olivier

Revision history for this message
pietro govoni (pietro-govoni) said :
#2

Dear Oliver,

thanks a lot for the quick reaction.
Concerning your question, the pythia8, fastjet, HepMC, Delphes programs come from an LHC environment, which is set up with the command:

source /cvmfs/sft.cern.ch/lcg/views/setupViews.sh LCG_102 x86_64-centos9-gcc11-opt

so I expect the installation to be sound.
The file mg5_configuration_LCG102_x86_64-centos9-gcc11-opt.txt was created by me to tell Madgraph where all packages are.

I will try following your suggestions and check for all the environment variables and come back to you.

Thanks!

pietro

Revision history for this message
pietro govoni (pietro-govoni) said :
#3

Dear Olivier,

I gave it a try and I still have a couple of questions I'd like to ask:

- when I use the instruction: shower=PY8 the shower gets deactivated, while if I do nothing it's there by default, which I find strange, how do I make sense of it?

it seems that the information present in mg5_configuration.txt does not get properly parsed, evidence 1, since I set it up NOT to run on condor, while pythia jobs get submitted to condor, how can I prevent it?

- it seems that the information present in mg5_configuration.txt does not get properly parsed, evidence 2, since the hepMC files are not saved because the MG5aMC_PY8_interface cannot be found, even if it's set. This is the error I get:

/pool/condor/dir_2863694/run_PY8.sh: line 2: ./MG5aMC_PY8_interface: No such file or directory

while this is the setting in the file:

mg5_configuration.txt:mg5amc_py8_interface_path = /afs/cern.ch/work/g/govoni/2024-VBS-tagger/LCG/MG5_aMC_v3_5_4/HEPTools/MG5aMC_PY8_interface #

Do I need to manually copy the file in the process folder?

Best regards,

pietro

Revision history for this message
pietro govoni (pietro-govoni) said :
#4

Dear Olivier,

I did manage to solve the condor problem, I found a bug in my code.

pietro

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

So everything is fixed now, or you still need help on something?

Cheers,

Olivier

Revision history for this message
pietro govoni (pietro-govoni) said :
#6

Hello Oliver,

yes, thanks, this thread has been very useful.
I am still left with some open points in my flow but as of now I can produce events, which is what matters :)
In case of more doubts I will open another ticket.

Have a nice day,

pietro