# Problem with lepton isolation

Hello,

I am trying to implement this analysis in MA5_v1.6beta: https:/

To obtain the requited isolated electron I use the following function

double relIsolatione = PHYSICS-

which gives the same results than

double relIsolatione = PHYSICS-

but it doesn't seem to work properly.

For example for one event I get

pTe = 127.209

relIsolatione = 0.00820042

which mean that the electron is isolated, but then later when I check if the electron is separated from jets with pT > 40 I see

pTe = 127.209

pTj = 134.985

dr = 0.00468496

which means that there's a heavy jet (pTj = 135 > pTe = 127) which is really close to the electron (dr = 0.00468496). Then I shouldn't have a value of relIsolatione so small in the first place, it should even be larger than 1. It seems that this jet is not considered in the calculation of relIsolatione, is it because I'm not using the adequate function?

I also tried using

relIsolatione = PHYSICS-

relIsolatione2 = PHYSICS-

relIsolatione3 = PHYSICS-

without any success. Here are some of the values I get for these three quantities for several electrons:

0.00692539

-0.0017438

0.998256

1.66236

1.65855

3.50103

0

0

1.04115

1.55794

1.55794

5.40572

20.2684

20.2684

25.1465

0

-0.00130479

0.998695

So relIsolatione and relIsolatione2 are always similar (if not equal), and I assume that the negative value, which are always very small are just due to numerical problems. I also see that relIsolatione3 is always larger than relIsolatione2 + 1, which makes me think that the pT of the electron and some other particles (which ones?) are included in the sum with this function.

Does it mean I am not using the right function? The only documentation I found about it is this pdf

http://

Is there a manual where all these functions are detailed?

Cheers,

Hugo

PS: It seems someone had a similar problem here: https:/

## Question information

- Language:
- English Edit question

- Status:
- Solved

- Assignee:
- No assignee Edit question

- Solved by:
- Benjamin Fuks

- Solved:
- 2018-01-29

- Last query:
- 2018-01-29

- Last reply:
- 2018-01-26

Benjamin Fuks (fuks) said : | #1 |

Hi Hugo,

> To obtain the requited isolated electron I use the following function

> double relIsolatione = PHYSICS-

> which gives the same results than

> double relIsolatione = PHYSICS-

> but it doesn't seem to work properly.

Those two indeed give the same result. You can check their implementation in the file tools/SampleAna

> For example for one event I get

> pTe = 127.209

> relIsolatione = 0.00820042

> which mean that the electron is isolated, but then later when I check if the electron is separated from jets with pT > 40 I see

> pTe = 127.209

> pTj = 134.985

> dr = 0.00468496

>

> which means that there's a heavy jet (pTj = 135 > pTe = 127) which is really close to the electron (dr = 0.00468496). Then I shouldn't have a value of relIsolatione so small in the first place, it should even be larger than 1. It seems that this jet is not considered in the calculation of relIsolatione, is it because I'm not using the adequate function?

The conclusion is wrong. Those consist in the same particle. Any electron present in the electron collection is also present in the jet collection (this is a feature). Once your electron collection is defined, you need to remove the overlap with the jet collection before doing anything else.

>

> Does it mean I am not using the right function? The only documentation I found about it is this pdf

> http://

> Is there a manual where all these functions are detailed?

We are finalizing somethingâ€¦ Nothing else at the moment, sorry.

Cheers,

Benj

hprager (prager-hugo) said : | #2 |

Hi Benjamin,

Thank you for your answer, that solves my problem!

Cheers,

Hugo

hprager (prager-hugo) said : | #3 |

Thanks Benjamin Fuks, that solved my question.