Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
Rec
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Noah Behling
Rec
Commits
c8a2c084
Commit
c8a2c084
authored
2 years ago
by
Gerhard Raven
Browse files
Options
Downloads
Patches
Plain Diff
Prefer LinksByKey::link over LinksByKey::addReference
parent
df7628d7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Pr/PrMCTools/src/PrLHCbID2MCParticle.cpp
+1
-3
1 addition, 3 deletions
Pr/PrMCTools/src/PrLHCbID2MCParticle.cpp
Rec/GlobalRecoMCTools/src/ProtoParticleAssociator.cpp
+2
-9
2 additions, 9 deletions
Rec/GlobalRecoMCTools/src/ProtoParticleAssociator.cpp
with
3 additions
and
12 deletions
Pr/PrMCTools/src/PrLHCbID2MCParticle.cpp
+
1
−
3
View file @
c8a2c084
...
...
@@ -108,9 +108,7 @@ namespace {
}
);
// remove any possible duplicates
partList
.
erase
(
std
::
unique
(
partList
.
begin
(),
partList
.
end
()
),
partList
.
end
()
);
for
(
const
auto
&
part
:
partList
)
{
olink
.
addReference
(
id
.
lhcbID
(),
-
1
,
part
->
index
(),
olink
.
linkID
(
&
mcParts
),
1.0
);
}
for
(
const
auto
&
part
:
partList
)
{
olink
.
link
(
id
.
lhcbID
(),
mcParts
(
part
->
index
()
),
1.0
);
}
}
/**
...
...
This diff is collapsed.
Click to expand it.
Rec/GlobalRecoMCTools/src/ProtoParticleAssociator.cpp
+
2
−
9
View file @
c8a2c084
...
...
@@ -147,15 +147,8 @@ struct ProtoParticleAssociator : public LHCb::Algorithm::MultiTransformer<std::t
// all MCParticle objects are always in a single container).
// See LinksByKey::resolveLinks for one way to load the target
// container given the target link ID from the input table.
const
auto
target_index
=
ref
.
objectKey
();
const
auto
*
mcp
=
mcparticles
.
object
(
target_index
);
const
auto
source_index
=
pp
->
index
();
const
auto
source_link_id
=
pp_links
.
linkID
(
pp
->
parent
()
);
const
auto
target_link_id
=
pp_links
.
linkID
(
mcp
->
parent
()
);
const
auto
weight
=
ref
.
weight
();
pp_links
.
addReference
(
source_index
,
source_link_id
,
target_index
,
target_link_id
,
weight
);
pp_table
.
relate
(
pp
,
mcp
,
weight
)
pp_links
.
link
(
pp
,
mcparticles
(
ref
.
objectKey
()
),
ref
.
weight
()
);
pp_table
.
relate
(
pp
,
mcparticles
(
ref
.
objectKey
()
),
ref
.
weight
()
)
.
orThrow
(
"Unexpected duplicate relation found"
,
"ProtoParticleAssociator::operator()"
);
ok
=
l
->
nextReference
(
ref
);
...
...
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