Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-09-28 07:02:56

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