Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-06-29 07:05:58

0001 // SPDX-License-Identifier: LGPL-3.0-or-later
0002 // Copyright (C) 2024 John Lajoie
0003 
0004 #pragma once
0005 
0006 #include <algorithms/algorithm.h>
0007 #include <edm4eic/InclusiveKinematicsCollection.h>
0008 #include <edm4eic/ReconstructedParticleCollection.h>
0009 #include <edm4hep/MCParticleCollection.h>
0010 #include <string>
0011 #include <string_view>
0012 
0013 #include "algorithms/interfaces/ParticleSvc.h"
0014 #include "algorithms/interfaces/WithPodConfig.h"
0015 
0016 namespace eicrecon {
0017 
0018 using TransformBreitFrameAlgorithm = algorithms::Algorithm<
0019     algorithms::Input<edm4hep::MCParticleCollection, edm4eic::InclusiveKinematicsCollection,
0020                       edm4eic::ReconstructedParticleCollection>,
0021     algorithms::Output<edm4eic::ReconstructedParticleCollection>>;
0022 
0023 class TransformBreitFrame : public TransformBreitFrameAlgorithm, public WithPodConfig<NoConfig> {
0024 
0025 public:
0026   TransformBreitFrame(std::string_view name)
0027       : TransformBreitFrameAlgorithm{
0028             name,
0029             {"inputMCParticles", "inputInclusiveKinematics", "inputReconstructedParticles"},
0030             {"outputReconstructedParticles"},
0031             "Transforms a set of particles from the lab frame to the Breit frame"} {}
0032 
0033   // algorithm initialization
0034   void init() final{};
0035 
0036   // run algorithm
0037   void process(const Input&, const Output&) const final;
0038 
0039 private:
0040   const algorithms::ParticleSvc& m_particleSvc = algorithms::ParticleSvc::instance();
0041   double m_crossingAngle{-0.025};
0042 
0043 }; // end TransformBreitFrame definition
0044 
0045 } // namespace eicrecon