DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
DetectorInterna.h
Go to the documentation of this file.
1 //==========================================================================
2 // AIDA Detector description implementation
3 //--------------------------------------------------------------------------
4 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
5 // All rights reserved.
6 //
7 // For the licensing terms see $DD4hepINSTALL/LICENSE.
8 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
9 //
10 // Author : M.Frank
11 //
12 //==========================================================================
13 //
14 // NOTE:
15 //
16 // This is an internal include file. It should only be included to
17 // instantiate code. Otherwise the Detector include file should be
18 // sufficient for all practical purposes.
19 //
20 //==========================================================================
21 #ifndef DD4HEP_DETAIL_DETECTORINTERNA_H
22 #define DD4HEP_DETAIL_DETECTORINTERNA_H
23 
24 // Framework include files
25 #include <DD4hep/Callback.h>
26 #include <DD4hep/NamedObject.h>
27 #include <DD4hep/World.h>
28 #include <DD4hep/Objects.h>
29 #include <DD4hep/DetElement.h>
30 #include <DD4hep/Alignments.h>
31 #include <DD4hep/Conditions.h>
32 #include <DD4hep/Segmentations.h>
34 
35 // ROOT include files
36 #include <TGeoMatrix.h>
37 
39 namespace dd4hep {
40 
41  class WorldObject;
42  class DetElementObject;
43  class SensitiveDetectorObject;
44  class VolumeManager_Populator;
45 
47 
55  public:
56  unsigned int magic;
57  int verbose;
59  double ecut;
63  std::string hitsCollection;
64 
68  SensitiveDetectorObject(const std::string& nam);
70  virtual ~SensitiveDetectorObject();
71  };
72 
74 
82  public:
83  // Type definitions.
84  // The full namespace declaration is required by cint....
85  typedef std::pair<Callback,unsigned long> UpdateCall;
86  typedef std::vector<UpdateCall> UpdateCallbacks;
87 
88  enum DetFlags {
94  HAVE_OTHER = 1<<31
95  };
96 
98  unsigned int magic;
100  unsigned int flag;
102  int id;
106  unsigned int typeFlag;
108  int level;
110  unsigned int key;
112  std::string path;
114  std::string placementPath;
115 
121 
134 
140 
144 
145  private:
147 
148  private:
152 
153  public:
155  DetElementObject(const std::string& nam, int ident);
160  virtual ~DetElementObject();
162  virtual DetElementObject* clone(int new_id, int flag) const;
165  { return privateWorld.isValid() ? privateWorld : i_access_world(); }
167  void removeAtUpdate(unsigned int type, void* pointer);
170  void update(unsigned int tags, void* param);
172  void revalidate();
174  std::pair<DetElement,Volume> reflect(const std::string& new_name, int new_id, SensitiveDetector sd);
175  };
176 
178 
186  public:
189 
190  public:
192  WorldObject();
194 #ifndef __CINT__
195  WorldObject(Detector& description, const std::string& nam);
197 #endif
198  virtual ~WorldObject();
200  };
201 
203  inline WorldObject::WorldObject() : DetElementObject(), description(0) {
204  }
205 
206 } /* End namespace dd4hep */
207 #endif // DD4HEP_DETAIL_DETECTORINTERNA_H
dd4hep::World
Handle class to hold the information of the top DetElement object 'world'.
Definition: World.h:31
dd4hep::SensitiveDetectorObject::~SensitiveDetectorObject
virtual ~SensitiveDetectorObject()
Internal object destructor: release extension object(s)
Definition: DetectorInterna.cpp:54
dd4hep::DetElementObject::children
DetElement::Children children
The array of children.
Definition: DetectorInterna.h:131
Objects.h
dd4hep::WorldObject::description
Detector * description
Reference to the Detector instance object.
Definition: DetectorInterna.h:188
Segmentations.h
dd4hep::SensitiveDetectorObject::ecut
double ecut
Definition: DetectorInterna.h:59
dd4hep::WorldObject
Data class with properties of a detector element.
Definition: DetectorInterna.h:185
dd4hep::SensitiveDetector
Handle class to hold the information of a sensitive detector.
Definition: DetElement.h:44
dd4hep::ObjectExtensions
Implementation of an object supporting arbitrary user extensions.
Definition: ObjectExtensions.h:33
dd4hep::DetElementObject::typeFlag
unsigned int typeFlag
Flag to encode detector types.
Definition: DetectorInterna.h:106
ObjectExtensions.h
dd4hep::AlignmentCondition
Main handle class to hold an alignment conditions object.
Definition: Alignments.h:68
dd4hep::PlacedVolume
Handle class holding a placed volume (also called physical volume)
Definition: Volumes.h:173
dd4hep::SensitiveDetectorObject::readout
Readout readout
Definition: DetectorInterna.h:60
Alignments.h
World.h
dd4hep::DetElementObject::idealPlace
PlacedVolume idealPlace
The subdetector placement corresponding to the ideal detector element's volume.
Definition: DetectorInterna.h:117
dd4hep::Handle::isValid
bool isValid() const
Check the validity of the object held by the handle.
Definition: Handle.h:128
dd4hep::Handle< NamedObject >
dd4hep::DetElementObject::removeAtUpdate
void removeAtUpdate(unsigned int type, void *pointer)
Remove callback from object.
Definition: DetectorInterna.cpp:227
dd4hep::DetElementObject::magic
unsigned int magic
Magic number to ensure data integrity.
Definition: DetectorInterna.h:98
dd4hep::DetElementObject
Data class with properties of a detector element.
Definition: DetectorInterna.h:81
dd4hep::DetElementObject::survey
AlignmentCondition survey
Basic detector element alignment entry containing the survey data.
Definition: DetectorInterna.h:139
dd4hep::SensitiveDetectorObject::limits
LimitSet limits
Definition: DetectorInterna.h:62
Callback.h
dd4hep::DetElementObject::parent
DetElement parent
Reference to the parent element.
Definition: DetectorInterna.h:129
dd4hep::DetElementObject::revalidate
void revalidate()
Revalidate the caches.
Definition: DetectorInterna.cpp:193
dd4hep::DetElementObject::privateWorld
World privateWorld
Reference to the parent element.
Definition: DetectorInterna.h:127
dd4hep::DetElementObject::HAVE_REFERENCE_TRAFO
@ HAVE_REFERENCE_TRAFO
Definition: DetectorInterna.h:91
dd4hep::DetElementObject::DetFlags
DetFlags
Definition: DetectorInterna.h:88
dd4hep::DetElement
Handle class describing a detector element.
Definition: DetElement.h:188
dd4hep::SensitiveDetectorObject::combineHits
int combineHits
Definition: DetectorInterna.h:58
dd4hep::LimitSet
Handle class describing a set of limits as they are used for simulation.
Definition: Objects.h:425
dd4hep::DetElementObject::i_access_world
World i_access_world()
Resolve the world object. Internal use ONLY.
Definition: DetectorInterna.cpp:180
dd4hep::DetElementObject::flag
unsigned int flag
Flag to remember internally calculated quatities.
Definition: DetectorInterna.h:100
dd4hep::DetElementObject::level
int level
Hierarchical level within the detector description.
Definition: DetectorInterna.h:108
dd4hep::DetElementObject::global_alignment
Ref_t global_alignment
Global alignment data.
Definition: DetectorInterna.h:142
dd4hep::WorldObject::WorldObject
WorldObject()
Not persistent in ROOT.
Definition: DetectorInterna.h:203
dd4hep::Region
Handle class describing a region as used in simulation.
Definition: Objects.h:462
NamedObject.h
dd4hep::DetElementObject::volumeID
VolumeID volumeID
The cached VolumeID of this subdetector element.
Definition: DetectorInterna.h:125
dd4hep::WorldObject::~WorldObject
virtual ~WorldObject()
Internal object destructor: release extension object(s)
Definition: DetectorInterna.cpp:260
dd4hep::DetElementObject::placement
PlacedVolume placement
The subdetector placement corresponding to the actual detector element's volume.
Definition: DetectorInterna.h:119
Conditions.h
dd4hep::DetElementObject::UpdateCallbacks
std::vector< UpdateCall > UpdateCallbacks
Definition: DetectorInterna.h:86
dd4hep::DetElementObject::id
int id
Unique integer identifier of the detector instance.
Definition: DetectorInterna.h:102
dd4hep::DetElementObject::reflect
std::pair< DetElement, Volume > 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: DetectorInterna.cpp:138
dd4hep::DetElementObject::updateCalls
UpdateCallbacks updateCalls
Placeholder for structure with update callbacks.
Definition: DetectorInterna.h:133
VolumeID
dd4hep::DDSegmentation::VolumeID VolumeID
Definition: SegmentationDictionary.h:49
dd4hep::DetElement::Children
std::map< std::string, DetElement > Children
Definition: DetElement.h:206
dd4hep::SensitiveDetectorObject::magic
unsigned int magic
Definition: DetectorInterna.h:56
dd4hep::DetElementObject::world
World world()
Access to the world object. Only possible once the geometry is closed.
Definition: DetectorInterna.h:164
dd4hep::DetElementObject::~DetElementObject
virtual ~DetElementObject()
Internal object destructor: release extension object(s)
Definition: DetectorInterna.cpp:86
dd4hep::DetElementObject::HAVE_OTHER
@ HAVE_OTHER
Definition: DetectorInterna.h:94
dd4hep::DetElementObject::HAVE_WORLD_TRAFO
@ HAVE_WORLD_TRAFO
Definition: DetectorInterna.h:89
DetElement.h
dd4hep::SensitiveDetectorObject
Data class with properties of sensitive detectors.
Definition: DetectorInterna.h:54
dd4hep
Namespace for the AIDA detector description toolkit.
Definition: AlignmentsCalib.h:28
dd4hep::NamedObject
Implementation of a named object.
Definition: NamedObject.h:30
dd4hep::DetElementObject::placementPath
std::string placementPath
The path to the placement of the detector element (if placed)
Definition: DetectorInterna.h:114
dd4hep::SensitiveDetectorObject::region
Region region
Definition: DetectorInterna.h:61
dd4hep::DetElementObject::combineHits
int combineHits
Flag to process hits.
Definition: DetectorInterna.h:104
dd4hep::Detector
The main interface to the dd4hep detector description package.
Definition: Detector.h:90
dd4hep::Readout
Handle to the implementation of the readout structure of a subdetector.
Definition: Readout.h:38
dd4hep::DetElementObject::DetElementObject
DetElementObject()
Default constructor.
Definition: DetectorInterna.cpp:63
dd4hep::SensitiveDetectorObject::SensitiveDetectorObject
SensitiveDetectorObject()
Default constructor.
Definition: DetectorInterna.cpp:37
dd4hep::NamedObject::type
std::string type
The object type.
Definition: NamedObject.h:35
dd4hep::DetElementObject::HAVE_SENSITIVE_DETECTOR
@ HAVE_SENSITIVE_DETECTOR
Definition: DetectorInterna.h:92
dd4hep::DetElementObject::nominal
AlignmentCondition nominal
Not ROOT persistent.
Definition: DetectorInterna.h:137
dd4hep::DetElementObject::clone
virtual DetElementObject * clone(int new_id, int flag) const
Deep object copy to replicate DetElement trees e.g. for reflection.
Definition: DetectorInterna.cpp:98
dd4hep::DetElementObject::IS_TOP_LEVEL_DETECTOR
@ IS_TOP_LEVEL_DETECTOR
Definition: DetectorInterna.h:93
dd4hep::DetElementObject::update
void update(unsigned int tags, void *param)
Trigger update callbacks.
Definition: DetectorInterna.cpp:237
dd4hep::DetElementObject::key
unsigned int key
Access hash key of this detector element (Only valid once geometry is closed!)
Definition: DetectorInterna.h:110
dd4hep::SensitiveDetectorObject::verbose
int verbose
Definition: DetectorInterna.h:57
dd4hep::DetElementObject::HAVE_PARENT_TRAFO
@ HAVE_PARENT_TRAFO
Definition: DetectorInterna.h:90
dd4hep::detail::VolumeManager_Populator
Helper class to populate the volume manager.
Definition: VolumeManager.cpp:45
dd4hep::DetElementObject::UpdateCall
std::pair< Callback, unsigned long > UpdateCall
Definition: DetectorInterna.h:85
dd4hep::DetElementObject::path
std::string path
Full path to this detector element. May be invalid.
Definition: DetectorInterna.h:112
dd4hep::SensitiveDetectorObject::hitsCollection
std::string hitsCollection
Definition: DetectorInterna.h:63