Custom function in Selector script

I have two questions:

  1. I have a function that perform jet-electron overlap removal and fills histograms of etcone20 based on that. I have to call it multiple times in my analysis which I perform in a Selector script which runs on an ntuple. Is there any way to have access to the ntuple variables like:

from a user-added function in a Selector?

  1. What’s the best way to deal with lots of histograms? I am currently initializing and declaring 72 histograms manually and I feel like there has to be a better way of doing things.

Thanks

[quote]Is there any way to have access to the ntuple variables like:[/quote]It should be sufficient to make it member function of the selector.

[quote]What’s the best way to deal with lots of histograms?[/quote]That depends on how different they are from each other and in particular where does the name/title comes from. If there are very similar and the name came be derived from some counter you might be able to create them in a loop (and store them in a TObjArray or any other collection).

Philippe.