Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-13 08:26:34

0001 // SPDX-License-Identifier: LGPL-3.0-or-later
0002 // Copyright (C) 2022, 2023, Sylvester Joosten, Wouter Deconinck, Dmitry Romanov, Christopher Dilks
0003 
0004 #pragma once
0005 
0006 #include <algorithms/algorithm.h>
0007 #include <edm4eic/CherenkovParticleIDCollection.h>
0008 #include <edm4eic/MCRecoParticleAssociationCollection.h>
0009 #include <edm4eic/MCRecoParticleLinkCollection.h>
0010 #include <edm4eic/ReconstructedParticleCollection.h>
0011 #include <edm4hep/ParticleIDCollection.h>
0012 #include <string>
0013 #include <string_view>
0014 
0015 #include "MatchToRICHPIDConfig.h"
0016 #include "algorithms/interfaces/WithPodConfig.h"
0017 
0018 namespace eicrecon {
0019 
0020 using MatchToRICHPIDAlgorithm = algorithms::Algorithm<
0021     algorithms::Input<edm4eic::ReconstructedParticleCollection,
0022                       edm4eic::MCRecoParticleLinkCollection,
0023                       edm4eic::CherenkovParticleIDCollection>,
0024     algorithms::Output<
0025         edm4eic::ReconstructedParticleCollection, edm4eic::MCRecoParticleLinkCollection,
0026         edm4eic::MCRecoParticleAssociationCollection, edm4hep::ParticleIDCollection>>;
0027 
0028 class MatchToRICHPID : public MatchToRICHPIDAlgorithm, public WithPodConfig<MatchToRICHPIDConfig> {
0029 public:
0030   MatchToRICHPID(std::string_view name)
0031       : MatchToRICHPIDAlgorithm{name,
0032                                 {"inputReconstructedParticlesCollection", "inputLinksCollection",
0033                                  "inputCherenkovParticleIDCollection"},
0034                                 {"outputReconstructedParticlesCollection", "outputLinks",
0035                                  "outputAssociationsCollection"},
0036                                 "Matches tracks to Cherenkov PIDs"} {};
0037 
0038   void init() final;
0039   void process(const Input&, const Output&) const final;
0040 
0041 private:
0042   bool linkCherenkovPID(edm4eic::MutableReconstructedParticle& in_part,
0043                         const edm4eic::CherenkovParticleIDCollection& in_pids,
0044                         edm4hep::ParticleIDCollection& out_pids) const;
0045 };
0046 
0047 } // namespace eicrecon