-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hepmc2root seems to be missing particles #2
Comments
Hi Sebastien,
Thanks for pointing this out. I'll take a look at this within the next few
days and get back to you. If I don't, please email again.
Harrison
…----
Harrison B. Prosper
Kirby W. Kemper Endowed Professor of Physics
Department of Physics
Florida State University
Tallahassee FL 32306, USA
"Take the risk of thinking for yourself. Much more truth and happiness
will come to you that way."
Christopher Hitchens
On Fri, Sep 23, 2022 at 4:53 PM Sebastien Binet ***@***.***> wrote:
trying to convert this file:
HepMC::Version 2.06.09
HepMC::IO_GenEvent-START_EVENT_LISTING
E 1 0 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 20 -3 4 0 0 0 0
U GEV MM
F 0 0 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0
V -1 0 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 1 1 0
P 1 2212 0.0000000000000000e+00 0.0000000000000000e+00 7.0000000000000000e+03 7.0000000000000000e+03 0.0000000000000000e+00 3 0.0000000000000000e+00 0.0000000000000000e+00 -1 0
P 3 1 7.5000000000000000e-01 -1.5690000000000000e+00 3.2191000000000003e+01 3.2238000000000000e+01 0.0000000000000000e+00 3 0.0000000000000000e+00 0.0000000000000000e+00 -3 0
V -2 0 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 1 1 0
P 2 2212 0.0000000000000000e+00 0.0000000000000000e+00 -7.0000000000000000e+03 7.0000000000000000e+03 0.0000000000000000e+00 3 0.0000000000000000e+00 0.0000000000000000e+00 -2 0
P 4 -2 -3.0470000000000002e+00 -1.9000000000000000e+01 -5.4628999999999998e+01 5.7920000000000002e+01 0.0000000000000000e+00 3 0.0000000000000000e+00 0.0000000000000000e+00 -3 0
V -3 0 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 2 0
P 5 22 -3.8130000000000002e+00 1.1300000000000000e-01 -1.8330000000000000e+00 4.2329999999999997e+00 0.0000000000000000e+00 1 0.0000000000000000e+00 0.0000000000000000e+00 0 0
P 6 -24 1.5169999999999999e+00 -2.0680000000000000e+01 -2.0605000000000000e+01 8.5924999999999997e+01 0.0000000000000000e+00 3 0.0000000000000000e+00 0.0000000000000000e+00 -4 0
V -4 0 1.2000000000000000e-01 -2.9999999999999999e-01 5.0000000000000003e-02 4.0000000000000001e-03 0 2 0
P 7 1 -2.4449999999999998e+00 2.8815999999999999e+01 6.0819999999999999e+00 2.9552000000000000e+01 0.0000000000000000e+00 1 0.0000000000000000e+00 0.0000000000000000e+00 0 0
P 8 -2 3.9620000000000002e+00 -4.9497999999999998e+01 -2.6687000000000001e+01 5.6372999999999998e+01 0.0000000000000000e+00 1 0.0000000000000000e+00 0.0000000000000000e+00 0 0
HepMC::IO_GenEvent-END_EVENT_LISTING
(also available here
<https://github.com/go-hep/hep/blob/main/hepmc/testdata/small.hepmc>)
which, AFAIK, is a valid HepMC file, will lead to:
$> root-dump ./small.root
>>> file[./small.root]
key[000]: Events;1 "created: Fri Sep 23 15:50:55 2022 HepMC 2.06.09" (TTree)
[000][Event_number]: 1
[000][Event_numberMP]: 0
[000][Event_scale]: 0
[000][Event_alphaQCD]: 0
[000][Event_alphaQED]: 0
[000][Event_barcodeSPV]: -3
[000][Event_numberV]: 4
[000][Event_barcodeBP1]: 0
[000][Event_barcodeBP2]: 0
[000][Event_numberP]: 6
[000][Xsection_value]: 0
[000][Xsection_error]: 0
[000][PDF_parton1]: 0
[000][PDF_parton2]: 0
[000][PDF_x1]: 0
[000][PDF_x2]: 0
[000][PDF_Q2]: 0
[000][PDF_x1f]: 0
[000][PDF_x2f]: 0
[000][PDF_id1]: 0
[000][PDF_id2]: 0
[000][Particle_x]: [0 0 0 0 0.12 0.12]
[000][Particle_y]: [0 0 0 0 -0.3 -0.3]
[000][Particle_z]: [0 0 0 0 0.05 0.05]
[000][Particle_ctau]: [0 0 0 0 0.004 0.004]
[000][Particle_barcode]: [1 2 5 6 7 8]
[000][Particle_pid]: [2212 2212 22 -24 1 -2]
[000][Particle_px]: [0 0 -3.813 1.517 -2.445 3.962]
[000][Particle_py]: [0 0 0.113 -20.68 28.816 -49.498]
[000][Particle_pz]: [7000 -7000 -1.833 -20.605 6.082 -26.687]
[000][Particle_energy]: [7000 7000 4.233 85.925 29.552 56.373]
[000][Particle_mass]: [0 0 0 0 0 0]
[000][Particle_status]: [3 3 1 3 1 1]
[000][Particle_d1]: [0 1 -1 4 -1 -1]
[000][Particle_d2]: [-1 -1 -1 5 -1 -1]
whereas:
$> go-hepmc-dump ./small.hepmc
________________________________________________________________________________
GenEvent: #1 ID= 20 SignalProcessGenVertex Barcode: -3
Momentum units: GEV Position units: MM
Entries this event: 4 vertices, 8 particles.
Beam Particles are not defined.
RndmState(0)=
Wgts(0)=
EventScale 0.00000 [energy] alphaQCD=0.00000000 alphaQED=0.00000000
GenParticle Legend
Barcode PDG ID ( Px, Py, Pz, E ) Stat DecayVtx
________________________________________________________________________________
GenVertex: -1 ID: 0 (X,cT):0
I: 1 1 2212 +0.00e+00,+0.00e+00,+7.00e+03,+7.00e+03 3 -1
O: 1 3 1 +7.50e-01,-1.57e+00,+3.22e+01,+3.22e+01 3 -3
GenVertex: -2 ID: 0 (X,cT):0
I: 1 2 2212 +0.00e+00,+0.00e+00,-7.00e+03,+7.00e+03 3 -2
O: 1 4 -2 -3.05e+00,-1.90e+01,-5.46e+01,+5.79e+01 3 -3
GenVertex: -3 ID: 0 (X,cT):0
I: 2 3 1 +7.50e-01,-1.57e+00,+3.22e+01,+3.22e+01 3 -3
4 -2 -3.05e+00,-1.90e+01,-5.46e+01,+5.79e+01 3 -3
O: 2 5 22 -3.81e+00,+1.13e-01,-1.83e+00,+4.23e+00 1
6 -24 +1.52e+00,-2.07e+01,-2.06e+01,+8.59e+01 3 -4
Vertex: -4 ID: 0 (X,cT)=+1.20e-01,-3.00e-01,+5.00e-02,+4.00e-03
I: 1 6 -24 +1.52e+00,-2.07e+01,-2.06e+01,+8.59e+01 3 -4
O: 2 7 1 -2.44e+00,+2.88e+01,+6.08e+00,+2.96e+01 1
8 -2 +3.96e+00,-4.95e+01,-2.67e+01,+5.64e+01 1
________________________________________________________________________________
*ie:* it's missing the particles with barcodes 3 and 4.
it seems to me this is because hepmc2root.py doesn't handle the case for
*initial* vertices with incoming particles, as it's only considering
out-going particles.
(also: what are the Particle_d1 and Particle_d2 fields meant to represent
? I suspect they are meant to represent the barcodes of the production- and
end-vertex of a given particle, but the logic escapes me.)
—
Reply to this email directly, view it on GitHub
<#2>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABJGM5FNL7DJXVHECOGY4BTV7W75TANCNFSM6AAAAAAQUBYN4M>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
ping ? in the meantime, I've implemented my own, keeping track of heavy ion stuff, vertices, and all: |
I have the same issue here. It seems the algorithm to add particles from a vertex does not work properly. The current algorithm first read the number of outgoing particles from a V, as However, sometimes the hepmc also put the incoming particle under the vertex line. For example,
Look at this event. The particle 1 goes into vertex -1, which produces particle 3 and 7. Current algorithm cannot read it correctly. |
FYI, I've checked that |
I saw it. Thanks for your work. it seems your algorithm is nice. But I'm not familiar with Go. Could you tell me how to install and run that script? Say, I'm going to convert I tried to download that github repository. But do not know how to run the hepmc2root. |
I'll try to cut a new release shortly (by the end of next week) so one would just need to download the binary from https://go-hep.org/dist. in the meantime, once Go has been installed, it should just be a matter of:
(I'll add some more documentation, as it is a bit terse ATM) |
@sbinet @hbprosper |
trying to convert this file:
(also available here)
which, AFAIK, is a valid HepMC file, will lead to:
whereas:
ie: it's missing the particles with barcodes 3 and 4.
it seems to me this is because
hepmc2root.py
doesn't handle the case for initial vertices with incoming particles, as it's only considering out-going particles.(also: what are the
Particle_d1
andParticle_d2
fields meant to represent ? I suspect they are meant to represent the barcodes of the production- and end-vertex of a given particle, but the logic escapes me.)The text was updated successfully, but these errors were encountered: