1#ifndef SOURCE_LINK_ANALYZERS_H
2#define SOURCE_LINK_ANALYZERS_H
5#include "edm4hep/RecoMCParticleLinkCollection.h"
17 explicit selPDG(
const int pdg) : m_pdg(pdg){};
19 template <
typename T> T
operator()(
const T &inLinkColl) {
21 result.setSubsetCollection();
23 for (
const auto &link : inLinkColl) {
24 const auto &particle = link.getTo();
25 if (particle.getPDG() == m_pdg) {
26 result.push_back(link);
45 throw std::invalid_argument(
"FCCAnalyses::PodioSource::Link::sel_absPDG: "
46 "Received negative value!");
50 template <
typename T>
auto operator()(
const T &inLinkColl) {
52 result.setSubsetCollection();
54 for (
const auto &link : inLinkColl) {
55 const auto &particle = link.getTo();
56 if (std::abs(particle.getPDG()) == m_pdg) {
57 result.push_back(link);
76 template <
typename T> T
operator()(
const T &inLinkColl) {
78 result.setSubsetCollection();
80 for (
const auto &link : inLinkColl) {
81 const auto &particle = link.getTo();
82 if (particle.getGeneratorStatus() == m_status) {
83 result.push_back(link);
FCC analyzers collection.
Definition Algorithms.h:15
Analyzer to select links where MC particle has a specified absolute value of PDG ID.
Definition LinkSource.h:40
auto operator()(const T &inLinkColl)
Definition LinkSource.h:50
const int m_pdg
Definition LinkSource.h:41
selAbsPDG(const int pdg)
Definition LinkSource.h:43
Analyzer to select links where the MC particle has a specified generator status.
Definition LinkSource.h:71
const int m_status
Definition LinkSource.h:72
selGenStatus(const int status)
Definition LinkSource.h:74
T operator()(const T &inLinkColl)
Definition LinkSource.h:76
Analyzer to select links where the MC particle has a specified PDG ID.
Definition LinkSource.h:14
selPDG(const int pdg)
Definition LinkSource.h:17
const int m_pdg
Definition LinkSource.h:15
T operator()(const T &inLinkColl)
Definition LinkSource.h:19