Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-06-30 08:34:27

0001 // SPDX-License-Identifier: LGPL-3.0-or-later
0002 // Copyright (C) 2023-2025, Simon Gardner
0003 
0004 #pragma once
0005 
0006 // Event Model related classes
0007 #include <edm4eic/TrackParametersCollection.h>
0008 #include <edm4eic/TrackCollection.h>
0009 #include <Eigen/Core>
0010 #include <string>
0011 #include <string_view>
0012 
0013 #include "algorithms/algorithm.h"
0014 #include "algorithms/fardetectors/FarDetectorLinearProjectionConfig.h"
0015 #include "algorithms/interfaces/WithPodConfig.h"
0016 
0017 namespace eicrecon {
0018 
0019 using FarDetectorLinearProjectionAlgorithm =
0020     algorithms::Algorithm<algorithms::Input<edm4eic::TrackCollection>,
0021                           algorithms::Output<edm4eic::TrackParametersCollection>>;
0022 
0023 class FarDetectorLinearProjection : public FarDetectorLinearProjectionAlgorithm,
0024                                     public WithPodConfig<FarDetectorLinearProjectionConfig> {
0025 
0026 public:
0027   FarDetectorLinearProjection(std::string_view name)
0028       : FarDetectorLinearProjectionAlgorithm{
0029             name, {"inputTrack"}, {"outputTrackParameters"}, "Project track segments to a plane"} {}
0030 
0031   /** One time initialization **/
0032   void init() final;
0033 
0034   /** Event by event processing **/
0035   void process(const Input&, const Output&) const final;
0036 
0037 private:
0038   Eigen::Vector3d m_plane_position;
0039   Eigen::Vector3d m_plane_a;
0040   Eigen::Vector3d m_plane_b;
0041   Eigen::Matrix3d m_directions;
0042 };
0043 
0044 } // namespace eicrecon