Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
Analysis Software
Deprecated List
Modules
Namespaces
Classes
Files
File List
acts
blob
sPHENIX
Alignment
CI
cmake
Core
docs
Examples
Algorithms
Alignment
AmbiguityResolution
Digitization
Fatras
Geant4
Geant4HepMC
Generators
GeneratorsPythia8
Geometry
HepMC
MaterialMapping
Printers
ActsExamples
Printers
HitsPrinter.cpp
HitsPrinter.hpp
ParticlesPrinter.cpp
ParticlesPrinter.hpp
TrackParametersPrinter.cpp
TrackParametersPrinter.hpp
Propagation
TrackFinding
TrackFindingExaTrkX
TrackFindingML
TrackFitting
TruthTracking
Utilities
Vertexing
Detectors
Framework
Io
Python
Run
Scripts
Fatras
Plugins
Tests
acts-fatras
analysis
analysis_tpc_prototype
coresoftware
Doxygen_Assist
g4exampledetector
GenFit
JETSCAPE
KFParticle
macros
online_distribution
OnlMon
prototype
pythia6
rcdaq
RDBC
tutorials
doxygen_mainpage.h
File Members
Examples
External Links
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
TrackParametersPrinter.cpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file TrackParametersPrinter.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
9
#include "
TrackParametersPrinter.hpp
"
10
11
#include "
Acts/EventData/GenericBoundTrackParameters.hpp
"
12
#include "
Acts/Utilities/Logger.hpp
"
13
#include "
ActsExamples/EventData/Track.hpp
"
14
#include "
ActsExamples/Framework/AlgorithmContext.hpp
"
15
16
#include <cstddef>
17
#include <ostream>
18
#include <stdexcept>
19
#include <vector>
20
21
ActsExamples::TrackParametersPrinter::TrackParametersPrinter
(
22
const
Config
&
cfg
,
Acts::Logging::Level
level
)
23
:
IAlgorithm
(
"TrackParametersPrinter"
, level),
m_cfg
(cfg) {
24
if
(
m_cfg
.
inputTrackParameters
.empty()) {
25
throw
std::invalid_argument(
26
"Input track parameters collection is not configured"
);
27
}
28
29
m_inputTrackParameters
.
initialize
(
m_cfg
.
inputTrackParameters
);
30
}
31
32
ActsExamples::ProcessCode
ActsExamples::TrackParametersPrinter::execute
(
33
const
ActsExamples::AlgorithmContext
& ctx)
const
{
34
const
auto
& trackParameters = m_inputTrackParameters(ctx);
35
36
ACTS_INFO
(
"event "
<< ctx.
eventNumber
<<
" collection '"
37
<<
m_cfg
.inputTrackParameters <<
"' contains "
38
<< trackParameters.size() <<
" track parameters"
);
39
std::size_t
i
= 0;
40
for
(
const
auto
& params : trackParameters) {
41
ACTS_INFO
(
" track "
<< i++ <<
"\n"
<< params);
42
}
43
return
ProcessCode::SUCCESS
;
44
}
acts
blob
sPHENIX
Examples
Algorithms
Printers
ActsExamples
Printers
TrackParametersPrinter.cpp
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:37
using
1.8.2 with
sPHENIX GitHub integration