diff --git a/DDCore/include/XML/XMLDetector.h b/DDCore/include/XML/XMLDetector.h index 09a060cafb0ad5fc22cb49c7e7dea7e8818a7219..f836eb9c22051478ccc9f23e30f39315438b8d08 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 ae050898b6684745678addbab0f29e5a9f32e204..338addc091f72bcf95c2627dc527c6ea8a5187d9 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 21f8e7c9d9f706295c289bbbe80acc51a0953598..ae519b3c6dad79dfe52affc72e1614571c341cfc 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 180e4d111124b8c4a09577a1d4544d18552e60f3..b207f198c78e0e858af12654bdad27054fb00d85 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 | --------