Cannot normalize to luminosity

Asked by Antony Martini

Dear ma5 team;

Using the following script :
"
import /home/fynu/amartini/MG5_aMC_v2_1_0/check_gg_gldgldj/Events/ATLAS_monoj_M32_2e-13_ptj80GeV_etaj4.5_allMasses20TeV/unweighted_events.lhe.gz as gg
set main.stacking_method=superimpose
set main.normalize=lumi
set gg.xsection=0.04537
set main.lumi = 10.5
set gg.title="gg"
plot PT(j[1]) 72 80 800[logY]
submit gg
"

I get the right plot normalized to the luminosity (10.5 fb-1). However since I need to do some cosmetic modifications, I modify the user.cpp to include some ROOT features using the TH1F class and to normalize to luminosity, I'm using :
"
        cross_section=0.04537;
        double nrm = cross_section * 10500. /
           static_cast<float>(summary.nevents());
        H0_->Scale(nrm);
"
in the 'finalize' method. I save the plot in an .eps file and a .root file. But looking at the .eps, I see that the normalization is not the right one. Why do I get a different one from the user friendly mode ?... I'm using LHE file of MadGraph as input. If I use an LHCO or HEP file i don't have this problem...

cheers,

Antony

Question information

Language:
English Edit question
Status:
Answered
For:
MadAnalysis 5 Edit question
Assignee:
Benjamin Fuks Edit question
Last query:
Last reply:
Revision history for this message
Benjamin Fuks (fuks) said :
#1

Dear Antony,

I think that you have forgotten to account for the event weight in your normalization, as it could be different from one.

Cheers,

Benjamin

Revision history for this message
Antony Martini (a-martini03) said :
#2

Dear Benjamin,

I changed
"
H0_->IncrementNEvents(__event_weight__);

H0_->Fill(_P_j_I1I_PTorderingfinalstate[ind[0]]->pt(),__event_weight__);
"

into

"
// H0_->IncrementNEvents(__event_weight__);

      H0_->Fill(_P_j_I1I_PTorderingfinalstate[ind[0]]->pt(),event.mc()->weight());
"

but it doesn't work...was it our point?

cheers,

Antony

Revision history for this message
Benjamin Fuks (fuks) said :
#3

Hi Antony,

It will indeed not work. Your rescaling assumes that the original event weight is equal to one, which is generally not the case. You need to calculate the new weight with respect to the desired luminosity and cross section.

Cheers,

Benjamin

On 23 Apr 2014, at 10:31 , Antony Martini <email address hidden> wrote:

> Question #247483 on MadAnalysis 5 changed:
> https://answers.launchpad.net/madanalysis5/+question/247483
>
> Antony Martini posted a new comment:
> Dear Benjamin,
>
> I changed
> "
> H0_->IncrementNEvents(__event_weight__);
>
> H0_->Fill(_P_j_I1I_PTorderingfinalstate[ind[0]]->pt(),__event_weight__);
> "
>
> into
>
> "
> // H0_->IncrementNEvents(__event_weight__);
>
> H0_->Fill(_P_j_I1I_PTorderingfinalstate[ind[0]]->pt(),event.mc()->weight());
> "
>
> but it doesn't work...was it our point?
>
> cheers,
>
> Antony
>
> --
> You received this question notification because you are a direct
> subscriber of the question.

Revision history for this message
Antony Martini (a-martini03) said :
#4

Ok but so how do you do that? because I suppose that ma5 does it in the user friendly mode...

thanks,

Antony

Revision history for this message
Antony Martini (a-martini03) said :
#5

because I tried also :
"
double eventweight=1;
    if (event.mc()!=0) eventweight=event.mc()->weight();
    UInt_t ind[1];
    for (ind[0]=0;ind[0]<_P_j_I1I_PTorderingfinalstate.size();ind[0]++)
    {
      H0_->Fill(_P_j_I1I_PTorderingfinalstate[ind[0]]->pt(),eventweight);
    }

"
 and it's still the same...

Revision history for this message
Benjamin Fuks (fuks) said :
#6

Hi Antony,

This exactly means that the event weight is the one present in the LHE file. In your previous root file, you could simply divide by the integral of the histogram over the number of entries.

Cheers,

Benjamin

On 23 Apr 2014, at 12:07 , Antony Martini <email address hidden> wrote:

> Question #247483 on MadAnalysis 5 changed:
> https://answers.launchpad.net/madanalysis5/+question/247483
>
> Antony Martini posted a new comment:
> because I tried also :
> "
> double eventweight=1;
> if (event.mc()!=0) eventweight=event.mc()->weight();
> UInt_t ind[1];
> for (ind[0]=0;ind[0]<_P_j_I1I_PTorderingfinalstate.size();ind[0]++)
> {
> H0_->Fill(_P_j_I1I_PTorderingfinalstate[ind[0]]->pt(),eventweight);
> }
>
> "
> and it's still the same...
>
> --
> You received this question notification because you are a direct
> subscriber of the question.

Revision history for this message
shibasipu (shibasipu) said :
#7

Hi Benjamin,
                            I am a similar question. At parton level my event file contains 50,000 events. Now I am analysing the root file. Suppose, I want to analyze the events at Lumi = 300 fb^-1 and finally normalize all events to 1.

In normal mode, If I use the following commands, it is solving the job.
set sig.xsection = 0.2046
 set main.stacking_method = normalize2one
set main.lumi = 1000
set main.normalize = lumi

I n expert mode, how to the same thing ? Could you please tell me which lines should I add for the above purpose in the .cpp file ?

Another question, Like normal mode, Is there a way to obtain the signal significance in the expert mode automatically ?

Regards,
Shiba

Revision history for this message
Benjamin Fuks (fuks) said :
#8

Hi Shiba,

In the expert mode, you can get the selection efficiency from the output SAF file. Then, it is up to you to work out the rest (nothing predefined exists), e.g. by using an external routine.

Cheers

Benjamin

On 13 Mar 2016, at 14:13 , shibasipu <email address hidden> wrote:

> Question #247483 on MadAnalysis 5 changed:
> https://answers.launchpad.net/madanalysis5/+question/247483
>
> shibasipu posted a new comment:
> Hi Benjamin,
> I am a similar question. At parton level my event file contains 50,000 events. Now I am analysing the root file. Suppose, I want to analyze the events at Lumi = 300 fb^-1 and finally normalize all events to 1.
>
> In normal mode, If I use the following commands, it is solving the job.
> set sig.xsection = 0.2046
> set main.stacking_method = normalize2one
> set main.lumi = 1000
> set main.normalize = lumi
>
> I n expert mode, how to the same thing ? Could you please tell me which
> lines should I add for the above purpose in the .cpp file ?
>
>
> Another question, Like normal mode, Is there a way to obtain the signal significance in the expert mode automatically ?
>
>
> Regards,
> Shiba
>
> --
> You received this question notification because you are subscribed to
> the question.

Revision history for this message
shibasipu (shibasipu) said :
#9

Hi Benjamin,
                           Thanks for the reply. I am trying to do the above stuffs. I am not sure whether I can implement the above stuffs in the expert mode. I may need your help later.

Regards,
Shiba

Can you help with this problem?

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

To post a message you must log in.