DD4hep
1.30.0
Detector Description Toolkit for High Energy Physics
|
Base class describing any field with 3D cartesian vectors for the field strength. More...
#include <Fields.h>
Classes | |
class | Object |
Internal data class shared by all handles of a given type. More... | |
class | TypedObject |
Internal data class shared by all handles of a given type. More... | |
Public Types | |
enum | FieldType { UNKNOWN = 0, ELECTRIC = 0x1, MAGNETIC = 0x2, OVERLAY = 0x4 } |
typedef std::map< std::string, std::map< std::string, std::string > > | Properties |
Public Types inherited from dd4hep::Handle< NamedObject > | |
typedef NamedObject | Object |
Extern accessible definition of the contained element type. More... | |
typedef Handle< NamedObject > | Base |
Self type: used by sub-classes. More... | |
Public Member Functions | |
CartesianField ()=default | |
Default constructor. More... | |
CartesianField (const CartesianField &e)=default | |
Constructor to be used when reading the already parsed DOM tree. More... | |
template<typename Q > | |
CartesianField (const Handle< Q > &e) | |
Constructor to be used when reading the already parsed DOM tree. More... | |
CartesianField & | operator= (const CartesianField &f)=default |
Assignment operator. More... | |
int | fieldType () const |
Access the field type. More... | |
const char * | type () const |
Access the field type (string) More... | |
bool | changesEnergy () const |
Does the field change the energy of charged particles? More... | |
void | value (const Position &pos, Direction &field) const |
Returns the 3 field components (x, y, z). More... | |
void | value (const Position &pos, double *val) const |
Returns the 3 field components (x, y, z). More... | |
void | value (const double *pos, double *val) const |
Returns the 3 field components (x, y, z). More... | |
Properties & | properties () const |
Access to properties container. More... | |
Public Member Functions inherited from dd4hep::Handle< NamedObject > | |
Handle ()=default | |
Default constructor. More... | |
Handle (Handle< NamedObject > &&element)=default | |
Copy constructor. More... | |
Handle (const Handle< NamedObject > &element)=default | |
Copy constructor. More... | |
Handle (NamedObject *element) | |
Initializing constructor from pointer. More... | |
Handle (Q *element) | |
Initializing constructor from unrelated pointer with type checking. More... | |
Handle (const Handle< Q > &element) | |
Initializing constructor from unrelated handle with type checking. More... | |
Handle< NamedObject > & | operator= (Handle< NamedObject > &&element)=default |
Assignment move operator. More... | |
Handle< NamedObject > & | operator= (const Handle< NamedObject > &element)=default |
Assignment copy operator. More... | |
bool | operator== (const Handle< NamedObject > &element) const |
Boolean operator == used for RB tree insertions. More... | |
bool | operator< (const Handle< NamedObject > &element) const |
Boolean operator < used for RB tree insertions. More... | |
bool | operator> (const Handle< NamedObject > &element) const |
Boolean operator > used for RB tree insertions. More... | |
bool | isValid () const |
Check the validity of the object held by the handle. More... | |
bool | operator! () const |
Check the validity of the object held by the handle. More... | |
Handle< NamedObject > & | clear () |
Release the object held by the handle. More... | |
NamedObject * | operator-> () const |
Access the held object using the -> operator. More... | |
operator NamedObject & () const | |
Automatic type conversion to an object references. More... | |
NamedObject & | operator* () const |
Access the held object using the * operator. More... | |
NamedObject * | ptr () const |
Access to the held object. More... | |
Q * | _ptr () const |
Access to an unrelated object type. More... | |
Q * | data () const |
Access to an unrelated object type. More... | |
Q & | object () const |
Access to an unrelated object type. More... | |
NamedObject * | access () const |
Checked object access. Throws invalid handle runtime exception if invalid handle. More... | |
const char * | name () const |
Access the object name (or "" if not supported by the object) More... | |
const char * | name () const |
const char * | name () const |
void | assign (Object *n, const std::string &nam, const std::string &title) |
Assign a new named object. Note: object references must be managed by the user. More... | |
void | assign (_Segmentation *s, const std::string &n, const std::string &) |
void | assign (NamedObject *p, const std::string &n, const std::string &t) |
void | destroy () |
Destroy the underlying object (be careful here: things are not reference counted)! More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from dd4hep::Handle< NamedObject > | |
static void | bad_assignment (const std::type_info &from, const std::type_info &to) |
Helper routine called when unrelated types are assigned. More... | |
Public Attributes inherited from dd4hep::Handle< NamedObject > | |
NamedObject * | m_element |
Single and only data member: Reference to the actual element. More... | |
Base class describing any field with 3D cartesian vectors for the field strength.
Abstract base class describing any field (electric or magnetic) with 3D cartesian vectors for the field strength and positions. Implementation classes need to overwrite void fieldComponents(const double* pos, double* field). The actual behaviour is solely implemented in the underlying object class.
typedef std::map<std::string, std::map<std::string, std::string> > dd4hep::CartesianField::Properties |
|
default |
Default constructor.
|
default |
Constructor to be used when reading the already parsed DOM tree.
|
inline |
bool CartesianField::changesEnergy | ( | ) | const |
Does the field change the energy of charged particles?
Definition at line 51 of file Fields.cpp.
|
inline |
|
default |
Assignment operator.
CartesianField::Properties & CartesianField::properties | ( | ) | const |
Access to properties container.
Definition at line 56 of file Fields.cpp.
const char * CartesianField::type | ( | ) | const |
Access the field type (string)
Definition at line 46 of file Fields.cpp.
void CartesianField::value | ( | const double * | pos, |
double * | val | ||
) | const |
Returns the 3 field components (x, y, z).
Definition at line 75 of file Fields.cpp.
Returns the 3 field components (x, y, z).
Definition at line 61 of file Fields.cpp.
void CartesianField::value | ( | const Position & | pos, |
double * | val | ||
) | const |
Returns the 3 field components (x, y, z).
Definition at line 69 of file Fields.cpp.