DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
Classes | Public Types | Public Member Functions | List of all members
dd4hep::CartesianField Class Reference

Base class describing any field with 3D cartesian vectors for the field strength. More...

#include <Fields.h>

Inheritance diagram for dd4hep::CartesianField:
dd4hep::Handle< NamedObject >

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< NamedObjectBase
 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...
 
CartesianFieldoperator= (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...
 
Propertiesproperties () 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...
 
NamedObjectoperator-> () const
 Access the held object using the -> operator. More...
 
 operator NamedObject & () const
 Automatic type conversion to an object references. More...
 
NamedObjectoperator* () const
 Access the held object using the * operator. More...
 
NamedObjectptr () 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...
 
NamedObjectaccess () 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 >
NamedObjectm_element
 Single and only data member: Reference to the actual element. More...
 

Detailed Description

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.

Author
M.Frank
Version
1.0

Definition at line 40 of file Fields.h.

Member Typedef Documentation

◆ Properties

typedef std::map<std::string, std::map<std::string, std::string> > dd4hep::CartesianField::Properties

Definition at line 45 of file Fields.h.

Member Enumeration Documentation

◆ FieldType

Enumerator
UNKNOWN 
ELECTRIC 
MAGNETIC 
OVERLAY 

Definition at line 42 of file Fields.h.

Constructor & Destructor Documentation

◆ CartesianField() [1/3]

dd4hep::CartesianField::CartesianField ( )
default

Default constructor.

◆ CartesianField() [2/3]

dd4hep::CartesianField::CartesianField ( const CartesianField e)
default

Constructor to be used when reading the already parsed DOM tree.

◆ CartesianField() [3/3]

template<typename Q >
dd4hep::CartesianField::CartesianField ( const Handle< Q > &  e)
inline

Constructor to be used when reading the already parsed DOM tree.

Definition at line 92 of file Fields.h.

Member Function Documentation

◆ changesEnergy()

bool CartesianField::changesEnergy ( ) const

Does the field change the energy of charged particles?

Definition at line 51 of file Fields.cpp.

◆ fieldType()

int dd4hep::CartesianField::fieldType ( ) const
inline

Access the field type.

Definition at line 99 of file Fields.h.

◆ operator=()

CartesianField& dd4hep::CartesianField::operator= ( const CartesianField f)
default

Assignment operator.

◆ properties()

CartesianField::Properties & CartesianField::properties ( ) const

Access to properties container.

Definition at line 56 of file Fields.cpp.

◆ type()

const char * CartesianField::type ( ) const

Access the field type (string)

Definition at line 46 of file Fields.cpp.

◆ value() [1/3]

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.

◆ value() [2/3]

void CartesianField::value ( const Position pos,
Direction field 
) const

Returns the 3 field components (x, y, z).

Definition at line 61 of file Fields.cpp.

◆ value() [3/3]

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.


The documentation for this class was generated from the following files: