EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TutorialVertexFinderAlgorithm.cpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file TutorialVertexFinderAlgorithm.cpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2020 CERN for the benefit of the Acts project
4 //
5 // This Source Code Form is subject to the terms of the Mozilla Public
6 // License, v. 2.0. If a copy of the MPL was not distributed with this
7 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 
10 
16 #include "Acts/Utilities/Units.hpp"
28 
29 #include "VertexingHelpers.hpp"
30 
32  const Config& cfg, Acts::Logging::Level lvl)
33  : ActsExamples::BareAlgorithm("TutorialVertexFinder", lvl), m_cfg(cfg) {
34  if (m_cfg.inputTrackParameters.empty()) {
35  throw std::invalid_argument("Missing input track parameters collection");
36  }
37  if (m_cfg.outputProtoVertices.empty()) {
38  throw std::invalid_argument("Missing output proto vertices collection");
39  }
40 }
41 
43  const ActsExamples::AlgorithmContext& ctx) const {
44  // retrieve input tracks and convert into the expected format
45  const auto& inputTrackParameters =
46  ctx.eventStore.get<TrackParametersContainer>(m_cfg.inputTrackParameters);
47  const auto& inputTrackPointers =
48  makeTrackParametersPointerContainer(inputTrackParameters);
49  //* Do not change the code above this line *//
50 
51  //* Remove following 2 lines. Only here to suppress unused variable errors *//
52  (void)(inputTrackParameters);
53  (void)(inputTrackPointers);
54 
56  /***** Note: This is a skeleton file to be filled with tutorial code *****/
57  /***** provided in the Acts Docs - Vertexing section under the link: *****/
58  /* https://acts.readthedocs.io/en/latest/howto/setup_and_run_vertexing.html */
59  /*** or in the Acts repository in docs/howto/setup_and_run_vertexing.md ***/
61 
63  /* Add the tutorial example code here */
66  /* For the full tutorial code please refer */
67  /* to AdaptiveMultiVertexFinderAlgorithm.cpp */
69 
70  //* Do not change the code below this line *//
72 }