Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
atlas
athena
Commits
9542b245
Commit
9542b245
authored
Jul 07, 2020
by
Mark Hodgkinson
Browse files
Fill in execute of PFChargedFlowElementCreatorAlgorithm.
parent
d6c5bba6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Reconstruction/eflowRec/src/PFChargedFlowElementCreatorAlgorithm.cxx
View file @
9542b245
#include "eflowRec/PFChargedFlowElementCreatorAlgorithm.h"
#include "xAODPFlow/FlowElementAuxContainer.h"
PFChargedFlowElementCreatorAlgorithm
::
PFChargedFlowElementCreatorAlgorithm
(
const
std
::
string
&
name
,
ISvcLocator
*
pSvcLocator
)
:
AthReentrantAlgorithm
(
name
,
pSvcLocator
)
{
...
...
@@ -18,6 +20,15 @@ StatusCode PFChargedFlowElementCreatorAlgorithm::execute(const EventContext& ctx
ATH_MSG_DEBUG
(
"Starting PFOChargedCreatorAlgorithm::execute"
);
SG
::
WriteHandle
<
xAOD
::
FlowElementContainer
>
chargedFlowElementContainerWriteHandle
(
m_chargedFlowElementContainerWriteHandleKey
,
ctx
);
ATH_CHECK
(
chargedFlowElementContainerWriteHandle
.
record
(
std
::
make_unique
<
xAOD
::
FlowElementContainer
>
(),
std
::
make_unique
<
xAOD
::
FlowElementAuxContainer
>
()));
/* Create Charged FlowElements from all eflowCaloObjects */
SG
::
ReadHandle
<
eflowCaloObjectContainer
>
eflowCaloObjectContainerReadHandle
(
m_eflowCaloObjectContainerReadHandleKey
,
ctx
);
for
(
auto
thisEflowCaloObject
:
*
eflowCaloObjectContainerReadHandle
)
createChargedFlowElements
(
*
thisEflowCaloObject
,
true
,
chargedFlowElementContainerWriteHandle
);
std
::
sort
(
chargedFlowElementContainerWriteHandle
->
begin
(),
chargedFlowElementContainerWriteHandle
->
end
(),
[]
(
const
xAOD
::
FlowElement
*
flowElement1
,
const
xAOD
::
FlowElement
*
flowElement2
)
{
return
flowElement1
->
pt
()
>
flowElement2
->
pt
();});
return
StatusCode
::
SUCCESS
;
}
...
...
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