ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
EmptyDetector.cpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file EmptyDetector.cpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2019 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 <boost/program_options.hpp>
12 
18 #include "Acts/Utilities/Units.hpp"
19 
21  boost::program_options::options_description& opt) const {
23 }
24 
26  const boost::program_options::variables_map& vm,
27  std::shared_ptr<const Acts::IMaterialDecorator> /*unused*/)
28  -> std::pair<TrackingGeometryPtr, ContextDecorators> {
29  using namespace Acts::UnitLiterals;
30 
31  // Create an empty cylinder with the chosen radius / halflength
32  double r = vm["geo-empty-radius"].as<double>() * 1_m;
33  double hz = vm["geo-empty-halfLength"].as<double>() * 1_m;
34 
35  // The cylinder volume bounds
36  auto cvBounds = std::make_shared<Acts::CylinderVolumeBounds>(0.0, r, hz);
37 
38  // Create the world volume
39  auto worldVolume =
40  Acts::TrackingVolume::create(nullptr, cvBounds, nullptr, "EmptyCylinder");
41 
42  // Create the tracking geometry
43  auto tgGeometry =
44  std::make_shared<Acts::TrackingGeometry>(std::move(worldVolume), nullptr);
45 
47  ContextDecorators eContextDeocrators = {};
48 
49  // And return the pair with empty decorators
50  return std::make_pair<TrackingGeometryPtr, ContextDecorators>(
51  std::move(tgGeometry), std::move(eContextDeocrators));
52 }