Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-11-15 09:30:21

0001 // SPDX-License-Identifier: LGPL-3.0-or-later
0002 // Copyright (C) 2026 Wouter Deconinck
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 "InclusiveKinematicsTruthDressedConfig.h"
0014 #include "algorithms/interfaces/WithPodConfig.h"
0015 #include "services/particle/ParticleSvc.h"
0016 
0017 namespace eicrecon {
0018 
0019 using InclusiveKinematicsTruthDressedAlgorithm = algorithms::Algorithm<
0020     algorithms::Input<edm4hep::MCParticleCollection>,
0021     algorithms::Output<edm4eic::InclusiveKinematicsCollection,
0022                        edm4eic::ReconstructedParticleCollection, edm4hep::MCParticleCollection>>;
0023 
0024 /// Inclusive kinematics on the lepton side with a dressed scattered lepton,
0025 /// q = k - (k' + k_FSR), where k_FSR are the real photons radiated from the scattered lepton:
0026 /// by parentage when the event record has photons emitted after the hard scattering, otherwise
0027 /// those inside a cone around the bare scattered lepton.
0028 ///
0029 /// Outputs the kinematics, the dressed scattered lepton (as the `scat` relation of the
0030 /// kinematics), and the generator particles it is made of (bare lepton first, then photons).
0031 class InclusiveKinematicsTruthDressed
0032     : public InclusiveKinematicsTruthDressedAlgorithm,
0033       public WithPodConfig<InclusiveKinematicsTruthDressedConfig> {
0034 
0035 public:
0036   InclusiveKinematicsTruthDressed(std::string_view name)
0037       : InclusiveKinematicsTruthDressedAlgorithm{
0038             name,
0039             {"MCParticles"},
0040             {"inclusiveKinematics", "scatteredLepton", "scatteredLeptonConstituents"},
0041             "Determine inclusive kinematics with a dressed scattered lepton from truth "
0042             "information."} {}
0043 
0044   void init() final;
0045   void process(const Input&, const Output&) const final;
0046 
0047 private:
0048   const algorithms::ParticleSvc& m_particleSvc = algorithms::ParticleSvc::instance();
0049 };
0050 
0051 } // namespace eicrecon