mc()->xsection() for .lhco and .root file

Asked by xbyuan

Hi,

I am working in MadAnalysis v1.3 with -R -E mode. I want to analysis a .lhco file generated by MadGraph+Pythia+Delphes.

In the .cpp file, I use
double xsec = sample.mc()->xsection();
to set cross section.

However, after make and ./MadAnalysis5job list, I get the following error.

    * SampleAnalyzer for MadAnalysis 5 - Welcome.
    * Initializing all components
      - version: 1.3 (2016/03/01)
      - general: everything is default.
      - extracting the list of event samples...
      - analyzer 'gmZ_j'
    * Running over files ...
    * 1/1 /home/xbyuan/Nu/FL_check/gmZ_j/Events/run_01/tag_1_delphes_events.lhco.gz
        => file size: 1.20 Mo
        => sample format: LHCO file produced by an unknown generator (cross section assumed in pb).
        => progress: [> ]
 *** Break *** segmentation violation

===========================================================
There was a crash.
This is the entire stack trace of all threads:
===========================================================
#0 0x0000003753cac61e in waitpid () from /lib64/libc.so.6
#1 0x0000003753c3e609 in do_system () from /lib64/libc.so.6
#2 0x00007f1d59727d9f in TUnixSystem::StackTrace() () from /usr/local/root/lib/libCore.so
#3 0x00007f1d5972989c in TUnixSystem::DispatchSignals(ESignals) () from /usr/local/root/lib/libCore.so
#4 <signal handler called>
#5 0x000000000040d9b7 in MA5::gmZ_j::Execute(MA5::SampleFormat&, MA5::EventFormat const&) ()
#6 0x000000000040c468 in main ()
===========================================================

The lines below might hint at the cause of the crash.
If they do not help you then please submit a bug report at
http://root.cern.ch/bugs. Please post the ENTIRE stack trace
from above as an attachment in addition to anything else
that might help us fixing this issue.
===========================================================
#5 0x000000000040d9b7 in MA5::gmZ_j::Execute(MA5::SampleFormat&, MA5::EventFormat const&) ()
#6 0x000000000040c468 in main ()
===========================================================

I have checked:

1. If I replace double xsec = sample.mc()->xsection(); with double xsec = 200; the code runs OK.

2. The .lhco contains the cross section information (similar as .lhe file)
#<MGGenerationInfo>
## Number of Events : 40000
## Integrated weight (pb) : 3027.95178552
#</MGGenerationInfo>
The number in Integrated weight is the same with the cross section.

3. There is the same error for .root file generated by MadGraph+Pythia+Delphes.

Thank you for your time.

Best Regards,
Xing-Bo Yuan

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 Xing-Bo,

The cross section information is not supported by the LHCO format, so that you have to fix it by hand. In the file generated by MadGraph, the cross section is therefore only available under the form of a comment and is thus ignored at the time of the reading of the file by MadAnalysis 5.

Regards,

Benjamin

Revision history for this message
xbyuan (yuanxingbo) said :
#2

Hi,

Thank you very much for the information. I still have one question.

For example, I want to analysis 3 processes. Their cross sections are xsec_1, xsec_2 and xsec_3, respectively. The events generated by Delphes are stored in file_1, file_2 and file_3.

In /Build folder, I create a file, named with "list" , containing
file_1
file_2
file_3

Usually, "./MadAnalysis5job list" works. However, as you said, I should set cross section for each process by hand. If I store the cross section xsec_1, xsec_2, xsec_3 in a file. Is there method to load it and match the process in /Build/list file automatically?

(Loading xsec_1, xsec_2, xsec_3 is esay. But, since /Build/list is loaded by MadAnalysis, matching cross section to each process is not trivial. )

Thank you again for your time.

Best Regards,
Xing-Bo Yuan

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

Hi,

You need to process the three files separately.

Cheers,

Benjamin

On 11 Apr 2016, at 18:27 , xbyuan <email address hidden> wrote:

> Question #290311 on MadAnalysis 5 changed:
> https://answers.launchpad.net/madanalysis5/+question/290311
>
> Status: Answered => Open
>
> xbyuan is still having a problem:
> Hi,
>
> Thank you very much for the information. I still have one question.
>
> For example, I want to analysis 3 processes. Their cross sections are
> xsec_1, xsec_2 and xsec_3, respectively. The events generated by
> Delphes are stored in file_1, file_2 and file_3.
>
> In /Build folder, I create a file, named with "list" , containing
> file_1
> file_2
> file_3
>
> Usually, "./MadAnalysis5job list" works. However, as you said, I should
> set cross section for each process by hand. If I store the cross section
> xsec_1, xsec_2, xsec_3 in a file. Is there method to load it and match
> the process in /Build/list file automatically?
>
> (Loading xsec_1, xsec_2, xsec_3 is esay. But, since /Build/list is
> loaded by MadAnalysis, matching cross section to each process is not
> trivial. )
>
> Thank you again for your time.
>
> Best Regards,
> Xing-Bo Yuan
>
> --
> You received this question notification because you are an answer
> contact for MadAnalysis 5.

Revision history for this message
xbyuan (yuanxingbo) said :
#4

Hi, Benjamin,

You mean, in such case, one should use ./ma5 -E to create 3 analysis projects to analysis these processes separately?

Best Regards,
Xing-Bo Yuan

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

Hi,

Not exactly. You only need one analysis, but you will run it three times.

Cheers,

Benjamin

On 12 Apr 2016, at 10:57 , xbyuan <email address hidden> wrote:

> Question #290311 on MadAnalysis 5 changed:
> https://answers.launchpad.net/madanalysis5/+question/290311
>
> Status: Answered => Open
>
> xbyuan is still having a problem:
> Hi, Benjamin,
>
> You mean, in such case, one should use ./ma5 -E to create 3 analysis
> projects to analysis these processes separately?
>
> Best Regards,
> Xing-Bo Yuan
>
> --
> You received this question notification because you are an answer
> contact for MadAnalysis 5.

Revision history for this message
xbyuan (yuanxingbo) said :
#6

Thanks Benjamin Fuks, that solved my question.

Revision history for this message
xbyuan (yuanxingbo) said :
#7

Hi, Benjamin,

Thank you very much. I understand.

In addition, I hope there will be function to load cross section information stored in a file and automatically match process in MadAnalysis in the future.

Best Regards,
Xing-Bo Yuan