Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-09-27 07:02:58

0001 // SPDX-License-Identifier: LGPL-3.0-or-later
0002 // Copyright (C) 2023, Simon Gardner
0003 
0004 #pragma once
0005 
0006 // Event Model related classes
0007 #include <edm4eic/TrackParametersCollection.h>
0008 #include <edm4eic/TrackSegmentCollection.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 = algorithms::Algorithm<
0020         algorithms::Input<
0021             edm4eic::TrackSegmentCollection
0022         >,
0023         algorithms::Output<
0024             edm4eic::TrackParametersCollection
0025         >
0026     >;
0027 
0028     class FarDetectorLinearProjection
0029     : public FarDetectorLinearProjectionAlgorithm,
0030       public WithPodConfig<FarDetectorLinearProjectionConfig>  {
0031 
0032     public:
0033         FarDetectorLinearProjection(std::string_view name)
0034             : FarDetectorLinearProjectionAlgorithm{name,
0035                 {"inputTrackSegments"},
0036                 {"outputTrackParameters"},
0037                 "Project track segments to a plane"} {}
0038 
0039         /** One time initialization **/
0040         void init() final;
0041 
0042         /** Event by event processing **/
0043         void process(const Input&, const Output&) const final;
0044 
0045 
0046     private:
0047         Eigen::Vector3d  m_plane_position;
0048         Eigen::Vector3d  m_plane_a;
0049         Eigen::Vector3d  m_plane_b;
0050         Eigen::Matrix3d  m_directions;
0051 
0052     };
0053 
0054 } // eicrecon