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
KinematicCasts.hpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file KinematicCasts.hpp
1
// This file is part of the Acts project.
2
//
3
// Copyright (C) 2018-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
#pragma once
10
11
#include "
Acts/Utilities/VectorHelpers.hpp
"
12
#include "
ActsFatras/EventData/Particle.hpp
"
13
14
#include <cmath>
15
16
namespace
ActsFatras {
17
namespace
Casts {
18
20
struct
Vrho
{
21
double
operator()
(
const
Particle
&
particle
)
const
{
22
return
std::hypot(particle.
position
().x(), particle.
position
().y());
23
}
24
};
25
27
struct
Vz
{
28
double
operator()
(
const
Particle
&
particle
)
const
{
29
return
particle.
position
().z();
30
}
31
};
32
34
struct
AbsVz
{
35
double
operator()
(
const
Particle
&
particle
)
const
{
36
return
std::abs(particle.
position
().z());
37
}
38
};
39
41
struct
Eta
{
42
double
operator()
(
const
Particle
&
particle
)
const
{
43
// particle direction is always normalized, i.e. dz = pz / p
44
return
std::atanh(particle.
direction
().z());
45
}
46
};
47
49
struct
AbsEta
{
50
double
operator()
(
const
Particle
&
particle
)
const
{
51
// particle direction is always normalized, i.e. dz = pz / p
52
return
std::atanh(std::abs(particle.
direction
().z()));
53
}
54
};
55
57
struct
Pt
{
58
double
operator()
(
const
Particle
&
particle
)
const
{
59
// particle direction is always normalized, i.e. dt²+dz²=1 w/ dt²=dx²+dy²
60
return
particle.
absoluteMomentum
() *
61
Acts::VectorHelpers::perp
(particle.
direction
());
62
}
63
};
64
66
struct
P
{
67
double
operator()
(
const
Particle
&
particle
)
const
{
68
return
particle.
absoluteMomentum
();
69
}
70
};
71
73
struct
E
{
74
double
operator()
(
const
Particle
&
particle
)
const
{
75
return
particle.
energy
();
76
}
77
};
78
79
}
// namespace Casts
80
}
// namespace ActsFatras
acts
blob
sPHENIX
Fatras
include
ActsFatras
Selectors
KinematicCasts.hpp
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:41
using
1.8.2 with
sPHENIX GitHub integration