Issues related to Delphes/ExRootAnalysis

Hi,

I am using Madgraph5+Pythia6+Delphes-3.2.0 and am attempting to run Example1 (included in post, provided by Delphes). There are a number of issues that I am having:

  1. Running a compiled Example1.cpp

I’ve tried using the binary as well as compiling, both versions ROOT 5.34 and 6.02. From what I can tell, the program is running normally (ExeROOT6.txt) using ROOT 6. However, no histograms are drawn. That is, nothing appears, not even an empty canvas. With ROOT5 I get:

./Example1 /Users/vincepascuzzi/sw/MG5_aMC_v2_2_3/MY_PROCS/sm_pp_wpwm/Events/run_01/wpwm_ATLAS_7TeV_delphes_events.root 
dyld: Symbol not found: _gInterpreterMutex
  Referenced from: /Users/vincepascuzzi/sw/MG5_aMC_v2_2_3/Delphes-3.2.0/./Example1
  Expected in: /Users/vincepascuzzi/sw/root/lib/libCore.so
 in /Users/vincepascuzzi/sw/MG5_aMC_v2_2_3/Delphes-3.2.0/./Example1
Trace/BPT trap: 5
  1. Running Example1.C as a macro

I’ve tried using the binary as well as compiling, both versions ROOT 5.34 and 6.02. In version < 6 the Delphes library would not load:

root [0] .x /Users/vincepascuzzi/sw/MG5_aMC_v2_2_3/Delphes-3.2.0/examples/Example1.C("/Users/vincepascuzzi/sw/MG5_aMC_v2_2_3/MY_PROCS/sm_pp_wpwm/Events/run_01/wpwm_ATLAS_7TeV_delphes_events.root")
dlopen error: dlopen(/Users/vincepascuzzi/sw/MG5_aMC_v2_2_3/Delphes-3.2.0/libDelphes.so, 9): Symbol not found: _gInterpreterMutex
  Referenced from: /Users/vincepascuzzi/sw/MG5_aMC_v2_2_3/Delphes-3.2.0/libDelphes.so
  Expected in: /Users/vincepascuzzi/sw/root/lib/libCore.so
 in /Users/vincepascuzzi/sw/MG5_aMC_v2_2_3/Delphes-3.2.0/libDelphes.so
Load Error: Failed to load Dynamic link library /Users/vincepascuzzi/sw/MG5_aMC_v2_2_3/Delphes-3.2.0/libDelphes.so
Warning: Return value of void Example1() ignored /Users/vincepascuzzi/sw/MG5_aMC_v2_2_3/Delphes-3.2.0/examples/Example1.C:16:

The errors trying version 6 are:

root [0] .x /Users/vincepascuzzi/sw/MG5_aMC_v2_2_3/Delphes-3.2.0/examples/Example1.C("/Users/vincepascuzzi/sw/MG5_aMC_v2_2_3/MY_PROCS/sm_pp_wpwm/Events/run_01/wpwm_ATLAS_7TeV_delphes_events.root")
In file included from input_line_24:1:
/Users/vincepascuzzi/sw/MG5_aMC_v2_2_3/Delphes-3.2.0/examples/Example1.C:23:3: error: unknown type
      name 'ExRootTreeReader'
  ExRootTreeReader *treeReader = new ExRootTreeReader(&chain);
  ^
/Users/vincepascuzzi/sw/MG5_aMC_v2_2_3/Delphes-3.2.0/examples/Example1.C:23:38: error: unknown type
      name 'ExRootTreeReader'
  ExRootTreeReader *treeReader = new ExRootTreeReader(&chain);
                                     ^
/Users/vincepascuzzi/sw/MG5_aMC_v2_2_3/Delphes-3.2.0/examples/Example1.C:44:7: error: unknown type
      name 'Jet'
      Jet *jet = (Jet*) branchJet->At(0);
      ^
