Home | News | Documentation | Download

Copying variables from Delphes ROOT files to new ROOT files


Please read tips for efficient and successful posting and posting code

ROOT Version: 6.14/04
Platform: Ubuntu v16.04.12
Compiler: gcc v5.4.0


Hi,
I want to copy some variables and combinations of variables from a Delphes output file to a new ROOT file. But the problem is with the branches with some events. Like for some events electrons are absent or photons are absent. So, in that case, it is basically retaining the value from the previous event and so copying the same value to subsequent empty events. Is there a way to fix it like we do for ASCII files with NaN. Is there any analogue to NaN in ROOT that I may use?

The same question I asked earlier, but that wasn’t solved. But some way I had found to work with the Delphes output itself in TMVA. But in this case, it’s not possible and so it’s critically required to somehow copy the variables. The link to the previous post is below.

Can somebody help me out of this situation?

I am attaching two of my macros here. But none worked.
NewDelphes1.C (3.5 KB)
NewDelphes.C (4.1 KB)

Regards,
Saumyen

Hi,

In the end what you store in each branch is some C++ type, so you need to provide some value for that type. I am not aware of any mechanism for a branch to have “no value” for some of the entries. @pcanal any idea here?

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.