Analysis Software
Documentation for sPHENIX simulation 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 
11 #include <stdexcept>
12 
13 #include "VertexingHelpers.hpp"
14 
15 namespace ActsExamples {
16 struct AlgorithmContext;
17 } // namespace ActsExamples
18 
20  const Config& cfg, Acts::Logging::Level lvl)
21  : ActsExamples::IAlgorithm("TutorialVertexFinder", lvl), m_cfg(cfg) {
22  if (m_cfg.inputTrackParameters.empty() == m_cfg.inputTrajectories.empty()) {
23  throw std::invalid_argument(
24  "You have to either provide track parameters or trajectories");
25  }
26  if (m_cfg.outputProtoVertices.empty()) {
27  throw std::invalid_argument("Missing output proto vertices collection");
28  }
29 
33 }
34 
36  const ActsExamples::AlgorithmContext& ctx) const {
37  // retrieve input tracks and convert into the expected format
38  const auto& inputTrackParameters = m_inputTrackParameters(ctx);
39  const auto& inputTrackPointers =
40  makeTrackParametersPointerContainer(inputTrackParameters);
41  //* Do not change the code above this line *//
42 
43  //* Remove following 2 lines. Only here to suppress unused variable errors *//
44  (void)(inputTrackParameters);
45  (void)(inputTrackPointers);
46 
48  /***** Note: This is a skeleton file to be filled with tutorial code *****/
49  /***** provided in the Acts Docs - Vertexing section under the link: *****/
50  /* https://acts.readthedocs.io/en/latest/howto/setup_and_run_vertexing.html */
51  /*** or in the Acts repository in docs/howto/setup_and_run_vertexing.md ***/
53 
55  /* Add the tutorial example code here */
58  /* For the full tutorial code please refer */
59  /* to AdaptiveMultiVertexFinderAlgorithm.cpp */
61 
62  //* Do not change the code below this line *//
64 }