DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
Public Types | Public Member Functions | Public Attributes | Private Member Functions | Friends | List of all members

Data class with properties of a detector element. More...

#include <DetectorInterna.h>

Inheritance diagram for dd4hep::DetElementObject:
dd4hep::NamedObject dd4hep::ObjectExtensions dd4hep::WorldObject

Public Types

enum  DetFlags {
  HAVE_WORLD_TRAFO = 1<<0, HAVE_PARENT_TRAFO = 1<<1, HAVE_REFERENCE_TRAFO = 1<<2, HAVE_SENSITIVE_DETECTOR = 1<<29,
  IS_TOP_LEVEL_DETECTOR = 1<<30, HAVE_OTHER = 1<<31
}
 
typedef std::pair< Callback, unsigned long > UpdateCall
 
typedef std::vector< UpdateCallUpdateCallbacks
 

Public Member Functions

 DetElementObject (const std::string &nam, int ident)
 Initializing constructor. More...
 
 DetElementObject ()
 Default constructor. More...
 
virtual ~DetElementObject ()
 Internal object destructor: release extension object(s) More...
 
virtual DetElementObjectclone (int new_id, int flag) const
 Deep object copy to replicate DetElement trees e.g. for reflection. More...
 
World world ()
 Access to the world object. Only possible once the geometry is closed. More...
 
void removeAtUpdate (unsigned int type, void *pointer)
 Remove callback from object. More...
 
void update (unsigned int tags, void *param)
 Trigger update callbacks. More...
 
void revalidate ()
 Revalidate the caches. More...
 
std::pair< DetElement, Volumereflect (const std::string &new_name, int new_id, SensitiveDetector sd)
 Reflect all volumes in a DetElement sub-tree and re-attach the placements. More...
 
- Public Member Functions inherited from dd4hep::NamedObject
 NamedObject (const char *nam, const char *typ="")
 Initializing constructor. More...
 
 NamedObject (const std::string &nam)
 Initializing constructor. More...
 
 NamedObject (const std::string &nam, const std::string &typ)
 Initializing constructor. More...
 
 NamedObject ()=default
 Standard constructor. More...
 
 NamedObject (const NamedObject &c)=default
 Copy constructor. More...
 
 NamedObject (NamedObject &&c)=default
 Move constructor. More...
 
virtual ~NamedObject ()=default
 Default destructor. More...
 
NamedObjectoperator= (const NamedObject &c)=default
 Assignment operator. More...
 
NamedObjectoperator= (NamedObject &&c)=default
 Move assignment operator. More...
 
const char * GetName () const
 Access name. More...
 
void SetName (const char *nam)
 Set name (used by Handle) More...
 
void SetTitle (const char *tit)
 Set Title (used by Handle) More...
 
const char * GetTitle () const
 Get name (used by Handle) More...
 
- Public Member Functions inherited from dd4hep::ObjectExtensions
 ObjectExtensions (const std::type_info &parent_type)
 Default constructor. More...
 
 ObjectExtensions (const ObjectExtensions &copy)=delete
 Copy constructor. More...
 
virtual ~ObjectExtensions ()
 Default destructor. More...
 
ObjectExtensionsoperator= (const ObjectExtensions &copy)=delete
 Assignment operator. More...
 
void initialize ()
 Initialize non-persistent object containers (e.g. after loading from ROOT file) More...
 
void move (ObjectExtensions &copy)
 Move extensions to target object. More...
 
void clear (bool destroy=true)
 Clear all extensions. More...
 
void copyFrom (const std::map< unsigned long long int, ExtensionEntry * > &ext, void *arg)
 Copy object extensions from another object. Hosting type must be identical! More...
 
void * addExtension (unsigned long long int key, ExtensionEntry *entry)
 Add an extension object to the detector element. More...
 
void * removeExtension (unsigned long long int key, bool destroy)
 Remove an existing extension object from the instance. More...
 
void * extension (unsigned long long int key, bool alert) const
 Access an existing extension object from the detector element. More...
 
void * extension (unsigned long long int key) const
 Access an existing extension object from the detector element. More...
 

