TEfficiency , hadd, Merge/Combine for MC samples

Hi all,

I would like to use TEfficiency objects in my analysis as these work nicely with ROOT’s hadd.

Let’s suppose I have various DiHiggs MC samples for different processes (gluon gluon fusion, Vector Boson Fusion) etc. Would hadd then be the correct macro to use?

In this example of TEfficiency’s class description, it is stated that If you use cuts to select electrons which can originate from two different processes,... , i should be using combined efficiency. I am not entirely sure if hadd supports the ::Combine() method, as I’ve only seen the ::Merge() method being utilized in the script.
In the end, is it correct to use hadd for samples of different physics processes?

Secondly, there is a type of Efficiency called (sometimes) Relative, which can be defined as :
Events passed by the cut with respect to the previous cuts / Total events passed by the previous cut,
e.g. for a cut-i in the analysis :
N_events(pass_i AND pass_i-1 AND … AND pass_0) / N_events (pass_i-1 AND … AND pass_0)

So each cut-i would be represented by this bin. I basically do :

    eff->SetTotalEvents(bin of cut i,Events passed by cut i-1);
    eff->SetPassedEvents(bin of cut i,Events passed by cut i);

But I am not sure if the efficiency calculation with hadd produces the correct overall efficiency.

Thank you in advance for your time.

Hi @smeriano ,

At the general level, you are right in that hadd Merges objects, I don’t think it calls Combine in any case. If you need that, I believe you must be doing it programmatically (i.e. in a custom program).

I will let @pcanal or @couet add more to this or correct me in case I’m missing something.

Cheers,
Vincenzo

Hi @vpadulan !

I got some feedback and in general it’s not needed to hadd files of different physics processes, as it would complicate things. But it’s more of a general question, so If anyone wants to answer feel free to do so :slight_smile:

Hi,

If you want to combine MC samples of the same process, then it is correct to use hadd, which uses internally TEfficiency::Merge to get the total efficiency. In this case a simple addition of the total and the passed histograms used to compute the efficiency is performed.
If you want to combine efficiencies from different processes, which with its own weight, then the correct thing to do is to use TEfficiency::Combine, as it is documented in the TEfficiency class description.

For the relative efficiency, what you are doing is correct, and you cannot use hadd also in this case if they represent different processes.

Lorenzo

Thank you @moneta ! I just wanted to make sure I understand the documentation.

Have a good day!

~ Spyros

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