ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
PrintParticles.cpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file PrintParticles.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 "
PrintParticles.hpp
"
10
11
#include "
ACTFW/EventData/SimParticle.hpp
"
12
#include "
ACTFW/Framework/WhiteBoard.hpp
"
13
#include "
Acts/Utilities/Helpers.hpp
"
14
#include "
Acts/Utilities/Logger.hpp
"
15
#include "
Acts/Utilities/Units.hpp
"
16
#include "
ActsFatras/Utilities/ParticleData.hpp
"
17
18
FW::PrintParticles::PrintParticles
(
const
Config
& cfg,
Acts::Logging::Level
lvl)
19
:
BareAlgorithm
(
"PrintParticles"
, lvl), m_cfg(cfg) {}
20
21
FW::ProcessCode
FW::PrintParticles::execute
(
22
const
FW::AlgorithmContext
& ctx)
const
{
23
using namespace
Acts::UnitLiterals;
24
25
const
auto
& particles =
26
ctx.
eventStore
.
get
<
SimParticleContainer
>(m_cfg.inputParticles);
27
28
for
(
const
auto
&
particle
: particles) {
29
ACTS_INFO
(
30
"evt="
<< ctx.
eventNumber
<<
" pid="
<<
particle
.particleId()
31
<<
" pdg="
<<
particle
.pdg() <<
" phi="
32
<<
Acts::VectorHelpers::phi
(
particle
.unitDirection()) / 1_degree
33
<<
"deg"
34
<<
" eta="
<<
Acts::VectorHelpers::eta
(
particle
.unitDirection())
35
<<
" p="
<<
particle
.absMomentum() / 1
_GeV
<<
"GeV"
);
36
}
37
return
ProcessCode::SUCCESS
;
38
}
acts
blob
master
Examples
Algorithms
Printers
ACTFW
Printers
PrintParticles.cpp
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:24:23
using
1.8.2 with
ECCE GitHub integration