PGS, Delphes and ROOT

Hi,
I’m learning how to use ROOT for analysis purposes, and my current task is to reproduce an old result for a given simulation using PGS as the detector simulator. I wrote down a very simple code that works with a ROOT file generated using Delphes, but when I try to use it for my PGS file I get the following:

root [2] LNVAnalysis(0,1)
Warning in <TClass::Init>: no dictionary for class TRootEvent is available
Warning in <TClass::Init>: no dictionary for class TRootPhoton is available
Warning in <TClass::Init>: no dictionary for class TSortableObject is available
Warning in <TClass::Init>: no dictionary for class TRootElectron is available
Warning in <TClass::Init>: no dictionary for class TRootMuon is available
Warning in <TClass::Init>: no dictionary for class TRootTau is available
Warning in <TClass::Init>: no dictionary for class TRootJet is available
Warning in <TClass::Init>: no dictionary for class TRootMissingET is available

Total number of events: 4201
Total XS = 1 fb
Background type: 0
Unit weight: 0.000238039 fb

# of events after Sig Sel: 0  |  XS = 0 fb
# of events after 1st cut: 0  |  XS = 0 fb
# of events after 2nd cut: 0  |  XS = 0 fb
# of events after 3rd cut: 0  |  XS = 0 fb
# of events after 4th cut: 0  |  XS = 0 fb

Could you address me about how to solve this?

Thank you in advance,
Sebastian

Hi Sebastian,

you are missing the dictionaries for the classes listed in the warning messages. Is delphes installed on your system and environment variables such as LD_LIBRARY_PATH correctly set?
Cheers,
D

Hi Danilo,
Thank you so much for your answer. I have Delphes installed, and I think the environment variables are OK because when I run my code with a Delphes-generated ROOT file everything works fine, but I’m not sure. Do you need more information? Please let me know!

Best,
Sebastian

Hi Sebastian,

Please try to load the Delphes library before running your code. Does that help?

Axel.

Hi Axel,
I’m not sure if I’m doing it properly, but I have these lines in my code

#ifdef __CLING__
R__LOAD_LIBRARY(libDelphes)
#include "classes/DelphesClasses.h"
#include "external/ExRootAnalysis/ExRootTreeReader.h"
#include "external/ExRootAnalysis/ExRootResult.h"
#endif

as well as

gSystem->Load("libDelphes");

If this is right, then my problem remains.

Best,
Sebastian

As I found out,

comes from CMS’s ExRootAnalysis. Did you load their libraries?

Now - you might not even need that. What ROOT is telling you with these warnings is that the TFile you opened contains objects of a type it doesn’t know anything about. If you don’t care then ROOT doesn’t care either; and it would give you another error if you try to read these objects but ROOT fails.

So maybe just accept that these warnings exist, because you now know what they mean?

Axel.

Hi!
I guess you’re right… I can live with this.

Thank you so much,
Sebastian