key4hep / k4GeneratorsConfig

0 stars 1 forks source link

MADGRAPH HEPMC output #6

Open dirkzerwas opened 3 months ago

dirkzerwas commented 3 months ago

MADGRAPH HEPMC output not yet implemented Need to add to the python suite hadronization and writing via pythia

dirkzerwas commented 3 months ago

I am wondering if the installation of madgraph in KEY4HEP is complete: I added install pythia8 as well as install mg5amc_py8_interface to the madgraph input file, both commands are recognised: "The import format was not given, so we guess it as command install pythia8 You are installing 'pythia8', please cite ref(s): arXiv:1410.3012. " but result in an error: OSError : [Errno 30] Read-only file system: /cvmfs/sw-nightlies.hsf.org/key4hep/releases/2024-03-08/x86_64-centos7-gcc12.2.0-opt/madgraph5amc/3.4.2-jzrczx/HEPTools'

in the directory .....3.4.2-jzrczx there is no HEPTools executable installed.

Zehvogel commented 3 months ago

I am wondering if the installation of madgraph in KEY4HEP is complete:

Looking at the maintenance state of the spack package I would not be surprised if stuff is missing... maybe @jmcarcell can comment :)

dirkzerwas commented 3 months ago

To add some more info, here are the steps:

  1. set up KEY4HEP: source /cvmfs/sw-nightlies.hsf.org/key4hep/setup.sh
  2. launch madgraph: mg5_aMC
  3. try to "install pythia8" gives this message:

MG5_aMC>install pythia8 You are installing 'pythia8', please cite ref(s): arXiv:1410.3012. Command "install pythia8" interrupted with error: OSError : [Errno 30] Read-only file system: '/cvmfs/sw-nightlies.hsf.org/key4hep/releases/2024-03-08/x86_64-centos7-gcc12.2.0-opt/madgraph5amc/3.4.2-jzrczx/HEPTools' Please report this bug on https://bugs.launchpad.net/mg5amcnlo More information is found in 'MG5_debug'. Please attach this file to your report.

I checked in /cvmfs/sw-nightlies.hsf.org/key4hep/releases/2024-03-08/x86_64-centos7-gcc12.2.0-opt/madgraph5amc/3.4.2-jzrczx/ there is no directory "HEPTools"

from the madgraph documentation I think that "install BLA" first downloads a tool "HEPToolsInstaller" probably into the mg5 directory in order to install pythi8, mg5_pythia8, so I guess that's what's blocking the execution.

BTW in /cvmfs/sw-nightlies.hsf.org/key4hep/releases/2024-03-08/x86_64-centos7-gcc12.2.0-opt/madgraph5amc/3.4.2-jzrczx/vendor/ the tool seems to be there, but not installed. OfflineHEPToolsInstaller.tar.gz

I guess the tool then installs the interface and probably some code when calling "install mg5amc_py8_interface" for "install pythia8" this may simply be the setting of the path. pythia8_path = ../pythia8 which we could try to work around (not sure).

Cheers, Dirk

dirkzerwas commented 3 months ago

Result of temporary addition of LHE read: Difermion_Polarized: Madgraph 4.0503 +- 0.089162 pb

Muon: Sherpa 1719.95 +- 1.07523 pb Madgraph 1720.44 +- 0.450408 pb Whizard 1721.66 +- 2.39159 pb

MuonNeutrino: Madgraph 3949.8 +- 0.48569 pb Whizard 3949.96 +- 0.465219 pb Sherpa 3948.88 +- 0.0907291 pb

Tau: Whizard 2005.99 +- 0.219619 pb Sherpa 2010.39 +- 0.0450829 pb Madgraph 2006.9 +- 0.536246 pb

TauNeutrino: Sherpa 3948.94 +- 0.0900616 pb Whizard 3949.9 +- 0.456594 pb Madgraph 3950.2 +- 0.46724 pb

ZH: Madgraph 0.24017 +- 0.00012676 pb Whizard 0.239985 +- 4.45033e-06 pb Sherpa 0.252791 +- 1.94466e-05 pb

ZHDecay: Madgraph 1.72148e-06 +- 1.49455e-09 pb Whizard 0.238792 +- 0.000112203 pb

ZHDecay: I think MADGRAPH gives out sigma(ZH)BR(H)BR(Z) whereas Whizard sticks to sigma(ZH). Need to check if there is a way get this consistently

BTW @apricePhy do you know if the lhef files of MADGRAPH are "standard"? The HepMC LHEF-Reader went into an infinite loop. I cured it by removing the content between

and
(containing the Madgraph cards summary) from the file via sed. I did not check if it was a subsection <></> or the full header. It seemed like standard xml marking....

dirkzerwas commented 2 months ago

Hi, a couple more things about the MG-pythia interface:

However the driver of the pythia8 interface resides in mg5, not in PYTHIA, therefore the absence of the directory: HEPTOOLS (and its subdirectories) prevents the

My guess is that during installation one would have to do the following:

This should install the interface in the release directorymg5/HEPTools/ when I tried it locally: install mg5amc_py8_interface also did the compilation so in directorymg5/HEPTools/MG5aMC_PY8_interface the "pythia8 driver/interface" executable: MG5aMC_PY8_interface is available

dirkzerwas commented 2 months ago

executing: mg5_aMC configureMadgraph

with configureMadgraph containing the line install mg5amc_py8_interface

installs the interface to PYTHIA8 (drivers and all that).

Things that can go wrong: -> in configureMadgraph you might need to as first line (before install...): set pythia8_path XXXX where XXX is the pythia8 directory in KEY4HEP.

dirkzerwas commented 2 months ago

Supplementary information: the HepMC ReaderLHE goes into an infinite loop when reading the madgraph lhe file. Bug reported to Andrii and ANdy Buckley of HepMC. Andrii corrected the bug (ignore a comment anchor <!--). Update foreseen for HepMC 3.3. afaict

dirkzerwas commented 2 months ago

Update from Juan:

However this does not work:

Further checks:

The error seems to be OS related. I asked Juan if MG5 v3.5.4 WITH Pythia can be installed on centos for a cross check.