Public Attributes

unsigned int magic
 Magic number to ensure data integrity. More...
 
unsigned int flag
 Flag to remember internally calculated quatities. More...
 
int id
 Unique integer identifier of the detector instance. More...
 
int combineHits
 Flag to process hits. More...
 
unsigned int typeFlag
 Flag to encode detector types. More...
 
int level
 Hierarchical level within the detector description. More...
 
unsigned int key
 Access hash key of this detector element (Only valid once geometry is closed!) More...
 
std::string path
 Full path to this detector element. May be invalid. More...
 
std::string placementPath
 The path to the placement of the detector element (if placed) More...
 
PlacedVolume idealPlace
 The subdetector placement corresponding to the ideal detector element's volume. More...
 
PlacedVolume placement
 The subdetector placement corresponding to the actual detector element's volume. More...
 
VolumeID volumeID
 The cached VolumeID of this subdetector element. More...
 
World privateWorld
 Reference to the parent element. More...
 
DetElement parent
 Reference to the parent element. More...
 
DetElement::Children children
 The array of children. More...
 
UpdateCallbacks updateCalls
 Placeholder for structure with update callbacks. More...
 
AlignmentCondition nominal
 Not ROOT persistent. More...
 
AlignmentCondition survey
 Basic detector element alignment entry containing the survey data. More...
 
Ref_t global_alignment
 Global alignment data. More...
 
- Public Attributes inherited from dd4hep::NamedObject
std::string name
 The object name. More...
 
std::string type
 The object type. More...
 
- Public Attributes inherited from dd4hep::ObjectExtensions
std::map< unsigned long long int, ExtensionEntry * > extensions
 The extensions object. More...
 

Private Member Functions

World i_access_world ()
 Resolve the world object. Internal use ONLY. More...
 

Friends

class VolumeManager_Populator
 

Detailed Description

Data class with properties of a detector element.

Author
M.Frank
Version
1.0

\

Definition at line 81 of file DetectorInterna.h.

Member Typedef Documentation

◆ UpdateCall

typedef std::pair<Callback,unsigned long> dd4hep::DetElementObject::UpdateCall

Definition at line 85 of file DetectorInterna.h.

◆ UpdateCallbacks

Definition at line 86 of file DetectorInterna.h.

Member Enumeration Documentation

◆ DetFlags

Enumerator
HAVE_WORLD_TRAFO 
HAVE_PARENT_TRAFO 
HAVE_REFERENCE_TRAFO 
HAVE_SENSITIVE_DETECTOR 
IS_TOP_LEVEL_DETECTOR 
HAVE_OTHER 

Definition at line 88 of file DetectorInterna.h.

Constructor & Destructor Documentation

◆ DetElementObject() [1/2]

DetElementObject::DetElementObject ( const std::string &  nam,
int  ident 
)

Initializing constructor.

Definition at line 74 of file DetectorInterna.cpp.

◆ DetElementObject() [2/2]

DetElementObject::DetElementObject ( )

Default constructor.

Definition at line 63 of file DetectorInterna.cpp.

◆ ~DetElementObject()

DetElementObject::~DetElementObject ( )
virtual

Internal object destructor: release extension object(s)

Definition at line 86 of file DetectorInterna.cpp.

Member Function Documentation

◆ clone()

DetElementObject * DetElementObject::clone ( int  new_id,
int  flag 
) const
virtual

Deep object copy to replicate DetElement trees e.g. for reflection.

Definition at line 98 of file DetectorInterna.cpp.

◆ i_access_world()

World DetElementObject::i_access_world ( )
private

Resolve the world object. Internal use ONLY.

Access to the world object. Only possible once the geometry is closed.

Definition at line 180 of file DetectorInterna.cpp.

◆ reflect()

std::pair< DetElement, Volume > DetElementObject::reflect ( const std::string &  new_name,
int  new_id,
SensitiveDetector  sd 
)

Reflect all volumes in a DetElement sub-tree and re-attach the placements.

Definition at line 138 of file DetectorInterna.cpp.

◆ removeAtUpdate()