/Users/vincepascuzzi/sw/MG5_aMC_v2_2_3/Delphes-3.2.0/examples/Example1.C:44:19: error: use of
      undeclared identifier 'Jet'
      Jet *jet = (Jet*) branchJet->At(0);
                  ^
/Users/vincepascuzzi/sw/MG5_aMC_v2_2_3/Delphes-3.2.0/examples/Example1.C:44:23: error: expected
      expression
      Jet *jet = (Jet*) branchJet->At(0);
                      ^
/Users/vincepascuzzi/sw/MG5_aMC_v2_2_3/Delphes-3.2.0/examples/Example1.C:53:5: error: unknown type
      name 'Electron'
    Electron *elec1, *elec2;
    ^
/Users/vincepascuzzi/sw/MG5_aMC_v2_2_3/Delphes-3.2.0/examples/Example1.C:59:16: error: use of
      undeclared identifier 'Electron'
      elec1 = (Electron *) branchElectron->At(0);
               ^
/Users/vincepascuzzi/sw/MG5_aMC_v2_2_3/Delphes-3.2.0/examples/Example1.C:59:26: error: expected
      expression
      elec1 = (Electron *) branchElectron->At(0);
                         ^
/Users/vincepascuzzi/sw/MG5_aMC_v2_2_3/Delphes-3.2.0/examples/Example1.C:60:7: error: use of
      undeclared identifier 'elec2'
      elec2 = (Electron *) branchElectron->At(1);
      ^
/Users/vincepascuzzi/sw/MG5_aMC_v2_2_3/Delphes-3.2.0/examples/Example1.C:60:16: error: use of
      undeclared identifier 'Electron'
      elec2 = (Electron *) branchElectron->At(1);
               ^
/Users/vincepascuzzi/sw/MG5_aMC_v2_2_3/Delphes-3.2.0/examples/Example1.C:60:26: error: expected
      expression
      elec2 = (Electron *) branchElectron->At(1);
                         ^
/Users/vincepascuzzi/sw/MG5_aMC_v2_2_3/Delphes-3.2.0/examples/Example1.C:63:40: error: use of
      undeclared identifier 'elec2'
      histMass->Fill(((elec1->P4()) + (elec2->P4())).M());

I’ve tried setting include directories from within ROOT using gROOT->ProcessLine(".include …") to no avail. When I add the following:

#include <classes/DelphesClasses.h>
#include <external/ExRootAnalysis/ExRootTreeReader.h>

when running from Delphes directory, and get another error:

root [0] .x /Users/vincepascuzzi/sw/MG5_aMC_v2_2_3/Delphes-3.2.0/examples/Example1.C("/Users/vincepascuzzi/sw/MG5_aMC_v2_2_3/MY_PROCS/sm_pp_wpwm/Events/run_01/wpwm_ATLAS_7TeV_delphes_events.root")
IncrementalExecutor::executeFunction: symbol '_ZN16ExRootTreeReader9ReadEntryEx' unresolved while linking function'_Z15__cling_Un1Qu30Pv'!
IncrementalExecutor::executeFunction: symbol '_ZN16ExRootTreeReader9UseBranchEPKc' unresolved while linking function'_Z15__cling_Un1Qu30Pv'!
IncrementalExecutor::executeFunction: symbol '_ZN16ExRootTreeReaderC1EP5TTree' unresolved while linking function'_Z15__cling_Un1Qu30Pv'!
IncrementalExecutor::executeFunction: symbol '_ZN8Electron2P4Ev' unresolved while linking function'_Z15__cling_Un1Qu30Pv'!

I am on OS X 10.10.2. My environment is in env.txt. Please let me know if there is any additional information I can provide.

Thank you in advance,

Vince.
Example1.C (1.96 KB)
Example1.cpp (2.2 KB)
env.txt (1.94 KB)

Hi,

I tried to compile delphes to reproduce these errors: I failed - tcl does not build on Kubuntu14 with clang 36 (error: invalid argument ‘-std=c++11’ not allowed with ‘C/ObjC’). Any suggestion to move forward apart from changing the cmake configuration?

