How to achieve "events normalized to 1" and set y axis range?

Asked by Mamutjan

Hi.

I am trying to generate a histogram whose y axis is "events normalized to 1".
How can I achieve it?

Also, in some of the graphics I got, y axis (logY) starts from, say 0.1, but I want it to start from 1. How can I set it?

Regards,
Mamutjan

Question information

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

Hi Mamutjan,

> I am trying to generate a histogram whose y axis is "events normalized to 1".
> How can I achieve it?
It is enough to use the "normqalize2one" option of the "plot" command, as indicated in the manual. For instance:
  plot MET [ normalize2one ]

> Also, in some of the graphics I got, y axis (logY) starts from, say 0.1, but I want it to start from 1. How can I set it?
This can be done by modifying the root files that hae been generated by madanalysis. Please have a look to the HTML directory that has been created, for instance.

Cheers,

Benjamin

Revision history for this message
Mamutjan (mamutjan) said :
#2

Thanks, I did find the following in HTML/selection_0.C:

mystack_stack_1->SetMinimum
mystack_stack_1->SetMaximum

they seemed to be the part I was looking for, but I couldn't find any related tutorial.

How can I use (run) it after modifying?

Regards,
Mamutjan

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

Hi,

You can run it as any root file:
 root -l <filename>

Cheers,

Benjamin

On 11 Apr 2015, at 11:31 , Mamutjan <email address hidden> wrote:

> Question #264931 on MadAnalysis 5 changed:
> https://answers.launchpad.net/madanalysis5/+question/264931
>
> Status: Answered => Open
>
> Mamutjan is still having a problem:
> Thanks, I did find the following in HTML/selection_0.C:
>
> mystack_stack_1->SetMinimum
> mystack_stack_1->SetMaximum
>
> they seemed to be the part I was looking for, but I couldn't find any
> related tutorial.
>
> How can I use (run) it after modifying?
>
> Regards,
> Mamutjan
>
> --
> You received this question notification because you are an answer
> contact for MadAnalysis 5.

Revision history for this message
Mamutjan (mamutjan) said :
#4

Thanks.

By the way, there were some errors in the generated root file:
1. first line included path in the declaration (fixed the error)
2. lines saying "mystack->Add(selection_0_X" (changing to "mystack->Add(selection_0_XX" fixed the error)
3. two lines "mystack_stack_X->SetMinimum(" and "mystack_stack_X->SetMaximum(" (changing to "mystack->" worked)

I couldn't locate the generator code, but hope someone could fix these.

Thanks again.

Cheers,
Mamutjan

Revision history for this message
Mamutjan (mamutjan) said :
#5

Thanks Benjamin Fuks, that solved my question.