File indexing completed on 2025-01-18 09:12:13
0001
0002
0003
0004
0005
0006
0007
0008
0009 #pragma once
0010
0011 #include "Acts/Utilities/VectorHelpers.hpp"
0012 #include "ActsFatras/EventData/Particle.hpp"
0013
0014 #include <cmath>
0015
0016 namespace ActsFatras::Casts {
0017
0018
0019 struct Vrho {
0020 double operator()(const Particle& particle) const {
0021 return std::hypot(particle.position().x(), particle.position().y());
0022 }
0023 };
0024
0025
0026 struct Vz {
0027 double operator()(const Particle& particle) const {
0028 return particle.position().z();
0029 }
0030 };
0031
0032
0033 struct AbsVz {
0034 double operator()(const Particle& particle) const {
0035 return std::abs(particle.position().z());
0036 }
0037 };
0038
0039
0040 struct Eta {
0041 double operator()(const Particle& particle) const {
0042
0043 return std::atanh(particle.direction().z());
0044 }
0045 };
0046
0047
0048 struct AbsEta {
0049 double operator()(const Particle& particle) const {
0050
0051 return std::atanh(std::abs(particle.direction().z()));
0052 }
0053 };
0054
0055
0056 struct Pt {
0057 double operator()(const Particle& particle) const {
0058
0059 return particle.absoluteMomentum() *
0060 Acts::VectorHelpers::perp(particle.direction());
0061 }
0062 };
0063
0064
0065 struct P {
0066 double operator()(const Particle& particle) const {
0067 return particle.absoluteMomentum();
0068 }
0069 };
0070
0071
0072 struct E {
0073 double operator()(const Particle& particle) const {
0074 return particle.energy();
0075 }
0076 };
0077
0078 }