ImpactX
Loading...
Searching...
No Matches
TrackingState.H
Go to the documentation of this file.
1/* Copyright 2022-2026 The Regents of the University of California, through Lawrence
2 * Berkeley National Laboratory (subject to receipt of any required
3 * approvals from the U.S. Dept. of Energy). All rights reserved.
4 *
5 * This file is part of ImpactX.
6 *
7 * Authors: Axel Huebl, Chad Mitchell
8 * License: BSD-3-Clause-LBNL
9 */
10#ifndef IMPACTX_TRACKING_STATE_H
11#define IMPACTX_TRACKING_STATE_H
12
13#include "elements/All.H"
15
16#include <optional>
17
18
19namespace impactx
20{
26 {
32 int m_step = 0;
33
35 int m_period = 0;
36
38 std::optional<elements::KnownElements*> m_element;
39
42
43 void set_no_element () { m_element = std::nullopt; }
44
45 bool forward () const { return m_direction == TrackingDirection::Forward; }
46 };
47
48} // namespace impactx
49
50#endif // IMPACTX_TRACKING_STATE_H
Definition CovarianceMatrixMath.H:25
TrackingDirection
Definition TrackingDirection.H:22
@ Forward
Definition TrackingDirection.H:22
Definition TrackingState.H:26
std::optional< elements::KnownElements * > m_element
Definition TrackingState.H:38
bool forward() const
Definition TrackingState.H:45
TrackingDirection m_direction
Definition TrackingState.H:41
void set_no_element()
Definition TrackingState.H:43
int m_step
Definition TrackingState.H:32
int m_period
Definition TrackingState.H:35