void DetElementObject::removeAtUpdate ( unsigned int  type,
void *  pointer 
)

Remove callback from object.

Definition at line 227 of file DetectorInterna.cpp.

◆ revalidate()

void DetElementObject::revalidate ( )

Revalidate the caches.

Now iterate down the children....

Definition at line 193 of file DetectorInterna.cpp.

◆ update()

void DetElementObject::update ( unsigned int  tags,
void *  param 
)

Trigger update callbacks.

Definition at line 237 of file DetectorInterna.cpp.

◆ world()

World dd4hep::DetElementObject::world ( )
inline

Access to the world object. Only possible once the geometry is closed.

Definition at line 164 of file DetectorInterna.h.

Friends And Related Function Documentation

◆ VolumeManager_Populator

friend class VolumeManager_Populator
friend

Definition at line 146 of file DetectorInterna.h.

Member Data Documentation

◆ children

DetElement::Children dd4hep::DetElementObject::children

The array of children.

Definition at line 131 of file DetectorInterna.h.

◆ combineHits

int dd4hep::DetElementObject::combineHits

Flag to process hits.

Definition at line 104 of file DetectorInterna.h.

◆ flag

unsigned int dd4hep::DetElementObject::flag

Flag to remember internally calculated quatities.

Definition at line 100 of file DetectorInterna.h.

◆ global_alignment

Ref_t dd4hep::DetElementObject::global_alignment

Global alignment data.

Definition at line 142 of file DetectorInterna.h.

◆ id

int dd4hep::DetElementObject::id

Unique integer identifier of the detector instance.

Definition at line 102 of file DetectorInterna.h.

◆ idealPlace

PlacedVolume dd4hep::DetElementObject::idealPlace

The subdetector placement corresponding to the ideal detector element's volume.

Definition at line 117 of file DetectorInterna.h.

◆ key

unsigned int dd4hep::DetElementObject::key

Access hash key of this detector element (Only valid once geometry is closed!)

Definition at line 110 of file DetectorInterna.h.

◆ level

int dd4hep::DetElementObject::level

Hierarchical level within the detector description.

Definition at line 108 of file DetectorInterna.h.

◆ magic

unsigned int dd4hep::DetElementObject::magic

Magic number to ensure data integrity.

Definition at line 98 of file DetectorInterna.h.

◆ nominal

AlignmentCondition dd4hep::DetElementObject::nominal

Not ROOT persistent.

Basic ideal/nominal detector element alignment entry

Definition at line 137 of file DetectorInterna.h.

◆ parent

DetElement dd4hep::DetElementObject::parent

Reference to the parent element.

Definition at line 129 of file DetectorInterna.h.

◆ path

std::string dd4hep::DetElementObject::path

Full path to this detector element. May be invalid.

Definition at line 112 of file DetectorInterna.h.

◆ placement

PlacedVolume dd4hep::DetElementObject::placement

The subdetector placement corresponding to the actual detector element's volume.

Definition at line 119 of file DetectorInterna.h.

◆ placementPath

std::string dd4hep::DetElementObject::placementPath

The path to the placement of the detector element (if placed)

Definition at line 114 of file DetectorInterna.h.

◆ privateWorld

World dd4hep::DetElementObject::privateWorld

Reference to the parent element.

Definition at line 127 of file DetectorInterna.h.

◆ survey

AlignmentCondition dd4hep::DetElementObject::survey

Basic detector element alignment entry containing the survey data.

Definition at line 139 of file DetectorInterna.h.

◆ typeFlag

unsigned int dd4hep::DetElementObject::typeFlag

Flag to encode detector types.

Definition at line 106 of file DetectorInterna.h.

◆ updateCalls

UpdateCallbacks dd4hep::DetElementObject::updateCalls

Placeholder for structure with update callbacks.

Definition at line 133 of file DetectorInterna.h.

◆ volumeID

VolumeID dd4hep::DetElementObject::volumeID

The cached VolumeID of this subdetector element.

Please note: These values are set when populating the volume manager. There are restrictions: e.g. only sensitive subdetectors are present.

Definition at line 125 of file DetectorInterna.h.


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