# Madanalysis not working with interference events

Hello,

I'm trying to use MA5 to recast a search using an event file I generated with MadGraph with a model featuring an extra vector-like quark T:

define tt = t t~

define bb = b b~

define W = w+ w-

generate p p > W bb j / bp x y QED^2==4 VLQ^2==2

It represents the interference term between the signal and the SM background and sometime gives negative cross section. I'm interested in the influence of the cuts on the events so I fed MA5 with my event file giving a cross section equal to 1 to prevent having problems with the negative cross section, and I want to get the efficiency after the cuts. Yet MA5 crashes and gives me this error message:

+------

| LogReport-Warning |

+------

| Message NIterations @ File Line |

|------

| Filling an histogram with not all SRs surviv 16 RegionSelection

+------

* Goodbye.

MA5: Restoring the PAD located in /home/soton/

MA5: Compiling the PAD located in /home/soton/

MA5: How many cores for the compiling? default = max = 12

MA5: => Number of cores used for the compilation = 12

MA5: Calculation of the exclusion CLs

Traceback (most recent call last):

File "./bin/ma5", line 70, in <module>

madanalysis

File "/home/

repeat = MainSession(

File "/home/

interpreter

File "/apps/

stop = self.onecmd(line)

File "/apps/

return func(arg)

File "/home/

self.

File "/home/

return self.do_

File "/home/

if not self.submit(

File "/home/

if not Recaster.

File "/home/

if not self.analysis_

File "/home/

if not self.compute_

File "/home/

self.

File "/home/

stat = (math.sqrt(

ValueError: math domain error

I still get the cutflow that I checked but I am surprised by the results

"Initial number of events" #

3823 6177 # nentries

8.133012e-05 -1.314089e-04 # sum of weights

1.730209e-12 2.795579e-12 # sum of weights^2

</InitialCounter>

<Counter>

"1 electron with pT>40 and eta<2.1"# 1st cut

159 269 # nentries

3.382550e-06 -5.722679e-06 # sum of weights

7.196003e-14 1.217437e-13 # sum of weights^2

</Counter>

[...]

<Counter>

"ST > 500 GeV" # 9st cut

3 5 # nentries

6.382170e-08 -1.063695e-07 # sum of weights

1.357736e-15 2.262894e-15 # sum of weights^2

I am used to have all the events in the first column of the cutflow, and not split between the two first column, what does that mean? Also can I simply add the number of events remaining (here 3+5=8) and divide them by the initial number of events (here 10k) to obtain the efficiency?

Best,

Hugo Prager

## Question information

- Language:
- English Edit question

- Status:
- Answered

- Assignee:
- No assignee Edit question

- Last query:
- 2018-05-04

- Last reply:
- 2018-05-04

Benjamin Fuks (fuks) said : | #1 |

Hi Hugo,

The crash comes from the fact that the total number of events is negative. The statistics module has never been planned to handle this.

The two columns in the cutflow table respectively correspond to the contribution of the positively-weighted events and the negatively-weighted events. When one sums these two numbers, we have a total negative number of events.

Regards,

Benjamin

> On 3 May 2018, at 17:12 , hprager <email address hidden> wrote:

>

> New question #668556 on MadAnalysis 5:

> https:/

>

> Hello,

>

> I'm trying to use MA5 to recast a search using an event file I generated with MadGraph with a model featuring an extra vector-like quark T:

>

> define tt = t t~

> define bb = b b~

> define W = w+ w-

> generate p p > W bb j / bp x y QED^2==4 VLQ^2==2

>

> It represents the interference term between the signal and the SM background and sometime gives negative cross section. I'm interested in the influence of the cuts on the events so I fed MA5 with my event file giving a cross section equal to 1 to prevent having problems with the negative cross section, and I want to get the efficiency after the cuts. Yet MA5 crashes and gives me this error message:

>

>

> +------

> | LogReport-Warning |

> +------

> | Message NIterations @ File Line |

> |------

> | Filling an histogram with not all SRs surviv 16 RegionSelection

> +------

> * Goodbye.

> MA5: Restoring the PAD located in /home/soton/

> MA5: Compiling the PAD located in /home/soton/

> MA5: How many cores for the compiling? default = max = 12

> MA5: => Number of cores used for the compilation = 12

> MA5: Calculation of the exclusion CLs

> Traceback (most recent call last):

> File "./bin/ma5", line 70, in <module>

> madanalysis.

> File "/home/

> repeat = MainSession(

> File "/home/

> interpreter.

> File "/apps/

> stop = self.onecmd(line)

> File "/apps/

> return func(arg)

> File "/home/

> self.cmd_

> File "/home/

> return self.do_

> File "/home/

> if not self.submit(

> File "/home/

> if not Recaster.

> File "/home/

> if not self.analysis_

> File "/home/

> if not self.compute_

> File "/home/

> self.write_

> File "/home/

> stat = (math.sqrt(

> ValueError: math domain error

>

> I still get the cutflow that I checked but I am surprised by the results

>

> "Initial number of events" #

> 3823 6177 # nentries

> 8.133012e-05 -1.314089e-04 # sum of weights

> 1.730209e-12 2.795579e-12 # sum of weights^2

> </InitialCounter>

>

> <Counter>

> "1 electron with pT>40 and eta<2.1"# 1st cut

> 159 269 # nentries

> 3.382550e-06 -5.722679e-06 # sum of weights

> 7.196003e-14 1.217437e-13 # sum of weights^2

> </Counter>

>

> [...]

>

> <Counter>

> "ST > 500 GeV" # 9st cut

> 3 5 # nentries

> 6.382170e-08 -1.063695e-07 # sum of weights

> 1.357736e-15 2.262894e-15 # sum of weights^2

>

>

> I am used to have all the events in the first column of the cutflow, and not split between the two first column, what does that mean? Also can I simply add the number of events remaining (here 3+5=8) and divide them by the initial number of events (here 10k) to obtain the efficiency?

>

> Best,

> Hugo Prager

>

> --

> You received this question notification because you are an answer

> contact for MadAnalysis 5.

>

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

Thanks for your answer. Then does is make sense to add the number of positive and negative events remaining after the cuts to get a selection efficiency?

Benjamin Fuks (fuks) said : | #3 |

Hi Hugo,

This is what needs to be done. Positive and negative weigths must be summed to get the full number of events. In your case, this sum is negative, which leads to the crash.

Cheers,

B>

> On 4 May 2018, at 15:27 , hprager <email address hidden> wrote:

>

> Question #668556 on MadAnalysis 5 changed:

> https:/

>

> Status: Answered => Open

>

> hprager is still having a problem:

> Thanks for your answer. Then does is make sense to add the number of

> positive and negative events remaining after the cuts to get a selection

> efficiency?

>

> --

> You received this question notification because you are an answer

> contact for MadAnalysis 5.

>

## Can you help with this problem?

Provide an answer of your own, or ask hprager for more information if necessary.