Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
Particle.cpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file Particle.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 "
ActsFatras/EventData/Particle.hpp
"
10
11
#include "
Acts/Definitions/ParticleData.hpp
"
12
#include "
Acts/Utilities/MultiIndex.hpp
"
13
14
#include <ostream>
15
16
ActsFatras::Particle::Particle
(
Barcode
particleId,
Acts::PdgParticle
pdg
)
17
:
Particle
(particleId, pdg,
findCharge
(pdg).value_or(0),
18
findMass
(pdg).value_or(0)) {}
19
20
std::ostream&
ActsFatras::operator<<
(std::ostream&
os
,
21
const
ActsFatras::Particle
&
particle
) {
22
// compact format w/ only identity information but no kinematics
23
os <<
"id="
<< particle.
particleId
().
value
() <<
"("
<< particle.
particleId
()
24
<<
")"
;
25
os <<
"|pdg="
<< particle.
pdg
();
26
os <<
"|q="
<< particle.
charge
();
27
os <<
"|m="
<< particle.
mass
();
28
os <<
"|p="
<< particle.
absoluteMomentum
();
29
return
os
;
30
}
acts
blob
sPHENIX
Fatras
src
EventData
Particle.cpp
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:41
using
1.8.2 with
sPHENIX GitHub integration