DD4hep  1.28.0
Detector Description Toolkit for High Energy Physics
DetectorHelper.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 #ifndef DD4HEP_DETECTORHELPER_H
15 #define DD4HEP_DETECTORHELPER_H
16 
17 #include "DD4hep/Detector.h"
18 
20 namespace dd4hep {
21 
23 
32  class DetectorHelper : public Handle<Detector> {
33  public:
35  DetectorHelper() = default;
37  DetectorHelper(const DetectorHelper& h) = default;
39  DetectorHelper(Detector* description_ptr) : Handle<Detector>(description_ptr) {}
41  DetectorHelper(Detector& description_ref) : Handle<Detector>(&description_ref) {}
45  ~DetectorHelper() = default;
47  DetectorHelper& operator=(const DetectorHelper& c) = default;
49  SensitiveDetector sensitiveDetector(const std::string& detector) const;
53  DetElement detectorByID(int id) const;
55  Atom element(const std::string& name) const;
57  Material material(const std::string& name) const;
58  };
59 
60 } /* End namespace dd4hep */
61 #endif // DD4HEP_DETECTORHELPER_H
dd4hep::DetectorHelper::element
Atom element(const std::string &name) const
Access an element from the element table by name.
Definition: DetectorHelper.cpp:58
dd4hep::Atom
Handle class describing an element in the periodic table.
Definition: Objects.h:242
dd4hep::SensitiveDetector
Handle class to hold the information of a sensitive detector.
Definition: DetElement.h:44
Detector.h
dd4hep::DetectorHelper::operator=
DetectorHelper & operator=(const DetectorHelper &c)=default
Assignment operator.
dd4hep::Handle
Handle: a templated class like a shared pointer, which allows specialized access to tgeometry objects...
Definition: Handle.h:84
dd4hep::Handle< Detector >::name
const char * name() const
Access the object name (or "" if not supported by the object)
dd4hep::DetectorHelper::DetectorHelper
DetectorHelper(Detector &description_ref)
Initializing constructor from pointer.
Definition: DetectorHelper.h:41
dd4hep::DetectorHelper::DetectorHelper
DetectorHelper()=default
Default constructor.
dd4hep::Material
Handle class describing a material.
Definition: Objects.h:272
dd4hep::DetectorHelper::detectorByID
DetElement detectorByID(int id) const
Find a detector element by its system ID.
Definition: DetectorHelper.cpp:48
dd4hep::DetElement
Handle class describing a detector element.
Definition: DetElement.h:188
dd4hep::DetectorHelper
DetectorHelper: class to shortcut certain questions to the dd4hep detector description interface.
Definition: DetectorHelper.h:32
dd4hep::DetectorHelper::~DetectorHelper
~DetectorHelper()=default
Default destructor.
dd4hep::DetectorHelper::DetectorHelper
DetectorHelper(Detector *description_ptr)
Initializing constructor from pointer.
Definition: DetectorHelper.h:39
dd4hep::DetectorHelper::DetectorHelper
DetectorHelper(const Handle< Detector > &h)
Copy constructor.
Definition: DetectorHelper.h:43
dd4hep::DetectorHelper::sensitiveDetector
SensitiveDetector sensitiveDetector(const std::string &detector) const
Access the sensitive detector of a given subdetector (if the sub-detector is sensitive!...
Definition: DetectorHelper.cpp:23
dd4hep
Namespace for the AIDA detector description toolkit.
Definition: AlignmentsCalib.h:28
dd4hep::Detector
The main interface to the dd4hep detector description package.
Definition: Detector.h:90
dd4hep::DetectorHelper::DetectorHelper
DetectorHelper(const DetectorHelper &h)=default
Copy constructor.
dd4hep::DetectorHelper::material
Material material(const std::string &name) const
Access a material from the material table by name.
Definition: DetectorHelper.cpp:79