Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DD4hep
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cepc
externals
mirroring
DD4hep
Commits
e4052034
Commit
e4052034
authored
1 year ago
by
Andre Sailer
Browse files
Options
Downloads
Patches
Plain Diff
HepMC3: use all vertex information to create primary vertices, including time
parent
8c5fd057
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
DDG4/hepmc/HepMC3EventReader.cpp
+6
-6
6 additions, 6 deletions
DDG4/hepmc/HepMC3EventReader.cpp
with
6 additions
and
6 deletions
DDG4/hepmc/HepMC3EventReader.cpp
+
6
−
6
View file @
e4052034
...
@@ -135,18 +135,18 @@ HEPMC3EventReader::readParticles(int event_number, Vertices& vertices, Particles
...
@@ -135,18 +135,18 @@ HEPMC3EventReader::readParticles(int event_number, Vertices& vertices, Particles
if
(
p
->
parents
.
size
()
==
0
)
{
if
(
p
->
parents
.
size
()
==
0
)
{
// A particle without a parent in HepMC3 can only be (something like) a beam particle, and it is attached to the
// A particle without a parent in HepMC3 can only be (something like) a beam particle, and it is attached to the
// root vertex, by default (0,0,0) and equal for all parent-less particles. Therefore we can take the end vertex
// root vertex, by default (0,0,0
,0
) and equal for all parent-less particles. Therefore we can take the end vertex
// of the parentless particle as the start vertex for outgoing particles. Note that for a particle without end
// of the parentless particle as the start vertex for outgoing particles. Note that for a particle without end
// vertex (such as in a particle gun), it defaults to (0,0,0). This cannot be fixed, the information simply isn't
// vertex (such as in a particle gun), it defaults to (0,0,0
,0
). This cannot be fixed, the information simply isn't
// in the HepMC file. Having a parent enforces a vertex, having no parent forbids a vertex.
// in the HepMC file. Having a parent enforces a vertex, having no parent forbids a vertex.
Geant4Vertex
*
vtx
=
new
Geant4Vertex
;
Geant4Vertex
*
vtx
=
new
Geant4Vertex
;
vertices
.
emplace_back
(
vtx
);
vertices
.
emplace_back
(
vtx
);
vtx
->
x
=
p
->
vex
;
vtx
->
x
=
vex
.
get_component
(
0
)
;
vtx
->
y
=
p
->
vey
;
vtx
->
y
=
vex
.
get_component
(
1
)
;
vtx
->
z
=
p
->
vez
;
vtx
->
z
=
vex
.
get_component
(
2
)
;
vtx
->
time
=
p
->
time
;
vtx
->
time
=
vex
.
get_component
(
3
)
*
len_unit
/
CLHEP
::
c_light
;
vtx
->
out
.
insert
(
p
->
id
)
;
vtx
->
out
.
insert
(
p
->
id
)
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment