Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // SPDX-License-Identifier: LGPL-3.0-or-later
0002 // Copyright (C) 2024 Tyler Kutz
0003 
0004 #pragma once
0005 
0006 #include <algorithms/algorithm.h>
0007 #include <edm4eic/HadronicFinalStateCollection.h>
0008 #include <edm4eic/MCRecoParticleAssociationCollection.h>
0009 #include <edm4eic/ReconstructedParticleCollection.h>
0010 #include <edm4hep/MCParticleCollection.h>
0011 #include <string>
0012 #include <string_view>
0013 
0014 #include "algorithms/interfaces/ParticleSvc.h"
0015 
0016 namespace eicrecon {
0017 
0018 using HadronicFinalStateAlgorithm = algorithms::Algorithm<
0019     algorithms::Input<edm4hep::MCParticleCollection, edm4eic::ReconstructedParticleCollection,
0020                       edm4eic::MCRecoParticleAssociationCollection>,
0021     algorithms::Output<edm4eic::HadronicFinalStateCollection>>;
0022 
0023 class HadronicFinalState : public HadronicFinalStateAlgorithm {
0024 
0025 public:
0026   HadronicFinalState(std::string_view name)
0027       : HadronicFinalStateAlgorithm{name,
0028                                     {"MCParticles", "inputParticles", "inputAssociations"},
0029                                     {"hadronicFinalState"},
0030                                     "Calculate summed quantities of the hadronic final state."} {}
0031 
0032   void init() final;
0033   void process(const Input&, const Output&) const final;
0034 
0035 private:
0036   const algorithms::ParticleSvc& m_particleSvc = algorithms::ParticleSvc::instance();
0037   double m_crossingAngle{-0.025};
0038 };
0039 
0040 } // namespace eicrecon