Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
atlas
athena
Commits
7560834e
Commit
7560834e
authored
Jul 10, 2020
by
Mark Hodgkinson
Browse files
Set vector of clusters and weights in charged FlowElement.
parent
aadb2203
Changes
1
Hide whitespace changes
Inline
Side-by-side
Reconstruction/eflowRec/src/PFChargedFlowElementCreatorAlgorithm.cxx
View file @
7560834e
...
...
@@ -147,8 +147,19 @@ void PFChargedFlowElementCreatorAlgorithm::createChargedFlowElements(const eflow
//sort the vectorClusterToSubtractedEnergies in order of subtracted energy ratio from low (most subtracted) to high (least subtracted)
std
::
sort
(
vectorClusterToSubtractedEnergies
.
begin
(),
vectorClusterToSubtractedEnergies
.
end
(),
[](
auto
const
&
a
,
auto
const
&
b
){
return
a
.
second
<
b
.
second
;});
//now split this into two vectors, ready to be used by the FlowElement
std
::
vector
<
ElementLink
<
xAOD
::
IParticleContainer
>
>
theClusters
;
std
::
vector
<
float
>
theClusterWeights
;
for
(
auto
thePair
:
vectorClusterToSubtractedEnergies
){
ElementLink
<
xAOD
::
IParticleContainer
>
theIParticleTrackLink
;
theIParticleTrackLink
.
resetWithKeyAndIndex
(
thePair
.
first
.
persKey
(),
thePair
.
first
.
persIndex
());
theClusters
.
push_back
(
theIParticleTrackLink
);
theClusterWeights
.
push_back
(
thePair
.
second
);
}
}
//Set the vector of clusters and vector of corresponding energies.
thisFE
->
setOtherObjectLinks
(
theClusters
,
theClusterWeights
);
}
//if we add clusters
}
//loop over eflowRecTracks
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment