Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
LHCb
Phys
Commits
43f0e223
Commit
43f0e223
authored
Nov 26, 2021
by
CI Runner
Browse files
Add a NeutralBasics particle maker
parent
6f6e32b5
Pipeline
#3287510
passed with stage
in 19 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Phys/ParticleMaker/src/NeutralMakers.cpp
View file @
43f0e223
...
...
@@ -14,6 +14,7 @@
#include
"GaudiAlg/Transformer.h"
#include
"Event/Particle.h"
#include
"Event/Particle_v2.h"
#include
"Event/ProtoParticle.h"
#include
"Event/RecVertex.h"
...
...
@@ -634,4 +635,46 @@ namespace LHCb::Phys::ParticleMakers {
debug
()
<<
" Skipped : "
<<
m_SkipPi0sCounter
<<
endmsg
;
debug
()
<<
"--------------------"
<<
endmsg
;
}
using
neutral_basics_maker_output_t
=
std
::
tuple
<
LHCb
::
Event
::
NeutralBasics
,
std
::
unique_ptr
<
LHCb
::
Event
::
CaloHypothesesWithDirection
>>
;
/** @class NeutralBasicsMaker
*
* @brief Create a container of neutral objects from the output of the reconstruction sequence and a set of vertices
*
*
*/
class
NeutralBasicsMaker
:
public
Gaudi
::
Functional
::
Transformer
<
neutral_basics_maker_output_t
(
LHCb
::
UniqueIDGenerator
const
&
,
LHCb
::
Event
::
Calo
::
v2
::
Hypotheses
const
&
,
LHCb
::
Event
::
v2
::
RecVertices
const
&
)
>
{
public:
NeutralBasicsMaker
(
const
std
::
string
&
name
,
ISvcLocator
*
pSvcLocator
)
:
Transformer
(
name
,
pSvcLocator
,
{
KeyValue
{
"InputUniqueIDGenerator"
,
LHCb
::
UniqueIDGeneratorLocation
::
Default
},
KeyValue
{
"InputCaloObjects"
,
LHCb
::
Event
::
Calo
::
v2
::
HypothesesLocation
::
Default
},
KeyValue
{
"InputPrimaryVertices"
,
LHCb
::
Event
::
v2
::
RecVertexLocation
::
Primary
}},
{
KeyValue
{
"OutputParticles"
,
""
}}
)
{}
neutral_basics_maker_output_t
operator
()(
LHCb
::
UniqueIDGenerator
const
&
unique_id_gen
,
LHCb
::
Event
::
Calo
::
v2
::
Hypotheses
const
&
calo_hypos
,
LHCb
::
Event
::
v2
::
RecVertices
const
&
primary_vertices
)
const
override
{
auto
zn
=
Zipping
::
generateZipIdentifier
();
auto
calo_hypos_with_direction
=
std
::
make_unique
<
LHCb
::
Event
::
CaloHypothesesWithDirection
>
(
unique_id_gen
,
zn
);
calo_hypos_with_direction
->
reserve
(
calo_hypos
.
size
()
*
primary_vertices
.
size
()
);
// here we are creating one hypothesis per primary vertex
for
(
auto
const
&
ch
:
calo_hypos
)
for
(
auto
const
&
vtx
:
primary_vertices
)
calo_hypos_with_direction
->
emplace_back
(
unique_id_gen
,
ch
,
vtx
);
return
{
LHCb
::
Pr
::
make_zip
(
std
::
as_const
(
*
calo_hypos_with_direction
)
),
std
::
move
(
calo_hypos_with_direction
)};
}
};
DECLARE_COMPONENT
(
NeutralBasicsMaker
)
}
// namespace LHCb::Phys::ParticleMakers
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