Coming to your issue, it is a bit hard to understand what is going on from the errors you post.
Two general suggestions about root6 could be:

  1. Set the ROOT_INCLUDE_PATH to the delphes includes.
  2. Make sure rootmaps are properly created and in the LD_LIBRARY_PATH in order for ROOT to load the approriate libraries

Cheers,
Danilo

By the way, with gcc49 one finds scary warnings like, even if I cannot judge if this could possibly ever affect the physics

Delphes/delphes/classes/DelphesStream.cc:94:31: warning: comparison of constant -9223372036854775808 with expression of type 'int' is always false [-Wtautological-constant-out-of-range-compare]
    if(fFirstLongMin && value == (-9223372036854775807L -1L)) 

Hi Danilo,

I’d suggest to build Delphes without using cmake.

The recommended commands to build it are
wget cp3.irmp.ucl.ac.be/downloads/Del … 2.0.tar.gz
tar -zxf Delphes-3.2.0.tar.gz
cd Delphes-3.2.0
make -j 4

Cheers,

Pavel

Example1.C in Delphes relies on the ‘gSystem->Load(“libEvent”); Event* e = new Event();’ feature of the ROOT 5 CLI.

According to

root.cern.ch/drupal/content/way-root-6

this feature is not supported in the ROOT 6 CLI.

So, we’ll need to adapt all the Delphes interpreted examples to ROOT 6.

All the compiled code works fine with ROOT 6.

Hi Pawel,

thanks for the instructions: I did not follow the instructions and just used CMake once I saw CMakeLists :frowning:
What you say is true: ROOT6 does not support yet dynamic scopes fully, i.e. it is not possible to load at runtime a library and have the names of its symbols available for the interpreter.
The way in which many users accomplished the transition to ROOT6 is using rootmap files. The interpreter is able to autoload the necessary libraries with those while inspecting the macro. Is the rootmap file created for libevent? If not you can easily produce one adding these commands to the rootcint/cling invocation for creating the dictionary: "-rml libEvent.so -rmf libEvent.rootmap"
The file produced is in ASCII format and should reside where libEvent.so is located (technically it is enough for it to be in the LD_LIBRARY_PATH).

Cheers,
Danilo

As I mentiond in my original post, compiling Example1.cpp runs, but no histograms are drawn (nothing shows up at all). Output says default canvas drawn but ROOT doesn’t even launch a canvas nor draws anything.

Can you provide the input file you are using for Example1?

As I’ve already explained in the comments to your Delphes ticket:

cp3.irmp.ucl.ac.be/projects/delphes/ticket/444

The only purpose of the compiled Example1 is to demonstrate how to convert an existing ROOT macro (Example1.C) to an executable. This example was created to answer a question from a different ticket.

If you want it to show canvas, it should be modified.

Danilo,

Thanks for the hint about the rootmap files. I did not know about them and I’ll try to add them to Delphes.

Could you point me to some documentation/examples on how to use them? With Google, I’ve only found the following forum thread:

root.cern.ch/root/roottalk/roottalk10/0034.html

This forum thread mentions a command called rlibmap but this command does not seem to be included with some of the prebuilt ROOT binaries. For example, it’s not available in root_v6.02.05.macosx64-10.10-i386.tar.gz

Cheers,

Pavel

Hi!
In order to solve this puzzle you just have to do the following steps. just copy the files and paste in the root include directory “/home/youpath/root/include”
The files you have to paste are these:
ExRootTreeReader.h from the directory of “/home/youpath/work/MG5_aMC_v2_7_2/ExRootAnalysis/ExRootAnalysis”
and the other two files are: DelphesClasses.h and SortableObject.h from the directory
“/home/youpath/work/MG5_aMC_v2_7_2/Delphes/classes”.
And just write these header files in your program
#include <DelphesClasses.h>
#include <ExRootTreeReader.h>