Opened 8 years ago
Closed 8 years ago
#1078 closed Bug (fixed)
not supporting hepmc generated by pythia8 in presence of weights (?)
Reported by: | olivier | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | Delphes code | Version: | Delphes 3 |
Keywords: | Cc: |
Description
Hi,
https://answers.launchpad.net/mg5amcnlo/+question/495731
reported a format problem with the hepmc generated by pythia8.
I guess that this might be related to the presence of the additional weight which are written in the hepmc.
Can you take a look?
Cheers,
Olivier
Attachments (1)
Change History (11)
follow-up: 2 comment:1 by , 8 years ago
by , 8 years ago
Attachment: | tag_1_pythia8_events.hepmc.gz added |
---|
comment:2 by , 8 years ago
Replying to pavel:
Please provide a small file that triggers this problem.
I attached the file. This is the output from MadGraph using Pythia8. I'm trying to then use it with Delphes and I get the error:
ERROR: invalid event format--------------------------------------] (0.00%)
################################################################ (100.00%)
Exiting...
follow-up: 4 comment:3 by , 8 years ago
Thanks for the file. However, Delphes reads it without any problem:
./DelphesHepMC cards/delphes_card_CMS.tcl test.root tag_1_pythia8_events.hepmc ... ** Reading tag_1_pythia8_events.hepmc ** [################################################################] (100.00%) ** Exiting...
Could it be that MadGraph runs Delphes with a wrong file or with some wrong command line arguments?
comment:4 by , 8 years ago
At this point I am completely at a loss. I don't understand why it doesn't work for me. On a fresh copy of OS X 10.11.6 I did the following:
- Installed Xcode (normal installation through app store)}}}
- After the install, launch and close app, then in terminal execute : xcode-select --install
- Homebrew:
- /usr/bin/ruby -e "$(curl –fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- Homebrew science:
- brew tap homebrew/science
- root6 (via homebrew)
- brew install root6
- MG5
- brew install wget wget https://launchpad.net/mg5amcnlo/2.0/2.5.x/+download/MG5_aMC_v2.5.2.tar.gz
- fastjet (via Homebrew)
- brew tap davidchall/hep b.brew install fastjet
- brew install automake autoconf libtool
- <MG_PATH>/bin/mg5_aMC
- install pythia8
- y
- install Delphes
- generate p p > t t~
- output test
- launch test
./DelphesHepMC cards/delphes_card_CMS.tcl delphes_output.root ../../PROCESS/test/Events/run_01/tag_1_pythia8_events.hepmc.gz ... ** Reading ../../PROCESS/test/Events/run_01/tag_1_pythia8_events.hepmc.gz ** ERROR: invalid PDF format----------------------------------------] (0.01%) ** [################################################################] (100.00%) ** Exiting...
- gunzip tag_1_pythia8_events.hepmc.gz
./DelphesHepMC cards/delphes_card_CMS.tcl delphes_output.root ../../PROCESS/test/Events/run_01/tag_1_pythia8_events.hepmc ... ** Reading ../../PROCESS/test/Events/run_01/tag_1_pythia8_events.hepmc ** ERROR: invalid event format--------------------------------------] (0.00%) ** [################################################################] (100.00%) ** Exiting...
comment:5 by , 8 years ago
Thanks for these additional details. Looks like MadGraph doesn't unpack tag_1_pythia8_events.hepmc.gz before running Delphes. The following command isn't correct:
./DelphesHepMC cards/delphes_card_CMS.tcl delphes_output.root ../../PROCESS/test/Events/run_01/tag_1_pythia8_events.hepmc.gz
The problem in 12 could be because of the Delphes version used by MadGraph. MadGraph currently uses Delphes 3.3.3. There was indeed a problem with long HepMC lines in that version. It's fixed in Delphes 3.4.0. I'll update the version used in MadGraph.
follow-up: 7 comment:6 by , 8 years ago
comment:7 by , 8 years ago
Great. I'm hoping I can get this resolved today:
MG5_aMC>install Delphes ... examples/Validation.cpp:200:3: warning: 'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'? [-Wmismatched-new-delete] delete new_bins; ^ [] examples/Validation.cpp:193:22: note: allocated with 'new[]' here Axis_t *new_bins = new Axis_t[bins + 1]; ^ examples/Validation.cpp:1459:31: error: variable length array of non-POD element type 'TGraphErrors' TGraphErrors gr_trkpi_res_pt[n_etabins], gr_trkpi_eff_pt[n_etabins], g... ^ examples/Validation.cpp:1462:44: error: variable length array of non-POD element type 'std::vector<resolPlot>' std::vector<resolPlot> plots_trkpi_res_pt[n_etabins], plots_trkpi_res_... ^ examples/Validation.cpp:1472:6: error: use of undeclared identifier 'gr_trkpi_eff_pt' gr_trkpi_eff_pt[k] = TGraphErrors(h_trkpi_eff_pt); ^ examples/Validation.cpp:1480:6: error: use of undeclared identifier 'gr_trkpi_eff_pt' gr_trkpi_eff_pt[k].SetName("trkEff_"+s_etaMin+"_"+s_etaMax); ^ examples/Validation.cpp:1483:37: error: use of undeclared identifier 'gr_trkpi_eff_pt' addResoGraph(mg_trkpi_eff_pt, &gr_trkpi_eff_pt[k], leg_trkpi_eff_pt... ^ examples/Validation.cpp:1489:33: error: use of undeclared identifier 'plots_trkpi_res_eta' HistogramsCollectionVsEta(&plots_trkpi_res_eta[k], etaMin, etaMax, ... ^ examples/Validation.cpp:1490:28: error: use of undeclared identifier 'plots_trkpi_res_eta' GetPtresVsEta<Track>(&plots_trkpi_res_eta[k], branchTrackPion, bran... ^ examples/Validation.cpp:1491:6: error: use of undeclared identifier 'gr_trkpi_res_eta' gr_trkpi_res_eta[k] = EresGraphVsEta(&plots_trkpi_res_eta[k]); ^ examples/Validation.cpp:1491:44: error: use of undeclared identifier 'plots_trkpi_res_eta' gr_trkpi_res_eta[k] = EresGraphVsEta(&plots_trkpi_res_eta[k]); ^ examples/Validation.cpp:1494:6: error: use of undeclared identifier 'gr_trkpi_eff_eta' gr_trkpi_eff_eta[k] = TGraphErrors(h_trkpi_eff_eta); ^ examples/Validation.cpp:1499:38: error: use of undeclared identifier 'gr_trkpi_res_eta' addResoGraph(mg_trkpi_res_eta, &gr_trkpi_res_eta[k], leg_trkpi_res_... ^ examples/Validation.cpp:1500:38: error: use of undeclared identifier 'gr_trkpi_eff_eta' addResoGraph(mg_trkpi_eff_eta, &gr_trkpi_eff_eta[k], leg_trkpi_eff_... ^ examples/Validation.cpp:1561:32: error: variable length array of non-POD element type 'TGraphErrors' TGraphErrors gr_trkele_res_pt[n_etabins], gr_trkele_eff_pt[n_etabins]... ^ examples/Validation.cpp:1564:45: error: variable length array of non-POD element type 'std::vector<resolPlot>' std::vector<resolPlot> plots_trkele_res_pt[n_etabins], plots_trkele_re... ^ examples/Validation.cpp:1574:6: error: use of undeclared identifier 'gr_trkele_eff_pt' gr_trkele_eff_pt[k] = TGraphErrors(h_trkele_eff_pt); ^ examples/Validation.cpp:1582:6: error: use of undeclared identifier 'gr_trkele_eff_pt' gr_trkele_eff_pt[k].SetName("trkEff_"+s_etaMin+"_"+s_etaMax); ^ examples/Validation.cpp:1585:38: error: use of undeclared identifier 'gr_trkele_eff_pt' addResoGraph(mg_trkele_eff_pt, &gr_trkele_eff_pt[k], leg_trkele_eff... ^ examples/Validation.cpp:1591:33: error: use of undeclared identifier 'plots_trkele_res_eta' HistogramsCollectionVsEta(&plots_trkele_res_eta[k], etaMin, etaMax... ^ examples/Validation.cpp:1592:28: error: use of undeclared identifier 'plots_trkele_res_eta' GetPtresVsEta<Track>(&plots_trkele_res_eta[k], branchTrackElectron... ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 3 warnings and 20 errors generated. make: *** [tmp/examples/Validation.o] Error 1 Error detected during the compilation. Please check the compilation error and run make manually.}}} "<MG_PATH>/Delphes/VERSION" read 3.4 after failed install.
follow-up: 9 comment:8 by , 8 years ago
Thanks for the test.
Validation.cpp in 3.4.0 can't be compiled using clang. We have a fixed version of Validation.cpp but it's not in a release.
As a quick solution, I've just updated Validation.cpp in the 3.4.0 .tar.gz files without creating any new release. Hopefully, the 'install Delphes' command should work again.
comment:10 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Thank you for confirming that this new patched version works. Closing this ticket.
Please provide a small file that triggers this problem.