DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
Objects.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 #ifndef DD4HEP_OBJECTS_H
14 #define DD4HEP_OBJECTS_H
15 
16 // Framework include files
17 #include <DD4hep/Handle.h>
18 #include <DD4hep/NamedObject.h>
19 
20 // Forward declarations
21 class TMap;
22 class TGeoElement;
23 class TGeoMaterial;
24 class TGeoMedium;
25 class TGeoMatrix;
26 class TGeoRotation;
27 class TGeoTranslation;
28 class TGeoPhysicalNode;
29 class TGeoIdentity;
30 
31 #ifdef __GNUC__
32 #pragma GCC diagnostic push
33 #pragma GCC diagnostic ignored "-Wdeprecated" // Code that causes warning goes here
34 #endif
35 // ROOT include files
36 #include <Math/Vector3D.h>
37 #include <Math/Transform3D.h>
38 #include <Math/Translation3D.h>
39 #include <Math/RotationX.h>
40 #include <Math/RotationY.h>
41 #include <Math/RotationZ.h>
42 #include <Math/Rotation3D.h>
43 #include <Math/RotationZYX.h>
44 #include <Math/EulerAngles.h>
45 #include <Math/VectorUtil.h>
46 #include <TGeoElement.h>
47 #include <TGeoMaterial.h>
48 #include <TGeoMedium.h>
49 #include <TGeoPhysicalNode.h>
50 #include <TGDMLMatrix.h>
51 
52 #ifdef __GNUC__
53 #pragma GCC diagnostic pop
54 #endif
55 
56 // C/C++ include files
57 #include <set>
58 #include <cmath>
59 #include <limits>
60 #include <vector>
61 
62 #define _USE_MATH_DEFINES
63 #ifndef M_PI
64 #define M_PI 3.14159265358979323846
65 #endif
66 
68 namespace dd4hep {
69 
70  // Forward declarations
71  class Detector;
72  class IDDescriptor;
73  class VisAttrObject;
74  class HeaderObject;
75  class ConstantObject;
76  class RegionObject;
77  class LimitSetObject;
78 
79  typedef ROOT::Math::RhoZPhiVector PositionRhoZPhi;
80  typedef ROOT::Math::Polar3DVector PositionPolar;
81  typedef ROOT::Math::XYZVector Position;
82  typedef ROOT::Math::XYZVector Direction;
83  typedef ROOT::Math::XYZVector XYZAngles;
84 
85  template <class V> V RotateX(const V& v, double a) {
87  }
88  template <class V> V RotateY(const V& v, double a) {
90  }
91  template <class V> V RotateZ(const V& v, double a) {
93  }
94 
120 
121 
123 
128  class Author: public Ref_t {
129  public:
131  Author() = default;
133  Author(const Author& e) = default;
135  template <typename Q> Author(const Handle<Q>& e) : Ref_t(e) { }
137  Author(Detector& doc);
139  Author& operator=(const Author& e) = default;
141  std::string authorName() const;
143  void setAuthorName(const std::string& nam);
145  std::string authorEmail() const;
147  void setAuthorEmail(const std::string& addr);
148  };
149 
151 
158  class Header: public Handle<HeaderObject> {
159  public:
161  Header() = default;
163  Header(const Header& copy) = default;
165  template <typename Q> Header(const Handle<Q>& e) : Handle<HeaderObject>(e) { }
167  Header(const std::string& author, const std::string& url);
169  Header& operator=(const Header& copy) = default;
171  const std::string name() const;
173  void setName(const std::string& new_name);
175  const std::string title() const;
177  void setTitle(const std::string& new_title);
179  const std::string& author() const;
181  void setAuthor(const std::string& new_author);
183  const std::string& url() const;
185  void setUrl(const std::string& new_url);
187  const std::string& status() const;
189  void setStatus(const std::string& new_status);
191  const std::string& version() const;
193  void setVersion(const std::string& new_version);
195  const std::string& comment() const;
197  void setComment(const std::string& new_comment);
198  };
199 
201 
209  class Constant: public Handle<ConstantObject> {
210  public:
212  Constant() = default;
214  Constant(const Constant& copy) = default;
216  template <typename Q> Constant(const Handle<Q>& e) : Handle<ConstantObject> (e) { }
218  Constant(const std::string& name);
220  Constant(const std::string& name, const std::string& val, const std::string& typ="number");
222  Constant& operator=(const Constant& copy) = default;
224  bool operator==(const Constant& rhs) const {
225  return m_element == rhs.m_element;
226  }
228  std::string dataType() const;
230  std::string toString() const;
231  };
232 
234 
242  class Atom: public Handle<TGeoElement> {
243  public:
245  Atom() = default;
247  Atom(const Atom& copy) = default;
249  Atom(Object* e) : Handle<Object>(e) { }
250 #ifndef __CINT__
251  Atom(const Handle<Object>& e) : Handle<Object>(e) { }
253 #endif
254  template <typename Q> Atom(const Handle<Q>& e) : Handle<Object>(e) { }
257  Atom(const std::string& name, const std::string& formula, int Z, int N, double density);
259  Atom& operator=(const Atom& copy) = default;
260  };
261 
263 
272  class Material: public Handle<TGeoMedium> {
273  public:
274  typedef const TGDMLMatrix* Property;
275 
276  public:
278  Material() = default;
280  Material(const Material& copy) = default;
282  Material(Object* e) : Handle<Object>(e) { }
283 #ifndef __CINT__
284  Material(const Handle<Object>& e) : Handle<Object>(e) { }
286 #endif
287  template <typename Q> Material(const Handle<Q>& e) : Handle<Object>(e) { }
290  Material& operator=(const Material& copy) = default;
292  double Z() const ;
294  double A() const ;
296  double density() const ;
298  std::string toString() const;
300  double radLength() const;
302  double intLength() const;
304  double fraction(Atom atom) const;
306  Property property(const char* name) const;
308  Property property(const std::string& name) const;
310  std::string propertyRef(const std::string& name, const std::string& default_value="");
312  double constProperty(const std::string& name) const;
314  std::string constPropertyRef(const std::string& name, const std::string& default_value="");
315  };
316 
318 
324  class VisAttr: public Handle<VisAttrObject> {
325  public:
326  enum Style {
327  SOLID = 0x1, WIREFRAME = 0x2, DASHED = 0x2, LAST_STYLE
328  };
330  VisAttr() = default;
332  VisAttr(const VisAttr& e) = default;
333 #ifndef __CINT__
334  VisAttr(const Handle<Object>& e) : Handle<Object>(e) { }
336 #endif
337  template <typename Q> VisAttr(const Handle<Q>& e) : Handle<Object>(e) { }
340  VisAttr(const std::string& name);
342  VisAttr(const char* name);
344  VisAttr& operator=(const VisAttr& attr) = default;
345 
347  bool showDaughters() const;
349  void setShowDaughters(bool value);
350 
352  bool visible() const;
354  void setVisible(bool value);
355 
357  int lineStyle() const;
359  void setLineStyle(int style);
360 
362  int drawingStyle() const;
364  void setDrawingStyle(int style);
365 
367  float alpha() const;
368 
370  int color() const;
372  void setColor(float alpha, float red, float green, float blue);
373 
375  bool rgb(float& red, float& green, float& blue) const;
377  bool argb(float& alpha, float& red, float& green, float& blue) const;
378 
380  std::string toString() const;
381  };
382 
384 
389  class Limit {
390  public:
392  std::string particles;
394  std::string name;
396  std::string unit;
398  std::string content;
400  double value = 0.0;
401  public:
403  Limit() = default;
405  Limit(const Limit& c) = default;
407  Limit& operator=(const Limit& c) = default;
409  bool operator==(const Limit& c) const;
411  bool operator<(const Limit& c) const;
413  std::string toString() const;
414  };
415 
417 
425  class LimitSet: public Handle<LimitSetObject> {
426  public:
428  typedef std::set<Limit> Set;
429  typedef std::set<Limit>::iterator iterator;
430  typedef std::set<Limit>::const_iterator const_iterator;
431  public:
433  LimitSet() = default;
435  LimitSet(const LimitSet& e) = default;
436 #ifndef __CINT__
439 #endif
440  template <typename Q> LimitSet(const Handle<Q>& e) : Handle<LimitSetObject>(e) { }
443  LimitSet& operator=(const LimitSet& c) = default;
445  LimitSet(const std::string& name);
447  bool addLimit(const Limit& limit);
449  const std::set<Limit>& limits() const;
451  bool addCut(const Limit& limit);
453  const std::set<Limit>& cuts() const;
454  };
455 
457 
462  class Region: public Handle<RegionObject> {
463  public:
465  Region() = default;
467  Region(const Region& e) = default;
468 #ifndef __CINT__
469  Region(const Handle<RegionObject>& e) : Handle<Object>(e) { }
471 #endif
472  template <typename Q> Region(const Handle<Q>& e) : Handle<Object>(e) { }
475  Region(const std::string& name);
477  Region& operator=(const Region& c) = default;
478 
480  Region& setStoreSecondaries(bool value);
482  Region& setThreshold(double value);
484  Region& setCut(double value);
486  Region& setCut(double value, const std::string& particle);
487 
489  std::vector<std::string>& limits() const;
490 
492  double cut() const;
494  double threshold() const;
496  bool storeSecondaries() const;
498  bool useDefaultCut() const;
500  bool wasThresholdSet() const;
501  };
502 
503 } /* End namespace dd4hep */
504 
505 #include <Math/Vector4D.h>
506 #include <Math/Point3D.h>
507 
508 namespace ROOT {
509  namespace Math {
511  inline double operator *(const dd4hep::Position& l, const dd4hep::Position& r) {
512  return std::sqrt(l.X() * r.X() + l.Y() * r.Y() + l.Z() * r.Z());
513  }
515  inline double mean_length(const dd4hep::Position& p1, const dd4hep::Position& p2) {
516  return 0.5 * (p1.R() + p2.R()) / 2.0;
517  }
520  return 0.5 * (p1 + p2);
521  }
522 
523  // These operators are used for component properties.
524  // The implementation is in the parsers, but since the parsers
525  // do not have public include files, they are defined here.
526 
528  bool operator<(const XYZPoint& a, const XYZPoint& b);
530  bool operator<(const XYZVector& a, const XYZVector& b);
532  bool operator<(const PxPyPzEVector& a, const PxPyPzEVector& b);
533  }
534 }
535 #endif // DD4HEP_OBJECTS_H
dd4hep::Material::operator=
Material & operator=(const Material &copy)=default
Assignment operator.
dd4hep::Header::setAuthor
void setAuthor(const std::string &new_author)
Accessor: set object author.
Definition: Objects.cpp:103
dd4hep::Author::setAuthorEmail
void setAuthorEmail(const std::string &addr)
Set the author's email address.
Definition: Objects.cpp:57
dd4hep::Author::Author
Author(const Author &e)=default
Constructorto be used for assignment from a handle.
dd4hep::Limit::operator=
Limit & operator=(const Limit &c)=default
Assignment operator.
dd4hep::Constant::operator=
Constant & operator=(const Constant &copy)=default
Copy assignment.
dd4hep::Limit::operator==
bool operator==(const Limit &c) const
Equality operator.
Definition: Objects.cpp:428
dd4hep::Material::Material
Material()=default
Default constructor.
dd4hep::VisAttr::color
int color() const
Get object color.
Definition: Objects.cpp:376
dd4hep::Header::comment
const std::string & comment() const
Accessor to object comment.
Definition: Objects.cpp:128
dd4hep::LimitSet::cuts
const std::set< Limit > & cuts() const
Accessor to limits container.
Definition: Objects.cpp:476
dd4hep::LimitSet::const_iterator
std::set< Limit >::const_iterator const_iterator
Definition: Objects.h:430
dd4hep::Atom
Handle class describing an element in the periodic table.
Definition: Objects.h:242
dd4hep::Material::toString
std::string toString() const
String representation of this object.
Definition: Objects.cpp:294
dd4hep::VisAttr::argb
bool argb(float &alpha, float &red, float &green, float &blue) const
Get alpha and RGB values of the color (if valid)
Definition: Objects.cpp:406
dd4hep::HeaderObject
Concrete object implementation for the Header handle.
Definition: ObjectsInterna.h:39
dd4hep::Constant::Constant
Constant(const Constant &copy)=default
Constructor to be used for assignment from a handle.
dd4hep::Header::setStatus
void setStatus(const std::string &new_status)
Accessor: set object status.
Definition: Objects.cpp:113
dd4hep::Region::wasThresholdSet
bool wasThresholdSet() const
Access was_threshold_set flag.
Definition: Objects.cpp:533
dd4hep::Header::operator=
Header & operator=(const Header &copy)=default
Assignment operator.
dd4hep::Constant::Constant
Constant(const Handle< Q > &e)
Constructor to be used when reading the already parsed DOM tree.
Definition: Objects.h:216
v
View * v
Definition: MultiView.cpp:28
dd4hep::Author::Author
Author(const Handle< Q > &e)
Constructor to be used when assigning already valid handle.
Definition: Objects.h:135
dd4hep::Handle< TGeoElement >::Object
TGeoElement Object
Extern accessible definition of the contained element type.
Definition: Handle.h:88
dd4hep::Header::title
const std::string title() const
Accessor to object title.
Definition: Objects.cpp:78
dd4hep::Limit::particles
std::string particles
Particle the limit should be applied to.
Definition: Objects.h:392
dd4hep::XYZAngles
ROOT::Math::XYZVector XYZAngles
Definition: Objects.h:83
dd4hep::Material::property
Property property(const char *name) const
Access to tabular properties of the material.
Definition: Objects.cpp:259
dd4hep::Author::Author
Author()=default
Default constructor.
dd4hep::Material::Property
const TGDMLMatrix * Property
Definition: Objects.h:274
dd4hep::VisAttr::toString
std::string toString() const
String representation of this object.
Definition: Objects.cpp:417
dd4hep::Region::setStoreSecondaries
Region & setStoreSecondaries(bool value)
Set flag to store secondaries.
Definition: Objects.cpp:492
dd4hep::VisAttr
Handle class describing visualization attributes.
Definition: Objects.h:324
dd4hep::Region::storeSecondaries
bool storeSecondaries() const
Access secondaries flag.
Definition: Objects.cpp:525
dd4hep::Region::setCut
Region & setCut(double value)
Set default production cut.
Definition: Objects.cpp:503
dd4hep::Region::Region
Region()=default
Default constructor.
dd4hep::LimitSet::limits
const std::set< Limit > & limits() const
Accessor to limits container.
Definition: Objects.cpp:464
dd4hep::Header::setComment
void setComment(const std::string &new_comment)
Accessor: set object comment.
Definition: Objects.cpp:133
dd4hep::Limit
Small object describing a limit structure acting on a particle type.
Definition: Objects.h:389
dd4hep::Limit::toString
std::string toString() const
Conversion to a string representation.
Definition: Objects.cpp:444
Handle.h
dd4hep::Author
Handle class describing an author entity.
Definition: Objects.h:128
dd4hep::VisAttr::setShowDaughters
void setShowDaughters(bool value)
Set Flag to show/hide daughter elements.
Definition: Objects.cpp:336
dd4hep::Material::constPropertyRef
std::string constPropertyRef(const std::string &name, const std::string &default_value="")
Access string property value from the material table.
Definition: Objects.cpp:286
dd4hep::Handle< NamedObject >
dd4hep::Atom::operator=
Atom & operator=(const Atom &copy)=default
Assignment operator.
dd4hep::Rotation3D
ROOT::Math::Rotation3D Rotation3D
Definition: Objects.h:113
dd4hep::VisAttr::setLineStyle
void setLineStyle(int style)
Set line style.
Definition: Objects.cpp:356
dd4hep::Material::propertyRef
std::string propertyRef(const std::string &name, const std::string &default_value="")
Access string property value from the material table.
Definition: Objects.cpp:269
dd4hep::Region::operator=
Region & operator=(const Region &c)=default
Assignment operator.
dd4hep::PositionPolar
ROOT::Math::Polar3DVector PositionPolar
Definition: Objects.h:80
dd4hep::RotateZ
V RotateZ(const V &v, double a)
Definition: Objects.h:91
dd4hep::Header::url
const std::string & url() const
Accessor to object url.
Definition: Objects.cpp:88
dd4hep::Direction
Position Direction
Definition: Fields.h:28
dd4hep::Handle< ConstantObject >::name
const char * name() const
Access the object name (or "" if not supported by the object)
dd4hep::Header::setUrl
void setUrl(const std::string &new_url)
Accessor: set object url.
Definition: Objects.cpp:93
dd4hep::Region::limits
std::vector< std::string > & limits() const
Access references to user limits.
Definition: Objects.cpp:510
dd4hep::LimitSet::LimitSet
LimitSet(const LimitSet &e)=default
Copy constructor for handle.
dd4hep::Material::intLength
double intLength() const
Access the interaction length of the underlying material.
Definition: Objects.cpp:221
dd4hep::Material::A
double A() const
atomic number of the underlying material
Definition: Objects.cpp:188
dd4hep::Material::fraction
double fraction(Atom atom) const
Access the fraction of an element within the material.
Definition: Objects.cpp:232
dd4hep::VisAttr::Style
Style
Definition: Objects.h:326
dd4hep::RotateY
V RotateY(const V &v, double a)
Definition: Objects.h:88
dd4hep::VisAttr::alpha
float alpha() const
Get alpha value.
Definition: Objects.cpp:371
dd4hep::VisAttr::VisAttr
VisAttr(const VisAttr &e)=default
Copy constructor for handle.
dd4hep::Region::Region
Region(const Region &e)=default
Copy Constructor.
ROOT::Math::operator*
double operator*(const dd4hep::Position &l, const dd4hep::Position &r)
Dot product of 3-vectors.
Definition: Objects.h:511
dd4hep::Region::setCut
Region & setCut(double value, const std::string &particle)
Set particle type specific cut (Geant4 accepts e+, e-, gamma, and proton)
dd4hep::Material::density
double density() const
density of the underlying material
Definition: Objects.cpp:199
dd4hep::Constant::dataType
std::string dataType() const
Access the constant.
Definition: Objects.cpp:148
dd4hep::Header::name
const std::string name() const
Accessor to object name.
Definition: Objects.cpp:68
dd4hep::VisAttr::lineStyle
int lineStyle() const
Get line style.
Definition: Objects.cpp:351
dd4hep::Material
Handle class describing a material.
Definition: Objects.h:272
dd4hep::VisAttr::drawingStyle
int drawingStyle() const
Get drawing style.
Definition: Objects.cpp:361
dd4hep::Constant::operator==
bool operator==(const Constant &rhs) const
Equality operator.
Definition: Objects.h:224
dd4hep::Translation3D
ROOT::Math::Translation3D Translation3D
Definition: Objects.h:119
dd4hep::VisAttr::showDaughters
bool showDaughters() const
Get Flag to show/hide daughter elements.
Definition: Objects.cpp:331
dd4hep::VisAttr::setDrawingStyle
void setDrawingStyle(int style)
Set drawing style.
Definition: Objects.cpp:366
dd4hep::Region::threshold
double threshold() const
Access production threshold.
Definition: Objects.cpp:520
dd4hep::LimitSet::operator=
LimitSet & operator=(const LimitSet &c)=default
Assignment operator.
dd4hep::Handle< TGeoElement >::Handle
Handle()=default
Default constructor.
dd4hep::Constant
Handle class describing a constant (define) object in description.
Definition: Objects.h:209
dd4hep::Author::operator=
Author & operator=(const Author &e)=default
Assignment operator.
dd4hep::Header::setTitle
void setTitle(const std::string &new_title)
Accessor: set object title.
Definition: Objects.cpp:83
dd4hep::VisAttr::setVisible
void setVisible(bool value)
Set visibility flag.
Definition: Objects.cpp:346
dd4hep::LimitSet
Handle class describing a set of limits as they are used for simulation.
Definition: Objects.h:425
dd4hep::Limit::name
std::string name
Limit name.
Definition: Objects.h:394
dd4hep::Author::setAuthorName
void setAuthorName(const std::string &nam)
Set the author's name.
Definition: Objects.cpp:47
dd4hep::VisAttr::DASHED
@ DASHED
Definition: Objects.h:327
dd4hep::RegionObject
Concrete object implementation of the Region Handle.
Definition: ObjectsInterna.h:111
dd4hep::Material::constProperty
double constProperty(const std::string &name) const
Access to tabular properties of the material.
Definition: Objects.cpp:277
dd4hep::RotationZ
ROOT::Math::RotationZ RotationZ
Definition: Objects.h:107
dd4hep::Material::Z
double Z() const
proton number of the underlying material
Definition: Objects.cpp:176
dd4hep::Header::author
const std::string & author() const
Accessor to object author.
Definition: Objects.cpp:98
dd4hep::LimitSet::Set
std::set< Limit > Set
Iterator definitions.
Definition: Objects.h:428
dd4hep::Region
Handle class describing a region as used in simulation.
Definition: Objects.h:462
dd4hep::VisAttr::rgb
bool rgb(float &red, float &green, float &blue) const
Get RGB values of the color (if valid)
Definition: Objects.cpp:396
dd4hep::Header::setName
void setName(const std::string &new_name)
Accessor: set object name.
Definition: Objects.cpp:73
dd4hep::Header
Handle class describing the basic information about geometry objects as it is defined in Detector.
Definition: Objects.h:158
NamedObject.h
dd4hep::ConstantObject
Concrete object implementation for the Constant handle.
Definition: ObjectsInterna.h:64
dd4hep::Handle< ConstantObject >::m_element
ConstantObject * m_element
Single and only data member: Reference to the actual element.
Definition: Handle.h:93
dd4hep::Limit::content
std::string content
Content.
Definition: Objects.h:398
dd4hep::Atom::Atom
Atom(const Atom &copy)=default
Copy constructor.
dd4hep::RotateX
V RotateX(const V &v, double a)
Definition: Objects.h:85
dd4hep::Limit::unit
std::string unit
Units.
Definition: Objects.h:396
dd4hep::PositionRhoZPhi
ROOT::Math::RhoZPhiVector PositionRhoZPhi
Definition: Objects.h:77
dd4hep::Material::Material
Material(const Material &copy)=default
Copy constructor.
dd4hep::Author::authorName
std::string authorName() const
Access the auhor's name.
Definition: Objects.cpp:42
dd4hep::LimitSet::iterator
std::set< Limit >::iterator iterator
Definition: Objects.h:429
dd4hep::sim::IDDescriptor
IDDescriptor IDDescriptor
Definition: LCIOConversions.cpp:69
dd4hep::Limit::value
double value
Double value.
Definition: Objects.h:400
dd4hep::Atom::Atom
Atom()=default
Default constructor.
dd4hep::Header::Header
Header(const Handle< Q > &e)
Constructor to be used when reading the already parsed DOM tree.
Definition: Objects.h:165
dd4hep::Region::cut
double cut() const
Access cut value.
Definition: Objects.cpp:515
dd4hep::LimitSet::addCut
bool addCut(const Limit &limit)
Add new limit. Returns true if the new limit was added, false if it already existed.
Definition: Objects.cpp:470
dd4hep::Transform3D
ROOT::Math::Transform3D Transform3D
Definition: Objects.h:117
dd4hep::Constant::toString
std::string toString() const
String representation of this object.
Definition: Objects.cpp:156
dd4hep::Limit::Limit
Limit(const Limit &c)=default
Copy constructor.
dd4hep::Position
ROOT::Math::XYZVector Position
Definition: Objects.h:81
dd4hep::EulerAngles
ROOT::Math::EulerAngles EulerAngles
Definition: Objects.h:115
dd4hep::RotationY
ROOT::Math::RotationY RotationY
Definition: Objects.h:109
ROOT::Math::operator<
bool operator<(const XYZPoint &a, const XYZPoint &b)
Allow point insertion of a point in maps.
Definition: ParsersObjects_XYZPoint.cpp:18
dd4hep::VisAttr::visible
bool visible() const
Get visibility flag.
Definition: Objects.cpp:341
dd4hep::Header::Header
Header()=default
Default constructor.
dd4hep::Limit::operator<
bool operator<(const Limit &c) const
operator less
Definition: Objects.cpp:433
dd4hep::VisAttr::SOLID
@ SOLID
Definition: Objects.h:327
dd4hep::Region::useDefaultCut
bool useDefaultCut() const
Access use_default_cut flag.
Definition: Objects.cpp:529
dd4hep
Namespace for the AIDA detector description toolkit.
Definition: AlignmentsCalib.h:28
dd4hep::VisAttr::WIREFRAME
@ WIREFRAME
Definition: Objects.h:327
ROOT::Math::mean_length
double mean_length(const dd4hep::Position &p1, const dd4hep::Position &p2)
Calculate the mean length of two vectors.
Definition: Objects.h:515
ROOT::Math::mean_direction
dd4hep::Position mean_direction(const dd4hep::Position &p1, const dd4hep::Position &p2)
Calculate the mean direction of two vectors.
Definition: Objects.h:519
dd4hep::Detector
The main interface to the dd4hep detector description package.
Definition: Detector.h:90
dd4hep::Limit::Limit
Limit()=default
Default constructor.
dd4hep::RotationX
ROOT::Math::RotationX RotationX
Definition: Objects.h:111
dd4hep::LimitSetObject
Concrete object implementation of the LimitSet Handle.
Definition: ObjectsInterna.h:134
dd4hep::detail::tools::copy
void copy(Alignment from, Alignment to)
Copy alignment object from source object.
Definition: AlignmentTools.cpp:43
dd4hep::Material::radLength
double radLength() const
Access the radiation length of the underlying material.
Definition: Objects.cpp:210
dd4hep::RotationZYX
ROOT::Math::RotationZYX RotationZYX
Definition: Objects.h:105
dd4hep::Header::status
const std::string & status() const
Accessor to object status.
Definition: Objects.cpp:108
dd4hep::VisAttr::setColor
void setColor(float alpha, float red, float green, float blue)
Set object color.
Definition: Objects.cpp:381
dd4hep::Constant::Constant
Constant()=default
Default constructor.
dd4hep::Material::Material
Material(Object *e)
Initialization from pointer.
Definition: Objects.h:282
dd4hep::LimitSet::addLimit
bool addLimit(const Limit &limit)
Add new limit. Returns true if the new limit was added, false if it already existed.
Definition: Objects.cpp:458
dd4hep::Header::setVersion
void setVersion(const std::string &new_version)
Accessor: set object version.
Definition: Objects.cpp:123
dd4hep::VisAttr::operator=
VisAttr & operator=(const VisAttr &attr)=default
Assignment operator.
ROOT
ROOT include files.
Definition: Objects.h:508
dd4hep::Header::Header
Header(const Header &copy)=default
Constructorto be used for assignment from a handle.
dd4hep::VisAttr::VisAttr
VisAttr()=default
Default constructor.
dd4hep::Header::version
const std::string & version() const
Accessor to object version.
Definition: Objects.cpp:118
dd4hep::Atom::Atom
Atom(Object *e)
Initialization from pointer.
Definition: Objects.h:249
dd4hep::VisAttr::LAST_STYLE
@ LAST_STYLE
Definition: Objects.h:327
dd4hep::Author::authorEmail
std::string authorEmail() const
Access the auhor's email address.
Definition: Objects.cpp:52
dd4hep::LimitSet::LimitSet
LimitSet()=default
Constructor to be used when reading the already parsed DOM tree.
dd4hep::Region::setThreshold
Region & setThreshold(double value)
Set threshold in MeV.
Definition: Objects.cpp:497