13 #ifndef DD4HEP_GEOMETRY_FIELDS_H
14 #define DD4HEP_GEOMETRY_FIELDS_H
52 typedef std::map<std::string, PropertyValues>
Properties;
89 return data<Object>()->
type;
93 const char*
type()
const;
105 void value(
const double* pos,
double* val)
const;
170 return data<Object>()->
type;
207 field[0] = field[1] = field[2] = 0.0;
224 field[0] = field[1] = field[2] = 0.0;
DD4hep::Geometry::CartesianField electric
Properties & properties() const
Access to properties container.
Internal data class shared by all handles of a given type.
Object()
Default constructor.
bool changesEnergy() const
Does the field change the energy of charged particles?
void combinedMagnetic(const Position &pos, double *field) const
Returns the 3 magnetic field components (x, y, z) if many components are present. ...
void magneticField(const Position &pos, Direction &field) const
Returns the 3 magnetic field components (x, y, z).
Object()
Default constructor.
Properties properties
Field extensions.
int fieldType() const
Access the field type.
Internal data class shared by all handles.
CartesianField ElectricField
std::map< std::string, std::string > PropertyValues
void add(CartesianField field)
Add a new field component.
std::map< std::string, PropertyValues > Properties
OverlayedField ElectroMagneticField
std::map< std::string, PropertyValues > Properties
std::vector< DD4hep::Geometry::CartesianField > electric_components
void magneticField(const double *pos, double *field) const
Returns the 3 magnetic field components (x, y, z).
const char * type() const
Access the field type (string)
void electricField(const Position &pos, Direction &field) const
Returns the 3 electric field components (x, y, z).
CartesianField MagneticField
OverlayedField(const Handle< Q > &e)
Constructor to be used when reading the already parsed DOM tree.
Class describing a field overlay with several sources.
Implementation of a named object.
bool changesEnergy() const
Does the field change the energy of charged particles?
CartesianField(const Handle< Q > &e)
Constructor to be used when reading the already parsed DOM tree.
std::vector< DD4hep::Geometry::CartesianField > magnetic_components
void electromagneticField(const Position &pos, double *val) const
Returns the 3 electric (val[0]-val[2]) and magnetic field components (val[3]-val[5]).
OverlayedField()=default
Default constructor.
std::map< std::string, std::string > PropertyValues
int type() const
Access the field type.
virtual void fieldComponents(const double *pos, double *field)=0
Call to access the field components at a given location.
ROOT::Math::XYZVector Position
void electricField(const double *pos, double *field) const
Returns the 3 electric field components (x, y, z).
CartesianField()=default
Default constructor.
Handle< NamedObject > Ref_t
Default Ref_t definition describing named objects.
virtual ~Object()
Default destructor.
Properties & properties() const
Access to properties container.
virtual ~Object()
Default destructor.
Handle: a templated class like a shared pointer, which allows specialized access to tgeometry objects...
Handle class describing any field with 3D cartesian vectors for the field strength.
void combinedElectric(const Position &pos, double *field) const
Returns the 3 electric field components (x, y, z) if many components are present. ...
void electricField(const Position &pos, double *field) const
Returns the 3 electric field components (x, y, z).
DD4hep::Geometry::CartesianField magnetic
CartesianField & operator=(const CartesianField &f)=default
Assignment operator.
void magneticField(const Position &pos, double *field) const
Returns the 3 magnetic field components (x, y, z).
void value(const Position &pos, Direction &field) const
Returns the 3 field components (x, y, z).
Properties properties
Field extensions.