File indexing completed on 2025-07-11 07:53:35
0001
0002
0003
0004 #pragma once
0005
0006 #include <algorithms/algorithm.h>
0007 #include <edm4eic/CherenkovParticleIDCollection.h>
0008 #include <edm4eic/MCRecoParticleAssociationCollection.h>
0009 #include <edm4eic/ReconstructedParticleCollection.h>
0010 #include <edm4hep/ParticleIDCollection.h>
0011 #include <string>
0012 #include <string_view>
0013
0014 #include "MatchToRICHPIDConfig.h"
0015 #include "algorithms/interfaces/WithPodConfig.h"
0016
0017 namespace eicrecon {
0018
0019 using MatchToRICHPIDAlgorithm =
0020 algorithms::Algorithm<algorithms::Input<edm4eic::ReconstructedParticleCollection,
0021 edm4eic::MCRecoParticleAssociationCollection,
0022 edm4eic::CherenkovParticleIDCollection>,
0023 algorithms::Output<edm4eic::ReconstructedParticleCollection,
0024 edm4eic::MCRecoParticleAssociationCollection,
0025 edm4hep::ParticleIDCollection>>;
0026
0027 class MatchToRICHPID : public MatchToRICHPIDAlgorithm, public WithPodConfig<MatchToRICHPIDConfig> {
0028 public:
0029 MatchToRICHPID(std::string_view name)
0030 : MatchToRICHPIDAlgorithm{
0031 name,
0032 {"inputReconstructedParticlesCollection", "inputAssociationsCollection",
0033 "inputCherenkovParticleIDCollection"},
0034 {"outputReconstructedParticlesCollection", "outputAssociationsCollection"},
0035 "Matches tracks to Cherenkov PIDs"} {};
0036
0037 void init() final;
0038 void process(const Input&, const Output&) const final;
0039
0040 private:
0041 bool linkCherenkovPID(edm4eic::MutableReconstructedParticle& in_part,
0042 const edm4eic::CherenkovParticleIDCollection& in_pids,
0043 edm4hep::ParticleIDCollection& out_pids) const;
0044 };
0045
0046 }