From cfb571dfc47124640a489fdd7f08aa2bd60f964d Mon Sep 17 00:00:00 2001 From: Markus Frank <markus.frank@cern.ch> Date: Fri, 15 Nov 2013 14:18:03 +0000 Subject: [PATCH] Fix bug and bring interface up to date to documentation --- DDCore/include/DD4hep/Detector.h | 23 +++++++++++++++++++---- DDCore/src/Detector.cpp | 15 ++++++++------- 2 files changed, 27 insertions(+), 11 deletions(-) diff --git a/DDCore/include/DD4hep/Detector.h b/DDCore/include/DD4hep/Detector.h index 494a9776d..031e5c993 100644 --- a/DDCore/include/DD4hep/Detector.h +++ b/DDCore/include/DD4hep/Detector.h @@ -167,9 +167,19 @@ namespace DD4hep { /** @class SubDetector Detector.h DD4hep/lcdd/Detector.h * - * The basic object type to access all information of a given - * Subdetector including it's hierarchical structure with - * other dependending DetElement daughters. + * Detector elements (class DetElement are entities which represent + * subdetectors or sizable parts of a subdetector. + * A DetElement instance has the means to provide to clients information about + * + * -- the detector hierarchy by exposing its children. + * -- its placement within the overall experiment if it represents an + * entire subdetector or its placement with respect to its parent + * if the \tw{DetElement} represents a part of a subdetector. + * -- information about the \tw{Readout} structure if the object is + * instrumented and read-out. Otherwise this link is empty. + * -- information about the environmental conditions etc. (\tw{conditons}). + * -- alignment information. + * * * @author M.Frank * @version 1.0 @@ -369,7 +379,7 @@ namespace DD4hep { /// Set the limits to the detector element DetElement& setLimitSet(const LCDD& lcdd, const std::string& name, const Volume& volume); - /// Access to the logical volume of the daughter placement + /// Access to the logical volume of the detector element's placement Volume volume() const; /// Access to the physical volume of this detector element @@ -386,6 +396,11 @@ namespace DD4hep { /// Access to the detector elements's parent DetElement parent() const; + /// Access to the alignment information + Alignment alignment() const; + /// Access to the conditions information + Conditions conditions() const; + /// Set detector element for reference transformations. Will delete existing reference trafo. DetElement& setReference(DetElement reference); diff --git a/DDCore/src/Detector.cpp b/DDCore/src/Detector.cpp index 3e7888735..44fa51685 100644 --- a/DDCore/src/Detector.cpp +++ b/DDCore/src/Detector.cpp @@ -374,16 +374,17 @@ DetElement& DetElement::setCombineHits(bool value, SensitiveDetector& sens) { sens.setCombineHits(value); return *this; } -#if 0 -Readout DetElement::readout() const { - return object<Object>().readout; + +/// Access to the alignment information +Alignment DetElement::alignment() const { + return object<Object>().alignment; } -DetElement& DetElement::setReadout(const Readout& readout) { - object<Object>().readout = readout; - return *this; +/// Access to the conditions information +Conditions DetElement::conditions() const { + return object<Object>().conditions; } -#endif + const DetElement::Children& DetElement::children() const { return object<Object>().children; } -- GitLab