Computing significance for signals in Madanalysis 5

Asked by Harshal Kulkarni

Hi,
     I have been referring to https://indico.in2p3.fr/event/5905/contributions/35909/attachments/28776/35453/Introduction2MadAnalysi5.pdf
as a primer for MA5, however wasn't able to find anything related to "computing significances for signals".
Is there a way to compute significance (when the signal and background both are known, i.e. the respective .lhe files for the processes have been generated and imported) in MA5 directly?

Thanks,
Harshal

Question information

Language:
English Edit question
Status:
Solved
For:
MadAnalysis 5 Edit question
Assignee:
No assignee Edit question
Solved by:
Jack Y. Araz
Solved:
Last query:
Last reply:
Revision history for this message
Best Jack Y. Araz (jackaraz) said :
#1

Hi Harshal

There is by default a figure of merit calculation built in ma5 (type `display main`). You need to set the signal and background when you import a sample you can set it as via

```
import <smp> as my_signal
set my_signal.type = signal
```
and similarly you can set your background. You can change the FoM formula using `set main.fom.formula`. If you press tab you will see all the options for everything.

cheers


Jack Y. Araz

> On Jul 13, 2021, at 2:35 PM, Harshal Kulkarni <email address hidden> wrote:
>
> [EXTERNAL EMAIL]
>
> New question #697962 on MadAnalysis 5:
> https://answers.launchpad.net/madanalysis5/+question/697962
>
> Hi,
> I have been referring to https://indico.in2p3.fr/event/5905/contributions/35909/attachments/28776/35453/Introduction2MadAnalysi5.pdf
> as a primer for MA5, however wasn't able to find anything related to "computing significances for signals".
> Is there a way to compute significance (when the signal and background both are known, i.e. the respective .lhe files for the processes have been generated and imported) in MA5 directly?
>
> Thanks,
> Harshal
>
> --
> You received this question notification because you are an answer
> contact for MadAnalysis 5.

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

Hi Harshal,

This is documented in the manual, the reference cards available from our wiki and in more recent madanalysis5 papers (than at least a talk from 2012). Please have a look and let us know whether this helps.

Regards,

Benjamin

> On 13 Jul 2021, at 15:35, Harshal Kulkarni <email address hidden> wrote:
>
> New question #697962 on MadAnalysis 5:
> https://answers.launchpad.net/madanalysis5/+question/697962
>
> Hi,
> I have been referring to https://indico.in2p3.fr/event/5905/contributions/35909/attachments/28776/35453/Introduction2MadAnalysi5.pdf
> as a primer for MA5, however wasn't able to find anything related to "computing significances for signals".
> Is there a way to compute significance (when the signal and background both are known, i.e. the respective .lhe files for the processes have been generated and imported) in MA5 directly?
>
> Thanks,
> Harshal
>
> --
> You received this question notification because you are an answer
> contact for MadAnalysis 5.

Revision history for this message
Harshal Kulkarni (hck18ms056) said :
#3

Thanks Jack Y Araz and Benjamin Fuks, that solved my problem.
On an unrelated note, is there a way to extract the data being used for the plotting so that I can use it in a separate python code for other analysis (like Jensen-Shannon divergence,etc)? I know that the histogram data is present in /output/SAF/Histos/Histos.saf. However, I don't know how to extract this data from here to a simple txt document that can be used further.
Thanks for your help.

Revision history for this message
Jack Y. Araz (jackaraz) said :
#4

Hi Harshal

You can find several readers from our home page. Otherthan that you can write data to a csv file, for instance, via expert mode.

cheers


Jack Y. Araz

> On Jul 14, 2021, at 1:25 PM, Harshal Kulkarni <email address hidden> wrote:
>
> [EXTERNAL EMAIL]
>
> Question #697962 on MadAnalysis 5 changed:
> https://answers.launchpad.net/madanalysis5/+question/697962
>
> Status: Answered => Solved
>
> Harshal Kulkarni confirmed that the question is solved:
> Thanks Jack Y Araz and Benjamin Fuks, that solved my problem.
> On an unrelated note, is there a way to extract the data being used for the plotting so that I can use it in a separate python code for other analysis (like Jensen-Shannon divergence,etc)? I know that the histogram data is present in /output/SAF/Histos/Histos.saf. However, I don't know how to extract this data from here to a simple txt document that can be used further.
> Thanks for your help.
>
> --
> You received this question notification because you are an answer
> contact for MadAnalysis 5.

Revision history for this message
Harshal Kulkarni (hck18ms056) said :
#5

I checked the saf readers from the home page. However, all of them directly plot histograms and don't give the data itself (in a text document) which can be analyzed/used separately. How to do that?
Since I am not familiar with C++ programming, I don't think I can use MA5 in the expert mode.

Thanks,
Harshal

Revision history for this message
Jack Y. Araz (jackaraz) said :
#6

Hi Harshal

> I checked the saf readers from the home page. However, all of them directly plot histograms and don't give the data itself (in a text document) which can be analyzed/used separately.
They are designed to read ma5 histogram outputs.

> Since I am not familiar with C++ programming, I don't think I can use MA5 in the expert mode.
Expert mode is fairly easy to learn. You can follow the analysis that you already generate through normal mode. It writes the analysis code automaticallly, hence all you need to do is instead of printing in to a Ma5-Histo object, printing it to whatever file that you want to use.

There are plenty of example codes in our public analysis database as well, if you like to learn.

Cheers


Jack Y. Araz

> On Jul 18, 2021, at 3:25 PM, Harshal Kulkarni <email address hidden> wrote:
>
> [EXTERNAL EMAIL]
>
> Question #697962 on MadAnalysis 5 changed:
> https://answers.launchpad.net/madanalysis5/+question/697962
>
> Harshal Kulkarni posted a new comment:
> I checked the saf readers from the home page. However, all of them directly plot histograms and don't give the data itself (in a text document) which can be analyzed/used separately. How to do that?
> Since I am not familiar with C++ programming, I don't think I can use MA5 in the expert mode.
>
> Thanks,
> Harshal
>
> --
> You received this question notification because you are an answer
> contact for MadAnalysis 5.

Revision history for this message
Harshal Kulkarni (hck18ms056) said :
#7

Thanks Jack Y. Araz, that solved my question.