PlasmaMLPALLAS
Loading...
Searching...
No Matches
PlasmaMLPALLASQuadrupoleUtils.hh
Go to the documentation of this file.
1#ifndef QUADRUPOLEUTILS_HH
2#define QUADRUPOLEUTILS_HH
3
38// Simple 3D vector structure to store x, y, z components
39struct Vector3
40{
41 float x, y, z;
42};
43
44// Structure representing the state of a single quadrupole
45// It stores the position and momentum vectors at both the beginning and end of the quadrupole
47{
48 Vector3 begin; // Position at the beginning of the quadrupole
49 Vector3 end; // Position at the end of the quadrupole
50 Vector3 beginMomentum; // Momentum at the beginning
51 Vector3 endMomentum; // Momentum at the end
52};
53
54// Structure storing all quadrupoles in a run, plus additional statistics like energy
63
64// Enumeration to identify each quadrupole
65enum class QuadID { Q1 = 1, Q2, Q3, Q4 };
66
67// Enumeration to specify whether we are referring to the beginning or end of a quadrupole
68enum class PositionType { Begin, End };
69
70// Enumeration to select between position vector or momentum vector
72
73// Enumeration to select a vector component
74enum class Axis { X, Y, Z };
75
76// Function declaration for setting a specific component of a quadrupole vector
77// Implementation is in PlasmaMLPALLASQuadrupoleUtils.cc
79 QuadID qid,
80 PositionType posType,
81 VectorType vecType,
82 Axis axis,
83 float value);
84
85#endif
QuadID
Definition PlasmaMLPALLASQuadrupoleUtils.hh:65
VectorType
Definition PlasmaMLPALLASQuadrupoleUtils.hh:71
void SetQuadrupoleValue(RunTallyQuadrupoles &stats, QuadID qid, PositionType posType, VectorType vecType, Axis axis, float value)
Sets a specific component of a quadrupole vector.
Definition PlasmaMLPALLASQuadrupoleUtils.cc:54
PositionType
Definition PlasmaMLPALLASQuadrupoleUtils.hh:68
Axis
Definition PlasmaMLPALLASQuadrupoleUtils.hh:74
Definition PlasmaMLPALLASQuadrupoleUtils.hh:47
Vector3 beginMomentum
Definition PlasmaMLPALLASQuadrupoleUtils.hh:50
Vector3 endMomentum
Definition PlasmaMLPALLASQuadrupoleUtils.hh:51
Vector3 begin
Definition PlasmaMLPALLASQuadrupoleUtils.hh:48
Vector3 end
Definition PlasmaMLPALLASQuadrupoleUtils.hh:49
Definition PlasmaMLPALLASQuadrupoleUtils.hh:56
QuadrupoleState Q4
Definition PlasmaMLPALLASQuadrupoleUtils.hh:60
QuadrupoleState Q1
Definition PlasmaMLPALLASQuadrupoleUtils.hh:57
QuadrupoleState Q3
Definition PlasmaMLPALLASQuadrupoleUtils.hh:59
QuadrupoleState Q2
Definition PlasmaMLPALLASQuadrupoleUtils.hh:58
float energy
Definition PlasmaMLPALLASQuadrupoleUtils.hh:61
Definition PlasmaMLPALLASQuadrupoleUtils.hh:40
float x
Definition PlasmaMLPALLASQuadrupoleUtils.hh:41
float y
Definition PlasmaMLPALLASQuadrupoleUtils.hh:41
float z
Definition PlasmaMLPALLASQuadrupoleUtils.hh:41