# weighting events properly in multiple-sample

Dear MG-Team:

Consider the simple problem,

I want to model a pt distribution of a given final particle (i.e it behaves, as many other observables, 1/pT) and I want the larger pt bins to have a statiscal error as small as lower pt bins have (so, I want the full distribution to have a similar statistical error in the full pt range). I had done this kind of study using pythia, in that case I cut on a few space paramente (let say transfer P_T in the parton interaction, pT_hard) and generate a few samples of events (10<PT_hard<50, pT_hard>50, PT_hard>100) not having the same number of events each. The issue is that in Pythia I had three final global parameters of the simulation: x-section of each sample (sigma), the tried parton configurations (ntrials) and the successes (the amplirtude of the sample I wanted, the nevents in the MG run_card). Then observable distribution for each sample needed to be weigthed before summation. In pythia's case the weight factor

sigma/ntrials

in such a way the histograms look smooth and independent of the successes asked por each sample. And this the point, in the results I get in MG simulation from unweightedevents root files the ntrials is never stored, just the success (even the weight in the tree is the average value of the x-section of succeses). So when I tried to add up al my samples in the final analysis I get the typical bumps in the distributions at the cuts I set if I cut on a given final P_T, which tells me I am making the weighting process wrong.

This is a quetsion actually for the ExRootAnalysis part but it spread from parton simulation to expermiental observables. The issue is the following:

1- How to properly weight observable distributions when adding diffrent samples of a given reaction?

I know the question looks simple but I can not figure out how to get it work properly with MG or at least find the suited explanation for weighting process in MG. Probably I am missing something .

any help is welcome and thanks in advance ,

arian

## Question information

- Language:
- English Edit question

- Status:
- Solved

- Assignee:
- No assignee Edit question

- Solved by:
- Arian Abrahantes

- Solved:
- 2012-01-16

- Last query:
- 2012-01-16

- Last reply:
- 2012-01-15

Hi,

so let_fix convention first,

10<PT_hard<50, this corresponds to a cross section noted xs_10 and

correspond to sample 1 with N_1 un-weighted event

pT_hard>50, this corresponds to a cross section noted xs_50 and

correspond to sample 2 with N_2 un-weighted event

PT_hard>100)this corresponds to a cross section noted xs_100 and

correspond to sample 3 with N_3 un-weighted event

In general the weight should be

XS / N

But here you have an overlap between the sample 2 and 3 that you need

to take into account

so the weight for the samples are

sample 1 : xs_10 / N1

sample 2 (if pt<100): xs_50 / N2 (nothing weird here, except that the

weight is valid only for pt<100)

sample 2 (if pt>100): xs_100 / (N3 + xs_100/xs_50 * N2)

sample 3 : xs_100 / (N3 + xs_100/xs_50 * N2)

(N3 + xs_100/xs_50 * N2) corresponds to the number of events generated

above pt>100.

Cheers,

Olivier

On 15-janv.-12, at 14:15, Arian Abrahantes wrote:

> New question #184781 on MadGraph5:

> https:/

>

> Dear MG-Team:

>

> Consider the simple problem,

>

> I want to model a pt distribution of a given final particle (i.e it

> behaves, as many other observables, 1/pT) and I want the larger pt

> bins to have a statiscal error as small as lower pt bins have (so, I

> want the full distribution to have a similar statistical error in

> the full pt range). I had done this kind of study using pythia, in

> that case I cut on a few space paramente (let say transfer P_T in

> the parton interaction, pT_hard) and generate a few samples of

> events (10<PT_hard<50, pT_hard>50, PT_hard>100) not having the same

> number of events each. The issue is that in Pythia I had three final

> global parameters of the simulation: x-section of each sample

> (sigma), the tried parton configurations (ntrials) and the successes

> (the amplirtude of the sample I wanted, the nevents in the MG

> run_card). Then observable distribution for each sample needed to be

> weigthed before summation. In pythia's case the weight factor

>

> sigma/ntrials

>

> in such a way the histograms look smooth and independent of the

> successes asked por each sample. And this the point, in the results

> I get in MG simulation from unweightedevents root files the ntrials

> is never stored, just the success (even the weight in the tree is

> the average value of the x-section of succeses). So when I tried to

> add up al my samples in the final analysis I get the typical bumps

> in the distributions at the cuts I set if I cut on a given final

> P_T, which tells me I am making the weighting process wrong.

>

> This is a quetsion actually for the ExRootAnalysis part but it

> spread from parton simulation to expermiental observables. The issue

> is the following:

>

> 1- How to properly weight observable distributions when adding

> diffrent samples of a given reaction?

>

>

> I know the question looks simple but I can not figure out how to get

> it work properly with MG or at least find the suited explanation for

> weighting process in MG. Probably I am missing something .

>

> any help is welcome and thanks in advance ,

>

> arian

>

> --

> You received this question notification because you are a member of

> MadTeam, which is an answer contact for MadGraph5.

Dear Oliver thanks I'll try this. At the moment I am closing the thread.