forked from acts-project/acts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Refactor Examples to use tracks instead of trajectories (ac…
…ts-project#2560) Currently we mix the usage of track and trajectory containers. In this PR I replace all the trajectory inputs to our writers in favor of track containers. blocked by - acts-project#2549
- Loading branch information
Showing
68 changed files
with
2,206 additions
and
2,364 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -167,7 +167,6 @@ histograms: | |
|
||
exclude: | ||
- event_nr | ||
- track_nr | ||
- hasFittedParams | ||
- majorityParticleId | ||
- multiTraj_nr | ||
- subTraj_nr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
Examples/Algorithms/Utilities/include/ActsExamples/Utilities/TracksToParameters.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
// This file is part of the Acts project. | ||
// | ||
// Copyright (C) 2023 CERN for the benefit of the Acts project | ||
// | ||
// This Source Code Form is subject to the terms of the Mozilla Public | ||
// License, v. 2.0. If a copy of the MPL was not distributed with this | ||
// file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
|
||
#pragma once | ||
|
||
#include "Acts/Utilities/Logger.hpp" | ||
#include "ActsExamples/EventData/Track.hpp" | ||
#include "ActsExamples/EventData/Trajectories.hpp" | ||
#include "ActsExamples/Framework/DataHandle.hpp" | ||
#include "ActsExamples/Framework/IAlgorithm.hpp" | ||
#include "ActsExamples/Framework/ProcessCode.hpp" | ||
|
||
#include <string> | ||
|
||
namespace ActsExamples { | ||
|
||
struct AlgorithmContext; | ||
|
||
class TracksToParameters final : public IAlgorithm { | ||
public: | ||
struct Config { | ||
std::string inputTracks = "tracks"; | ||
std::string outputTrackParameters = "parameters-from-tracks"; | ||
}; | ||
|
||
/// Construct the algorithm. | ||
/// | ||
/// @param cfg is the algorithm configuration | ||
/// @param lvl is the logging level | ||
TracksToParameters(Config cfg, Acts::Logging::Level lvl); | ||
|
||
/// Run the algorithm. | ||
/// | ||
/// @param ctx is the algorithm context with event information | ||
/// @return a process code indication success or failure | ||
ProcessCode execute(const AlgorithmContext& ctx) const final; | ||
|
||
/// Const access to the config | ||
const Config& config() const { return m_cfg; } | ||
|
||
private: | ||
Config m_cfg; | ||
|
||
ReadDataHandle<ConstTrackContainer> m_inputTracks{this, "InputTracks"}; | ||
WriteDataHandle<TrackParametersContainer> m_outputTrackParameters{ | ||
this, "OutputTrackParameters"}; | ||
}; | ||
|
||
} // namespace ActsExamples |
Oops, something went wrong.