Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-07-27 07:54:07

0001 // SPDX-License-Identifier: LGPL-3.0-or-later
0002 // Copyright (C) 2025, Simon Gardner
0003 
0004 #include <algorithms/algorithm.h>
0005 #include <edm4eic/MCRecoParticleAssociationCollection.h>
0006 #include <edm4eic/ReconstructedParticleCollection.h>
0007 #include <edm4hep/ParticleIDCollection.h>
0008 #include <edm4hep/Vector3f.h>
0009 #include <stdint.h>
0010 #include <string>
0011 #include <string_view>
0012 
0013 #include "PhaseSpacePIDConfig.h"
0014 #include "algorithms/interfaces/WithPodConfig.h"
0015 
0016 namespace eicrecon {
0017 
0018 using PhaseSpacePIDAlgorithm =
0019     algorithms::Algorithm<algorithms::Input<edm4eic::ReconstructedParticleCollection,
0020                                             edm4eic::MCRecoParticleAssociationCollection>,
0021                           algorithms::Output<edm4eic::ReconstructedParticleCollection,
0022                                              edm4eic::MCRecoParticleAssociationCollection,
0023                                              edm4hep::ParticleIDCollection>>;
0024 
0025 class PhaseSpacePID : public PhaseSpacePIDAlgorithm, public WithPodConfig<PhaseSpacePIDConfig> {
0026 
0027 public:
0028   PhaseSpacePID(std::string_view name)
0029       : PhaseSpacePIDAlgorithm{name,
0030                                {"inputParticlesCollection", "inputParticleAssociationsCollection"},
0031                                {"outputParticlesCollection", "outputParticleAssociationsCollection",
0032                                 "outputParticleIDCollection"},
0033                                ""} {}
0034 
0035   void init() final;
0036   void process(const Input&, const Output&) const final;
0037 
0038 private:
0039   int32_t m_system;
0040   edm4hep::Vector3f m_direction; // Direction vector for the phase space
0041   double m_mass;
0042   double m_charge;
0043 };
0044 
0045 } // namespace eicrecon