Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TrackFindingOptions.cpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file TrackFindingOptions.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 
13 
14 #include <string>
15 
16 #include <boost/program_options.hpp>
17 
21 
22  auto opt = desc.add_options();
23  opt("ckf-selection-abseta-bins", value<VariableReals>()->default_value({{}}),
24  "bins in |eta| to specify variable selections");
25  opt("ckf-selection-chi2max", value<VariableReals>()->default_value({{15}}),
26  "Maximum chi2 for CKF measurement selection "
27  "(specify multiple values with --ckf-selection-abseta-bins)");
28  opt("ckf-selection-nmax", value<VariableIntegers>()->default_value({{10}}),
29  "Maximum number of measurement candidates on a "
30  "surface for CKF measurement selection "
31  "(specify multiple values with --ckf-selection-abseta-bins)");
32  opt("ckf-initial-variance-inflation",
33  value<Reals<6>>()->default_value({{1., 1., 1., 1., 1., 1.}}),
34  "Inflation factor for the initial variances in the CKF search, must be "
35  "of form i:j:k:l:m:n.");
36 }
37 
40  const ActsExamples::Options::Variables& variables) {
41  auto etaBins = variables["ckf-selection-abseta-bins"]
42  .template as<VariableReals>()
43  .values;
44  auto chi2Max =
45  variables["ckf-selection-chi2max"].template as<VariableReals>().values;
46  auto nMax =
47  variables["ckf-selection-nmax"].template as<VariableIntegers>().values;
48 
49  // config is a GeometryHierarchyMap with just the global default
51  cfg.measurementSelectorCfg = {
53  {etaBins, chi2Max, {nMax.begin(), nMax.end()}}},
54  };
55  return cfg;
56 }