Fork me on GitHub

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)

tag_1_pythia8_events.hepmc.gz (6.9 MB ) - added by Blake 8 years ago.

Change History (11)

comment:1 by Pavel Demin, 8 years ago

Please provide a small file that triggers this problem.

by Blake, 8 years ago

in reply to:  1 comment:2 by Blake, 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...
Last edited 8 years ago by Pavel Demin (previous) (diff)

comment:3 by Pavel Demin, 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?

Last edited 8 years ago by Pavel Demin (previous) (diff)

in reply to:  3 comment:4 by Blake, 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:

  1. Installed Xcode (normal installation through app store)}}}
    1. After the install, launch and close app, then in terminal execute : xcode-select --install
  2. Homebrew:
    1. /usr/bin/ruby -e "$(curl –fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  3. Homebrew science:
    1. brew tap homebrew/science
  4. root6 (via homebrew)
    1. brew install root6
  5. MG5
    1. brew install wget wget https://launchpad.net/mg5amcnlo/2.0/2.5.x/+download/MG5_aMC_v2.5.2.tar.gz
  6. fastjet (via Homebrew)
    1. brew tap davidchall/hep b.brew install fastjet
  7. brew install automake autoconf libtool
  8. <MG_PATH>/bin/mg5_aMC
    1. install pythia8
    2. y
    3. install Delphes
  9. generate p p > t t~
  10. output test
  11. 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...
    
  1. 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...
    
Last edited 8 years ago by Blake (previous) (diff)

comment:5 by Pavel Demin, 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.

Last edited 8 years ago by Pavel Demin (previous) (diff)

comment:6 by Pavel Demin, 8 years ago

I've updated the version used in MadGraph. The 'install Delphes' command in MadGraph should now install Delphes 3.4.0.

in reply to:  6 comment:7 by Blake, 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.
Last edited 8 years ago by Blake (previous) (diff)

comment:8 by Pavel Demin, 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.

in reply to:  8 comment:9 by Blake, 8 years ago

Thank you pavel! Everything is working swimmingly now.

comment:10 by Pavel Demin, 8 years ago

Resolution: fixed
Status: newclosed

Thank you for confirming that this new patched version works. Closing this ticket.

Note: See TracTickets for help on using tickets.