EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
EIC Software
Deprecated List
Modules
Namespaces
Classes
Files
File List
acts
blob
sPHENIX
CI
Core
docs
Examples
Algorithms
Digitization
Fatras
Fitting
Geant4
Geant4DD4hep
Generators
GeneratorsPythia8
MaterialMapping
Printers
ActsExamples
Printers
PrintHits.cpp
PrintHits.hpp
PrintParticles.cpp
PrintParticles.hpp
Propagation
TrackFinding
TruthTracking
Vertexing
Detectors
Framework
Io
Run
Scripts
Fatras
Plugins
Tests
thirdparty
BeastMagneticField
delphes_EIC
Doxygen_Assist
east
eic-smear
EicRoot
eicsmear-jetexample
eicsmeardetectors
EicToyModel
estarlight
Fun4All-lmon
fun4all_coresoftware
fun4all_eic_qa
fun4all_eic_tutorials
fun4all_eicdetectors
fun4all_eicmacros
fun4all_g4jleic
fun4all_GenFit
fun4all_macros
fun4all_tutorials
g4exampledetector
g4lblvtx
online_distribution
PEPSI
doxygen_mainpage.h
File Members
External Links
•
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 "
Acts/Utilities/Helpers.hpp
"
12
#include "
Acts/Utilities/Logger.hpp
"
13
#include "
Acts/Utilities/Units.hpp
"
14
#include "
ActsExamples/EventData/SimParticle.hpp
"
15
#include "
ActsExamples/Framework/WhiteBoard.hpp
"
16
#include "
ActsFatras/Utilities/ParticleData.hpp
"
17
18
ActsExamples::PrintParticles::PrintParticles
(
const
Config
& cfg,
19
Acts::Logging::Level
lvl)
20
:
BareAlgorithm
(
"PrintParticles"
, lvl), m_cfg(cfg) {}
21
22
ActsExamples::ProcessCode
ActsExamples::PrintParticles::execute
(
23
const
ActsExamples::AlgorithmContext
& ctx)
const
{
24
using namespace
Acts::UnitLiterals;
25
26
const
auto
& particles =
27
ctx.
eventStore
.
get
<
SimParticleContainer
>(m_cfg.inputParticles);
28
29
for
(
const
auto
&
particle
: particles) {
30
ACTS_INFO
(
31
"evt="
<< ctx.
eventNumber
<<
" pid="
<<
particle
.particleId()
32
<<
" pdg="
<<
particle
.pdg() <<
" phi="
33
<<
Acts::VectorHelpers::phi
(
particle
.unitDirection()) / 1_degree
34
<<
"deg"
35
<<
" eta="
<<
Acts::VectorHelpers::eta
(
particle
.unitDirection())
36
<<
" p="
<<
particle
.absMomentum() / 1_GeV <<
"GeV"
);
37
}
38
return
ProcessCode::SUCCESS
;
39
}
acts
blob
sPHENIX
Examples
Algorithms
Printers
ActsExamples
Printers
PrintParticles.cpp
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:24
using
1.8.2 with
EIC GitHub integration