Fork me on GitHub

Opened 7 years ago

Closed 7 years ago

#1229 closed How to (wontfix)

Access weights with python

Reported by: Amin Abou Ibrahim Owned by:
Priority: minor Milestone:
Component: Delphes code Version: Delphes 3
Keywords: Cc:

Description

Dear Delphes team,

To access event weights using a C++ macro, I usually do:

HepMCEvent *event = (HepMCEvent*) branchEvent->At(0);
cout << event->Weight << endl;

How can I do the same thing with a python code?

Thank you,
Amin

Change History (3)

comment:1 by Pavel Demin, 7 years ago

Dear Amin,

Please have a look at Example1.py.

Best regards,

Pavel

comment:2 by Amin Abou Ibrahim, 7 years ago

Dear Pavel,

I did try this example before and it worked. However, I was trying to make it work without using ExRootTreeReader. It is still not working.

Thank you,
Amin

comment:3 by Pavel Demin, 7 years ago

Resolution: wontfix
Status: newclosed

However, I was trying to make it work without using ExRootTreeReader

ExRootTreeReader is essential for it to work.

Note: See TracTickets for help on using tickets.