# PGS, Delphes and ROOT

**URL:** <https://root-forum.cern.ch/t/pgs-delphes-and-root/31371>\
**Category:** Newbie\
**Created:** [October 31, 2018, 12:03am UTC](https://root-forum.cern.ch/t/pgs-delphes-and-root/31371 "2018-10-31T00:03:39Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![surrutiaquir](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/s/ea666f/32.png) [@surrutiaquir](https://root-forum.cern.ch/u/surrutiaquir)\
**Post date:** [October 31, 2018, 12:03am UTC](https://root-forum.cern.ch/t/pgs-delphes-and-root/31371/1 "2018-10-31T00:03:39Z")

</div>

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:

```auto
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

---

<div class="post-metadata">

**Author:** ![Danilo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/danilo/32/34528_2.png) [@Danilo](https://root-forum.cern.ch/u/Danilo)\
**Post date:** [October 31, 2018, 10:03am UTC](https://root-forum.cern.ch/t/pgs-delphes-and-root/31371/2 "2018-10-31T10:03:40Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![surrutiaquir](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/s/ea666f/32.png) [@surrutiaquir](https://root-forum.cern.ch/u/surrutiaquir)\
**Post date:** [October 31, 2018, 2:54pm UTC](https://root-forum.cern.ch/t/pgs-delphes-and-root/31371/3 "2018-10-31T14:54:27Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Axel](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/axel/32/11084_2.png) [@Axel](https://root-forum.cern.ch/u/Axel)\
**Post date:** [November 1, 2018, 8:58am UTC](https://root-forum.cern.ch/t/pgs-delphes-and-root/31371/4 "2018-11-01T08:58:18Z")

</div>

Hi Sebastian,

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

Axel.

---

<div class="post-metadata">

**Author:** ![surrutiaquir](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/s/ea666f/32.png) [@surrutiaquir](https://root-forum.cern.ch/u/surrutiaquir)\
**Post date:** [November 1, 2018, 2:51pm UTC](https://root-forum.cern.ch/t/pgs-delphes-and-root/31371/5 "2018-11-01T14:51:22Z")

</div>

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

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

```

as well as

```auto
gSystem->Load("libDelphes");

```

If this is right, then my problem remains.

Best,  
Sebastian

---

<div class="post-metadata">

**Author:** ![Axel](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/axel/32/11084_2.png) [@Axel](https://root-forum.cern.ch/u/Axel)\
**Post date:** [November 2, 2018, 8:58am UTC](https://root-forum.cern.ch/t/pgs-delphes-and-root/31371/6 "2018-11-02T08:58:15Z")

</div>

As I found out,

> [@surrutiaquir](#):
>
> no dictionary for class TRootEvent is available

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.

---

<div class="post-metadata">

**Author:** ![surrutiaquir](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/s/ea666f/32.png) [@surrutiaquir](https://root-forum.cern.ch/u/surrutiaquir)\
**Post date:** [November 5, 2018, 10:07pm UTC](https://root-forum.cern.ch/t/pgs-delphes-and-root/31371/7 "2018-11-05T22:07:50Z")

</div>

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

Thank you so much,  
Sebastian
