Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-15 09:06:35

0001 // SPDX-License-Identifier: LGPL-3.0-or-later
0002 // Copyright (C) 2022, 2023 Sylvester Joosten, Dmitry Romanov, Wouter Deconinck
0003 
0004 #pragma once
0005 
0006 #include <algorithms/algorithm.h>
0007 #include <edm4eic/HadronicFinalStateCollection.h>
0008 #include <edm4eic/InclusiveKinematicsCollection.h>
0009 #include <edm4eic/ReconstructedParticleCollection.h>
0010 #include <edm4hep/MCParticleCollection.h>
0011 #include <string>
0012 #include <string_view>
0013 
0014 #include "algorithms/interfaces/WithPodConfig.h"
0015 #include "services/particle/ParticleSvc.h"
0016 
0017 namespace eicrecon {
0018 
0019 using InclusiveKinematicsESigmaAlgorithm = algorithms::Algorithm<
0020     algorithms::Input<edm4hep::MCParticleCollection, edm4hep::MCParticleCollection,
0021                       edm4eic::ReconstructedParticleCollection,
0022                       edm4eic::HadronicFinalStateCollection>,
0023     algorithms::Output<edm4eic::InclusiveKinematicsCollection>>;
0024 
0025 class InclusiveKinematicsESigma : public InclusiveKinematicsESigmaAlgorithm,
0026                                   public WithPodConfig<NoConfig> {
0027 
0028 public:
0029   InclusiveKinematicsESigma(std::string_view name)
0030       : InclusiveKinematicsESigmaAlgorithm{
0031             name,
0032             {"MCBeamElectrons", "MCBeamProtons", "scatteredElectron", "hadronicFinalState"},
0033             {"inclusiveKinematics"},
0034             "Determine inclusive kinematics using e-Sigma method."} {}
0035 
0036   void init() final;
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 
0044 } // namespace eicrecon