Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /acts/Examples/Algorithms/Utilities/src/SeedsToProtoTracks.cpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // This file is part of the ACTS project.
0002 //
0003 // Copyright (C) 2016 CERN for the benefit of the ACTS project
0004 //
0005 // This Source Code Form is subject to the terms of the Mozilla Public
0006 // License, v. 2.0. If a copy of the MPL was not distributed with this
0007 // file, You can obtain one at https://mozilla.org/MPL/2.0/.
0008 
0009 #include "ActsExamples/Utilities/SeedsToProtoTracks.hpp"
0010 
0011 #include "ActsExamples/EventData/ProtoTrack.hpp"
0012 #include "ActsExamples/Utilities/EventDataTransforms.hpp"
0013 
0014 #include <utility>
0015 
0016 namespace ActsExamples {
0017 
0018 SeedsToProtoTracks::SeedsToProtoTracks(
0019     Config cfg, std::unique_ptr<const Acts::Logger> logger)
0020     : IAlgorithm("SeedsToProtoTracks", std::move(logger)),
0021       m_cfg(std::move(cfg)) {
0022   m_inputSeeds.initialize(m_cfg.inputSeeds);
0023   m_outputProtoTracks.initialize(m_cfg.outputProtoTracks);
0024 }
0025 
0026 ProcessCode SeedsToProtoTracks::execute(const AlgorithmContext& ctx) const {
0027   const SeedContainer& seeds = m_inputSeeds(ctx);
0028 
0029   ProtoTrackContainer tracks;
0030   tracks.reserve(seeds.size());
0031 
0032   std::transform(seeds.begin(), seeds.end(), std::back_inserter(tracks),
0033                  seedToProtoTrack);
0034 
0035   m_outputProtoTracks(ctx, std::move(tracks));
0036 
0037   return ProcessCode::SUCCESS;
0038 }
0039 
0040 }  // namespace ActsExamples