# How to change the normalization of a histogram such that its area is equal to the total cross section?

Dear MadAnalysis experts,

I would like to know is it possible to rescale a histogram in MadAnalysis (in the user-friendly mode)

in such a way that the area of the histogram becomes equal to the total cross section.

For example I create a pT histogram (using MadGraph events),

so I type plot PT(jet) 100 10 100 and I then I would like to get the total cross section in the cell called Integral in my PDF report, or in other words I want to rescale the histogram in such a way that a sum bin width times bin height over the histogram gives me a total cross section.

I tried to change normalization using main set.lumi and <set>.xsection = <value> but it doesn't do exactly what I want.

I also written a simple python script which runs through a histogram data produced by MadAnalysis and rescales everything the way I need, but I wonder is there a possibility to do it from the MadAnalysis command line?

Thank you!

With best regards,

Oleh

## Question information

- Language:
- English Edit question

- Status:
- Solved

- Assignee:
- No assignee Edit question

- Solved by:
- oleh

- Solved:
- 2018-02-01

- Last query:
- 2018-02-01

- Last reply:
- 2018-01-31

Benjamin Fuks (fuks) said : | #1 |

Dear Oleh,

You can change the total rate of the sample (set datasetname.

Cheers,

Benjamin

> On 30 Jan 2018, at 13:42 , oleh <email address hidden> wrote:

>

> New question #663842 on MadAnalysis 5:

> https:/

>

> Dear MadAnalysis experts,

>

> I would like to know is it possible to rescale a histogram in MadAnalysis (in the user-friendly mode)

> in such a way that the area of the histogram becomes equal to the total cross section.

>

> For example I create a pT histogram (using MadGraph events),

> so I type plot PT(jet) 100 10 100 and I then I would like to get the total cross section in the cell called Integral in my PDF report, or in other words I want to rescale the histogram in such a way that a sum bin width times bin height over the histogram gives me a total cross section.

>

> I tried to change normalization using main set.lumi and <set>.xsection = <value> but it doesn't do exactly what I want.

>

> I also written a simple python script which runs through a histogram data produced by MadAnalysis and rescales everything the way I need, but I wonder is there a possibility to do it from the MadAnalysis command line?

>

> Thank you!

>

> With best regards,

> Oleh

>

>

> --

> You received this question notification because you are an answer

> contact for MadAnalysis 5.

oleh (fedkevych) said : | #2 |

Dear Benjamin,

many thanks for finding time to answer my question.

Indeed I had to play around more and change both parameters properly.

Sorry for bothering.

With best regards,

Oleh