Can I create an ElectronContainer in PyROOT?

Dear experts,

I am working with an AOD-file (in ARA) that has e.g. an ElectronContainer. Can I make my own ElectronContainer in ROOT? That is, I want to create a new container that includes only a subset of the original ElectronContainer. How should I do this, and where can I find information about it?

I tried to do in python something like this:

def GetElectrons(El):
 els=ROOT.ElectronContainer

    for el in El:
        if ( el.author()==1 or el.author==3 and \
             (el.isem() & ROOT.egammaPID.ElectronMedium) == 0):
            
            els.Add(el)     

where El is already an ElectronContainer from the AOD.

This is obviously wrong since I get:

Thanks
Maiken

Hi,

‘ElectronContainer’ is not a ROOT classes (but rather it seems to be an experiment specific class) and you seems to simply be using the wrong interface for it. I suggest you contact its developer for more information on how to use ElectronContainer.

Cheers,
Philippe.

Thank you, this was my suspicion…

Maiken

use the class TEntryList, see: root.cern.ch/root/html/TEntryList.html

Rene

Thank you very much,

Maiken