How to run Delphes in madevent?

Asked by Li

Hi,
    I have a question when running MG5 in slurm type cluster. It create cluster_queue for Delphes, which limited to be smaller 6 hours, and is too short for me.
   To solve this problem, I wish I can either
    1) Stop the cluster use cluster_queue when Delphes, but I don't know how to do that
    or
    2) Run Delphes manually. However I only knew first gunzip the pythia file then run Delphes, then zip the pythia file, I afraid this waste too much time in gunzip/zip. As I tried that in madevent I can just command "delphes" to just run Delphes to zipped pythia file. I wonder if there is a way to do this in script way and I can specify which run_?? I want to run Delphes.

     Sometime when I use "delphes run_01" when there are already run_01_delphes_event.root and run_02_delphes_event.root, it just report the error:

WARNING: Error in <TFile::TFile>: file run_01/tag_2_delphes_events.root already exists
** ERROR: can't create output file run_01/tag_2_delphes_events.root

    Can't it create tag_3_delphes_events.root in the case?

    Either solution will be very helpful! Thank you!

Question information

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

Hi,

> 2) Run Delphes manually. However I only knew first gunzip the pythia file then run Delphes, then zip the pythia file, I afraid this waste too much time in gunzip/zip. As I tried that in madevent I can just command "delphes" to just run Delphes to zipped pythia file.

Well when your run the delphes command in madevent, this is exactly what we do:
1) unzip the file
2) run Delphes
3) zip the file
I'm not aware of the fact that Delphes is able to do on the flight unziping.

> I wonder if there is a way to do this in script way and I can specify which run_?? I want to run Delphes.

You can check the FAQ how to script MG5aMC
In this case you can run the bash command
./bin/madevent delphes run_XX

> Sometime when I use "delphes run_01" when there are already run_01_delphes_event.root and run_02_delphes_event.root, it just report the error:
>
> WARNING: Error in <TFile::TFile>: file run_01/tag_2_delphes_events.root already exists
> ** ERROR: can't create output file run_01/tag_2_delphes_events.root
>
> Can't it create tag_3_delphes_events.root in the case?

Thanks for letting us know, I will try if I can reproduce this and if so will fix it.

Cheers,

Olivier

> On 14 Feb 2020, at 23:43, Li <email address hidden> wrote:
>
> New question #688790 on MadGraph5_aMC@NLO:
> https://answers.launchpad.net/mg5amcnlo/+question/688790
>
> Hi,
> I have a question when running MG5 in slurm type cluster. It create cluster_queue for Delphes, which limited to be smaller 6 hours, and is too short for me.
> To solve this problem, I wish I can either
> 1) Stop the cluster use cluster_queue when Delphes, but I don't know how to do that
> or
> 2) Run Delphes manually. However I only knew first gunzip the pythia file then run Delphes, then zip the pythia file, I afraid this waste too much time in gunzip/zip. As I tried that in madevent I can just command "delphes" to just run Delphes to zipped pythia file. I wonder if there is a way to do this in script way and I can specify which run_?? I want to run Delphes.
>
> Sometime when I use "delphes run_01" when there are already run_01_delphes_event.root and run_02_delphes_event.root, it just report the error:
>
> WARNING: Error in <TFile::TFile>: file run_01/tag_2_delphes_events.root already exists
> ** ERROR: can't create output file run_01/tag_2_delphes_events.root
>
> Can't it create tag_3_delphes_events.root in the case?
>
> Either solution will be very helpful! Thank you!
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
Li (huangli-itp) said :
#2

Hi Olivier,
    Thank you! I guess Delphes just cant work on zipped file, I just thought you may have some tricks.

Best,
Li

Revision history for this message
Jaebak Kim (jbkim) said :
#3

Hi all,

I was looking into this recently, and the below command seems to work.

gunzip -c pythia8_events.hepmc.gz | ./DelphesHepMC2 ./cards/delphes_card_CMS.tcl delphes3_events.root

where -c means to write output to standard output, while keeping the original file unchanged.

Best regards,
Jaebak