From f01d267b36f57fdff90e9e9915b8e13b13f1e57f Mon Sep 17 00:00:00 2001 From: Nikiforos Nikiforou <Nikiforos.Nikiforou@cern.ch> Date: Thu, 2 Jul 2015 14:49:54 +0000 Subject: [PATCH] Extended LayerCalorimeterStruct and added isRadiator() helper function --- DDCore/include/XML/XMLDetector.h | 4 ++++ DDCore/src/XML/XMLDetector.cpp | 6 ++++++ DDRec/include/DDRec/DetectorData.h | 17 +++++++++++++++++ doc/release.notes | 17 ++++++++++++++++- 4 files changed, 43 insertions(+), 1 deletion(-) diff --git a/DDCore/include/XML/XMLDetector.h b/DDCore/include/XML/XMLDetector.h index 09a060caf..f836eb9c2 100644 --- a/DDCore/include/XML/XMLDetector.h +++ b/DDCore/include/XML/XMLDetector.h @@ -43,6 +43,10 @@ namespace DD4hep { std::string materialStr() const; /// Check if component is sensitive bool isSensitive() const; + + /// Check if component is a radiator (absorber) + bool isRadiator() const; + /// Create a shape using the plugin mechanism from an XML element NamedObject* createShape() const; }; diff --git a/DDCore/src/XML/XMLDetector.cpp b/DDCore/src/XML/XMLDetector.cpp index ae050898b..338addc09 100644 --- a/DDCore/src/XML/XMLDetector.cpp +++ b/DDCore/src/XML/XMLDetector.cpp @@ -26,6 +26,12 @@ bool Component::isSensitive() const { return val == 'T' || val == 'Y'; } +bool Component::isRadiator() const { + char val = m_element.hasAttr(_U(radiator)) ? m_element.attr < string > (_U(radiator))[0] : 'f'; + val = ::toupper(val); + return val == 'T' || val == 'Y'; +} + DD4hep::NamedObject* Component::createShape() const { using namespace DD4hep::Geometry; Dimension child_dim(m_element); diff --git a/DDRec/include/DDRec/DetectorData.h b/DDRec/include/DDRec/DetectorData.h index 21f8e7c9d..ae519b3c6 100644 --- a/DDRec/include/DDRec/DetectorData.h +++ b/DDRec/include/DDRec/DetectorData.h @@ -295,8 +295,25 @@ namespace DD4hep { */ int inner_symmetry ; + /// inner azimuthal angle of the first module in barrel layout + double inner_phi0 ; + + /// outer azimuthal angle of the first module in barrel layout + double outer_phi0 ; + /// azimuthal angle of the first module in barrel layout + /// DEPRECATED! PLEASE POPULATE INNER/OUTER PHI0 INSTEAD double phi0 ; + + /// Gap between modules(eg. stave gap) in the phi-direction + double gap0; + + /// Gap between modules(eg. middle stave gap) in the z-direction + double gap1; + + /// Gap between modules(reserved for future use) e.g in the r-direction + double gap2; + struct Layer { /// distance from Origin (or the z-axis) diff --git a/doc/release.notes b/doc/release.notes index 180e4d111..b207f198c 100644 --- a/doc/release.notes +++ b/doc/release.notes @@ -3,7 +3,22 @@ DD4hep ---- Release Notes ================================= - +2015/07/02 Nikiforos Nikiforou +------------------------------ + + - Added isRadiator() helper function in DDCore/XML/XMLDetector.h/cpp + Mirroring functionality of isSensitive() and used in geometry drivers + e.g. to calculate total absorber thickness + + - Extended LayeredCalorimeterStruct in DDRec/DetectorData.h to include + additional parameters required by Pandora: + inner_phi0 (e.g. alignment for inner symmetry) + outer_phi0 (e.g aligment for outer symmetry) + NOTE: phi0 still remains but is deprecated + gap0 (e.g stave gap along r-phi) + gap1 (e.g middle stave gap along z) + gap2 (reserved for future use) + -------- | v00-12 | -------- -- GitLab