Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-06-26 07:05:44

0001 // SPDX-License-Identifier: LGPL-3.0-or-later
0002 // Copyright (C) 2022 - 2024, Sylvester Joosten, Wouter Deconinck, Dmitry Romanov, Christopher Dilks, Dmitry Kalinkin
0003 
0004 
0005 #pragma once
0006 
0007 #include <algorithms/algorithm.h>
0008 #include <edm4eic/MCRecoParticleAssociationCollection.h>
0009 #include <edm4eic/ReconstructedParticleCollection.h>
0010 #include <edm4eic/TrackCollection.h>
0011 #include <edm4hep/MCParticleCollection.h>
0012 #include <string>
0013 #include <string_view>
0014 
0015 #include "TracksToParticlesConfig.h"
0016 #include "algorithms/interfaces/WithPodConfig.h"
0017 
0018 
0019 namespace eicrecon {
0020 
0021 using TracksToParticlesAlgorithm =
0022     algorithms::Algorithm<
0023       algorithms::Input<edm4hep::MCParticleCollection, edm4eic::TrackCollection>,
0024       algorithms::Output<edm4eic::ReconstructedParticleCollection, edm4eic::MCRecoParticleAssociationCollection>
0025     >;
0026 
0027 class TracksToParticles : public TracksToParticlesAlgorithm, public WithPodConfig<TracksToParticlesConfig> {
0028 public:
0029 
0030     TracksToParticles(std::string_view name) : TracksToParticlesAlgorithm{name, {"inputMCParticlesCollection", "inputTracksCollection"}, {"outputReconstructedParticlesCollection", "outputAssociationsCollection"}, "Converts track to particles with associations"} {};
0031 
0032     void init() final;
0033     void process(const Input&, const Output&) const final;
0034 
0035 private:
0036 
0037     void tracePhiToleranceOnce(const double sinPhiOver2Tolerance, double phiTolerance) const;
0038 };
0039 
0040 }