EICrecon
JANA based reconstruction for the EPIC detector
Loading...
Searching...
No Matches
ChargedReconstructedParticleSelector.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-3.0-or-later
2// Copyright (C) 2024 - 2025 Dmitry Kalinkin, Derek Anderson, Wouter Deconinck
3
4#pragma once
5
6#include <memory>
7#include <utility>
8
9#include <algorithms/algorithm.h>
10#include <edm4eic/ReconstructedParticleCollection.h>
11#include <spdlog/logger.h>
12
14
15namespace eicrecon {
16
18 algorithms::Algorithm<algorithms::Input<edm4eic::ReconstructedParticleCollection>,
19 algorithms::Output<edm4eic::ReconstructedParticleCollection>>;
20
22 public WithPodConfig<NoConfig> {
23
24public:
27 name, {"inputParticles"}, {"outputParticles"}, "select charged particles"} {}
28
29 // algorithm initialization
30 void init() final {}
31
32 // primary algorithm call
33 void process(const Input& input, const Output& output) const final {
34 const auto [rc_particles_in] = input;
35 auto [rc_particles_out] = output;
36 rc_particles_out->setSubsetCollection();
37
38 for (const auto& particle : *rc_particles_in) {
39 if (particle.getCharge() != 0.) {
40 rc_particles_out->push_back(particle);
41 }
42 }
43 }
44};
45
46} // namespace eicrecon
Definition ChargedReconstructedParticleSelector.h:22
void process(const Input &input, const Output &output) const final
Definition ChargedReconstructedParticleSelector.h:33
void init() final
Definition ChargedReconstructedParticleSelector.h:30
ChargedReconstructedParticleSelector(std::string_view name)
Definition ChargedReconstructedParticleSelector.h:25
Definition WithPodConfig.h:22
-client
Definition CalorimeterClusterRecoCoG.cc:37
algorithms::Algorithm< algorithms::Input< edm4eic::ReconstructedParticleCollection >, algorithms::Output< edm4eic::ReconstructedParticleCollection > > ChargedReconstructedParticleSelectorAlgorithm
Definition ChargedReconstructedParticleSelector.h:19