6#include <algorithms/algorithm.h>
7#include <edm4eic/ClusterCollection.h>
8#include <edm4eic/EDM4eicVersion.h>
9#include <edm4eic/MCRecoClusterParticleAssociationCollection.h>
22#if EDM4EIC_BUILD_VERSION >= EDM4EIC_VERSION(8, 7, 0)
23#include <edm4eic/MCRecoClusterParticleLinkCollection.h>
32 algorithms::Input<edm4eic::ClusterCollection,
33 std::optional<edm4eic::MCRecoClusterParticleAssociationCollection>>,
34 algorithms::Output<edm4eic::ClusterCollection,
35#if EDM4EIC_BUILD_VERSION >= EDM4EIC_VERSION(8, 7, 0)
36 std::optional<edm4eic::MCRecoClusterParticleLinkCollection>,
38 std::optional<edm4eic::MCRecoClusterParticleAssociationCollection>>>;
54 {
"inputClusters",
"inputMCClusterAssociations"},
56#if EDM4EIC_BUILD_VERSION >= EDM4EIC_VERSION(8, 7, 0)
57 "outputMCClusterLinks",
59 "outputMCClusterAssociations"},
60 "Computes cluster shape parameters"} {
65 void process(const Input&, const Output&) const final;
69 static
double constWeight(
double ,
double ,
double ,
int ) {
return 1.0; }
72 static double linearWeight(
double E,
double ,
double ,
int ) {
return E; }
75 static double logWeight(
double E,
double tE,
double base,
int ) {
76 return std::max(0., base + std::log(E / tE));
80 const std::map<std::string, std::function<double(
double,
double,
double,
int)>> m_weightMethods =
81 {{
"none", constWeight}, {
"linear", linearWeight}, {
"log", logWeight}};
84 std::function<double(
double,
double,
double,
int)> m_weightFunc;
Calculate cluster shapes for provided clusters.
Definition CalorimeterClusterShape.h:48
CalorimeterClusterShape(std::string_view name)
Definition CalorimeterClusterShape.h:52
Definition WithPodConfig.h:22
E
Definition TwoElectronsTopCAL.py:10
-client
Definition CalorimeterClusterRecoCoG.cc:37
algorithms::Algorithm< algorithms::Input< edm4eic::ClusterCollection, std::optional< edm4eic::MCRecoClusterParticleAssociationCollection > >, algorithms::Output< edm4eic::ClusterCollection, std::optional< edm4eic::MCRecoClusterParticleLinkCollection >, std::optional< edm4eic::MCRecoClusterParticleAssociationCollection > > > CalorimeterClusterShapeAlgorithm
Algorithm input/output.
Definition CalorimeterClusterShape.h:38