gfields
Loading...
Searching...
No Matches
gfield_multipoles.h
Go to the documentation of this file.
1#pragma once
2
3// gemc
4#include "gfield.h"
5
40
41public:
48 explicit GField_MultipolesFactory(const std::shared_ptr<GOptions>& gopt) : GField(gopt) {}
49
61 void GetFieldValue(const double pos[3], G4double* bfield) const override;
62
71
72private:
74 int pole_number = 0;
75
77 G4double origin[3] = {0.0, 0.0, 0.0};
78
80 G4double rotation_angle = 0.0;
81
90 int rotaxis = 2;
91
98 G4double strength = 0.0;
99
101 bool longitudinal = false;
102};
Factory class implementing an ideal multipole magnetic field.
void GetFieldValue(const double pos[3], G4double *bfield) const override
Evaluate the magnetic field B at a given position.
void load_field_definitions(GFieldDefinition gfd) override
Load and cache field-definition parameters for fast field evaluation.
GField_MultipolesFactory(const std::shared_ptr< GOptions > &gopt)
Construct the multipole field factory using the module options.
Abstract base class representing a magnetic field.
Definition gfield.h:99
Lightweight configuration carrier used to load and configure a GField plugin.
Definition gfield.h:26