Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Qipeng Hu
athena
Commits
10b8994f
Commit
10b8994f
authored
Nov 25, 2021
by
Adam Edward Barton
Browse files
Merge branch 'weightindexmap' into 'master'
Create weight index map function for GenEvent See merge request
!48524
parents
e7fbfbbf
72d6940d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Generators/AtlasHepMC/AtlasHepMC/GenEvent.h
View file @
10b8994f
...
...
@@ -36,6 +36,15 @@ inline long long int get_ll_event_number(const HepMC3::GenEvent* e){
return
at
?
at
->
value
()
:
e
->
event_number
();
}
inline
std
::
map
<
std
::
string
,
std
::
size_t
>
weights_map
(
const
HepMC3
::
GenEvent
*
e
)
{
std
::
map
<
std
::
string
,
std
::
size_t
>
ret
;
auto
run
=
e
->
run_info
();
if
(
!
run
)
return
ret
;
std
::
vector
<
std
::
string
>
names
=
run
->
weight_names
();
for
(
const
auto
&
name
:
names
)
ret
[
name
]
=
run
->
weight_index
(
name
);
return
ret
;
}
inline
std
::
vector
<
HepMC3
::
GenParticlePtr
>::
const_iterator
begin
(
HepMC3
::
GenEvent
&
e
)
{
return
e
.
particles
().
begin
();
}
inline
std
::
vector
<
HepMC3
::
GenParticlePtr
>::
const_iterator
end
(
HepMC3
::
GenEvent
&
e
)
{
return
e
.
particles
().
end
();
}
inline
std
::
vector
<
HepMC3
::
ConstGenParticlePtr
>::
const_iterator
begin
(
const
HepMC3
::
GenEvent
&
e
)
{
return
e
.
particles
().
begin
();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment