diff --git a/DetectorDescription/ReadoutGeometryBase/CMakeLists.txt b/DetectorDescription/ReadoutGeometryBase/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..2be2bc3a8e5b3567707555f808f775594e7744d0 --- /dev/null +++ b/DetectorDescription/ReadoutGeometryBase/CMakeLists.txt @@ -0,0 +1,20 @@ +################################################################################ +# Package: ReadoutGeometryBase +################################################################################ + +# Declare the package name: +atlas_subdir( ReadoutGeometryBase ) + +# External dependencies: +find_package( CLHEP ) +find_package( Eigen ) +find_package( GeoModelCore ) + +# Component(s) in the package: +atlas_add_library( ReadoutGeometryBase + src/*.c* + PUBLIC_HEADERS ReadoutGeometryBase + INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} + DEFINITIONS ${CLHEP_DEFINITIONS} + LINK_LIBRARIES ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} ${GEOMODELCORE_LIBRARIES} AthenaKernel SGTools AtlasDetDescr GeoPrimitives Identifier GaudiKernel InDetCondTools InDetIdentifier TrkDetElementBase TrkSurfaces TrkEventPrimitives StoreGateLib SGtests + PRIVATE_LINK_LIBRARIES AthenaPoolUtilities DetDescrConditions IdDictDetDescr TRT_ConditionsData GeoModelUtilities) diff --git a/DetectorDescription/ReadoutGeometryBase/ReadoutGeometryBase/DetectorDesign.h b/DetectorDescription/ReadoutGeometryBase/ReadoutGeometryBase/DetectorDesign.h new file mode 100644 index 0000000000000000000000000000000000000000..1f2d5bea7fbad4285af5b70b47f46800ebbc2d6a --- /dev/null +++ b/DetectorDescription/ReadoutGeometryBase/ReadoutGeometryBase/DetectorDesign.h @@ -0,0 +1,289 @@ +/* + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +*/ + +/////////////////////////////////////////////////////////////////// +// DetectorDesign.h +/////////////////////////////////////////////////////////////////// +// (c) ATLAS Detector software +/////////////////////////////////////////////////////////////////// + +#ifndef READOUTGEOMETRYBASE_DETECTORDESIGN_H +#define READOUTGEOMETRYBASE_DETECTORDESIGN_H + +// base class +#include "GeoModelKernel/RCBase.h" + +#include "ReadoutGeometryBase/SiDiodesParameters.h" +#include "ReadoutGeometryBase/InDetDD_Defs.h" +#include "CLHEP/Geometry/Point3D.h" +#include "CLHEP/Geometry/Vector3D.h" +#include "CLHEP/Geometry/Transform3D.h" +#include "AtlasDetDescr/AtlasDetectorID.h" + +#include <list> +#include <vector> + +namespace Trk { +class SurfaceBounds; +} + +namespace InDetDD { +class SiReadoutCellId; +class SiCellId; +class SiDiode; +class SiReadoutCell; +class SiLocalPosition; +class SiIntersect; + +enum DetectorShape { + Box=0, Trapezoid, Annulus,Other +}; + +/** @class DetectorDesign + + Base class for the detector design classes for ITk and HGTD. + These hold the local description of the detector elements which are + shared by a number of detector elements. + + */ + +class DetectorDesign: public RCBase { +public: + enum Axis { + xAxis=0, yAxis, zAxis + }; + + /////////////////////////////////////////////////////////////////// + // Public methods: + /////////////////////////////////////////////////////////////////// +public: +/** Constructor + @param thickness: Thickness of sensor + @param phiSymmetric, etaSymmetric, depthSymmetric: Flag to indicate if + element is symmetric about these axes. ie for rectangular sensor they + are all true, for trapezoidal sensor etaSymmetric + is false. They can also be used to force element not to swap directions. + @param carrierType: Carrier type that drifts to readout + (ie electrons for pixels and holes for SCT) + @param readoutSide: Readout side, +ve = positive Depth Side, -ve = negative + Depth Side */ + DetectorDesign(double thickness, + bool phiSymmetric, + bool etaSymmetric, + bool depthSymmetric, + InDetDD::CarrierType carrierType, + int readoutSide); + + DetectorDesign(double thickness, + bool phiSymmetric, + bool etaSymmetric, + bool depthSymmetric, + InDetDD::CarrierType carrierType, + int readoutSide, + Axis stripDirection, + Axis depthDirection); + + // Destructor + ~DetectorDesign(); + + /////////////////////////////////////////////////////////////////// + // Const methods: + /////////////////////////////////////////////////////////////////// + /** Return the centre of a sensor in the local reference frame. + For most designs, this is the origin of the local reference frame. + For StripStereoAnnulusDesign, this is not the case (coordinate origin is "on the beamline") */ + //virtual HepGeom::Point3D<double> sensorCenter() const; + virtual Amg::Vector3D sensorCenter() const; + + /** Test if point is in the active part of the detector with specified tolerances */ + SiIntersect inDetector(const SiLocalPosition &localPosition, double phiTol, + double etaTol) const; + + /** Override default symmetries to prevent swapping of axes. + NB. Flags can be changed from true to false but not false to true. */ + void setSymmetry(bool phiSymmetric, bool etaSymmetric, bool depthSymmetric); + + /** local axis corresponding to eta direction: */ + Axis etaAxis() const; + + /** local axis corresponding to phi direction: */ + Axis phiAxis() const; + + /** local axis corresponding to depth direction: */ + Axis depthAxis() const; + + /** Method which returns thickness of the silicon wafer */ + double thickness() const; + + /** Return carrier type (ie electrons or holes) */ + InDetDD::CarrierType carrierType() const; + + bool phiSymmetric() const; + bool etaSymmetric() const; + bool depthSymmetric() const; + + /** ReadoutSide. +1 = postive depth side, -1 = negative depth side. */ + int readoutSide() const; + + /////////////////////////////////////////////////////////////////// + // Pure virtual methods: + /////////////////////////////////////////////////////////////////// + + /** Returns distance to nearest detector active edge + +ve = inside + -ve = outside */ + virtual void distanceToDetectorEdge(const SiLocalPosition &localPosition, + double &etaDist, double &phiDist) const = 0; + + /** Shape of element */ + virtual DetectorShape shape() const; + + /** Method to calculate length of a module */ + virtual double length() const = 0; + + /** Method to calculate average width of a module */ + virtual double width() const = 0; + + /** Method to calculate minimum width of a module */ + virtual double minWidth() const = 0; + + /** Method to calculate maximum width of a module */ + virtual double maxWidth() const = 0; + + /** Pitch in phi direction */ + virtual double phiPitch() const = 0; + + /** Pitch in phi direction */ + virtual double phiPitch(const SiLocalPosition &localPosition) const = 0; + + // ** Pitch in eta direction */ + virtual double etaPitch() const = 0; + + /** Return true if hit local direction is the same as readout direction. */ + virtual bool swapHitPhiReadoutDirection() const = 0; + virtual bool swapHitEtaReadoutDirection() const = 0; + + /** Element boundary */ + virtual const Trk::SurfaceBounds &bounds() const = 0; + + /** Transform from SiHit to GeoModel frame */ + //virtual const HepGeom::Transform3D SiHitToGeoModel() const; + virtual const Amg::Transform3D SiHitToGeoModel() const; + + /////////////////////////////////////////////////////////// + // + // The following will replace existing methods but are not all implemented yet + // + + /** readout or diode id -> position, size */ + virtual SiDiodesParameters parameters(const SiCellId &cellId) const = 0; + + /** readout or diode id -> position. */ + virtual SiLocalPosition localPositionOfCell(const SiCellId &cellId) const = 0; + + /** number of connected cells. Generally 1 except for ganged pixels which will be 2. + */ + virtual int numberOfConnectedCells(const SiReadoutCellId &readoutId) const = 0; + + /** readout id -> id of connected diodes. + parameter number = 0 will refer to the primary diode and in general the + cell number will be the same. + NB. SiCellId cellId = connectedCell(readoutId, 0) will in general be equivalent to + SiCellId cellId = readoutId */ + virtual SiCellId connectedCell(const SiReadoutCellId &readoutId, + int number) const = 0; + + /** diode id -> readout id + NB assignment of a SiReadoutCellId to a SiCellId is allowed so you are can + pass SiReadoutCellId variables to functions expecting a SiCellId. */ + virtual SiReadoutCellId readoutIdOfCell(const SiCellId &cellId) const = 0; + + /** position -> id */ + virtual SiReadoutCellId readoutIdOfPosition(const SiLocalPosition &localPos) const = 0; + + /** position -> id */ + virtual SiCellId cellIdOfPosition(const SiLocalPosition &localPos) const = 0; + + /** Get the neighbouring diodes of a given diode: + Cell for which the neighbours must be found + List of cells which are neighbours of the given one */ + virtual void neighboursOfCell(const SiCellId &cellId, + std::vector<SiCellId> &neighbours) const = 0; + + /** Check if cell is in range. Returns the original cellId if it is in range, + otherwise it returns an invalid id. */ + virtual SiCellId cellIdInRange(const SiCellId &cellId) const = 0; + + /////////////////////////////////////////////////////////////////// + // Private methods: + /////////////////////////////////////////////////////////////////// +private: + DetectorDesign(); + + /////////////////////////////////////////////////////////////////// + // Private data: + /////////////////////////////////////////////////////////////////// +private: + Axis m_etaAxis; // !< local axis corresponding to eta direction + Axis m_phiAxis; // !< local axis corresponding to phi direction + Axis m_depthAxis; // !< local axis corresponding to depth direction + double m_thickness; // !< thickness of silicon sensor + InDetDD::CarrierType m_carrierType; // !< carrier type that drifts towards readout + // !< (ie holes fro SCT and electrons for pixel) + bool m_phiSymmetric; + bool m_etaSymmetric; + bool m_depthSymmetric; + + bool m_readoutSidePosDepth; // !< Control which side readout is on. + // !< true = positive Depth Side, false = negative Depth + // Side + + // Disallow Copy and assignment; + DetectorDesign(const DetectorDesign &design); + DetectorDesign &operator = (const DetectorDesign &design); +}; + +/////////////////////////////////////////////////////////////////// +// Inline methods: +/////////////////////////////////////////////////////////////////// + +inline DetectorDesign::Axis DetectorDesign::etaAxis() const { + return m_etaAxis; +} + +inline DetectorDesign::Axis DetectorDesign::phiAxis() const { + return m_phiAxis; +} + +inline DetectorDesign::Axis DetectorDesign::depthAxis() const { + return m_depthAxis; +} + +inline double DetectorDesign::thickness() const { + return m_thickness; +} + +inline InDetDD::CarrierType DetectorDesign::carrierType() const { + return m_carrierType; +} + +inline bool DetectorDesign::phiSymmetric() const { + return m_phiSymmetric; +} + +inline bool DetectorDesign::etaSymmetric() const { + return m_etaSymmetric; +} + +inline bool DetectorDesign::depthSymmetric() const { + return m_depthSymmetric; +} + +inline int DetectorDesign::readoutSide() const { + return (m_readoutSidePosDepth) ? +1 : -1; +} + +} // namespace InDetDD + +#endif // READOUTGEOMETRYBASE_DETECTORDESIGN_H diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/InDetDD_Defs.h b/DetectorDescription/ReadoutGeometryBase/ReadoutGeometryBase/InDetDD_Defs.h old mode 100755 new mode 100644 similarity index 90% rename from InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/InDetDD_Defs.h rename to DetectorDescription/ReadoutGeometryBase/ReadoutGeometryBase/InDetDD_Defs.h index d8061e9a6c5e658ad18979d771793030700fee2e..7ade3a553c7317b5e3a863191c9a2627a597e186 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/InDetDD_Defs.h +++ b/DetectorDescription/ReadoutGeometryBase/ReadoutGeometryBase/InDetDD_Defs.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// diff --git a/InnerDetector/InDetDetDescr/PixelReadoutGeometry/PixelReadoutGeometry/PixelDiodeMap.h b/DetectorDescription/ReadoutGeometryBase/ReadoutGeometryBase/PixelDiodeMap.h similarity index 94% rename from InnerDetector/InDetDetDescr/PixelReadoutGeometry/PixelReadoutGeometry/PixelDiodeMap.h rename to DetectorDescription/ReadoutGeometryBase/ReadoutGeometryBase/PixelDiodeMap.h index a6da4c189833f02a36cd6c6f3f46013188a61cb1..db9eb4d2bfb2fbef429e5c50050550c60dbf2c58 100755 --- a/InnerDetector/InDetDetDescr/PixelReadoutGeometry/PixelReadoutGeometry/PixelDiodeMap.h +++ b/DetectorDescription/ReadoutGeometryBase/ReadoutGeometryBase/PixelDiodeMap.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -8,8 +8,8 @@ // (c) ATLAS Pixel Detector software /////////////////////////////////////////////////////////////////// -#ifndef INDETREADOUTGEOMETRY_PIXELDIODEMAP_H -#define INDETREADOUTGEOMETRY_PIXELDIODEMAP_H +#ifndef READOUTGEOMETRYBASE_PIXELDIODEMAP_H +#define READOUTGEOMETRYBASE_PIXELDIODEMAP_H // STL classes #include <list> @@ -17,11 +17,11 @@ #include <vector> // Data member classes -#include "PixelReadoutGeometry/PixelDiodeMatrix.h" +#include "ReadoutGeometryBase/PixelDiodeMatrix.h" // Input/output classes -#include "InDetReadoutGeometry/SiCellId.h" -#include "InDetReadoutGeometry/SiDiodesParameters.h" +#include "ReadoutGeometryBase/SiCellId.h" +#include "ReadoutGeometryBase/SiDiodesParameters.h" namespace InDetDD { @@ -193,4 +193,4 @@ class PixelDiodeMatrix; } // namespace InDetDD -#endif // INDETREADOUTGEOMETRY_PIXELDIODEMAP_H +#endif // READOUTGEOMETRYBASE_PIXELDIODEMAP_H diff --git a/InnerDetector/InDetDetDescr/PixelReadoutGeometry/PixelReadoutGeometry/PixelDiodeMatrix.h b/DetectorDescription/ReadoutGeometryBase/ReadoutGeometryBase/PixelDiodeMatrix.h similarity index 97% rename from InnerDetector/InDetDetDescr/PixelReadoutGeometry/PixelReadoutGeometry/PixelDiodeMatrix.h rename to DetectorDescription/ReadoutGeometryBase/ReadoutGeometryBase/PixelDiodeMatrix.h index 53ec66cc27b8574014b73d265b19d7d01478ff4e..ad7c44ae4af03f40da311eaf09c7665f4c554efa 100755 --- a/InnerDetector/InDetDetDescr/PixelReadoutGeometry/PixelReadoutGeometry/PixelDiodeMatrix.h +++ b/DetectorDescription/ReadoutGeometryBase/ReadoutGeometryBase/PixelDiodeMatrix.h @@ -1,15 +1,15 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// // PixelDiodeMatrix.h /////////////////////////////////////////////////////////////////// -#ifndef INDETREADOUTGEOMETRY_PIXELDIODEMATRIX_H -#define INDETREADOUTGEOMETRY_PIXELDIODEMATRIX_H +#ifndef READOUTGEOMETRYBASE_PIXELDIODEMATRIX_H +#define READOUTGEOMETRYBASE_PIXELDIODEMATRIX_H -#include "InDetReadoutGeometry/SiCellId.h" +#include "ReadoutGeometryBase/SiCellId.h" #include "GeoPrimitives/GeoPrimitives.h" #include "TrkDetElementBase/TrkDetElementBase.h" @@ -199,4 +199,4 @@ namespace InDetDD { } // end namespace -#endif //INDETREADOUTGEOMETRY_PIXELDIODEMATRIX_H +#endif //READOUTGEOMETRYBASE_PIXELDIODEMATRIX_H diff --git a/InnerDetector/InDetDetDescr/PixelReadoutGeometry/PixelReadoutGeometry/PixelMultipleConnection1D.h b/DetectorDescription/ReadoutGeometryBase/ReadoutGeometryBase/PixelMultipleConnection1D.h similarity index 94% rename from InnerDetector/InDetDetDescr/PixelReadoutGeometry/PixelReadoutGeometry/PixelMultipleConnection1D.h rename to DetectorDescription/ReadoutGeometryBase/ReadoutGeometryBase/PixelMultipleConnection1D.h index 1e605eaceee7b482510f14fd19aeed0d05cedbcb..16d66c8dd8b6464e82eb3b58573b6d567bf301ba 100755 --- a/InnerDetector/InDetDetDescr/PixelReadoutGeometry/PixelReadoutGeometry/PixelMultipleConnection1D.h +++ b/DetectorDescription/ReadoutGeometryBase/ReadoutGeometryBase/PixelMultipleConnection1D.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -9,8 +9,8 @@ /////////////////////////////////////////////////////////////////// -#ifndef INDETREADOUTGEOMETRY_PIXELMULTIPLECONNECTION1D_H -#define INDETREADOUTGEOMETRY_PIXELMULTIPLECONNECTION1D_H +#ifndef READOUTGEOMETRYBASE_PIXELMULTIPLECONNECTION1D_H +#define READOUTGEOMETRYBASE_PIXELMULTIPLECONNECTION1D_H #include <vector> @@ -125,4 +125,4 @@ inline int PixelMultipleConnection1D::gangedCell(const int index) const } // namespace InDetDD -#endif // INDETREADOUTGEOMETRY_PIXELMULTIPLECONNECTION1D_H +#endif // READOUTGEOMETRYBASE_PIXELMULTIPLECONNECTION1D_H diff --git a/InnerDetector/InDetDetDescr/PixelReadoutGeometry/PixelReadoutGeometry/PixelReadoutScheme.h b/DetectorDescription/ReadoutGeometryBase/ReadoutGeometryBase/PixelReadoutScheme.h similarity index 93% rename from InnerDetector/InDetDetDescr/PixelReadoutGeometry/PixelReadoutGeometry/PixelReadoutScheme.h rename to DetectorDescription/ReadoutGeometryBase/ReadoutGeometryBase/PixelReadoutScheme.h index ad377034ed791c3102e442b9833f15a35cac99cc..af7da285f7126ea92efab651aedf2e8bb5fd4c45 100755 --- a/InnerDetector/InDetDetDescr/PixelReadoutGeometry/PixelReadoutGeometry/PixelReadoutScheme.h +++ b/DetectorDescription/ReadoutGeometryBase/ReadoutGeometryBase/PixelReadoutScheme.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -8,15 +8,15 @@ // (c) ATLAS Pixel Detector software /////////////////////////////////////////////////////////////////// -#ifndef INDETREADOUTGEOMETRY_PIXELREADOUTSCHEME_H -#define INDETREADOUTGEOMETRY_PIXELREADOUTSCHEME_H +#ifndef READOUTGEOMETRYBASE_PIXELREADOUTSCHEME_H +#define READOUTGEOMETRYBASE_PIXELREADOUTSCHEME_H // Data member classes -#include "PixelReadoutGeometry/PixelMultipleConnection1D.h" +#include "ReadoutGeometryBase/PixelMultipleConnection1D.h" // Input and output classes -#include "InDetReadoutGeometry/SiReadoutCellId.h" -#include "InDetReadoutGeometry/SiCellId.h" +#include "ReadoutGeometryBase/SiReadoutCellId.h" +#include "ReadoutGeometryBase/SiCellId.h" namespace InDetDD { @@ -154,4 +154,4 @@ inline int PixelReadoutScheme::rows() const } // namespace InDetDD -#endif // INDETREADOUTGEOMETRY_PIXELREADOUTSCHEME_H +#endif // READOUTGEOMETRYBASE_PIXELREADOUTSCHEME_H diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiCellId.h b/DetectorDescription/ReadoutGeometryBase/ReadoutGeometryBase/SiCellId.h old mode 100755 new mode 100644 similarity index 98% rename from InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiCellId.h rename to DetectorDescription/ReadoutGeometryBase/ReadoutGeometryBase/SiCellId.h index a1ac94208009b8debbe5aef67ceadf8e598a486d..ea0d006521b13c92d4ecfc3f9ca2101056a0219d --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiCellId.h +++ b/DetectorDescription/ReadoutGeometryBase/ReadoutGeometryBase/SiCellId.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiCommonItems.h b/DetectorDescription/ReadoutGeometryBase/ReadoutGeometryBase/SiCommonItems.h old mode 100755 new mode 100644 similarity index 95% rename from InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiCommonItems.h rename to DetectorDescription/ReadoutGeometryBase/ReadoutGeometryBase/SiCommonItems.h index 1ef3a759fa9366e546effdf145a81be318562509..74779f436f81787894b69c57601857821d7ef21d --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiCommonItems.h +++ b/DetectorDescription/ReadoutGeometryBase/ReadoutGeometryBase/SiCommonItems.h @@ -6,8 +6,8 @@ * SiCommonItems.h */ -#ifndef INDETREADOUTGEOMETRY_SICOMMONITEMS_H -#define INDETREADOUTGEOMETRY_SICOMMONITEMS_H +#ifndef READOUTGEOMETRYBASE_SICOMMONITEMS_H +#define READOUTGEOMETRYBASE_SICOMMONITEMS_H class AtlasDetectorID; @@ -128,4 +128,4 @@ namespace InDetDD { } // End namespace InDetDD -#endif // INDETREADOUTGEOMETRY_SICOMMONITEMSS_H +#endif // READOUTGEOMETRYBASE_SICOMMONITEMS_H diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDiodesParameters.h b/DetectorDescription/ReadoutGeometryBase/ReadoutGeometryBase/SiDiodesParameters.h old mode 100755 new mode 100644 similarity index 97% rename from InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDiodesParameters.h rename to DetectorDescription/ReadoutGeometryBase/ReadoutGeometryBase/SiDiodesParameters.h index 6460550ca07f9e284549ceb161a7d58a007ce9b7..ce3aeadd592b47ec12aa2d983ccd4788e7fd9e14 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDiodesParameters.h +++ b/DetectorDescription/ReadoutGeometryBase/ReadoutGeometryBase/SiDiodesParameters.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -12,7 +12,7 @@ #define INDETREADOUTGEOMETRY_SIDIODESPARAMETERS_H // Data members classes -#include "InDetReadoutGeometry/SiLocalPosition.h" +#include "ReadoutGeometryBase/SiLocalPosition.h" namespace InDetDD { diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiIntersect.h b/DetectorDescription/ReadoutGeometryBase/ReadoutGeometryBase/SiIntersect.h old mode 100755 new mode 100644 similarity index 96% rename from InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiIntersect.h rename to DetectorDescription/ReadoutGeometryBase/ReadoutGeometryBase/SiIntersect.h index 4cabb39b818cc3c33927166d215660e18dbb469b..b57a105a04ff94c8b6fb0006028b093f690fe0f3 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiIntersect.h +++ b/DetectorDescription/ReadoutGeometryBase/ReadoutGeometryBase/SiIntersect.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiLocalPosition.h b/DetectorDescription/ReadoutGeometryBase/ReadoutGeometryBase/SiLocalPosition.h old mode 100755 new mode 100644 similarity index 92% rename from InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiLocalPosition.h rename to DetectorDescription/ReadoutGeometryBase/ReadoutGeometryBase/SiLocalPosition.h index 11befcef68a3f5fabfe050a1c5d6753355b3b160..c1b5c7202bf06bbce8a7dc3c5bc3bbfbff139946 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiLocalPosition.h +++ b/DetectorDescription/ReadoutGeometryBase/ReadoutGeometryBase/SiLocalPosition.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -36,11 +36,11 @@ namespace InDetDD { /////////////////////////////////////////////////////////////////// public: - /** Default constructor: */ + /** Implicit constructor: */ SiLocalPosition(); - + /** Copy constructor: */ - SiLocalPosition(const SiLocalPosition &position) = default; + SiLocalPosition(const SiLocalPosition &position); /** This allows one to pass a Amg::Vector2D to a SiLocalPosition */ SiLocalPosition(const Amg::Vector2D &position); @@ -52,14 +52,8 @@ namespace InDetDD { SiLocalPosition(const double xEta,const double xPhi, const double xDepth=0); - /** Destructor: */ - ~SiLocalPosition()=default; - /** Assignment operator: */ - SiLocalPosition &operator=(const SiLocalPosition &) = default; - - /** Move assignment **/ - SiLocalPosition &operator=(SiLocalPosition &&) = default; + SiLocalPosition &operator=(const SiLocalPosition &position); /////////////////////////////////////////////////////////////////// // Const methods: @@ -121,7 +115,6 @@ namespace InDetDD { /////////////////////////////////////////////////////////////////// // Inline methods: /////////////////////////////////////////////////////////////////// - inline double SiLocalPosition::xEta() const { return m_xEta; diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiReadoutCellId.h b/DetectorDescription/ReadoutGeometryBase/ReadoutGeometryBase/SiReadoutCellId.h old mode 100755 new mode 100644 similarity index 94% rename from InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiReadoutCellId.h rename to DetectorDescription/ReadoutGeometryBase/ReadoutGeometryBase/SiReadoutCellId.h index fd4463700fbf23dfd787f8bb25c4754c68ed09c9..e388d413885dfdaded55c2644e7e577852ad03ce --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiReadoutCellId.h +++ b/DetectorDescription/ReadoutGeometryBase/ReadoutGeometryBase/SiReadoutCellId.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -12,7 +12,7 @@ #define INDETREADOUTGEOMETRY_SIREADOUTCELLID_H // Base class -#include "InDetReadoutGeometry/SiCellId.h" +#include "ReadoutGeometryBase/SiCellId.h" namespace InDetDD { diff --git a/DetectorDescription/ReadoutGeometryBase/ReadoutGeometryBase/SolidStateDetectorElementBase.h b/DetectorDescription/ReadoutGeometryBase/ReadoutGeometryBase/SolidStateDetectorElementBase.h new file mode 100644 index 0000000000000000000000000000000000000000..5714eea1442bd200efe136d7fbe2f8683e1d3790 --- /dev/null +++ b/DetectorDescription/ReadoutGeometryBase/ReadoutGeometryBase/SolidStateDetectorElementBase.h @@ -0,0 +1,734 @@ +/* + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +*/ + +/** + * @file SoldiStateDetectorElementBase.h + **/ + +#ifndef READOUTGEOMETRYBASE_SOLIDSTATEDETECTORELEMENTBASE_H +#define READOUTGEOMETRYBASE_SOLIDSTATEDETECTORELEMENTBASE_H + +/** + * Base class. + */ +#include "TrkDetElementBase/TrkDetElementBase.h" + +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoPrimitives/CLHEPtoEigenConverter.h" +#include "GeoPrimitives/GeoPrimitives.h" +#include "Identifier/Identifier.h" +#include "Identifier/IdentifierHash.h" +#include "ReadoutGeometryBase/InDetDD_Defs.h" +#include "ReadoutGeometryBase/SiCellId.h" +#include "ReadoutGeometryBase/SiCommonItems.h" +#include "ReadoutGeometryBase/DetectorDesign.h" +#include "ReadoutGeometryBase/SiIntersect.h" +#include "ReadoutGeometryBase/SiLocalPosition.h" +#include "TrkEventPrimitives/ParamDefs.h" + +#include "CLHEP/Geometry/Point3D.h" + +#include <atomic> +#include <limits> +#include <memory> +#include <mutex> + +class AtlasDetectorID; +class GeoAlignmentStore; +class GeoVFullPhysVol; + +namespace Trk { + class SurfaceBounds; +} + +namespace InDetDD { + + class SiReadoutCellId; + + /** + * + * @class SolidStateDetectorElementBase + * + * Class to hold geometrical description of a solid state detector element. + * This base class is shared between the InnerDetetector/ITk/HGTD since there is a lot of commonality. + * + * @par Coordinate Frames. + * + * The following coordinate frames are used in these elements. + * + * - Global frame:\n + * Currently global frame in G4/GeoModel. Probably eventually + * will be global frame most suitable for reconstruction + * (eg solenoid axis). + * + * - Local hit frame:\n + * Local frame for hits. It is the same as local frame in G4 and GeoModel. + * I also refer to this as the local simulation frame. + * By convention elements are orientated such that: + * - hitDepth = local x + * - hitPhi = local y + * - hitEta = local z + * . + * Directions of these correspond to the physical wafer. Consequently hitDepth and hitPhi axes go in + * different directions depending on the orientation of the module. + * The readout side is determined from design()->readoutSide(). + * + * - Local reconstruction frame:\n + * - distPhi = local x + * - distEta = local y + * - distDepth = local z + * . + * The directions of the axes are defined as + * - distPhi in direction of increasing phi + * - distEta in direction of increasing z in barrel and increasing r in endcap. + * - distDepth (normal) choosen to give right-handed coordinate. + * => away from intersection point for barrel, decreasing z for endcap + * + * @par Overview of Methods + * + * Methods are grouped into the the following categories + * + * - Identification + * - Navigation + * - Transformation/Orientation + * - Module Frame + * - Element Extent + * - Design methods + * - Intersection Tests + * - Lorentz Correction + * - Readout cell id + * - Miscellaneous + * - Cache handling. + * + * + * @author Grant Gorfine + * - modified & maintained: Nick Styles, Andreas Salzburger + * - modified Nigel Hessey: get directions from the design instead of hard-wiring them + * + * @par Some notes on Thread safety for AthenaMT + * + * The private methods of this class do not have locks. + * + * The method updateCache of is of particular interest as + * it set all cache values and at the end sets the + * m_cacheValid atomic variable to true. + * + * The const methods call the updateCache() under a mutex lock + * when the need to perform lazy initialization + * \code{.cpp} + * if (!m_cacheValid) { + * std::lock_guard<std::mutex> lock(m_mutex); + * if (!m_cacheValid) updateCache(); + * } + * \endcode + * + * So as concurrent const operations are valid + * and do not race with each other. + * + * The non-const methods do not use a mutex lock. They can set the state + * of the cache or the cache itself (invalidate/setCache methods etc) + * + * Note: Synchronisation of creating SiDetElements for different events + * and accessing for each events + * can be done via write/read handles or similar EventContext aware + * framework machinery. + */ + + + class SolidStateDetectorElementBase : public Trk::TrkDetElementBase { + + public: + + /** + * Constructor with parameters + */ + SolidStateDetectorElementBase(const Identifier& id, + const DetectorDesign* design, + const GeoVFullPhysVol* geophysvol, + const SiCommonItems* commonItems, + const GeoAlignmentStore* geoAlignStore=nullptr); + + /** + * Destructor + */ + virtual ~SolidStateDetectorElementBase(); + + /** + * Don't allow no-argument constructor + */ + SolidStateDetectorElementBase() = delete; + + /** + * Don't allow copy constructor + */ + SolidStateDetectorElementBase(const SolidStateDetectorElementBase&) = delete; + + /** + * Don't allow assignment operator + */ + SolidStateDetectorElementBase& operator=(const SolidStateDetectorElementBase&) = delete; + + /** + * Don't allow move constructor + */ + SolidStateDetectorElementBase(SolidStateDetectorElementBase&&) = delete; + + /** + * Don't allow move assignment operator + */ + SolidStateDetectorElementBase& operator=(SolidStateDetectorElementBase&&) = delete; + + /** + * @name Cache handling + * + * Methods to handle invalidating and updating caches. The cached values include values that are affected by alignment + */ + //@{ + /** + * Signal that cached values are no longer valid. + * Invalidate general cache (inline) + */ + void invalidate(); + + /** + * Set/calculate cache values (inline) + */ + void setCache(); + //@} + + /** + * @name Common items + * Inline method + */ + //@{ + const SiCommonItems* getCommonItems() const; + //@} + + /** + * @name Identification + * Methods to identify the element and identifier manipulation. + */ + //@{ + + /** + * identifier of this detector element (inline) + */ + virtual Identifier identify() const override final; + + /** + * identifier hash (inline) + */ + virtual IdentifierHash identifyHash() const override final; + + /** + * Returns the id helper (inline) + */ + const AtlasDetectorID* getIdHelper() const; + + /** + * Identifier <-> SiCellId (ie strip number or pixel eta_index,phi_index) + * Identifier from SiCellId (ie strip number or pixel eta_index,phi_index) + */ + virtual Identifier identifierFromCellId(const SiCellId &cellId) const = 0; + /** + * SiCellId from Identifier + */ + virtual SiCellId cellIdFromIdentifier(const Identifier& identifier) const = 0; + + //@} + + /** + * @name Surface + */ + //@{ + /** + * Element Surface + */ + Trk::Surface& surface(); + virtual const Trk::Surface& surface() const override final; + /** + * TrkDetElementBase interface (inline) + */ + virtual const Trk::Surface& surface(const Identifier&) const override final; + /** + * @name Transformation + */ + //@{ + /** + * Local (simulation/hit frame) to global transform + */ + const GeoTrf::Transform3D& transformHit() const; + + /** + * Local (reconstruction frame) to global transform + */ + const HepGeom::Transform3D& transformCLHEP() const; + virtual const Amg::Transform3D& transform() const override final; + /** + * TrkDetElementBase interface (inline) + */ + virtual const Amg::Transform3D& transform(const Identifier&) const override final; + + /** + * Default Local (reconstruction frame) to global transform + * ie with no misalignment. + */ + const HepGeom::Transform3D defTransformCLHEP() const; + const Amg::Transform3D defTransform() const; + + /** + * Transform to go from local reconstruction frame to local hit frame. + */ + const HepGeom::Transform3D recoToHitTransform() const; + //@} + + /** + * @name Orientation + */ + //{@ + + /** + * Directions of hit depth,phi,eta axes relative to reconstruction local + * position axes (LocalPosition). Returns +/-1. inline + */ + double hitDepthDirection() const; + /** + * See previous method. inline + */ + double hitPhiDirection() const; + /** + * See previous method. inline + */ + double hitEtaDirection() const; + + /** + * To determine if readout direction between online and offline needs + * swapping, see methods swapPhiReadoutDirection() and + * swapEtaReadoutDirection() below in "Readout Cell id" section + * + * Orientation. + * Directions. + * - phiAxis in same direction as increasing phi and identifier phi_index/strip. + * NB. This requires some flipping of axes with repsect to the hits. + * - etaAxis in direction of increasing z in the barrel and increasing r in the endcap. + * - normal choosen to give right-handed coordinate frame (x=normal,y=phiAxis,z=etaAxis) + * NB. This requires some flipping of axes with repsect to the hits. + * + * Get reconstruction local phi axes in global frame. + * In same direction as increasing phi and identifier phi_index/strip. + */ + const HepGeom::Vector3D<double>& phiAxisCLHEP() const; + const Amg::Vector3D& phiAxis() const; + /** + * Get reconstruction local eta axes in global frame. + * In direction of increasing z in the barrel and increasing r in the endcap. + */ + const HepGeom::Vector3D<double>& etaAxisCLHEP() const; + const Amg::Vector3D& etaAxis() const; + + /** + * Get reconstruction local normal axes in global frame. Choosen to give right-handed coordinate frame. + */ + virtual const Amg::Vector3D& normal() const override final; + /** + * TrkDetElementBase interface (inline) + */ + virtual const Amg::Vector3D& normal(const Identifier&) const override final; + + //@} + + /** + * @name Position + */ + //@{ + /** + * Center in global coordinates + */ + virtual const Amg::Vector3D& center() const override final; + /** + * TrkDetElementBase interface (inline) + */ + virtual const Amg::Vector3D& center(const Identifier&) const override final; + + /** + * transform a hit local position into a global position (inline): + */ + HepGeom::Point3D<double> globalPositionHit(const HepGeom::Point3D<double>& simulationLocalPos) const; + Amg::Vector3D globalPositionHit(const Amg::Vector3D& simulationLocalPos) const; + + /** + * transform a reconstruction local position into a global position (inline): + */ + HepGeom::Point3D<double> globalPosition(const HepGeom::Point3D<double>& localPos) const; + Amg::Vector3D globalPosition(const Amg::Vector3D& localPos) const; + + /** + * as in previous method but for 2D local position (inline) + */ + HepGeom::Point3D<double> globalPositionCLHEP(const Amg::Vector2D& localPos) const; + Amg::Vector3D globalPosition(const Amg::Vector2D& localPos) const; + + /** + * Simulation/Hit local frame to reconstruction local frame. 2D. + * TODO: Will change order of parameters at some point. + */ + Amg::Vector2D hitLocalToLocal(double xEta, double xPhi) const; + /** + * Same as previuos method but 3D. + */ + HepGeom::Point3D<double> hitLocalToLocal3D(const HepGeom::Point3D<double>& hitPosition) const; + + /** + * transform a global position into a 2D local position (reconstruction frame) (inline) + */ + Amg::Vector2D localPosition(const HepGeom::Point3D<double>& globalPosition) const; + Amg::Vector2D localPosition(const Amg::Vector3D& globalPosition) const; + + //@} + + + /** + * @name Element Extent + * Inline methods to get extent of element in r,phi and z. + */ + //@{ + double rMin() const; + double rMax() const; + double zMin() const; + double zMax() const; + double phiMin() const; + double phiMax() const; + + /** + * Method for building up region of interest table. + * Get eta/phi extent for the element. Returns min/max eta and phi + * and r (for barrel) or z (for endcap) Takes as input the vertex + * spread in z (-deltaZ to +deltaZ) + */ + void getEtaPhiRegion(double deltaZ, + double& etaMin, double& etaMax, + double& phiMin, double& phiMax, + double& rz) const; + //@} + virtual double get_rz() const = 0; + + /** + * @name Design methods + */ + //@{ + + /** + * access to the local description (inline): + */ + + virtual const DetectorDesign& design() const; + + virtual const Trk::SurfaceBounds& bounds() const override final; + /** + * TrkDetElementBase interface (inline) + */ + virtual const Trk::SurfaceBounds& bounds(const Identifier&) const override final; + + /** + * Methods from design (inline) + * + * Width in phi direction. For the SCT endcap it returns the average width. + */ + double width() const; + /** + * Min width. Needed for the SCT endcap. + */ + double minWidth() const; + /** + * Max width. Needed for the SCT endcap. + */ + double maxWidth() const; + /** + * Length in eta direction (z - barrel, r - endcap) + */ + double length() const; + double thickness() const; + + /** + * Pitch (inline methods) + * + * NOTE: phiPitch is ambiguous for the Forward SCT where it varies along the strip.\n + * etaPitch is ambiguous for the pixel which has long pixels between FE chips.\n + * + * For these cases: + * + * phiPitch: For SCT Forward returns pitch at center.\n + * etaPitch: For pixel returns average pitch. (Active_length/number_of_cells)\n + * + * All return pitch in distance units. + */ + double etaPitch() const; + double phiPitch() const; + + /** + * carrier type for readout. ie holes for SCT and electrons for pixels. inline + */ + InDetDD::CarrierType carrierType() const; + + /** + * Determine if readout direction between online and offline needs swapping. + * Returns true if online and offline numbers run in opposite directions. + * For strip/phi_index (inline) + */ + bool swapPhiReadoutDirection() const; + /** + * For eta_index (only relevant for pixel) (inline) + */ + bool swapEtaReadoutDirection() const; + + //@} + + /** + * @name Intersection Tests + */ + //@{ + + /** + * Test that it is in the active region + * + * Intersect has 3 states + * bool SiIntersect::in() const // definitely in\n + * bool SiIntersect::out() const // definitely out\n + * bool SiIntersect::nearBoundary() const // near a boundary within the tolerances\n + * bool SiIntersect::mayIntersect() const // in() OR nearBoundary() + */ + SiIntersect inDetector(const Amg::Vector2D& localPosition, double phiTol, double etaTol) const; + SiIntersect inDetector(const HepGeom::Point3D<double>& globalPosition, double phiTol, double etaTol) const; + //@} + + /** + * @name Readout cell id + * Cell id's are the strip number in SCT and phi_index,eta_index in the pixel + * as defined in the offline identifier. Their direction runs in the distPhi, distEta + * direction in the Reconstruction local frame. + * + * For methods taking a SiCellId (basically phi,eta index for pixel or strip for SCT) you + * can do the following fro example: + * - For pixel\n + * localPositionOfCell(SiCellId(phi_index,eta_index));\n + * - For SCT\n + * localPositionOfCell(SiCellId(strip));\n + */ + //@{ + + /** + * Full identifier of the cell for a given position: + * assumes a raw local position (no Lorentz shift) + */ + Identifier identifierOfPosition(const Amg::Vector2D& localPos) const; + /** + * As in previous method but returns SiCellId + */ + SiCellId cellIdOfPosition(const Amg::Vector2D& localPos) const; + + /** + * Returns position (center) of cell. + * These are the raw positions _NOT_ corrected for the Lorentz shift + */ + Amg::Vector2D rawLocalPositionOfCell(const SiCellId& cellId) const; + /** + * As above + */ + Amg::Vector2D rawLocalPositionOfCell(const Identifier& id) const; + + /** + * Test if readout cell has more than one diode associated with it. + * Number of cells sharing the same readout as this cell. + * ie generally 1 except for ganged pixels which will be 2. + */ + int numberOfConnectedCells(const SiCellId cellId) const; + /** + * Get the cell ids sharing the readout for this cell. + * number = 0 will return the primary readout cell id. + */ + SiCellId connectedCell(const SiCellId cellId, int number) const; + + /** + * Recalculate cached values. + */ + virtual void updateCache() const; + + private: + /** + * @name Private Methods + * + * Do not use locks. + */ + //@{ + /** + * Common code for constructors. + */ + void commonConstructor(); + + /** + * Calculate extent in r,z and phi. The values are cached and there + * are rMin(), rMax etc methods. + * It is only used from updateCache + */ + void getExtent(double& rMin, double& rMax, + double& zMin, double& zMax, + double& phiMin, double& phiMax) const; + + /** + * Return the four corners of an element in local coordinates. + * Pass it an array of length 4. + * This function is used by getEtaPhiRegion() + */ + void getCorners(HepGeom::Point3D<double>* corners) const; + + /** + * Get eta and phi coresponding to a point in local coordinates. + * Requires as input the vertex spread. Returns etaMin, etaMax, and phi. + * This function is used by getEtaPhiRegion() + */ + void getEtaPhiPoint(const HepGeom::Point3D<double>& point, double deltaZ, + double& etaMin, double& etaMax, double& phi) const; + + /** + * Private recoToHitTransform Implementation method with no lock + */ + const HepGeom::Transform3D recoToHitTransformImpl() const; + + /** + * Declaring the Message method for further use (inline) + */ + MsgStream& msg(MSG::Level lvl) const; + + /** + * Declaring the Method providing Verbosity Level (inline) + */ + bool msgLvl(MSG::Level lvl) const; + //@} + + /** + * Protected data: + */ + protected: + + /** + * @name Variables for cache validities + */ + //@{ + /** + * For alignment associated quatities. + */ + //not obvious why we need a separate bool for the base class version... + mutable std::atomic_bool m_baseCacheValid{false}; + mutable std::atomic_bool m_cacheValid{false}; + /** + * For alignment independent quantities + */ + //ditto + mutable std::atomic_bool m_firstTimeBase{true}; + mutable std::atomic_bool m_firstTime{true}; + + /** + * @name Mutex guard to update mutable variables in const methods + */ + //@{ + mutable std::mutex m_mutex{}; + //@} + + /** + * @name Variables set by constructor + */ + //@{ + + /** + * identifier of this detector element + */ + Identifier m_id{}; + + /** + * local description of this detector element + */ + const DetectorDesign* m_design{nullptr}; + + const SiCommonItems* m_commonItems{nullptr}; + std::unique_ptr<Trk::Surface> m_surface; + const GeoAlignmentStore* m_geoAlignStore{}; + + /** + * Axes + */ + DetectorDesign::Axis m_hitEta; + DetectorDesign::Axis m_hitPhi; + DetectorDesign::Axis m_hitDepth; + //@} + + /** + * @name Variables set by commonConstructor + */ + //@{ + /** + * hash id of this detector element + */ + IdentifierHash m_idHash{}; + //@} + + /** + * @name Variables set by updateCache with m_firstTime of true + * Happens only once + * + * Directions of axes. These are true if the hit/simulation and reconstruction local + * frames are in the same direction and false if they are opposite. + */ + //@{ + /** + * Direction of depth axis. + * Also direction of readout implant (n+ for pixel, p+ for SCT). + */ + mutable bool m_depthDirection ATLAS_THREAD_SAFE {true}; + mutable bool m_phiDirection ATLAS_THREAD_SAFE {true}; + mutable bool m_etaDirection ATLAS_THREAD_SAFE {true}; + //@} + + /** + * @name Variables set by updateCache + */ + //@{ + mutable Amg::Transform3D m_transformHit ATLAS_THREAD_SAFE; + mutable Amg::Transform3D m_transform ATLAS_THREAD_SAFE; + mutable HepGeom::Transform3D m_transformCLHEP ATLAS_THREAD_SAFE; + + mutable Amg::Vector3D m_normal ATLAS_THREAD_SAFE; + mutable Amg::Vector3D m_etaAxis ATLAS_THREAD_SAFE; + mutable HepGeom::Vector3D<double> m_etaAxisCLHEP ATLAS_THREAD_SAFE; + mutable Amg::Vector3D m_phiAxis ATLAS_THREAD_SAFE; + mutable HepGeom::Vector3D<double> m_phiAxisCLHEP ATLAS_THREAD_SAFE; + mutable Amg::Vector3D m_center ATLAS_THREAD_SAFE; + mutable HepGeom::Vector3D<double> m_centerCLHEP ATLAS_THREAD_SAFE; + mutable Amg::Vector3D m_origin ATLAS_THREAD_SAFE; + + /** + * @name Variable set by updateCache + * Determines if the orientations is "barrel like" + * (which for ITk pixel can be the case even if + * not strictly part of the barrel geometry) + */ + mutable bool m_barrelLike ATLAS_THREAD_SAFE {false}; + + mutable double m_minZ ATLAS_THREAD_SAFE {std::numeric_limits<double>::max()}; + mutable double m_maxZ ATLAS_THREAD_SAFE {std::numeric_limits<double>::lowest()}; + mutable double m_minR ATLAS_THREAD_SAFE {std::numeric_limits<double>::max()}; + mutable double m_maxR ATLAS_THREAD_SAFE {std::numeric_limits<double>::lowest()}; + mutable double m_minPhi ATLAS_THREAD_SAFE {std::numeric_limits<double>::max()}; + mutable double m_maxPhi ATLAS_THREAD_SAFE {std::numeric_limits<double>::lowest()}; + //@} + + }; + +} // namespace InDetDD + +/** + * Include implementation of inline methods + */ +#include "ReadoutGeometryBase/SolidStateDetectorElementBase.icc" + +#endif // INDETREADOUTGEOMETRY_SIDETECTORELEMENTBASE_H diff --git a/DetectorDescription/ReadoutGeometryBase/ReadoutGeometryBase/SolidStateDetectorElementBase.icc b/DetectorDescription/ReadoutGeometryBase/ReadoutGeometryBase/SolidStateDetectorElementBase.icc new file mode 100644 index 0000000000000000000000000000000000000000..b5a6d4587b0be2e3876d13587ce498c174755ff3 --- /dev/null +++ b/DetectorDescription/ReadoutGeometryBase/ReadoutGeometryBase/SolidStateDetectorElementBase.icc @@ -0,0 +1,299 @@ +/* + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +*/ + +/** + * @file SolidStateDetectorElementBase.icc + **/ + +namespace InDetDD { + + /////////////////////////////////////////////////////////////////// + // Inline methods: + /////////////////////////////////////////////////////////////////// + + inline void SolidStateDetectorElementBase::invalidate() + { + m_cacheValid = false; + } + + inline void SolidStateDetectorElementBase::setCache() + { + updateCache(); + } + + inline const SiCommonItems* SolidStateDetectorElementBase::getCommonItems() const + { + return m_commonItems; + } + + inline Identifier SolidStateDetectorElementBase::identify() const + { + return m_id; + } + + inline IdentifierHash SolidStateDetectorElementBase::identifyHash() const + { + return m_idHash; + } + + inline const AtlasDetectorID* SolidStateDetectorElementBase::getIdHelper() const + { + return m_commonItems->getIdHelper(); + } + + inline const Trk::Surface& SolidStateDetectorElementBase::surface(const Identifier&) const + { + return surface(); + } + + inline const Amg::Transform3D& SolidStateDetectorElementBase::transform(const Identifier&) const + { + return transform(); + } + + inline double SolidStateDetectorElementBase::hitDepthDirection() const + { + if (!m_cacheValid) { + std::lock_guard<std::mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); + } + + return (m_depthDirection) ? 1. : -1.; + } + + inline double SolidStateDetectorElementBase::hitPhiDirection() const + { + if (!m_cacheValid) { + std::lock_guard<std::mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); + } + + return (m_phiDirection) ? 1. : -1.; + } + + inline double SolidStateDetectorElementBase::hitEtaDirection() const + { + if (!m_cacheValid) { + std::lock_guard<std::mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); + } + + return (m_etaDirection) ? 1. : -1.; + } + + inline const Amg::Vector3D& SolidStateDetectorElementBase::normal(const Identifier&) const + { + return normal(); + } + + inline const Amg::Vector3D& SolidStateDetectorElementBase::center(const Identifier&) const + { + return center(); + } + + inline HepGeom::Point3D<double> SolidStateDetectorElementBase::globalPositionHit(const HepGeom::Point3D<double>& simulationLocalPos) const + { + return Amg::EigenTransformToCLHEP(transformHit())*simulationLocalPos; + } + + inline Amg::Vector3D SolidStateDetectorElementBase::globalPositionHit(const Amg::Vector3D& simulationLocalPos) const + { + return transformHit() * simulationLocalPos; + } + + inline HepGeom::Point3D<double> SolidStateDetectorElementBase::globalPosition(const HepGeom::Point3D<double>& localPos) const + { + return transformCLHEP() * localPos; + } + + inline Amg::Vector3D SolidStateDetectorElementBase::globalPosition(const Amg::Vector3D& localPos) const + { + return transform() * localPos; + } + + inline HepGeom::Point3D<double> SolidStateDetectorElementBase::globalPositionCLHEP(const Amg::Vector2D& localPos) const + { + if (!m_cacheValid) { + std::lock_guard<std::mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); + } + + return m_centerCLHEP + localPos[Trk::distEta] * m_etaAxisCLHEP + localPos[Trk::distPhi] * m_phiAxisCLHEP; + } + + inline Amg::Vector3D SolidStateDetectorElementBase::globalPosition(const Amg::Vector2D& localPos) const + { + if (!m_cacheValid) { + std::lock_guard<std::mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); + } + + return m_center + localPos[Trk::distEta] * m_etaAxis + localPos[Trk::distPhi] * m_phiAxis; + } + + inline Amg::Vector2D SolidStateDetectorElementBase::localPosition(const HepGeom::Point3D<double>& globalPosition) const + { + if (!m_cacheValid) { + std::lock_guard<std::mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); + } + + HepGeom::Vector3D<double> relativePos = globalPosition - m_centerCLHEP; + return Amg::Vector2D(relativePos.dot(m_phiAxisCLHEP), relativePos.dot(m_etaAxisCLHEP)); + } + + inline Amg::Vector2D SolidStateDetectorElementBase::localPosition(const Amg::Vector3D& globalPosition) const + { + if (!m_cacheValid) { + std::lock_guard<std::mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); + } + + Amg::Vector3D relativePos = globalPosition - m_center; + return Amg::Vector2D(relativePos.dot(m_phiAxis), relativePos.dot(m_etaAxis)); + } + + inline double SolidStateDetectorElementBase::rMin() const + { + if (!m_cacheValid) { + std::lock_guard<std::mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); + } + + return m_minR; + } + + inline double SolidStateDetectorElementBase::rMax() const + { + if (!m_cacheValid) { + std::lock_guard<std::mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); + } + + return m_maxR; + } + + inline double SolidStateDetectorElementBase::zMin() const + { + if (!m_cacheValid) { + std::lock_guard<std::mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); + } + + return m_minZ; + } + + inline double SolidStateDetectorElementBase::zMax() const + { + if (!m_cacheValid) { + std::lock_guard<std::mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); + } + + return m_maxZ; + } + + inline double SolidStateDetectorElementBase::phiMin() const + { + if (!m_cacheValid) { + std::lock_guard<std::mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); + } + + return m_minPhi; + } + + inline double SolidStateDetectorElementBase::phiMax() const + { + if (!m_cacheValid) { + std::lock_guard<std::mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); + } + + return m_maxPhi; + } + + inline const DetectorDesign& SolidStateDetectorElementBase::design() const + { + return *m_design; + } + + inline const Trk::SurfaceBounds& SolidStateDetectorElementBase::bounds(const Identifier&) const + { + return bounds(); + } + + inline double SolidStateDetectorElementBase::width() const + { + return m_design->width(); + } + + inline double SolidStateDetectorElementBase::minWidth() const + { + return m_design->minWidth(); + } + + inline double SolidStateDetectorElementBase::maxWidth() const + { + return m_design->maxWidth(); + } + + inline double SolidStateDetectorElementBase::length() const + { + return m_design->length(); + } + + inline double SolidStateDetectorElementBase::thickness() const + { + return m_design->thickness(); + } + + inline double SolidStateDetectorElementBase::etaPitch() const + { + return m_design->etaPitch(); + } + + inline double SolidStateDetectorElementBase::phiPitch() const + { + return m_design->phiPitch(); + } + + inline InDetDD::CarrierType SolidStateDetectorElementBase::carrierType() const + { + return m_design->carrierType(); + } + + inline bool SolidStateDetectorElementBase::swapPhiReadoutDirection() const + { + if (m_firstTime) { + std::lock_guard<std::mutex> lock(m_mutex); + if (m_firstTime) updateCache(); // In order to set m_phiDirection + } + // equivalent to (m_design->swapHitPhiReadoutDirection() xor !m_phiDirection) + return ((!m_design->swapHitPhiReadoutDirection() && !m_phiDirection) + || (m_design->swapHitPhiReadoutDirection() && m_phiDirection)); + } + + inline bool SolidStateDetectorElementBase::swapEtaReadoutDirection() const + { + if (m_firstTime) { + std::lock_guard<std::mutex> lock(m_mutex); + if (m_firstTime) updateCache(); // In order to set m_etaDirection + } + // equivalent to (m_design->swapHitEtaReadoutDirection() xor !m_etaDirection) + return ((!m_design->swapHitEtaReadoutDirection() && !m_etaDirection) + || (m_design->swapHitEtaReadoutDirection() && m_etaDirection)); + } + + inline MsgStream& SolidStateDetectorElementBase::msg(MSG::Level lvl) const + { + return m_commonItems->msg(lvl); + } + + inline bool SolidStateDetectorElementBase::msgLvl(MSG::Level lvl) const + { + return m_commonItems->msgLvl(lvl); + } + +} // namespace InDetDD diff --git a/DetectorDescription/ReadoutGeometryBase/src/DetectorDesign.cxx b/DetectorDescription/ReadoutGeometryBase/src/DetectorDesign.cxx new file mode 100644 index 0000000000000000000000000000000000000000..790a62824371cb6fab90aa927d04d16040c217c6 --- /dev/null +++ b/DetectorDescription/ReadoutGeometryBase/src/DetectorDesign.cxx @@ -0,0 +1,129 @@ +/* + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +*/ + +#include "ReadoutGeometryBase/DetectorDesign.h" +#include "ReadoutGeometryBase/SiIntersect.h" + +namespace InDetDD { + +// Constructor with parameters: +DetectorDesign::DetectorDesign(double thickness, + bool phiSymmetric, + bool etaSymmetric, + bool depthSymmetric, + InDetDD::CarrierType carrierType, + int readoutSide): + m_etaAxis(zAxis), + m_phiAxis(yAxis), + m_depthAxis(xAxis), + m_thickness(thickness), + m_carrierType(carrierType), + m_phiSymmetric(phiSymmetric), + m_etaSymmetric(etaSymmetric), + m_depthSymmetric(depthSymmetric), + m_readoutSidePosDepth(readoutSide > 0) { +} + +// Constructor with axis parameters: +DetectorDesign::DetectorDesign(double thickness, + bool phiSymmetric, + bool etaSymmetric, + bool depthSymmetric, + InDetDD::CarrierType carrierType, + int readoutSide, + Axis stripDirection, + Axis thicknessDirection): + m_etaAxis(stripDirection), + m_depthAxis(thicknessDirection), + m_thickness(thickness), + m_carrierType(carrierType), + m_phiSymmetric(phiSymmetric), + m_etaSymmetric(etaSymmetric), + m_depthSymmetric(depthSymmetric), + m_readoutSidePosDepth(readoutSide > 0) { + if (stripDirection == thicknessDirection) { + throw std::runtime_error( + "ERROR: DetectorDesign called with phi and thickness directions equal"); + } + // phiAxis is "the other one" + m_phiAxis = static_cast<Axis> ((xAxis + yAxis + zAxis) - (stripDirection + thicknessDirection)); + + + +} + +DetectorDesign::~DetectorDesign(){} + + + +Amg::Vector3D DetectorDesign::sensorCenter() const { + return Amg::Vector3D(0., 0., 0.); +} + +//For future: Should update to use appropriate message streams in place of cout +void DetectorDesign::setSymmetry(bool phiSymmetric, bool etaSymmetric, + bool depthSymmetric) { + // Flags can be changed from true to false but not false to true. + if (m_phiSymmetric) { + m_phiSymmetric = phiSymmetric; + } + else if (phiSymmetric) { + std::cout << + "SiDetectorDesign: WARNING! Attempt to allow swapping of xPhi axis direction ignored." + << std::endl; + } + + if (m_etaSymmetric) { + m_etaSymmetric = etaSymmetric; + } + else if (etaSymmetric) { + std::cout << + "SiDetectorDesign: WARNING! Attempt to allow swapping of xEta axis direction ignored." + << std::endl; + } + + if (m_depthSymmetric) { + m_depthSymmetric = depthSymmetric; + } + else if (depthSymmetric) { + std::cout << + "SiDetectorDesign: WARNING! Attempt to allow swapping of xDepth axis direction ignored." + << std::endl; + } +} + +DetectorShape DetectorDesign::shape() const { + // Default is Box. + return InDetDD::Box; +} + +SiIntersect DetectorDesign::inDetector(const SiLocalPosition &localPosition, + double phiTol, double etaTol) const { + double etaDist = 0; + double phiDist = 0; + + distanceToDetectorEdge(localPosition, etaDist, phiDist); + + SiIntersect state; + + if (phiDist < -phiTol || etaDist < -etaTol) { + state.setOut(); + return state; + } + + if (phiDist > phiTol && etaDist > etaTol) { + state.setIn(); + return state; + } + + // Near boundary. + state.setNearBoundary(); + return state; +} + + const Amg::Transform3D DetectorDesign::SiHitToGeoModel() const { + return Amg::Transform3D::Identity(); +} + +} // namespace InDetDD diff --git a/InnerDetector/InDetDetDescr/PixelReadoutGeometry/src/PixelDiodeMap.cxx b/DetectorDescription/ReadoutGeometryBase/src/PixelDiodeMap.cxx similarity index 97% rename from InnerDetector/InDetDetDescr/PixelReadoutGeometry/src/PixelDiodeMap.cxx rename to DetectorDescription/ReadoutGeometryBase/src/PixelDiodeMap.cxx index 649cdaeaff7a46f955e51fdf03fbe50b07815f0c..85b10a1b1c260c4d12b4699e488a9dbd7714d13a 100755 --- a/InnerDetector/InDetDetDescr/PixelReadoutGeometry/src/PixelDiodeMap.cxx +++ b/DetectorDescription/ReadoutGeometryBase/src/PixelDiodeMap.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -12,9 +12,9 @@ // Modified: Grant Gorfine /////////////////////////////////////////////////////////////////// -#include "PixelReadoutGeometry/PixelDiodeMap.h" -#include "PixelReadoutGeometry/PixelDiodeMatrix.h" -#include "InDetReadoutGeometry/SiCellId.h" +#include "ReadoutGeometryBase/PixelDiodeMap.h" +#include "ReadoutGeometryBase/PixelDiodeMatrix.h" +#include "ReadoutGeometryBase/SiCellId.h" #include <cmath> #include <algorithm> diff --git a/InnerDetector/InDetDetDescr/PixelReadoutGeometry/src/PixelDiodeMatrix.cxx b/DetectorDescription/ReadoutGeometryBase/src/PixelDiodeMatrix.cxx similarity index 98% rename from InnerDetector/InDetDetDescr/PixelReadoutGeometry/src/PixelDiodeMatrix.cxx rename to DetectorDescription/ReadoutGeometryBase/src/PixelDiodeMatrix.cxx index 096049c656cf8849139361f9bb578762979a92d5..fafba5f5ff1f166919d15895e41ccdc60a3c3c97 100755 --- a/InnerDetector/InDetDetDescr/PixelReadoutGeometry/src/PixelDiodeMatrix.cxx +++ b/DetectorDescription/ReadoutGeometryBase/src/PixelDiodeMatrix.cxx @@ -1,9 +1,9 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ -#include "PixelReadoutGeometry/PixelDiodeMatrix.h" -#include "InDetReadoutGeometry/SiCellId.h" +#include "ReadoutGeometryBase/PixelDiodeMatrix.h" +#include "ReadoutGeometryBase/SiCellId.h" #include "TrkEventPrimitives/ParamDefs.h" #include <cassert> diff --git a/InnerDetector/InDetDetDescr/PixelReadoutGeometry/src/PixelMultipleConnection1D.cxx b/DetectorDescription/ReadoutGeometryBase/src/PixelMultipleConnection1D.cxx similarity index 97% rename from InnerDetector/InDetDetDescr/PixelReadoutGeometry/src/PixelMultipleConnection1D.cxx rename to DetectorDescription/ReadoutGeometryBase/src/PixelMultipleConnection1D.cxx index f01091e57517215dbfe957a1ae1292495776ea43..026771e3cefc813f84f7c1a246b6a2d85378af8c 100755 --- a/InnerDetector/InDetDetDescr/PixelReadoutGeometry/src/PixelMultipleConnection1D.cxx +++ b/DetectorDescription/ReadoutGeometryBase/src/PixelMultipleConnection1D.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -12,7 +12,7 @@ // 06/02/2008 Grant Gorfine /////////////////////////////////////////////////////////////////// -#include "PixelReadoutGeometry/PixelMultipleConnection1D.h" +#include "ReadoutGeometryBase/PixelMultipleConnection1D.h" #include <iostream> namespace InDetDD { diff --git a/InnerDetector/InDetDetDescr/PixelReadoutGeometry/src/PixelReadoutScheme.cxx b/DetectorDescription/ReadoutGeometryBase/src/PixelReadoutScheme.cxx similarity index 93% rename from InnerDetector/InDetDetDescr/PixelReadoutGeometry/src/PixelReadoutScheme.cxx rename to DetectorDescription/ReadoutGeometryBase/src/PixelReadoutScheme.cxx index 5887103e66c7fad45413b12e9fe31caccc02d640..dba074df5d406e44c83480d29888399961bda5b0 100755 --- a/InnerDetector/InDetDetDescr/PixelReadoutGeometry/src/PixelReadoutScheme.cxx +++ b/DetectorDescription/ReadoutGeometryBase/src/PixelReadoutScheme.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -12,9 +12,9 @@ // Modified: Grant Gorfine /////////////////////////////////////////////////////////////////// -#include "PixelReadoutGeometry/PixelReadoutScheme.h" -#include "InDetReadoutGeometry/SiCellId.h" -#include "InDetReadoutGeometry/SiReadoutCellId.h" +#include "ReadoutGeometryBase/PixelReadoutScheme.h" +#include "ReadoutGeometryBase/SiCellId.h" +#include "ReadoutGeometryBase/SiReadoutCellId.h" namespace InDetDD { diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiCellId.cxx b/DetectorDescription/ReadoutGeometryBase/src/SiCellId.cxx old mode 100755 new mode 100644 similarity index 72% rename from InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiCellId.cxx rename to DetectorDescription/ReadoutGeometryBase/src/SiCellId.cxx index fd4bef30a6c2c58f26322193dc3ebb1cad191e3d..1d933e0cbc6c017529c32d0da27e67a38e1cbadc --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiCellId.cxx +++ b/DetectorDescription/ReadoutGeometryBase/src/SiCellId.cxx @@ -1,8 +1,8 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ -#include "InDetReadoutGeometry/SiCellId.h" +#include "ReadoutGeometryBase/SiCellId.h" namespace InDetDD{ std::ostream & operator << (std::ostream & os, const SiCellId & cellId) diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiCommonItems.cxx b/DetectorDescription/ReadoutGeometryBase/src/SiCommonItems.cxx old mode 100755 new mode 100644 similarity index 93% rename from InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiCommonItems.cxx rename to DetectorDescription/ReadoutGeometryBase/src/SiCommonItems.cxx index 46e095a29d9649716d3692343a8904fa109a7aa8..20058b7c1c6770bb5dbfe2608739f4b06b863cf9 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiCommonItems.cxx +++ b/DetectorDescription/ReadoutGeometryBase/src/SiCommonItems.cxx @@ -2,7 +2,7 @@ Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ -#include "InDetReadoutGeometry/SiCommonItems.h" +#include "ReadoutGeometryBase/SiCommonItems.h" namespace InDetDD { diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDiodesParameters.cxx b/DetectorDescription/ReadoutGeometryBase/src/SiDiodesParameters.cxx old mode 100755 new mode 100644 similarity index 90% rename from InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDiodesParameters.cxx rename to DetectorDescription/ReadoutGeometryBase/src/SiDiodesParameters.cxx index 0fdc6da16f0d1dbb49e9183c9d9c8a4e94cd8aa9..a820d23eec72ff48fbbef9165043305fb2a8b7de --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDiodesParameters.cxx +++ b/DetectorDescription/ReadoutGeometryBase/src/SiDiodesParameters.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -11,7 +11,7 @@ // Version 1.0 14/08/2001 David Calvet /////////////////////////////////////////////////////////////////// -#include "InDetReadoutGeometry/SiDiodesParameters.h" +#include "ReadoutGeometryBase/SiDiodesParameters.h" namespace InDetDD { diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiLocalPosition.cxx b/DetectorDescription/ReadoutGeometryBase/src/SiLocalPosition.cxx old mode 100755 new mode 100644 similarity index 78% rename from InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiLocalPosition.cxx rename to DetectorDescription/ReadoutGeometryBase/src/SiLocalPosition.cxx index d0f2958d70c24d98920b60884b0ac9824e95e97e..ed0eee5e40674cb0655198ce04c80cc4fad63553 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiLocalPosition.cxx +++ b/DetectorDescription/ReadoutGeometryBase/src/SiLocalPosition.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -11,18 +11,23 @@ // Version 2.1 01/08/2001 David Calvet /////////////////////////////////////////////////////////////////// -#include "InDetReadoutGeometry/SiLocalPosition.h" +#include "ReadoutGeometryBase/SiLocalPosition.h" namespace InDetDD { -// Default constructor: +// Implicit constructor: SiLocalPosition::SiLocalPosition() : m_xEta(0), m_xPhi(0), m_xDepth(0) {} - +// Copy constructor: +SiLocalPosition::SiLocalPosition(const SiLocalPosition &position) : + m_xEta(position.m_xEta), + m_xPhi(position.m_xPhi), + m_xDepth(position.m_xDepth) +{} // Constructor with parameters: SiLocalPosition::SiLocalPosition(const double xEta,const double xPhi, @@ -44,7 +49,16 @@ SiLocalPosition::operator Amg::Vector2D(void) const return Amg::Vector2D(m_xPhi, m_xEta); } - +// Assignment operator: +SiLocalPosition &SiLocalPosition::operator=(const SiLocalPosition &position) +{ + if (this!=&position) { + m_xEta=position.m_xEta; + m_xPhi=position.m_xPhi; + m_xDepth=position.m_xDepth; + } else {} + return *this; +} // addition of positions: SiLocalPosition &SiLocalPosition::operator+=(const SiLocalPosition &position) diff --git a/DetectorDescription/ReadoutGeometryBase/src/SolidStateDetectorElementBase.cxx b/DetectorDescription/ReadoutGeometryBase/src/SolidStateDetectorElementBase.cxx new file mode 100644 index 0000000000000000000000000000000000000000..33e37600e2e2087b89a340f21feb8c15fcde46b6 --- /dev/null +++ b/DetectorDescription/ReadoutGeometryBase/src/SolidStateDetectorElementBase.cxx @@ -0,0 +1,724 @@ +/* + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +*/ + +#include "AthenaBaseComps/AthMsgStreamMacros.h" +#include "ReadoutGeometryBase/SolidStateDetectorElementBase.h" +#include "ReadoutGeometryBase/SiReadoutCellId.h" +#include "GeoModelUtilities/GeoAlignmentStore.h" +#include "TrkSurfaces/PlaneSurface.h" +#include "CLHEP/Geometry/Vector3D.h" +#include "CLHEP/Units/SystemOfUnits.h" +#include "CLHEP/Vector/ThreeVector.h" + +namespace InDetDD { +using Trk::distPhi; +using Trk::distEta; +using Trk::distDepth; + +// Constructor with parameters: + SolidStateDetectorElementBase::SolidStateDetectorElementBase(const Identifier& id, + const DetectorDesign* design, + const GeoVFullPhysVol* geophysvol, + const SiCommonItems* commonItems, + const GeoAlignmentStore* geoAlignStore) : + TrkDetElementBase(geophysvol), + m_id(id), + m_design(design), + m_commonItems(commonItems), + m_surface(), + m_geoAlignStore(geoAlignStore) + { + m_hitEta = m_design->etaAxis(); + m_hitPhi = m_design->phiAxis(); + m_hitDepth = m_design->depthAxis(); + + commonConstructor(); + } + + // Destructor: + SolidStateDetectorElementBase::~SolidStateDetectorElementBase() + { + } + + + + Trk::Surface& + SolidStateDetectorElementBase::surface() + { + return *m_surface; + } + + const Trk::Surface& + SolidStateDetectorElementBase::surface() const + { + return *m_surface; + } + + const GeoTrf::Transform3D& + SolidStateDetectorElementBase::transformHit() const + { + if (!m_cacheValid) { + std::lock_guard<std::mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); + } + + return m_transformHit; + } + + const HepGeom::Transform3D& + SolidStateDetectorElementBase::transformCLHEP() const + { + //stuff to get the CLHEP version of the local to global transform. + if (!m_cacheValid) { + std::lock_guard<std::mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); + } + + return m_transformCLHEP; + } + + const Amg::Transform3D& + SolidStateDetectorElementBase::transform() const + { + if (!m_cacheValid) { + std::lock_guard<std::mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); + } + + return m_transform; + } + + const HepGeom::Transform3D + SolidStateDetectorElementBase::defTransformCLHEP() const + { + if (m_geoAlignStore) { + const GeoTrf::Transform3D* ptrXf = m_geoAlignStore->getDefAbsPosition(getMaterialGeom()); + if (ptrXf) return Amg::EigenTransformToCLHEP(*ptrXf) * recoToHitTransform(); + } + return Amg::EigenTransformToCLHEP(getMaterialGeom()->getDefAbsoluteTransform()) * recoToHitTransform(); + } + + const Amg::Transform3D + SolidStateDetectorElementBase::defTransform() const + { + HepGeom::Transform3D tmpTransform = defTransformCLHEP(); + return Amg::CLHEPTransformToEigen(tmpTransform); + } + + const HepGeom::Transform3D + SolidStateDetectorElementBase::recoToHitTransform() const + { + // Determine the reconstruction local (LocalPosition) to global transform. + if (m_firstTime) { + std::lock_guard<std::mutex> lock(m_mutex); + if (m_firstTime) updateCache(); + } + + return recoToHitTransformImpl(); + } + + const HepGeom::Vector3D<double>& + SolidStateDetectorElementBase::phiAxisCLHEP() const + { + if (!m_cacheValid) { + std::lock_guard<std::mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); + } + + return m_phiAxisCLHEP; + } + + const Amg::Vector3D& + SolidStateDetectorElementBase::phiAxis() const + { + if (!m_cacheValid) { + std::lock_guard<std::mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); + } + + return m_phiAxis; + } + + const HepGeom::Vector3D<double>& + SolidStateDetectorElementBase::etaAxisCLHEP() const + { + if (!m_cacheValid) { + std::lock_guard<std::mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); + } + + return m_etaAxisCLHEP; + } + + const Amg::Vector3D& + SolidStateDetectorElementBase::etaAxis() const + { + if (!m_cacheValid) { + std::lock_guard<std::mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); + } + + return m_etaAxis; + } + + const Amg::Vector3D& + SolidStateDetectorElementBase::normal() const + { + if (!m_cacheValid) { + std::lock_guard<std::mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); + } + + return m_normal; + } + + const Amg::Vector3D& + SolidStateDetectorElementBase::center() const + { + if (!m_cacheValid) { + std::lock_guard<std::mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); + } + + return m_center; + } + + Amg::Vector2D + SolidStateDetectorElementBase::hitLocalToLocal(double xEta, double xPhi) const // Will change order to phi, eta + { + if (!m_cacheValid) { + std::lock_guard<std::mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); + } + + if (!m_etaDirection) xEta = -xEta; + if (!m_phiDirection) xPhi = -xPhi; + return Amg::Vector2D(xPhi, xEta); + } + + HepGeom::Point3D<double> + SolidStateDetectorElementBase::hitLocalToLocal3D(const HepGeom::Point3D<double>& hitPosition) const + { + // Equiv to transform().inverse * transformHit() * hitPosition + if (!m_cacheValid) { + std::lock_guard<std::mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); + } + + double xDepth = hitPosition[m_hitDepth]; + double xPhi = hitPosition[m_hitPhi]; + double xEta = hitPosition[m_hitEta]; + if (!m_depthDirection) xDepth = -xDepth; + if (!m_phiDirection) xPhi = -xPhi; + if (!m_etaDirection) xEta = -xEta; + return HepGeom::Point3D<double>(xPhi, xEta, xDepth); + } + + // Get eta/phi extent. Returns min/max eta and phi and r (for barrel) + // or z (for endcap) Takes as input the vertex spread in z (+-deltaZ). + // Gets 4 corners of the sensor and calculates eta phi for each corner + // for both +/- vertex spread. The returned phi is between -M_PI and M_PI + // with the direction minPhi to maxPhi always in the positive sense, + // so if the element extends across the -180/180 boundary then minPhi will + // be greater than maxPhi. + void + SolidStateDetectorElementBase::getEtaPhiRegion(double deltaZ, double& etaMin, double& etaMax, double& phiMin, + double& phiMax, double& rz) const + { + if (!m_cacheValid) { + std::lock_guard<std::mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); + } + + HepGeom::Point3D<double> corners[4]; + getCorners(corners); + + bool first = true; + + double phiOffset = 0.; + + for (int i = 0; i < 4; i++) { + double etaMinPoint = 0.; + double etaMaxPoint = 0.; + double phiPoint = 0.; + + // Get the eta phi value for this corner. + getEtaPhiPoint(corners[i], deltaZ, etaMinPoint, etaMaxPoint, phiPoint); + + if (first) { // Use the first point to initialize the min/max values. + + // Put phi in a range so that we are not near -180/+180 division. + // Do this by adding an offset if phi > 90 CLHEP::deg or < -90 CLHEP::deg. + // This offset is later removed. + if (phiPoint < -0.5 * M_PI) { + phiOffset = -0.5 * M_PI; + } else if (phiPoint > 0.5 * M_PI) { + phiOffset = 0.5 * M_PI; + } + phiMin = phiMax = phiPoint - phiOffset; + etaMin = etaMinPoint; + etaMax = etaMaxPoint; + } else { + phiPoint -= phiOffset; + // put phi back in -M_PI < phi < +M_PI range + if (phiPoint < -M_PI) phiPoint += 2. * M_PI; + if (phiPoint > M_PI) phiPoint -= 2. * M_PI; + phiMin = std::min(phiMin, phiPoint); + phiMax = std::max(phiMax, phiPoint); + etaMin = std::min(etaMin, etaMinPoint); + etaMax = std::max(etaMax, etaMaxPoint); + } + first = false; + } + + // put phi back in -M_PI < phi < +M_PI range + phiMin += phiOffset; + phiMax += phiOffset; + if (phiMin < -M_PI) phiMin += 2. * M_PI; + if (phiMin > M_PI) phiMin -= 2. * M_PI; + if (phiMax < -M_PI) phiMax += 2. * M_PI; + if (phiMax > M_PI) phiMax -= 2. * M_PI; + //does it make sense having this if the below is pure virtual for this base class? + //Should this just be postponed to the derived classes? + rz = get_rz(); + + } + + const Trk::SurfaceBounds& + SolidStateDetectorElementBase::bounds() const + { + return m_design->bounds(); + } + + SiIntersect + SolidStateDetectorElementBase::inDetector(const Amg::Vector2D& localPosition, + double phiTol, double etaTol) const + { + return m_design->inDetector(localPosition, phiTol, etaTol); + } + + SiIntersect + SolidStateDetectorElementBase::inDetector(const HepGeom::Point3D<double>& globalPosition, double phiTol, double etaTol) const + { + return m_design->inDetector(localPosition(globalPosition), phiTol, etaTol); + } + + Identifier + SolidStateDetectorElementBase::identifierOfPosition(const Amg::Vector2D& localPosition) const + { + SiCellId cellId = m_design->cellIdOfPosition(localPosition); + return identifierFromCellId(cellId); + } + + SiCellId + SolidStateDetectorElementBase::cellIdOfPosition(const Amg::Vector2D& localPosition) const + { + return m_design->cellIdOfPosition(localPosition); + } + + Amg::Vector2D + SolidStateDetectorElementBase::rawLocalPositionOfCell(const SiCellId& cellId) const + { + return m_design->localPositionOfCell(cellId); + } + + Amg::Vector2D + SolidStateDetectorElementBase::rawLocalPositionOfCell(const Identifier& id) const + { + SiCellId cellId = cellIdFromIdentifier(id); + return m_design->localPositionOfCell(cellId); + } + + int + SolidStateDetectorElementBase::numberOfConnectedCells(const SiCellId cellId) const + { + SiReadoutCellId readoutId = m_design->readoutIdOfCell(cellId); + return m_design->numberOfConnectedCells(readoutId); + } + + SiCellId + SolidStateDetectorElementBase::connectedCell(const SiCellId cellId, int number) const + { + SiReadoutCellId readoutId = m_design->readoutIdOfCell(cellId); + return m_design->connectedCell(readoutId, number); + } + + void + SolidStateDetectorElementBase::commonConstructor() + { + //Do we need this at all in base class, or just in derived? + if (!m_id.is_valid()) throw std::runtime_error("SolidStateDetectorElementBase: Invalid identifier"); + + // Set surface + m_surface = std::make_unique<Trk::PlaneSurface>(*this); + } + + // update cache + // This is supposed to be called inside a block like + // + // if (!m_cacheValid) { + // std::lock_guard<std::mutex> lock(m_mutex); + // if (!m_cacheValid) updateCache(); + // } + // + void + SolidStateDetectorElementBase::updateCache() const + { + + // use aligned transform if available + const GeoTrf::Transform3D* ptrXf; + + if (m_geoAlignStore){ + ptrXf = m_geoAlignStore->getAbsPosition(getMaterialGeom()); + if (ptrXf) { + m_transformHit = (*ptrXf) * m_design->SiHitToGeoModel(); + } + } + else{ + m_transformHit = (getMaterialGeom()->getAbsoluteTransform() * m_design->SiHitToGeoModel()); + } + + const GeoTrf::Transform3D& geoTransform = m_transformHit; + + m_baseCacheValid = true; + + bool firstTimeBaseTmp = m_firstTimeBase; + m_firstTimeBase = false; + + m_center = geoTransform * m_design->sensorCenter(); + + //Is this needed outside e.g. ReadSiDetElements? Maybe candidate for future removal? + m_centerCLHEP = HepGeom::Point3D<double>(m_center[0],m_center[1],m_center[2]); + + Amg::Vector3D centerGeoModel(0., 0., 0.); + m_origin = geoTransform * centerGeoModel; + + // + // Determine directions depth, eta and phi axis in reconstruction local frame + // ie depth away from interaction point + // phi in direction of increasing phi + // eta in direction of increasing z in barrel, and increasing r in endcap + // + + // depthAxis, phiAxis, and etaAxis are defined to be x,y,z respectively for all detectors for hit local frame. + // depthAxis, phiAxis, and etaAxis are defined to be z,x,y respectively for all detectors for reco local frame. + static const Amg::Vector3D localAxes[3] = { + Amg::Vector3D(1.,0.,0.), + Amg::Vector3D(0.,1.,0.), + Amg::Vector3D(0.,0.,1.) + }; + + static const Amg::Vector3D & localRecoPhiAxis = localAxes[distPhi]; // Defined to be same as x axis + static const Amg::Vector3D & localRecoEtaAxis = localAxes[distEta]; // Defined to be same as y axis + static const Amg::Vector3D & localRecoDepthAxis = localAxes[distDepth]; // Defined to be same as z axis + + // We only need to calculate the rough orientation once. + //For it to change would require extreme unrealistic misalignment changes. + if (firstTimeBaseTmp) { + // Determine the unit vectors in global frame + + const Amg::Vector3D &geoModelPhiAxis = localAxes[m_hitPhi]; + const Amg::Vector3D &geoModelEtaAxis = localAxes[m_hitEta]; + const Amg::Vector3D &geoModelDepthAxis = localAxes[m_hitDepth]; + + Amg::Vector3D globalDepthAxis(geoTransform.linear() * geoModelDepthAxis); + Amg::Vector3D globalPhiAxis(geoTransform.linear() * geoModelPhiAxis); + Amg::Vector3D globalEtaAxis(geoTransform.linear() * geoModelEtaAxis); + + // unit radial vector + Amg::Vector3D unitR(m_center.x(), m_center.y(), 0.); + unitR.normalize(); + + Amg::Vector3D nominalEta(0.0,0.0,1.0); + Amg::Vector3D nominalNormal(0.0,0.0,0.0); + Amg::Vector3D nominalPhi(-unitR.y(), unitR.x(), 0.0); + + // In Barrel like geometry, the etaAxis is along increasing z, and normal is in increasing radial direction. + // In Endcap like geometry, the etaAxis is along increasing r, and normal is in decreasing z direction, + // We base whether it is barrel like or endcap like by the orientation of the local z axis of the + // the element. This allows the use of endcap identifiers in a TB setup. + + + nominalEta(2) = 1.0; + m_barrelLike = true; + + if (std::abs(globalEtaAxis.dot(nominalEta)) < 0.5) { // Check that it is in roughly the right direction. Allowed not to be for ITK inclined/barrel ring modules + m_barrelLike = false; + } + + if (m_barrelLike) { + nominalEta(2) = 1.0; + nominalNormal = unitR; + } else { // endcap like + nominalNormal(2) = -1.0; + nominalEta = unitR; + } + + // Determine if axes are to have there directions swapped. + + // + // Depth axis. + // + double depthDir = globalDepthAxis.dot(nominalNormal); + m_depthDirection = true; + if (depthDir < 0) { + if (m_design->depthSymmetric()) { + m_depthDirection = false; + } else { + ATH_MSG_DEBUG( "Unable to swap local depth axis."); + } + } + if (std::abs(depthDir) < 0.5) { // Check that it is in roughly the right direction. + ATH_MSG_ERROR( "Orientation of local depth axis does not follow correct convention."); + m_depthDirection = true; // Don't swap. + } + + // + // Phi axis + // + double phiDir = globalPhiAxis.dot(nominalPhi); + m_phiDirection = true; + if (phiDir < 0) { + if (m_design->phiSymmetric()) { + m_phiDirection = false; + } else { + ATH_MSG_DEBUG("Unable to swap local xPhi axis."); + } + } + + if (std::abs(phiDir) < 0.5) { // Check that it is in roughly the right direction. + ATH_MSG_ERROR( "Orientation of local xPhi axis does not follow correct convention."); + m_phiDirection = true; // Don't swap. + } + + // + // Eta axis + // + double etaDir = globalEtaAxis.dot(nominalEta); + m_etaDirection = true; + if (etaDir < 0) { + if (m_design->etaSymmetric()) { + m_etaDirection = false; + } else { + ATH_MSG_DEBUG("Unable to swap local xEta axis."); + } + } + if (std::abs(etaDir) < 0.5) { // Check that it is in roughly the right direction. + ATH_MSG_ERROR( "Orientation of local xEta axis does not follow correct convention."); + m_etaDirection = true; // Don't swap + } + + } // end if (firstTimeBaseTemp) + + m_transformCLHEP = Amg::EigenTransformToCLHEP(geoTransform) * recoToHitTransformImpl(); + m_transform = Amg::CLHEPTransformToEigen(m_transformCLHEP); + + #ifndef NDEBUG + // Check that local frame is right-handed. (ie transform has no reflection) + // This can be done by checking that the determinant is >0. + if (firstTimeBaseTmp) { // Only need to check this once. + HepGeom::Transform3D & t = m_transformCLHEP; + double det = t(0,0) * (t(1,1)*t(2,2) - t(1,2)*t(2,1)) - + t(0,1) * (t(1,0)*t(2,2) - t(1,2)*t(2,0)) + + t(0,2) * (t(1,0)*t(2,1) - t(1,1)*t(2,0)); + if (det < 0) { + ATH_MSG_DEBUG( "Local frame is left-handed. (hitEtaDirection, hitPhiDirection, hitDepthDirection) = (" + << m_etaDirection <<", " + << m_phiDirection <<", " + << m_depthDirection <<")"); + } + } + #endif + + // Initialize various cached members, needs to be done here otherwise the necessary transforms are not yet initialized + // The unit vectors + m_normal = m_transform.linear() * localRecoDepthAxis; + + m_phiAxis = m_transform.linear() * localRecoPhiAxis; + m_etaAxis = m_transform.linear() * localRecoEtaAxis; + + //Check where these are actually needed - candidates for removal? + m_phiAxisCLHEP = HepGeom::Vector3D<double>(m_phiAxis[0],m_phiAxis[1],m_phiAxis[2]); + m_etaAxisCLHEP = HepGeom::Vector3D<double>(m_etaAxis[0],m_etaAxis[1],m_etaAxis[2]); + + getExtent(m_minR, m_maxR, m_minZ, m_maxZ, m_minPhi, m_maxPhi); + + //Install the cache at the end + m_cacheValid.store(true); + if (m_firstTime) m_firstTime.store(false); + } + + // Get min/max or r, z,and phi + // helper method only to be used for the cache construction + // i.e inside updateCache + void + SolidStateDetectorElementBase::getExtent(double& rMin, double& rMax, + double& zMin, double& zMax, + double& phiMin, double& phiMax) const + { + + double radialShift = 0.; + /* + Deprecated method for specialized ITk DetElement with different global frame - to be replaced! + const InDetDD::StripStereoAnnulusDesign* testDesign = dynamic_cast<const InDetDD::StripStereoAnnulusDesign*>(m_design); + if (testDesign) radialShift = testDesign->localModuleCentreRadius();//additional radial shift for sensors centred on beamline + */ + + //NS this probably needs updates to get a shift from the m_design!!!! + + HepGeom::Point3D<double> corners[4]; + getCorners(corners); + + bool first = true; + + double phiOffset = 0.; + + + const HepGeom::Transform3D rShift = HepGeom::TranslateX3D(radialShift);//in local frame, radius is x + + for (int i = 0; i < 4; i++) { + + //if (testDesign) corners[i].transform(rShift); see comment re ITk... + + // m_tranform is already there as part of the cache construction + // This method seems to be used only as a helper for updateCache + HepGeom::Point3D<double> globalPoint = m_transformCLHEP * corners[i]; + + double rPoint = globalPoint.perp(); + double zPoint = globalPoint.z(); + double phiPoint = globalPoint.phi(); + + // Use first point to initializa min/max values. + if (first) { + + // Put phi in a range so that we are not near -180/+180 division. + // Do this by adding an offset if phi > 90 CLHEP::deg or < -90 CLHEP::deg. + // This offset is later removed. + if (phiPoint < -0.5 * M_PI) { + phiOffset = -0.5 * M_PI; + } else if (phiPoint > 0.5 * M_PI) { + phiOffset = 0.5 * M_PI; + } + phiMin = phiMax = phiPoint - phiOffset; + rMin = rMax = rPoint; + zMin = zMax = zPoint; + + } else { + phiPoint -= phiOffset; + // put phi back in -M_PI < phi < +M_PI range + if (phiPoint < -M_PI) phiPoint += 2. * M_PI; + if (phiPoint > M_PI) phiPoint -= 2. * M_PI; + phiMin = std::min(phiMin, phiPoint); + phiMax = std::max(phiMax, phiPoint); + rMin = std::min(rMin, rPoint); + rMax = std::max(rMax, rPoint); + zMin = std::min(zMin, zPoint); + zMax = std::max(zMax, zPoint); + } + first = false; + } + + // put phi back in -M_PI < phi < +M_PI range + phiMin += phiOffset; + phiMax += phiOffset; + if (phiMin < -M_PI) phiMin += 2. * M_PI; + if (phiMin > M_PI) phiMin -= 2. * M_PI; + if (phiMax < -M_PI) phiMax += 2. * M_PI; + if (phiMax > M_PI) phiMax -= 2. * M_PI; + + } + + void + SolidStateDetectorElementBase::getCorners(HepGeom::Point3D<double>* corners) const + { + // This makes the assumption that the forward SCT detectors are orientated such that + // the positive etaAxis corresponds to the top of the detector where the width is largest. + // This is currently always the case. + // For the SCT barrel and pixel detectors minWidth and maxWidth are the same and so should + // work for all orientations. + + double tmpMinWidth = minWidth(); + double tmpMaxWidth = maxWidth(); + double tmpLength = length(); + + // Lower left + corners[0][distPhi] = -0.5 * tmpMinWidth; + corners[0][distEta] = -0.5 * tmpLength; + corners[0][distDepth] = 0.; + + // Lower right + corners[1][distPhi] = 0.5 * tmpMinWidth; + corners[1][distEta] = -0.5 * tmpLength; + corners[1][distDepth] = 0.; + + // Upper Right + corners[2][distPhi] = 0.5 * tmpMaxWidth; + corners[2][distEta] = 0.5 * tmpLength; + corners[2][distDepth] = 0.; + + // Upper left + corners[3][distPhi] = -0.5 * tmpMaxWidth; + corners[3][distEta] = 0.5 * tmpLength; + corners[3][distDepth] = 0.; + } + + // Gets eta phi for a point given in local coordinates. deltaZ is specified to + // account for the vertex spread. phi is independent of this vertex + // spread. etaMax will correspond to zMin (-deltaZ) and etaMin will + // correspond to zMax (+deltaZ). + void + SolidStateDetectorElementBase::getEtaPhiPoint(const HepGeom::Point3D<double>& point, double deltaZ, + double& etaMin, double& etaMax, double& phi) const + { + // Get the point in global coordinates. + HepGeom::Point3D<double> globalPoint = globalPosition(point); + + double r = globalPoint.perp(); + double z = globalPoint.z(); + + double thetaMin = std::atan2(r,(z + deltaZ)); + etaMax = -std::log(tan(0.5 * thetaMin)); + double thetaMax = std::atan2(r,(z - deltaZ)); + etaMin = -std::log(tan(0.5 * thetaMax)); + + phi = globalPoint.phi(); + } + + const HepGeom::Transform3D + SolidStateDetectorElementBase::recoToHitTransformImpl() const + { + // = transfromHit * hitLocal + // = transformHit * recoToHitTransform * recoLocal + // recoToHitTransform takes recoLocal to hitLocal + // x,y,z -> y,z,x + // equiv to a rotation around Y of 90 deg followed by a rotation around X of 90deg + // + // recoToHit is static as it needs to be calculated once only. + // We use the HepGeom::Transform3D constructor which takes one coordinates system to another where the + // coordinate system is defined by it center and two axes. + // distPhi, distEta are the reco local axes and hitPhi and hitEta are the hit local axes. + // It assume phi, eta, depth makes a right handed system which is the case. + static const HepGeom::Vector3D<double> localAxes[3] = { + HepGeom::Vector3D<double>(1., 0., 0.), + HepGeom::Vector3D<double>(0., 1., 0.), + HepGeom::Vector3D<double>(0., 0., 1.) + }; + + const HepGeom::Transform3D recoToHit(HepGeom::Point3D<double>(0., 0., 0.), + localAxes[distPhi], + localAxes[distEta], + HepGeom::Point3D<double>(0., 0., 0.), + localAxes[m_hitPhi], + localAxes[m_hitEta]); + + // Swap direction of axis as appropriate + CLHEP::Hep3Vector scale(1., 1., 1.); + if (!m_phiDirection) scale[distPhi] = -1.; + if (!m_etaDirection) scale[distEta] = -1.; + if (!m_depthDirection) scale[distDepth] = -1.; + return recoToHit * HepGeom::Scale3D(scale[0], scale[1], scale[2]); + } + + +} // namespace InDetDD diff --git a/InnerDetector/InDetAlignTools/InDetAlignGenTools/CMakeLists.txt b/InnerDetector/InDetAlignTools/InDetAlignGenTools/CMakeLists.txt index c12540c0f7838e71d7d4288a2aaeb9c5666f51f8..703d80c37b81b01e5e6d502af75cf7ed490641ea 100644 --- a/InnerDetector/InDetAlignTools/InDetAlignGenTools/CMakeLists.txt +++ b/InnerDetector/InDetAlignTools/InDetAlignGenTools/CMakeLists.txt @@ -19,4 +19,4 @@ atlas_add_component( InDetAlignGenTools src/*.cxx src/components/*.cxx INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${HEPPDT_INCLUDE_DIRS} - LINK_LIBRARIES ${CLHEP_LIBRARIES} ${CORAL_LIBRARIES} ${HEPPDT_LIBRARIES} AthContainers AthenaKernel AthenaPoolUtilities AtlasDetDescr AtlasHepMCLib DetDescrConditions GaudiKernel GeoPrimitives Identifier InDetAlignGenToolsLib InDetAlignTrkInfo InDetIdentifier InDetPrepRawData InDetReadoutGeometry PixelReadoutGeometry RegistrationServicesLib SCT_ReadoutGeometry TrackRecordLib TrkEventPrimitives TrkExInterfaces TrkFitterInterfaces TrkMeasurementBase TrkParameters TrkPrepRawData TrkRIO_OnTrack TrkToolInterfaces TrkTrack TrkTrackSummary TrkTruthData ) + LINK_LIBRARIES ${CLHEP_LIBRARIES} ${CORAL_LIBRARIES} ${HEPPDT_LIBRARIES} AthContainers AthenaKernel AthenaPoolUtilities AtlasDetDescr AtlasHepMCLib DetDescrConditions GaudiKernel GeoPrimitives Identifier InDetAlignGenToolsLib InDetAlignTrkInfo InDetIdentifier InDetPrepRawData ReadoutGeometryBase InDetReadoutGeometry PixelReadoutGeometry RegistrationServicesLib SCT_ReadoutGeometry TrackRecordLib TrkEventPrimitives TrkExInterfaces TrkFitterInterfaces TrkMeasurementBase TrkParameters TrkPrepRawData TrkRIO_OnTrack TrkToolInterfaces TrkTrack TrkTrackSummary TrkTruthData ) diff --git a/InnerDetector/InDetAlignTools/InDetAlignGenTools/src/InDetAlignDBTool.cxx b/InnerDetector/InDetAlignTools/InDetAlignGenTools/src/InDetAlignDBTool.cxx index 18540ac4de4ccaa854762ee9e8713a6fcd0028da..2337dc17193efcd97e247e61fe1f8a0737802e69 100755 --- a/InnerDetector/InDetAlignTools/InDetAlignGenTools/src/InDetAlignDBTool.cxx +++ b/InnerDetector/InDetAlignTools/InDetAlignGenTools/src/InDetAlignDBTool.cxx @@ -29,7 +29,7 @@ #include "SCT_ReadoutGeometry/SCT_DetectorManager.h" #include "InDetReadoutGeometry/SiDetectorElementCollection.h" #include "InDetReadoutGeometry/SiDetectorElement.h" -#include "InDetReadoutGeometry/InDetDD_Defs.h" +#include "ReadoutGeometryBase/InDetDD_Defs.h" #include "InDetIdentifier/PixelID.h" #include "InDetIdentifier/SCT_ID.h" diff --git a/InnerDetector/InDetConditions/SiPropertiesTool/CMakeLists.txt b/InnerDetector/InDetConditions/SiPropertiesTool/CMakeLists.txt index c237a54eb3b2f695bf4853087201f5ff26b5ed3f..38490319a92070bd0596c2c48ea8d5adc77f9c8d 100644 --- a/InnerDetector/InDetConditions/SiPropertiesTool/CMakeLists.txt +++ b/InnerDetector/InDetConditions/SiPropertiesTool/CMakeLists.txt @@ -12,7 +12,7 @@ atlas_add_library( SiPropertiesToolLib PUBLIC_HEADERS SiPropertiesTool PRIVATE_INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES AthenaKernel GaudiKernel Identifier InDetConditionsSummaryService InDetReadoutGeometry PixelConditionsData SCT_ConditionsData + LINK_LIBRARIES AthenaKernel GaudiKernel Identifier InDetConditionsSummaryService InDetReadoutGeometry ReadoutGeometryBase PixelConditionsData SCT_ConditionsData PRIVATE_LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaBaseComps InDetIdentifier StoreGateLib ) atlas_add_component( SiPropertiesTool diff --git a/InnerDetector/InDetConditions/SiPropertiesTool/SiPropertiesTool/SiliconProperties.h b/InnerDetector/InDetConditions/SiPropertiesTool/SiPropertiesTool/SiliconProperties.h index 1ee7771f234eb3da0168746f9b2349b5f77b3ad0..a76b002d3ed4181e300c181349dd53c8fea499f9 100644 --- a/InnerDetector/InDetConditions/SiPropertiesTool/SiPropertiesTool/SiliconProperties.h +++ b/InnerDetector/InDetConditions/SiPropertiesTool/SiPropertiesTool/SiliconProperties.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef SIPROPERTIESTOOL_SILICONPROPERTIES_H @@ -16,7 +16,7 @@ // Authors: Grant Gorfine /////////////////////////////////////////////////////////////////// -#include "InDetReadoutGeometry/InDetDD_Defs.h" +#include "ReadoutGeometryBase/InDetDD_Defs.h" namespace InDet { diff --git a/InnerDetector/InDetConditions/TRT_ConditionsServices/CMakeLists.txt b/InnerDetector/InDetConditions/TRT_ConditionsServices/CMakeLists.txt index aeba1407ad483d817e15cf5a9780efbfa5d9fbc6..6033b875face38e480fc8b898417bc86a2ba5708 100644 --- a/InnerDetector/InDetConditions/TRT_ConditionsServices/CMakeLists.txt +++ b/InnerDetector/InDetConditions/TRT_ConditionsServices/CMakeLists.txt @@ -18,7 +18,7 @@ atlas_add_library( TRT_ConditionsServicesLib PUBLIC_HEADERS TRT_ConditionsServices PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} LINK_LIBRARIES LINK_LIBRARIES AthenaKernel AthenaPoolUtilities DetDescrConditions EventPrimitives GaudiKernel GeoPrimitives InDetConditionsSummaryService InDetIdentifier TRT_ConditionsData - PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps CxxUtils GeoModelInterfaces GeoModelUtilities Identifier xAODEventInfo InDetReadoutGeometry TRT_ReadoutGeometry PathResolver RegistrationServicesLib RDBAccessSvcLib ${extra_lib} ) + PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps CxxUtils GeoModelInterfaces GeoModelUtilities Identifier xAODEventInfo ReadoutGeometryBase InDetReadoutGeometry TRT_ReadoutGeometry PathResolver RegistrationServicesLib RDBAccessSvcLib ${extra_lib} ) atlas_add_component( TRT_ConditionsServices src/components/*.cxx diff --git a/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_AlignDbSvc.cxx b/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_AlignDbSvc.cxx index 13b0318737b63b958972319cf0ed5aa68bd4ed96..d33b6115896169da2f587d6923d76508ed4b2132 100755 --- a/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_AlignDbSvc.cxx +++ b/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_AlignDbSvc.cxx @@ -19,7 +19,7 @@ #include "TRT_ReadoutGeometry/TRT_DetElementCollection.h" #include "TRT_ReadoutGeometry/TRT_BaseElement.h" -#include "InDetReadoutGeometry/InDetDD_Defs.h" +#include "ReadoutGeometryBase/InDetDD_Defs.h" #include "TRT_ReadoutGeometry/TRT_DetectorManager.h" #include "TRT_ConditionsData/FloatArrayStore.h" diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/CMakeLists.txt b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/CMakeLists.txt index a3abb437c41332f6858edfc23146fee9c452f1b1..1b152a50fbbe9837475e17d830a93653c8be6b0a 100644 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/CMakeLists.txt +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/CMakeLists.txt @@ -13,5 +13,5 @@ atlas_add_library( InDetReadoutGeometry PUBLIC_HEADERS InDetReadoutGeometry INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES ${CLHEP_LIBRARIES} ${GEOMODELCORE_LIBRARIES} AthenaKernel AtlasDetDescr CxxUtils GeoPrimitives Identifier GaudiKernel InDetIdentifier TrkDetElementBase TrkSurfaces TrkEventPrimitives StoreGateLib DetDescrConditions InDetCondTools + LINK_LIBRARIES ${CLHEP_LIBRARIES} ${GEOMODELCORE_LIBRARIES} AthenaKernel AtlasDetDescr CxxUtils GeoPrimitives Identifier GaudiKernel InDetIdentifier TrkDetElementBase ReadoutGeometryBase TrkSurfaces TrkEventPrimitives StoreGateLib DetDescrConditions InDetCondTools PRIVATE_LINK_LIBRARIES AthenaBaseComps AthenaPoolUtilities IdDictDetDescr GeoModelUtilities ) diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/InDetDetectorManager.h b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/InDetDetectorManager.h index fbbc892e7d40242780587a11f86f7c4ec0c526b0..3043161171fc41af9128c3fa5d29be8c57bf6999 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/InDetDetectorManager.h +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/InDetDetectorManager.h @@ -15,7 +15,7 @@ #include "GeoPrimitives/GeoPrimitives.h" // GeoModel stuff #include "GeoModelKernel/GeoVDetectorManager.h" -#include "InDetReadoutGeometry/InDetDD_Defs.h" +#include "ReadoutGeometryBase/InDetDD_Defs.h" #include "InDetReadoutGeometry/Version.h" #include "CLHEP/Geometry/Transform3D.h" // Message Stream Member diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorDesign.h b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorDesign.h index e2c0b26f27a7aa8d45c3f38a1a40ec4b3c950685..049987862187aba96b18baf7481094881a52b83c 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorDesign.h +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorDesign.h @@ -9,14 +9,15 @@ #ifndef INDETREADOUTGEOMETRY_SIDETECTORDESIGN_H #define INDETREADOUTGEOMETRY_SIDETECTORDESIGN_H +//Base class +#include "ReadoutGeometryBase/DetectorDesign.h" // Input/output classes -#include "InDetReadoutGeometry/SiDiodesParameters.h" -#include "InDetReadoutGeometry/InDetDD_Defs.h" +#include "ReadoutGeometryBase/SiDiodesParameters.h" +#include "ReadoutGeometryBase/InDetDD_Defs.h" #include "CLHEP/Geometry/Point3D.h" #include "CLHEP/Geometry/Vector3D.h" #include "AtlasDetDescr/AtlasDetectorID.h" #include "GeoPrimitives/GeoPrimitives.h" -#include "InDetDD_Defs.h" #include <list> #include <vector> @@ -36,10 +37,6 @@ class SiReadoutCell; class SiLocalPosition; class SiIntersect; -enum DetectorShape { - Box=0, Trapezoid, Annulus,Other -}; - /** @class SiDetectorDesign Base class for the detector design classes for Pixel and SCT. @@ -50,12 +47,7 @@ enum DetectorShape { @author A. Calvet, Grant Gorfine */ -class SiDetectorDesign { -public: - enum Axis { - xAxis=0, yAxis, zAxis - }; - + class SiDetectorDesign : public DetectorDesign { /////////////////////////////////////////////////////////////////// // Public methods: @@ -94,48 +86,20 @@ public: /////////////////////////////////////////////////////////////////// // Const methods: /////////////////////////////////////////////////////////////////// - - /** Test if point is in the active part of the detector with specified tolerances */ - SiIntersect inDetector(const SiLocalPosition &localPosition, double phiTol, - double etaTol) const; + /** Give strip angle in the reco frame */ + virtual double sinStripAngleReco(double phiCoord, double etaCoord) const; /** Test if near bond gap within tolerances, only relevant for SCT. */ virtual bool nearBondGap(const SiLocalPosition &localPosition, double etaTol) const = 0; - /** local axis corresponding to eta direction: */ - Axis etaAxis() const; - - /** local axis corresponding to phi direction: */ - Axis phiAxis() const; - - /** local axis corresponding to depth direction: */ - Axis depthAxis() const; - - bool phiSymmetric() const; - bool etaSymmetric() const; - bool depthSymmetric() const; - - /** ReadoutSide. +1 = postive depth side, -1 = negative depth side. */ - int readoutSide() const; - - /** Override default symmetries to prevent swapping of axes. - NB. Flags can be changed from true to false but not false to true. */ - void setSymmetry(bool phiSymmetric, bool etaSymmetric, bool depthSymmetric); - + /** only relevant for SCT. Return strip1Dim(int strip, int row) if SCT; otherwise -1 */ + virtual int strip1Dim(int strip, int row) const; + /////////////////////////////////////////////////////////////////// // Pure virtual methods: /////////////////////////////////////////////////////////////////// - - /** Returns distance to nearest detector active edge - +ve = inside - -ve = outside */ - virtual void distanceToDetectorEdge(const SiLocalPosition &localPosition, - double &etaDist, double &phiDist) const = 0; - - - /** Helper method for stereo angle computation, DEPRECATED */ virtual HepGeom::Vector3D<double> phiMeasureSegment(const SiLocalPosition &position) const = 0; @@ -144,93 +108,10 @@ public: virtual std::pair<SiLocalPosition, SiLocalPosition> endsOfStrip( const SiLocalPosition &position) const = 0; - /** Method to calculate length of a module */ - virtual double length() const = 0; - - /** Method to calculate average width of a module */ - virtual double width() const = 0; - - /** Method to calculate minimum width of a module */ - virtual double minWidth() const = 0; - - /** Method to calculate maximum width of a module */ - virtual double maxWidth() const = 0; - - /** Method which returns thickness of the silicon wafer */ - double thickness() const; - - /** Pitch in phi direction */ - virtual double phiPitch() const = 0; - - /** Pitch in phi direction */ - virtual double phiPitch(const SiLocalPosition &localPosition) const = 0; - - // ** Pitch in eta direction */ - virtual double etaPitch() const = 0; - - /** Return carrier type (ie electrons or holes) */ - InDetDD::CarrierType carrierType() const; - - /** Return true if hit local direction is the same as readout direction. */ - virtual bool swapHitPhiReadoutDirection() const = 0; - virtual bool swapHitEtaReadoutDirection() const = 0; - - /** Shape of element */ - virtual DetectorShape shape() const; - - /** Element boundary */ - virtual const Trk::SurfaceBounds &bounds() const = 0; - - - /////////////////////////////////////////////////////////// - // - // The following will replace existing methods but are not all implemented yet - // - - /** readout or diode id -> position, size */ - virtual SiDiodesParameters parameters(const SiCellId &cellId) const = 0; - - /** readout or diode id -> position. */ - virtual SiLocalPosition localPositionOfCell(const SiCellId &cellId) const = 0; - - /** number of connected cells. Generally 1 except for ganged pixels which will be 2. - */ - virtual int numberOfConnectedCells(const SiReadoutCellId &readoutId) const = 0; - - /** readout id -> id of connected diodes. - parameter number = 0 will refer to the primary diode and in general the - cell number will be the same. - NB. SiCellId cellId = connectedCell(readoutId, 0) will in general be equivalent to - SiCellId cellId = readoutId */ - virtual SiCellId connectedCell(const SiReadoutCellId &readoutId, - int number) const = 0; - /** If cell is ganged return the id of the other cell which shares the readout for this cell, otherwise return an invalid id. */ virtual SiCellId gangedCell(const SiCellId &cellId) const = 0; - /** diode id -> readout id - NB assignment of a SiReadoutCellId to a SiCellId is allowed so you are can - pass SiReadoutCellId variables to functions expecting a SiCellId. */ - virtual SiReadoutCellId readoutIdOfCell(const SiCellId &cellId) const = 0; - - /** position -> id */ - virtual SiReadoutCellId readoutIdOfPosition(const SiLocalPosition &localPos) const = - 0; - - /** position -> id */ - virtual SiCellId cellIdOfPosition(const SiLocalPosition &localPos) const = 0; - - /** Get the neighbouring diodes of a given diode: - Cell for which the neighbours must be found - List of cells which are neighbours of the given one */ - virtual void neighboursOfCell(const SiCellId &cellId, - std::vector<SiCellId> &neighbours) const = 0; - - /** Check if cell is in range. Returns the original cellId if it is in range, - otherwise it returns an invalid id. */ - virtual SiCellId cellIdInRange(const SiCellId &cellId) const = 0; - /////////////////////////////////////////////////////////////////// // Private methods: @@ -238,66 +119,23 @@ public: private: SiDetectorDesign(); - /////////////////////////////////////////////////////////////////// - // Private data: - /////////////////////////////////////////////////////////////////// -private: - Axis m_etaAxis; // !< local axis corresponding to eta direction - Axis m_phiAxis; // !< local axis corresponding to phi direction - Axis m_depthAxis; // !< local axis corresponding to depth direction - double m_thickness; // !< thickness of silicon sensor - InDetDD::CarrierType m_carrierType; // !< carrier type that drifts towards readout - // !< (ie holes fro SCT and electrons for pixel) - bool m_phiSymmetric; - bool m_etaSymmetric; - bool m_depthSymmetric; - - bool m_readoutSidePosDepth; // !< Control which side readout is on. - // !< true = positive Depth Side, false = negative Depth - // Side - // Disallow Copy and assignment; SiDetectorDesign(const SiDetectorDesign &design); SiDetectorDesign &operator = (const SiDetectorDesign &design); + }; /////////////////////////////////////////////////////////////////// // Inline methods: /////////////////////////////////////////////////////////////////// -inline SiDetectorDesign::Axis SiDetectorDesign::etaAxis() const { - return m_etaAxis; -} -inline SiDetectorDesign::Axis SiDetectorDesign::phiAxis() const { - return m_phiAxis; -} - -inline SiDetectorDesign::Axis SiDetectorDesign::depthAxis() const { - return m_depthAxis; -} - -inline double SiDetectorDesign::thickness() const { - return m_thickness; -} - -inline InDetDD::CarrierType SiDetectorDesign::carrierType() const { - return m_carrierType; -} - -inline bool SiDetectorDesign::phiSymmetric() const { - return m_phiSymmetric; -} - -inline bool SiDetectorDesign::etaSymmetric() const { - return m_etaSymmetric; -} - -inline bool SiDetectorDesign::depthSymmetric() const { - return m_depthSymmetric; -} - -inline int SiDetectorDesign::readoutSide() const { - return (m_readoutSidePosDepth) ? +1 : -1; -} + inline double SiDetectorDesign::sinStripAngleReco(double /* x */, double /* y */) const { + return 0.0; // pixel and barrel strip sensors always zero + } + + inline int SiDetectorDesign::strip1Dim(int, int) const{ + return -1.0; + } + } // namespace InDetDD #endif // INDETREADOUTGEOMETRY_SIDETECTORDESIGN_H diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorElement.h b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorElement.h index 5d6e1ddb7248007bd7d9f210178b23af8fa9b860..17663e193be1ff3c30bff0b2773796fe542adadf 100644 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorElement.h +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorElement.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /** @@ -12,40 +12,11 @@ /** * Base class. */ -#include "TrkDetElementBase/TrkDetElementBase.h" - -#include "GeoModelKernel/GeoDefinitions.h" -#include "GeoPrimitives/CLHEPtoEigenConverter.h" -#include "GeoPrimitives/GeoPrimitives.h" -#include "Identifier/Identifier.h" -#include "Identifier/IdentifierHash.h" -#include "InDetReadoutGeometry/InDetDD_Defs.h" -#include "InDetReadoutGeometry/SiCellId.h" -#include "InDetReadoutGeometry/SiCommonItems.h" +#include "ReadoutGeometryBase/SolidStateDetectorElementBase.h" #include "InDetReadoutGeometry/SiDetectorDesign.h" -#include "InDetReadoutGeometry/SiIntersect.h" -#include "InDetReadoutGeometry/SiLocalPosition.h" -#include "TrkEventPrimitives/ParamDefs.h" - -#include "CLHEP/Geometry/Point3D.h" - -#include <atomic> -#include <limits> -#include <memory> -#include <mutex> - -class AtlasDetectorID; -class GeoAlignmentStore; -class GeoVFullPhysVol; - -namespace Trk { - class SurfaceBounds; -} namespace InDetDD { - class SiReadoutCellId; - /** * * @class SiDetectorElement @@ -53,6 +24,7 @@ namespace InDetDD { * Class to hold geometrical description of a silicon detector element. * A detector element is a module in the pixels and one side of a module in the SCT. * This class is shared between the Pixel and SCT detector since there is a lot of commonality. + * It inherits frm ReadoutGeometryBase/SolidStateDetectorElement, which is also used for HGTD * * @par Coordinate Frames. * @@ -92,7 +64,6 @@ namespace InDetDD { * * - Identification * - Navigation - * - Transformation/Orientation * - Module Frame * - Element Extent * - Design methods @@ -100,7 +71,6 @@ namespace InDetDD { * - Lorentz Correction * - Readout cell id * - Miscellaneous - * - Cache handling. * * * @author Grant Gorfine @@ -137,7 +107,7 @@ namespace InDetDD { */ - class SiDetectorElement final : public Trk::TrkDetElementBase { + class SiDetectorElement final : public InDetDD::SolidStateDetectorElementBase { public: @@ -180,23 +150,6 @@ namespace InDetDD { */ SiDetectorElement& operator=(SiDetectorElement&&) = delete; - /** - * @name Cache handling - * - * Methods to handle invalidating and updating caches. The cached values include values that are affected by alignment - */ - //@{ - /** - * Signal that cached values are no longer valid. - * Invalidate general cache (inline) - */ - void invalidate(); - - /** - * Set/calculate cache values (inline) - */ - void setCache(); - //@} /** * @name Navigation setters @@ -229,35 +182,12 @@ namespace InDetDD { const SiDetectorElement* otherSide() const; //@} - /** - * @name Common items - * Inline method - */ - //@{ - const SiCommonItems* getCommonItems() const; - //@} - /** * @name Identification * Methods to identify the element and identifier manipulation. */ //@{ - /** - * identifier of this detector element (inline) - */ - virtual Identifier identify() const override final; - - /** - * identifier hash (inline) - */ - virtual IdentifierHash identifyHash() const override final; - - /** - * Returns the id helper (inline) - */ - const AtlasDetectorID* getIdHelper() const; - bool isPixel() const; bool isSCT() const; bool isDBM() const; @@ -283,53 +213,12 @@ namespace InDetDD { * @name Surface */ //@{ - /** - * Element Surface - */ - Trk::Surface& surface(); - virtual const Trk::Surface& surface() const override final; - /** - * TrkDetElementBase interface (inline) - */ - virtual const Trk::Surface& surface(const Identifier&) const override final; - + /** * Returns the full list of surfaces associated to this detector element */ const std::vector<const Trk::Surface*>& surfaces() const; - //@} - - /** - * @name Transformation - */ //@{ - /** - * Local (simulation/hit frame) to global transform - */ - const GeoTrf::Transform3D& transformHit() const; - - /** - * Local (reconstruction frame) to global transform - */ - const HepGeom::Transform3D& transformCLHEP() const; - virtual const Amg::Transform3D& transform() const override final; - /** - * TrkDetElementBase interface (inline) - */ - virtual const Amg::Transform3D& transform(const Identifier&) const override final; - - /** - * Default Local (reconstruction frame) to global transform - * ie with no misalignment. - */ - const HepGeom::Transform3D defTransformCLHEP() const; - const Amg::Transform3D defTransform() const; - - /** - * Transform to go from local reconstruction frame to local hit frame. - */ - const HepGeom::Transform3D recoToHitTransform() const; - //@} /** * @name Module Frame @@ -380,107 +269,10 @@ namespace InDetDD { //@} /** - * @name Orientation - */ - //{@ - - /** - * Directions of hit depth,phi,eta axes relative to reconstruction local - * position axes (LocalPosition). Returns +/-1. inline - */ - double hitDepthDirection() const; - /** - * See previous method. inline - */ - double hitPhiDirection() const; - /** - * See previous method. inline - */ - double hitEtaDirection() const; - - /** - * To determine if readout direction between online and offline needs - * swapping, see methods swapPhiReadoutDirection() and - * swapEtaReadoutDirection() below in "Readout Cell id" section - * - * Orientation. - * Directions. - * - phiAxis in same direction as increasing phi and identifier phi_index/strip. - * NB. This requires some flipping of axes with repsect to the hits. - * - etaAxis in direction of increasing z in the barrel and increasing r in the endcap. - * - normal choosen to give right-handed coordinate frame (x=normal,y=phiAxis,z=etaAxis) - * NB. This requires some flipping of axes with repsect to the hits. - * - * Get reconstruction local phi axes in global frame. - * In same direction as increasing phi and identifier phi_index/strip. - */ - const HepGeom::Vector3D<double>& phiAxisCLHEP() const; - const Amg::Vector3D& phiAxis() const; - /** - * Get reconstruction local eta axes in global frame. - * In direction of increasing z in the barrel and increasing r in the endcap. - */ - const HepGeom::Vector3D<double>& etaAxisCLHEP() const; - const Amg::Vector3D& etaAxis() const; - - /** - * Get reconstruction local normal axes in global frame. Choosen to give right-handed coordinate frame. - */ - virtual const Amg::Vector3D& normal() const override final; - /** - * TrkDetElementBase interface (inline) - */ - virtual const Amg::Vector3D& normal(const Identifier&) const override final; - - //@} - - /** - * @name Position - */ - //@{ - /** - * Center in global coordinates - */ - virtual const Amg::Vector3D& center() const override final; - /** - * TrkDetElementBase interface (inline) - */ - virtual const Amg::Vector3D& center(const Identifier&) const override final; - - /** - * transform a hit local position into a global position (inline): - */ - HepGeom::Point3D<double> globalPositionHit(const HepGeom::Point3D<double>& simulationLocalPos) const; - Amg::Vector3D globalPositionHit(const Amg::Vector3D& simulationLocalPos) const; - - /** - * transform a reconstruction local position into a global position (inline): - */ - HepGeom::Point3D<double> globalPosition(const HepGeom::Point3D<double>& localPos) const; - Amg::Vector3D globalPosition(const Amg::Vector3D& localPos) const; - - /** - * as in previous method but for 2D local position (inline) - */ - HepGeom::Point3D<double> globalPositionCLHEP(const Amg::Vector2D& localPos) const; - Amg::Vector3D globalPosition(const Amg::Vector2D& localPos) const; - - /** - * Simulation/Hit local frame to reconstruction local frame. 2D. - * TODO: Will change order of parameters at some point. - */ - Amg::Vector2D hitLocalToLocal(double xEta, double xPhi) const; - /** - * Same as previuos method but 3D. - */ - HepGeom::Point3D<double> hitLocalToLocal3D(const HepGeom::Point3D<double>& hitPosition) const; - - /** - * transform a global position into a 2D local position (reconstruction frame) (inline) + * @name Element Extent + * Methods to get extent of element in r,phi and z. */ - Amg::Vector2D localPosition(const HepGeom::Point3D<double>& globalPosition) const; - Amg::Vector2D localPosition(const Amg::Vector3D& globalPosition) const; - + double get_rz() const; //@} /** @@ -530,30 +322,7 @@ namespace InDetDD { bool isStereo() const; //@} - - /** - * @name Element Extent - * Inline methods to get extent of element in r,phi and z. - */ - //@{ - double rMin() const; - double rMax() const; - double zMin() const; - double zMax() const; - double phiMin() const; - double phiMax() const; - /** - * Method for building up region of interest table. - * Get eta/phi extent for the element. Returns min/max eta and phi - * and r (for barrel) or z (for endcap) Takes as input the vertex - * spread in z (-deltaZ to +deltaZ) - */ - void getEtaPhiRegion(double deltaZ, - double& etaMin, double& etaMax, - double& phiMin, double& phiMax, - double& rz) const; - //@} /** * @name Design methods @@ -564,32 +333,6 @@ namespace InDetDD { * access to the local description (inline): */ const SiDetectorDesign& design() const; - - virtual const Trk::SurfaceBounds& bounds() const override final; - /** - * TrkDetElementBase interface (inline) - */ - virtual const Trk::SurfaceBounds& bounds(const Identifier&) const override final; - - /** - * Methods from design (inline) - * - * Width in phi direction. For the SCT endcap it returns the average width. - */ - double width() const; - /** - * Min width. Needed for the SCT endcap. - */ - double minWidth() const; - /** - * Max width. Needed for the SCT endcap. - */ - double maxWidth() const; - /** - * Length in eta direction (z - barrel, r - endcap) - */ - double length() const; - double thickness() const; /** * Pitch (inline methods) @@ -604,7 +347,7 @@ namespace InDetDD { * * All return pitch in distance units. */ - double etaPitch() const; + double phiPitch() const; /** * Useful for SCT Forward. @@ -637,67 +380,7 @@ namespace InDetDD { * Test if near bond gap within tolerances */ bool nearBondGap(const Amg::Vector2D& localPosition, double etaTol) const; - bool nearBondGap(const HepGeom::Point3D<double>& globalPosition, double etaTol) const; - - /** - * Test that it is in the active region - * - * Intersect has 3 states - * bool SiIntersect::in() const // definitely in\n - * bool SiIntersect::out() const // definitely out\n - * bool SiIntersect::nearBoundary() const // near a boundary within the tolerances\n - * bool SiIntersect::mayIntersect() const // in() OR nearBoundary() - */ - SiIntersect inDetector(const Amg::Vector2D& localPosition, double phiTol, double etaTol) const; - SiIntersect inDetector(const HepGeom::Point3D<double>& globalPosition, double phiTol, double etaTol) const; - //@} - - /** - * @name Readout cell id - * Cell id's are the strip number in SCT and phi_index,eta_index in the pixel - * as defined in the offline identifier. Their direction runs in the distPhi, distEta - * direction in the Reconstruction local frame. - * - * For methods taking a SiCellId (basically phi,eta index for pixel or strip for SCT) you - * can do the following fro example: - * - For pixel\n - * localPositionOfCell(SiCellId(phi_index,eta_index));\n - * - For SCT\n - * localPositionOfCell(SiCellId(strip));\n - */ - //@{ - - /** - * Full identifier of the cell for a given position: - * assumes a raw local position (no Lorentz shift) - */ - Identifier identifierOfPosition(const Amg::Vector2D& localPos) const; - /** - * As in previous method but returns SiCellId - */ - SiCellId cellIdOfPosition(const Amg::Vector2D& localPos) const; - - /** - * Returns position (center) of cell. - * These are the raw positions _NOT_ corrected for the Lorentz shift - */ - Amg::Vector2D rawLocalPositionOfCell(const SiCellId& cellId) const; - /** - * As above - */ - Amg::Vector2D rawLocalPositionOfCell(const Identifier& id) const; - - /** - * Test if readout cell has more than one diode associated with it. - * Number of cells sharing the same readout as this cell. - * ie generally 1 except for ganged pixels which will be 2. - */ - int numberOfConnectedCells(const SiCellId cellId) const; - /** - * Get the cell ids sharing the readout for this cell. - * number = 0 will return the primary readout cell id. - */ - SiCellId connectedCell(const SiCellId cellId, int number) const; + bool nearBondGap(const HepGeom::Point3D<double>& globalPosition, double etaTol) const; /** * If cell is ganged return the id of the other cell which shares the readout @@ -743,35 +426,6 @@ namespace InDetDD { */ void determineStereo() const; - /** - * Calculate extent in r,z and phi. The values are cached and there - * are rMin(), rMax etc methods. - * It is only used from updateCache - */ - void getExtent(double& rMin, double& rMax, - double& zMin, double& zMax, - double& phiMin, double& phiMax) const; - - /** - * Return the four corners of an element in local coordinates. - * Pass it an array of length 4. - * This function is used by getEtaPhiRegion() - */ - void getCorners(HepGeom::Point3D<double>* corners) const; - - /** - * Get eta and phi coresponding to a point in local coordinates. - * Requires as input the vertex spread. Returns etaMin, etaMax, and phi. - * This function is used by getEtaPhiRegion() - */ - void getEtaPhiPoint(const HepGeom::Point3D<double>& point, double deltaZ, - double& etaMin, double& etaMax, double& phi) const; - - /** - * Private recoToHitTransform Implementation method with no lock - */ - const HepGeom::Transform3D recoToHitTransformImpl() const; - /** * Private implementation method with no lock at center */ @@ -780,17 +434,6 @@ namespace InDetDD { * Private implementation method with no lock at given global position */ double sinStereoImpl(const HepGeom::Point3D<double>& globalPosition) const; - - /** - * Declaring the Message method for further use (inline) - */ - MsgStream& msg(MSG::Level lvl) const; - - /** - * Declaring the Method providing Verbosity Level (inline) - */ - bool msgLvl(MSG::Level lvl) const; - //@} /** * Protected data: @@ -801,14 +444,7 @@ namespace InDetDD { * @name Variables for cache validities */ //@{ - /** - * For alignment associated quatities. - */ - mutable std::atomic_bool m_cacheValid{false}; - /** - * For alignment independent quantities - */ - mutable std::atomic_bool m_firstTime{true}; + /** * Since m_isStereo depends on m_otherSide->sinStereo(), a dedicated validity variable is needed. */ @@ -820,47 +456,30 @@ namespace InDetDD { //@} /** - * @name Mutex guard to update mutable variables in const methods + * @name Variable set by surfaces ith m_surfacesValid of false + * Happens only once */ //@{ - mutable std::mutex m_mutex{}; + mutable std::vector<const Trk::Surface*> m_surfaces ATLAS_THREAD_SAFE {}; //@} /** - * @name Variables set by constructor + * @name Mutex guard to update mutable variables in const methods */ //@{ + mutable std::mutex m_mutex{}; + //@} /** - * identifier of this detector element - */ - Identifier m_id{}; - - /** - * local description of this detector element - */ - const SiDetectorDesign* m_design{nullptr}; - - const SiCommonItems* m_commonItems{nullptr}; - std::unique_ptr<Trk::Surface> m_surface; - const GeoAlignmentStore* m_geoAlignStore{}; - - /** - * Axes + * @name Variables set by constructor */ - SiDetectorDesign::Axis m_hitEta; - SiDetectorDesign::Axis m_hitPhi; - SiDetectorDesign::Axis m_hitDepth; - //@} + //@{ + const SiDetectorDesign* m_design; /** * @name Variables set by commonConstructor */ //@{ - /** - * hash id of this detector element - */ - IdentifierHash m_idHash{}; bool m_isPixel{false}; bool m_isDBM{false}; @@ -886,37 +505,6 @@ namespace InDetDD { * frames are in the same direction and false if they are opposite. */ //@{ - /** - * Direction of depth axis. - * Also direction of readout implant (n+ for pixel, p+ for SCT). - */ - mutable bool m_depthDirection ATLAS_THREAD_SAFE {true}; - mutable bool m_phiDirection ATLAS_THREAD_SAFE {true}; - mutable bool m_etaDirection ATLAS_THREAD_SAFE {true}; - //@} - - /** - * @name Variables set by updateCache - */ - //@{ - mutable Amg::Transform3D m_transform ATLAS_THREAD_SAFE; - mutable HepGeom::Transform3D m_transformCLHEP ATLAS_THREAD_SAFE; - - mutable Amg::Vector3D m_normal ATLAS_THREAD_SAFE; - mutable Amg::Vector3D m_etaAxis ATLAS_THREAD_SAFE; - mutable HepGeom::Vector3D<double> m_etaAxisCLHEP ATLAS_THREAD_SAFE; - mutable Amg::Vector3D m_phiAxis ATLAS_THREAD_SAFE; - mutable HepGeom::Vector3D<double> m_phiAxisCLHEP ATLAS_THREAD_SAFE; - mutable Amg::Vector3D m_center ATLAS_THREAD_SAFE; - mutable HepGeom::Vector3D<double> m_centerCLHEP ATLAS_THREAD_SAFE; - - mutable double m_minZ ATLAS_THREAD_SAFE {std::numeric_limits<double>::max()}; - mutable double m_maxZ ATLAS_THREAD_SAFE {std::numeric_limits<double>::lowest()}; - mutable double m_minR ATLAS_THREAD_SAFE {std::numeric_limits<double>::max()}; - mutable double m_maxR ATLAS_THREAD_SAFE {std::numeric_limits<double>::lowest()}; - mutable double m_minPhi ATLAS_THREAD_SAFE {std::numeric_limits<double>::max()}; - mutable double m_maxPhi ATLAS_THREAD_SAFE {std::numeric_limits<double>::lowest()}; - //@} /** * @name Variable set by determineStereo with m_stereoCacheValid of false @@ -926,14 +514,17 @@ namespace InDetDD { mutable bool m_isStereo ATLAS_THREAD_SAFE {false}; //@} + /** + * Declaring the Message method for further use (inline) + */ + MsgStream& msg(MSG::Level lvl) const; + /** - * @name Variable set by surfaces ith m_surfacesValid of false - * Happens only once + * Declaring the Method providing Verbosity Level (inline) */ - //@{ - mutable std::vector<const Trk::Surface*> m_surfaces ATLAS_THREAD_SAFE {}; + bool msgLvl(MSG::Level lvl) const; //@} - + }; } // namespace InDetDD diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorElement.icc b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorElement.icc index 40990960c5dd10953dc5342dc5a8897476e7a327..fbb6b0abf8f4ee73698130c8b8ac96454f8528e0 100644 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorElement.icc +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorElement.icc @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /** @@ -11,16 +11,6 @@ namespace InDetDD { /////////////////////////////////////////////////////////////////// // Inline methods: /////////////////////////////////////////////////////////////////// - - inline void SiDetectorElement::invalidate() - { - m_cacheValid = false; - } - - inline void SiDetectorElement::setCache() - { - updateCache(); - } inline void SiDetectorElement::setNextInEta(const SiDetectorElement* element) { @@ -71,244 +61,17 @@ namespace InDetDD { { return m_otherSide; } - - inline const SiCommonItems* SiDetectorElement::getCommonItems() const - { - return m_commonItems; - } - - inline Identifier SiDetectorElement::identify() const - { - return m_id; - } - - inline IdentifierHash SiDetectorElement::identifyHash() const - { - return m_idHash; - } - - inline const AtlasDetectorID* SiDetectorElement::getIdHelper() const - { - return m_commonItems->getIdHelper(); - } inline bool SiDetectorElement::isEndcap() const { return (!isBarrel() && !isDBM()); } - - inline const Trk::Surface& SiDetectorElement::surface(const Identifier&) const - { - return surface(); - } - - inline const Amg::Transform3D& SiDetectorElement::transform(const Identifier&) const - { - return transform(); - } - - inline double SiDetectorElement::hitDepthDirection() const - { - if (!m_cacheValid) { - std::lock_guard<std::mutex> lock(m_mutex); - if (!m_cacheValid) updateCache(); - } - - return (m_depthDirection) ? 1. : -1.; - } - - inline double SiDetectorElement::hitPhiDirection() const - { - if (!m_cacheValid) { - std::lock_guard<std::mutex> lock(m_mutex); - if (!m_cacheValid) updateCache(); - } - - return (m_phiDirection) ? 1. : -1.; - } - - inline double SiDetectorElement::hitEtaDirection() const - { - if (!m_cacheValid) { - std::lock_guard<std::mutex> lock(m_mutex); - if (!m_cacheValid) updateCache(); - } - - return (m_etaDirection) ? 1. : -1.; - } - - inline const Amg::Vector3D& SiDetectorElement::normal(const Identifier&) const - { - return normal(); - } - - inline const Amg::Vector3D& SiDetectorElement::center(const Identifier&) const - { - return center(); - } - - inline HepGeom::Point3D<double> SiDetectorElement::globalPositionHit(const HepGeom::Point3D<double>& simulationLocalPos) const - { - return Amg::EigenTransformToCLHEP(transformHit())*simulationLocalPos; - } - - inline Amg::Vector3D SiDetectorElement::globalPositionHit(const Amg::Vector3D& simulationLocalPos) const - { - return transformHit() * simulationLocalPos; - } - - inline HepGeom::Point3D<double> SiDetectorElement::globalPosition(const HepGeom::Point3D<double>& localPos) const - { - return transformCLHEP() * localPos; - } - - inline Amg::Vector3D SiDetectorElement::globalPosition(const Amg::Vector3D& localPos) const - { - return transform() * localPos; - } - - inline HepGeom::Point3D<double> SiDetectorElement::globalPositionCLHEP(const Amg::Vector2D& localPos) const - { - if (!m_cacheValid) { - std::lock_guard<std::mutex> lock(m_mutex); - if (!m_cacheValid) updateCache(); - } - - return m_centerCLHEP + localPos[Trk::distEta] * m_etaAxisCLHEP + localPos[Trk::distPhi] * m_phiAxisCLHEP; - } - - inline Amg::Vector3D SiDetectorElement::globalPosition(const Amg::Vector2D& localPos) const - { - if (!m_cacheValid) { - std::lock_guard<std::mutex> lock(m_mutex); - if (!m_cacheValid) updateCache(); - } - - return m_center + localPos[Trk::distEta] * m_etaAxis + localPos[Trk::distPhi] * m_phiAxis; - } - - inline Amg::Vector2D SiDetectorElement::localPosition(const HepGeom::Point3D<double>& globalPosition) const - { - if (!m_cacheValid) { - std::lock_guard<std::mutex> lock(m_mutex); - if (!m_cacheValid) updateCache(); - } - - HepGeom::Vector3D<double> relativePos = globalPosition - m_centerCLHEP; - return Amg::Vector2D(relativePos.dot(m_phiAxisCLHEP), relativePos.dot(m_etaAxisCLHEP)); - } - - inline Amg::Vector2D SiDetectorElement::localPosition(const Amg::Vector3D& globalPosition) const - { - if (!m_cacheValid) { - std::lock_guard<std::mutex> lock(m_mutex); - if (!m_cacheValid) updateCache(); - } - - Amg::Vector3D relativePos = globalPosition - m_center; - return Amg::Vector2D(relativePos.dot(m_phiAxis), relativePos.dot(m_etaAxis)); - } - - inline double SiDetectorElement::rMin() const - { - if (!m_cacheValid) { - std::lock_guard<std::mutex> lock(m_mutex); - if (!m_cacheValid) updateCache(); - } - - return m_minR; - } - - inline double SiDetectorElement::rMax() const - { - if (!m_cacheValid) { - std::lock_guard<std::mutex> lock(m_mutex); - if (!m_cacheValid) updateCache(); - } - - return m_maxR; - } - - inline double SiDetectorElement::zMin() const - { - if (!m_cacheValid) { - std::lock_guard<std::mutex> lock(m_mutex); - if (!m_cacheValid) updateCache(); - } - - return m_minZ; - } - - inline double SiDetectorElement::zMax() const - { - if (!m_cacheValid) { - std::lock_guard<std::mutex> lock(m_mutex); - if (!m_cacheValid) updateCache(); - } - - return m_maxZ; - } - - inline double SiDetectorElement::phiMin() const - { - if (!m_cacheValid) { - std::lock_guard<std::mutex> lock(m_mutex); - if (!m_cacheValid) updateCache(); - } - - return m_minPhi; - } - - inline double SiDetectorElement::phiMax() const - { - if (!m_cacheValid) { - std::lock_guard<std::mutex> lock(m_mutex); - if (!m_cacheValid) updateCache(); - } - - return m_maxPhi; - } inline const SiDetectorDesign& SiDetectorElement::design() const { return *m_design; } - inline const Trk::SurfaceBounds& SiDetectorElement::bounds(const Identifier&) const - { - return bounds(); - } - - inline double SiDetectorElement::width() const - { - return m_design->width(); - } - - inline double SiDetectorElement::minWidth() const - { - return m_design->minWidth(); - } - - inline double SiDetectorElement::maxWidth() const - { - return m_design->maxWidth(); - } - - inline double SiDetectorElement::length() const - { - return m_design->length(); - } - - inline double SiDetectorElement::thickness() const - { - return m_design->thickness(); - } - - inline double SiDetectorElement::etaPitch() const - { - return m_design->etaPitch(); - } - inline double SiDetectorElement::phiPitch() const { return m_design->phiPitch(); @@ -348,7 +111,7 @@ namespace InDetDD { inline SiCellId SiDetectorElement::gangedCell(const SiCellId& cellId) const { - return m_design->gangedCell(cellId); + return m_design->gangedCell(cellId); } inline MsgStream& SiDetectorElement::msg(MSG::Level lvl) const @@ -361,4 +124,6 @@ namespace InDetDD { return m_commonItems->msgLvl(lvl); } + + } // namespace InDetDD diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorManager.h b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorManager.h index 8978d64411f7c8a7cf7f5e7266d784aff23567e4..efddabc7ea3f9d6baf29a2cfbd78495cc58504f5 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorManager.h +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorManager.h @@ -14,7 +14,7 @@ #include "InDetReadoutGeometry/InDetDetectorManager.h" #include "InDetReadoutGeometry/SiDetectorElementCollection.h" -#include "InDetReadoutGeometry/InDetDD_Defs.h" +#include "ReadoutGeometryBase/InDetDD_Defs.h" #include "InDetReadoutGeometry/SiNumerology.h" // Amg stuff diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDetectorDesign.cxx b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDetectorDesign.cxx index 75f991c061a8c6fe88488c4bb1ee43bdc906103d..701523ccdf01e9d8c31df288003757bd4687190b 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDetectorDesign.cxx +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDetectorDesign.cxx @@ -13,7 +13,7 @@ /////////////////////////////////////////////////////////////////// #include "InDetReadoutGeometry/SiDetectorDesign.h" -#include "InDetReadoutGeometry/SiIntersect.h" +#include "ReadoutGeometryBase/SiIntersect.h" namespace InDetDD { // Constructor with parameters: @@ -23,15 +23,12 @@ SiDetectorDesign::SiDetectorDesign(double thickness, bool depthSymmetric, InDetDD::CarrierType carrierType, int readoutSide): - m_etaAxis(zAxis), - m_phiAxis(yAxis), - m_depthAxis(xAxis), - m_thickness(thickness), - m_carrierType(carrierType), - m_phiSymmetric(phiSymmetric), - m_etaSymmetric(etaSymmetric), - m_depthSymmetric(depthSymmetric), - m_readoutSidePosDepth(readoutSide > 0) { + DetectorDesign(thickness, + phiSymmetric, + etaSymmetric, + depthSymmetric, + carrierType, + readoutSide) { } // Constructor with axis parameters: @@ -43,83 +40,17 @@ SiDetectorDesign::SiDetectorDesign(double thickness, int readoutSide, Axis stripDirection, Axis thicknessDirection): - m_etaAxis(stripDirection), - m_depthAxis(thicknessDirection), - m_thickness(thickness), - m_carrierType(carrierType), - m_phiSymmetric(phiSymmetric), - m_etaSymmetric(etaSymmetric), - m_depthSymmetric(depthSymmetric), - m_readoutSidePosDepth(readoutSide > 0) { - if (stripDirection == thicknessDirection) { - throw std::runtime_error( - "ERROR: SiDetectorDesign called with phi and thickness directions equal"); - } - // phiAxis is "the other one" - m_phiAxis = static_cast<Axis> ((xAxis + yAxis + zAxis) - (stripDirection + thicknessDirection)); + DetectorDesign(thickness, + phiSymmetric, + etaSymmetric, + depthSymmetric, + carrierType, + readoutSide, + stripDirection, + thicknessDirection){ } - // Destructor: SiDetectorDesign::~SiDetectorDesign() { } -SiIntersect SiDetectorDesign::inDetector(const SiLocalPosition &localPosition, - double phiTol, double etaTol) const { - double etaDist = 0; - double phiDist = 0; - - distanceToDetectorEdge(localPosition, etaDist, phiDist); - - SiIntersect state; - - if (phiDist < -phiTol || etaDist < -etaTol) { - state.setOut(); - return state; - } - - if (phiDist > phiTol && etaDist > etaTol) { - state.setIn(); - return state; - } - - // Near boundary. - state.setNearBoundary(); - return state; -} - -void SiDetectorDesign::setSymmetry(bool phiSymmetric, bool etaSymmetric, - bool depthSymmetric) { - // Flags can be changed from true to false but not false to true. - if (m_phiSymmetric) { - m_phiSymmetric = phiSymmetric; - } - else if (phiSymmetric) { - std::cout << - "SiDetectorDesign: WARNING! Attempt to allow swapping of xPhi axis direction ignored." - << std::endl; - } - - if (m_etaSymmetric) { - m_etaSymmetric = etaSymmetric; - } - else if (etaSymmetric) { - std::cout << - "SiDetectorDesign: WARNING! Attempt to allow swapping of xEta axis direction ignored." - << std::endl; - } - - if (m_depthSymmetric) { - m_depthSymmetric = depthSymmetric; - } - else if (depthSymmetric) { - std::cout << - "SiDetectorDesign: WARNING! Attempt to allow swapping of xDepth axis direction ignored." - << std::endl; - } -} - -DetectorShape SiDetectorDesign::shape() const { - // Default is Box. - return InDetDD::Box; -} } // namespace InDetDD diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDetectorElement.cxx b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDetectorElement.cxx index 2df1dec48750210329d8f2d4061fcd8aa5c72585..401fdfdeff0722b45c6d60823e7726bf0d510efd 100644 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDetectorElement.cxx +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDetectorElement.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /** @@ -17,7 +17,7 @@ #include "GeoModelUtilities/GeoAlignmentStore.h" #include "InDetIdentifier/PixelID.h" #include "InDetIdentifier/SCT_ID.h" -#include "InDetReadoutGeometry/SiReadoutCellId.h" +#include "ReadoutGeometryBase/SiReadoutCellId.h" #include "TrkSurfaces/PlaneSurface.h" #include "TrkSurfaces/SurfaceBounds.h" @@ -39,17 +39,9 @@ namespace InDetDD { const GeoVFullPhysVol* geophysvol, const SiCommonItems* commonItems, const GeoAlignmentStore* geoAlignStore) : - TrkDetElementBase(geophysvol), - m_id(id), - m_design(design), - m_commonItems(commonItems), - m_surface(), - m_geoAlignStore(geoAlignStore) + SolidStateDetectorElementBase(id,design,geophysvol,commonItems,geoAlignStore), + m_design(design) { - m_hitEta = m_design->etaAxis(); - m_hitPhi = m_design->phiAxis(); - m_hitDepth = m_design->depthAxis(); - commonConstructor(); } @@ -165,18 +157,6 @@ namespace InDetDD { return cellId; } - Trk::Surface& - SiDetectorElement::surface() - { - return *m_surface; - } - - const Trk::Surface& - SiDetectorElement::surface() const - { - return *m_surface; - } - const std::vector<const Trk::Surface*>& SiDetectorElement::surfaces() const { @@ -196,69 +176,7 @@ namespace InDetDD { // return the surfaces return m_surfaces; } - - const GeoTrf::Transform3D& - SiDetectorElement::transformHit() const - { - if (m_geoAlignStore) { - const GeoTrf::Transform3D* ptrXf = m_geoAlignStore->getAbsPosition(getMaterialGeom()); - if (ptrXf) return *ptrXf; - } - return getMaterialGeom()->getAbsoluteTransform(); - } - - const HepGeom::Transform3D& - SiDetectorElement::transformCLHEP() const - { - //stuff to get the CLHEP version of the local to global transform. - if (!m_cacheValid) { - std::lock_guard<std::mutex> lock(m_mutex); - if (!m_cacheValid) updateCache(); - } - - return m_transformCLHEP; - } - - const Amg::Transform3D& - SiDetectorElement::transform() const - { - if (!m_cacheValid) { - std::lock_guard<std::mutex> lock(m_mutex); - if (!m_cacheValid) updateCache(); - } - - return m_transform; - } - - const HepGeom::Transform3D - SiDetectorElement::defTransformCLHEP() const - { - if (m_geoAlignStore) { - const GeoTrf::Transform3D* ptrXf = m_geoAlignStore->getDefAbsPosition(getMaterialGeom()); - if (ptrXf) return Amg::EigenTransformToCLHEP(*ptrXf) * recoToHitTransform(); - } - return Amg::EigenTransformToCLHEP(getMaterialGeom()->getDefAbsoluteTransform()) * recoToHitTransform(); - } - - const Amg::Transform3D - SiDetectorElement::defTransform() const - { - HepGeom::Transform3D tmpTransform = defTransformCLHEP(); - return Amg::CLHEPTransformToEigen(tmpTransform); - } - - const HepGeom::Transform3D - SiDetectorElement::recoToHitTransform() const - { - // Determine the reconstruction local (LocalPosition) to global transform. - if (m_firstTime) { - std::lock_guard<std::mutex> lock(m_mutex); - if (m_firstTime) updateCache(); - } - - return recoToHitTransformImpl(); - } - + const Amg::Transform3D& SiDetectorElement::moduleTransform() const { @@ -308,103 +226,6 @@ namespace InDetDD { return !isStereo(); } - const HepGeom::Vector3D<double>& - SiDetectorElement::phiAxisCLHEP() const - { - if (!m_cacheValid) { - std::lock_guard<std::mutex> lock(m_mutex); - if (!m_cacheValid) updateCache(); - } - - return m_phiAxisCLHEP; - } - - const Amg::Vector3D& - SiDetectorElement::phiAxis() const - { - if (!m_cacheValid) { - std::lock_guard<std::mutex> lock(m_mutex); - if (!m_cacheValid) updateCache(); - } - - return m_phiAxis; - } - - const HepGeom::Vector3D<double>& - SiDetectorElement::etaAxisCLHEP() const - { - if (!m_cacheValid) { - std::lock_guard<std::mutex> lock(m_mutex); - if (!m_cacheValid) updateCache(); - } - - return m_etaAxisCLHEP; - } - - const Amg::Vector3D& - SiDetectorElement::etaAxis() const - { - if (!m_cacheValid) { - std::lock_guard<std::mutex> lock(m_mutex); - if (!m_cacheValid) updateCache(); - } - - return m_etaAxis; - } - - const Amg::Vector3D& - SiDetectorElement::normal() const - { - if (!m_cacheValid) { - std::lock_guard<std::mutex> lock(m_mutex); - if (!m_cacheValid) updateCache(); - } - - return m_normal; - } - - const Amg::Vector3D& - SiDetectorElement::center() const - { - if (!m_cacheValid) { - std::lock_guard<std::mutex> lock(m_mutex); - if (!m_cacheValid) updateCache(); - } - - return m_center; - } - - Amg::Vector2D - SiDetectorElement::hitLocalToLocal(double xEta, double xPhi) const // Will change order to phi, eta - { - if (!m_cacheValid) { - std::lock_guard<std::mutex> lock(m_mutex); - if (!m_cacheValid) updateCache(); - } - - if (!m_etaDirection) xEta = -xEta; - if (!m_phiDirection) xPhi = -xPhi; - return Amg::Vector2D(xPhi, xEta); - } - - HepGeom::Point3D<double> - SiDetectorElement::hitLocalToLocal3D(const HepGeom::Point3D<double>& hitPosition) const - { - // Equiv to transform().inverse * transformHit() * hitPosition - if (!m_cacheValid) { - std::lock_guard<std::mutex> lock(m_mutex); - if (!m_cacheValid) updateCache(); - } - - double xDepth = hitPosition[m_hitDepth]; - double xPhi = hitPosition[m_hitPhi]; - double xEta = hitPosition[m_hitEta]; - if (!m_depthDirection) xDepth = -xDepth; - if (!m_phiDirection) xPhi = -xPhi; - if (!m_etaDirection) xEta = -xEta; - return HepGeom::Point3D<double>(xPhi, xEta, xDepth); - } - // compute sin(tilt angle) at center: double SiDetectorElement::sinTilt() const @@ -529,159 +350,41 @@ namespace InDetDD { return m_isStereo; } - // Get eta/phi extent. Returns min/max eta and phi and r (for barrel) - // or z (for endcap) Takes as input the vertex spread in z (+-deltaZ). - // Gets 4 corners of the sensor and calculates eta phi for each corner - // for both +/- vertex spread. The returned phi is between -M_PI and M_PI - // with the direction minPhi to maxPhi always in the positive sense, - // so if the element extends across the -180/180 boundary then minPhi will - // be greater than maxPhi. - void - SiDetectorElement::getEtaPhiRegion(double deltaZ, double& etaMin, double& etaMax, double& phiMin, - double& phiMax, double& rz) const + double SiDetectorElement::get_rz() const { - if (!m_cacheValid) { - std::lock_guard<std::mutex> lock(m_mutex); - if (!m_cacheValid) updateCache(); - } - - HepGeom::Point3D<double> corners[4]; - getCorners(corners); - - bool first = true; - - double phiOffset = 0.; - - for (int i = 0; i < 4; i++) { - double etaMinPoint = 0.; - double etaMaxPoint = 0.; - double phiPoint = 0.; - - // Get the eta phi value for this corner. - getEtaPhiPoint(corners[i], deltaZ, etaMinPoint, etaMaxPoint, phiPoint); - - if (first) { // Use the first point to initialize the min/max values. - - // Put phi in a range so that we are not near -180/+180 division. - // Do this by adding an offset if phi > 90 CLHEP::deg or < -90 CLHEP::deg. - // This offset is later removed. - if (phiPoint < -0.5 * M_PI) { - phiOffset = -0.5 * M_PI; - } else if (phiPoint > 0.5 * M_PI) { - phiOffset = 0.5 * M_PI; - } - phiMin = phiMax = phiPoint - phiOffset; - etaMin = etaMinPoint; - etaMax = etaMaxPoint; - } else { - phiPoint -= phiOffset; - // put phi back in -M_PI < phi < +M_PI range - if (phiPoint < -M_PI) phiPoint += 2. * M_PI; - if (phiPoint > M_PI) phiPoint -= 2. * M_PI; - phiMin = std::min(phiMin, phiPoint); - phiMax = std::max(phiMax, phiPoint); - etaMin = std::min(etaMin, etaMinPoint); - etaMax = std::max(etaMax, etaMaxPoint); - } - first = false; - } - - // put phi back in -M_PI < phi < +M_PI range - phiMin += phiOffset; - phiMax += phiOffset; - if (phiMin < -M_PI) phiMin += 2. * M_PI; - if (phiMin > M_PI) phiMin -= 2. * M_PI; - if (phiMax < -M_PI) phiMax += 2. * M_PI; - if (phiMax > M_PI) phiMax -= 2. * M_PI; - // Calculate rz = r (barrel) or z (endcap) // Use center of sensor ((0,0,0) in local coordinates) for determining this. // HepGeom::Point3D<double> globalCenter = globalPosition(HepGeom::Point3D<double>(0,0,0)); if (isBarrel()) { - rz = center().perp(); // r + return center().perp(); // r } else { - rz = center().z(); // z + return center().z(); // z } - - } - - const Trk::SurfaceBounds& - SiDetectorElement::bounds() const - { - return m_design->bounds(); } + bool SiDetectorElement::nearBondGap(const Amg::Vector2D& localPosition, double etaTol) const { - return m_design->nearBondGap(localPosition, etaTol); + //again, can we avoid casting here? + return static_cast<const SiDetectorDesign *>(m_design)->nearBondGap(localPosition, etaTol); } bool SiDetectorElement::nearBondGap(const HepGeom::Point3D<double>& globalPosition, double etaTol) const { - return m_design->nearBondGap(localPosition(globalPosition), etaTol); + return static_cast<const SiDetectorDesign *>(m_design)->nearBondGap(localPosition(globalPosition), etaTol); } - SiIntersect - SiDetectorElement::inDetector(const Amg::Vector2D& localPosition, - double phiTol, double etaTol) const - { - return m_design->inDetector(localPosition, phiTol, etaTol); - } - - SiIntersect - SiDetectorElement::inDetector(const HepGeom::Point3D<double>& globalPosition, double phiTol, double etaTol) const - { - return m_design->inDetector(localPosition(globalPosition), phiTol, etaTol); - } - Identifier - SiDetectorElement::identifierOfPosition(const Amg::Vector2D& localPosition) const - { - SiCellId cellId = m_design->cellIdOfPosition(localPosition); - return identifierFromCellId(cellId); - } - - SiCellId - SiDetectorElement::cellIdOfPosition(const Amg::Vector2D& localPosition) const - { - return m_design->cellIdOfPosition(localPosition); - } - - Amg::Vector2D - SiDetectorElement::rawLocalPositionOfCell(const SiCellId& cellId) const - { - return m_design->localPositionOfCell(cellId); - } - - Amg::Vector2D - SiDetectorElement::rawLocalPositionOfCell(const Identifier& id) const - { - SiCellId cellId = cellIdFromIdentifier(id); - return m_design->localPositionOfCell(cellId); - } - - int - SiDetectorElement::numberOfConnectedCells(const SiCellId cellId) const - { - SiReadoutCellId readoutId = m_design->readoutIdOfCell(cellId); - return m_design->numberOfConnectedCells(readoutId); - } - - SiCellId - SiDetectorElement::connectedCell(const SiCellId cellId, int number) const - { - SiReadoutCellId readoutId = m_design->readoutIdOfCell(cellId); - return m_design->connectedCell(readoutId, number); - } // Special method for SCT to retrieve the two ends of a "strip" std::pair<Amg::Vector3D,Amg::Vector3D> SiDetectorElement::endsOfStrip(const Amg::Vector2D& position) const { + //again with the casting... const std::pair<Amg::Vector2D,Amg::Vector2D> localEnds= - m_design->endsOfStrip(position); + static_cast<const SiDetectorDesign *>(m_design)->endsOfStrip(position); return std::pair<Amg::Vector3D,Amg::Vector3D >(globalPosition(localEnds.first), globalPosition(localEnds.second)); } @@ -721,6 +424,7 @@ namespace InDetDD { // Set surface m_surface = std::make_unique<Trk::PlaneSurface>(*this); + } // update cache @@ -734,181 +438,18 @@ namespace InDetDD { void SiDetectorElement::updateCache() const { - const GeoTrf::Transform3D& geoTransform = transformHit(); - double radialShift = 0.; - /* - Deprecated method for specialized ITk DetElement with different global frame - to be replaced! - const InDetDD::StripStereoAnnulusDesign* testDesign = dynamic_cast<const InDetDD::StripStereoAnnulusDesign*>(m_design); - if (testDesign) radialShift = testDesign->localModuleCentreRadius(); - */ - - HepGeom::Point3D<double> centerGeoModel(radialShift, 0., 0.); - m_centerCLHEP = Amg::EigenTransformToCLHEP(geoTransform) * centerGeoModel; - m_center = Amg::Vector3D(m_centerCLHEP[0], m_centerCLHEP[1], m_centerCLHEP[2]); + SolidStateDetectorElementBase::updateCache(); - // - // Determine directions depth, eta and phi axis in reconstruction local frame - // ie depth away from interaction point - // phi in direction of increasing phi - // eta in direction of increasing z in barrel, and increasing r in endcap - // + //Similar to 21.9, but ... Do we actually need this? If not, we could just rely on the base-class implementation? - // depthAxis, phiAxis, and etaAxis are defined to be x,y,z respectively for all detectors for hit local frame. - // depthAxis, phiAxis, and etaAxis are defined to be z,x,y respectively for all detectors for reco local frame. - static const HepGeom::Vector3D<double> localAxes[3] = { - HepGeom::Vector3D<double>(1., 0., 0.), - HepGeom::Vector3D<double>(0., 1., 0.), - HepGeom::Vector3D<double>(0., 0., 1.) - }; - - static const HepGeom::Vector3D<double>& localRecoPhiAxis = localAxes[distPhi]; // Defined to be same as x axis - static const HepGeom::Vector3D<double>& localRecoEtaAxis = localAxes[distEta]; // Defined to be same as y axis - static const HepGeom::Vector3D<double>& localRecoDepthAxis = localAxes[distDepth]; // Defined to be same as z axis - - // We only need to calculate the rough orientation once. - // For it to change would require extreme unrealistic misalignment changes. - if (m_firstTime) { - // Determine the unit vectors in global frame - - const HepGeom::Vector3D<double>& geoModelPhiAxis = localAxes[m_hitPhi]; - const HepGeom::Vector3D<double>& geoModelEtaAxis = localAxes[m_hitEta]; - const HepGeom::Vector3D<double>& geoModelDepthAxis = localAxes[m_hitDepth]; - - HepGeom::Vector3D<double> globalDepthAxis(Amg::EigenTransformToCLHEP(geoTransform) * geoModelDepthAxis); - HepGeom::Vector3D<double> globalPhiAxis(Amg::EigenTransformToCLHEP(geoTransform) * geoModelPhiAxis); - HepGeom::Vector3D<double> globalEtaAxis(Amg::EigenTransformToCLHEP(geoTransform) * geoModelEtaAxis); - - // unit radial vector - HepGeom::Vector3D<double> unitR(m_center.x(), m_center.y(), 0.); - unitR.setMag(1.); - - HepGeom::Vector3D<double> nominalEta; - HepGeom::Vector3D<double> nominalNormal; - HepGeom::Vector3D<double> nominalPhi(-unitR.y(), unitR.x(), 0.); - - // In Barrel like geometry, the etaAxis is along increasing z, and normal is in increasing radial direction. - // In Endcap like geometry, the etaAxis is along increasing r, and normal is in decreasing z direction, - // We base whether it is barrel like or endcap like by the orientation of the local z axis of the - // the element. This allows the use of endcap identifiers in a TB setup. A warning message is issued however if - // the orientation and identifier are not consistent (ie a barrel like orientation with an endcap identifier). - - bool barrelLike = true; - nominalEta.setZ(1.); - if (std::abs(globalEtaAxis.dot(nominalEta)) < 0.5) { // Check that it is in roughly the right direction. - barrelLike = false; - } - - if (isBarrel() && !barrelLike) { + if (isBarrel() && !m_barrelLike) { ATH_MSG_WARNING("Element has endcap like orientation with barrel identifier."); - } else if (!isBarrel() && barrelLike) { + } else if (!isBarrel() && m_barrelLike) { ATH_MSG_WARNING("Element has barrel like orientation with endcap identifier."); } - if (barrelLike) { - nominalEta.setZ(1.); - nominalNormal = unitR; - } else { // endcap like - nominalNormal.setZ(-1.); - nominalEta = unitR; - } - - // Determine if axes are to have there directions swapped. - - // - // Depth axis. - // - double depthDir = globalDepthAxis.dot(nominalNormal); - m_depthDirection = true; - if (depthDir < 0.) { - if (m_design->depthSymmetric()) { - m_depthDirection = false; - } else { - ATH_MSG_WARNING("Unable to swap local depth axis."); - } - } - if (std::abs(depthDir) < 0.5) { // Check that it is in roughly the right direction. - ATH_MSG_ERROR("Orientation of local depth axis does not follow correct convention."); - // throw std::runtime_error("Orientation of local depth axis does not follow correct convention."); - m_depthDirection = true; // Don't swap. - } - - // - // Phi axis - // - double phiDir = globalPhiAxis.dot(nominalPhi); - m_phiDirection = true; - if (phiDir < 0.) { - if (m_design->phiSymmetric()) { - m_phiDirection = false; - } else { - ATH_MSG_WARNING("Unable to swap local xPhi axis."); - } - } - - if (std::abs(phiDir) < 0.5) { // Check that it is in roughly the right direction. - ATH_MSG_ERROR("Orientation of local xPhi axis does not follow correct convention."); - // throw std::runtime_error("Orientation of local xPhi axis does not follow correct convention."); - m_phiDirection = true; // Don't swap. - } - - // - // Eta axis - // - double etaDir = globalEtaAxis.dot(nominalEta); - m_etaDirection = true; - if (etaDir < 0.) { - if (m_design->etaSymmetric()) { - m_etaDirection = false; - } else { - ATH_MSG_DEBUG("Unable to swap local xEta axis."); - } - } - if (std::abs(etaDir) < 0.5) { // Check that it is in roughly the right direction. - ATH_MSG_ERROR("Orientation of local xEta axis does not follow correct convention."); - // throw std::runtime_error("Orientation of local xEta axis does not follow correct convention."); - m_etaDirection = true; // Don't swap - } - - } // end if (m_firstTime) - - m_transformCLHEP = Amg::EigenTransformToCLHEP(geoTransform) * recoToHitTransformImpl(); - m_transform = Amg::CLHEPTransformToEigen(m_transformCLHEP); - - // Check that local frame is right-handed. (ie transform has no reflection) - // This can be done by checking that the determinant is >0. - if (m_firstTime) { // Only need to check this once. - HepGeom::Transform3D& t = m_transformCLHEP; - double det = t(0,0) * (t(1,1)*t(2,2) - t(1,2)*t(2,1)) - - t(0,1) * (t(1,0)*t(2,2) - t(1,2)*t(2,0)) + - t(0,2) * (t(1,0)*t(2,1) - t(1,1)*t(2,0)); - if (det < 0.) { - if (m_design->depthSymmetric()) { - ATH_MSG_DEBUG("Local frame is left-handed, Swapping depth axis to make it right handed."); - m_depthDirection = !m_depthDirection; - m_transformCLHEP = Amg::EigenTransformToCLHEP(geoTransform) * recoToHitTransformImpl(); - m_transform = Amg::CLHEPTransformToEigen(m_transformCLHEP); - } else { - ATH_MSG_WARNING("Local frame is left-handed."); - } - } - } - - // Initialize various cached members - // The unit vectors - HepGeom::Vector3D<double> normalCLHEP = m_transformCLHEP * localRecoDepthAxis; - m_normal = Amg::Vector3D(normalCLHEP[0], normalCLHEP[1], normalCLHEP[2]); - - m_phiAxisCLHEP = m_transformCLHEP * localRecoPhiAxis; - m_etaAxisCLHEP = m_transformCLHEP * localRecoEtaAxis; - - m_phiAxis = Amg::Vector3D(m_phiAxisCLHEP[0], m_phiAxisCLHEP[1], m_phiAxisCLHEP[2]); - m_etaAxis = Amg::Vector3D(m_etaAxisCLHEP[0], m_etaAxisCLHEP[1], m_etaAxisCLHEP[2]); - - getExtent(m_minR, m_maxR, m_minZ, m_maxZ, m_minPhi, m_maxPhi); - - //Install the cache at the end m_cacheValid.store(true); if (m_firstTime) m_firstTime.store(false); } @@ -940,176 +481,7 @@ namespace InDetDD { m_stereoCacheValid.store(true); } - - // Get min/max or r, z,and phi - // helper method only to be used for the cache construction - // i.e inside updateCache - void - SiDetectorElement::getExtent(double& rMin, double& rMax, - double& zMin, double& zMax, - double& phiMin, double& phiMax) const - { - - double radialShift = 0.; - /* - Deprecated method for specialized ITk DetElement with different global frame - to be replaced! - const InDetDD::StripStereoAnnulusDesign* testDesign = dynamic_cast<const InDetDD::StripStereoAnnulusDesign*>(m_design); - if (testDesign) radialShift = testDesign->localModuleCentreRadius();//additional radial shift for sensors centred on beamline - */ - - HepGeom::Point3D<double> corners[4]; - getCorners(corners); - - bool first = true; - - double phiOffset = 0.; - - - const HepGeom::Transform3D rShift = HepGeom::TranslateX3D(radialShift);//in local frame, radius is x - - for (int i = 0; i < 4; i++) { - - //if (testDesign) corners[i].transform(rShift); see comment re ITk... - - // m_tranform is already there as part of the cache construction - // This method seems to be used only as a helper for updateCache - HepGeom::Point3D<double> globalPoint = m_transformCLHEP * corners[i]; - - double rPoint = globalPoint.perp(); - double zPoint = globalPoint.z(); - double phiPoint = globalPoint.phi(); - - // Use first point to initializa min/max values. - if (first) { - - // Put phi in a range so that we are not near -180/+180 division. - // Do this by adding an offset if phi > 90 CLHEP::deg or < -90 CLHEP::deg. - // This offset is later removed. - if (phiPoint < -0.5 * M_PI) { - phiOffset = -0.5 * M_PI; - } else if (phiPoint > 0.5 * M_PI) { - phiOffset = 0.5 * M_PI; - } - phiMin = phiMax = phiPoint - phiOffset; - rMin = rMax = rPoint; - zMin = zMax = zPoint; - - } else { - phiPoint -= phiOffset; - // put phi back in -M_PI < phi < +M_PI range - if (phiPoint < -M_PI) phiPoint += 2. * M_PI; - if (phiPoint > M_PI) phiPoint -= 2. * M_PI; - phiMin = std::min(phiMin, phiPoint); - phiMax = std::max(phiMax, phiPoint); - rMin = std::min(rMin, rPoint); - rMax = std::max(rMax, rPoint); - zMin = std::min(zMin, zPoint); - zMax = std::max(zMax, zPoint); - } - first = false; - } - - // put phi back in -M_PI < phi < +M_PI range - phiMin += phiOffset; - phiMax += phiOffset; - if (phiMin < -M_PI) phiMin += 2. * M_PI; - if (phiMin > M_PI) phiMin -= 2. * M_PI; - if (phiMax < -M_PI) phiMax += 2. * M_PI; - if (phiMax > M_PI) phiMax -= 2. * M_PI; - - } - - void - SiDetectorElement::getCorners(HepGeom::Point3D<double>* corners) const - { - // This makes the assumption that the forward SCT detectors are orientated such that - // the positive etaAxis corresponds to the top of the detector where the width is largest. - // This is currently always the case. - // For the SCT barrel and pixel detectors minWidth and maxWidth are the same and so should - // work for all orientations. - - double tmpMinWidth = minWidth(); - double tmpMaxWidth = maxWidth(); - double tmpLength = length(); - // Lower left - corners[0][distPhi] = -0.5 * tmpMinWidth; - corners[0][distEta] = -0.5 * tmpLength; - corners[0][distDepth] = 0.; - - // Lower right - corners[1][distPhi] = 0.5 * tmpMinWidth; - corners[1][distEta] = -0.5 * tmpLength; - corners[1][distDepth] = 0.; - - // Upper Right - corners[2][distPhi] = 0.5 * tmpMaxWidth; - corners[2][distEta] = 0.5 * tmpLength; - corners[2][distDepth] = 0.; - - // Upper left - corners[3][distPhi] = -0.5 * tmpMaxWidth; - corners[3][distEta] = 0.5 * tmpLength; - corners[3][distDepth] = 0.; - } - - // Gets eta phi for a point given in local coordinates. deltaZ is specified to - // account for the vertex spread. phi is independent of this vertex - // spread. etaMax will correspond to zMin (-deltaZ) and etaMin will - // correspond to zMax (+deltaZ). - void - SiDetectorElement::getEtaPhiPoint(const HepGeom::Point3D<double>& point, double deltaZ, - double& etaMin, double& etaMax, double& phi) const - { - // Get the point in global coordinates. - HepGeom::Point3D<double> globalPoint = globalPosition(point); - - double r = globalPoint.perp(); - double z = globalPoint.z(); - - double thetaMin = std::atan2(r,(z + deltaZ)); - etaMax = -std::log(tan(0.5 * thetaMin)); - double thetaMax = std::atan2(r,(z - deltaZ)); - etaMin = -std::log(tan(0.5 * thetaMax)); - - phi = globalPoint.phi(); - } - - const HepGeom::Transform3D - SiDetectorElement::recoToHitTransformImpl() const - { - // = transfromHit * hitLocal - // = transformHit * recoToHitTransform * recoLocal - // recoToHitTransform takes recoLocal to hitLocal - // x,y,z -> y,z,x - // equiv to a rotation around Y of 90 deg followed by a rotation around X of 90deg - // - // recoToHit is static as it needs to be calculated once only. - // We use the HepGeom::Transform3D constructor which takes one coordinates system to another where the - // coordinate system is defined by it center and two axes. - // distPhi, distEta are the reco local axes and hitPhi and hitEta are the hit local axes. - // It assume phi, eta, depth makes a right handed system which is the case. - static const HepGeom::Vector3D<double> localAxes[3] = { - HepGeom::Vector3D<double>(1., 0., 0.), - HepGeom::Vector3D<double>(0., 1., 0.), - HepGeom::Vector3D<double>(0., 0., 1.) - }; - - const HepGeom::Transform3D recoToHit(HepGeom::Point3D<double>(0., 0., 0.), - localAxes[distPhi], - localAxes[distEta], - HepGeom::Point3D<double>(0., 0., 0.), - localAxes[m_hitPhi], - localAxes[m_hitEta]); - - // Swap direction of axis as appropriate - CLHEP::Hep3Vector scale(1., 1., 1.); - if (!m_phiDirection) scale[distPhi] = -1.; - if (!m_etaDirection) scale[distEta] = -1.; - if (!m_depthDirection) scale[distDepth] = -1.; - return recoToHit * HepGeom::Scale3D(scale[0], scale[1], scale[2]); - } - double SiDetectorElement::sinStereoImpl() const { @@ -1175,4 +547,6 @@ namespace InDetDD { return sinStereo; } + + } // namespace InDetDD diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDetectorManager.cxx b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDetectorManager.cxx index c9615b82e5749e468c45b8a2dc3134f1b9120078..195f4580bcc3d8d06fb404ea0e8008af9e6ac593 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDetectorManager.cxx +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDetectorManager.cxx @@ -14,7 +14,7 @@ #include "GeoGenericFunctions/Variable.h" #include "GeoModelKernel/GeoAlignableTransform.h" #include "DetDescrConditions/AlignableTransformContainer.h" -#include "InDetReadoutGeometry/SiCommonItems.h" +#include "ReadoutGeometryBase/SiCommonItems.h" #include "InDetReadoutGeometry/SiDetectorElementCollection.h" #include "InDetReadoutGeometry/SiDetectorElement.h" #include "InDetReadoutGeometry/ExtendedAlignableTransform.h" diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/CMakeLists.txt b/InnerDetector/InDetDetDescr/PixelGeoModel/CMakeLists.txt index 21ab313db3c7823481fc3482a6e7bbb6699cf4ea..037568acbe3c140e740ae9c53d4ae3004e463db0 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/CMakeLists.txt +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/CMakeLists.txt @@ -11,7 +11,7 @@ atlas_add_library( PixelGeoModelLib PixelGeoModel/*.h src/*.cxx PUBLIC_HEADERS PixelGeoModel LINK_LIBRARIES AthenaBaseComps GaudiKernel GeoModelUtilities GeometryDBSvcLib InDetGeoModelUtils - PRIVATE_LINK_LIBRARIES ${GEOMODELCORE_LIBRARIES} AthenaKernel CxxUtils DetDescrConditions GeoModelInterfaces GeoPrimitives Identifier InDetIdentifier InDetReadoutGeometry PixelReadoutGeometry RDBAccessSvcLib SGTools StoreGateLib + PRIVATE_LINK_LIBRARIES ${GEOMODELCORE_LIBRARIES} AthenaKernel CxxUtils DetDescrConditions GeoModelInterfaces GeoPrimitives Identifier InDetIdentifier InDetReadoutGeometry PixelReadoutGeometry ReadoutGeometryBase RDBAccessSvcLib SGTools StoreGateLib PRIVATE_DEFINITIONS "-DGEOTORUS=1" ) atlas_add_component( PixelGeoModel diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/DBM_Module.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/DBM_Module.cxx index db84a8c365904ddc24911892e8fb8e564b94de66..701c5e29b6a93c5158dbd9535692bfaf56a7e968 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/DBM_Module.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/DBM_Module.cxx @@ -17,7 +17,7 @@ #include "InDetReadoutGeometry/SiDetectorElement.h" #include "PixelReadoutGeometry/PixelModuleDesign.h" -#include "PixelReadoutGeometry/PixelDiodeMatrix.h" +#include "ReadoutGeometryBase/PixelDiodeMatrix.h" using namespace InDetDD; DBM_Module::DBM_Module(InDetDD::PixelDetectorManager* ddmgr, diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelSiCrystal.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelSiCrystal.cxx index 7f7859f3656337c47a86e073acda0422cd26a187..4e314b60dd9ad77d5043cf1ab5831de2ee477673 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelSiCrystal.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelSiCrystal.cxx @@ -23,9 +23,9 @@ #include "InDetReadoutGeometry/SiDetectorElement.h" #include "PixelReadoutGeometry/PixelModuleDesign.h" -#include "PixelReadoutGeometry/PixelDiodeMatrix.h" -#include "InDetReadoutGeometry/SiCommonItems.h" -#include "InDetReadoutGeometry/InDetDD_Defs.h" +#include "ReadoutGeometryBase/PixelDiodeMatrix.h" +#include "ReadoutGeometryBase/SiCommonItems.h" +#include "ReadoutGeometryBase/InDetDD_Defs.h" #include <algorithm> //for std::min, std::max #include <vector> diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorDC1DC2.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorDC1DC2.cxx index a31b9faff3e8cdec2d75671c8e28a8e81e0981d0..fa5e3b08d5e5cbfde061d8d79e3379718f487475 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorDC1DC2.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorDC1DC2.cxx @@ -8,11 +8,11 @@ #include "PixelDetectorDC1DC2.h" -#include "InDetReadoutGeometry/InDetDD_Defs.h" +#include "ReadoutGeometryBase/InDetDD_Defs.h" #include "PixelReadoutGeometry/PixelDetectorManager.h" -#include "PixelReadoutGeometry/PixelDiodeMatrix.h" +#include "ReadoutGeometryBase/PixelDiodeMatrix.h" #include "PixelReadoutGeometry/PixelModuleDesign.h" -#include "InDetReadoutGeometry/SiCommonItems.h" +#include "ReadoutGeometryBase/SiCommonItems.h" #include "InDetReadoutGeometry/SiDetectorElement.h" #include "InDetIdentifier/PixelID.h" diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorFactory.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorFactory.cxx index 3d38b2e333b758207f5766e6368857f6b5f291ea..e464f8882e87c460780b3967d53c36160b4b96ef 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorFactory.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorFactory.cxx @@ -16,8 +16,8 @@ #include "GaudiKernel/SystemOfUnits.h" // InDetReadoutGeometry -#include "InDetReadoutGeometry/SiCommonItems.h" -#include "InDetReadoutGeometry/InDetDD_Defs.h" +#include "ReadoutGeometryBase/SiCommonItems.h" +#include "ReadoutGeometryBase/InDetDD_Defs.h" #include "PixelReadoutGeometry/PixelModuleDesign.h" #include "PixelReadoutGeometry/PixelDetectorManager.h" diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorFactory.h b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorFactory.h index d5aa810ca91d904d29dc1a582a895bf027022dfc..b803ce678d86a949cfd0614528e96be9abb25570 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorFactory.h +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorFactory.h @@ -9,7 +9,7 @@ #include "InDetGeoModelUtils/InDetDetectorFactoryBase.h" // readout includes: #include "PixelReadoutGeometry/PixelDetectorManager.h" -#include "InDetReadoutGeometry/InDetDD_Defs.h" +#include "ReadoutGeometryBase/InDetDD_Defs.h" #include "CxxUtils/checker_macros.h" class PixelSwitches; diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorFactoryDC2.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorFactoryDC2.cxx index d0a21c707dc7dd09d134996d69c4b5262efabde2..2e2cd4b14a7bafbd2b4c2e22e06931a7384727cd 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorFactoryDC2.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorFactoryDC2.cxx @@ -16,8 +16,8 @@ #include "GeoModelKernel/GeoAlignableTransform.h" // InDetReadoutGeometry -#include "InDetReadoutGeometry/SiCommonItems.h" -#include "InDetReadoutGeometry/InDetDD_Defs.h" +#include "ReadoutGeometryBase/SiCommonItems.h" +#include "ReadoutGeometryBase/InDetDD_Defs.h" #include "PixelReadoutGeometry/PixelModuleDesign.h" #include "PixelGeoModelAthenaComps.h" diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorFactorySR1.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorFactorySR1.cxx index 1af29094867ea867c9708c2a7ff69fe441dd148c..eb010092c45f4103328eb2ad6d89eab9d2527632 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorFactorySR1.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorFactorySR1.cxx @@ -19,8 +19,8 @@ #include "GaudiKernel/SystemOfUnits.h" // InDetReadoutGeometry -#include "InDetReadoutGeometry/SiCommonItems.h" -#include "InDetReadoutGeometry/InDetDD_Defs.h" +#include "ReadoutGeometryBase/SiCommonItems.h" +#include "ReadoutGeometryBase/InDetDD_Defs.h" #include "PixelReadoutGeometry/PixelModuleDesign.h" #include "PixelGeoModelAthenaComps.h" diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorTool.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorTool.cxx index 9f94dc7c9fd57f61f435e9902650133af2b6afee..9234c063ab77f8cdf30f51c1aa9c713c5c4c361b 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorTool.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorTool.cxx @@ -11,7 +11,7 @@ #include "PixelSwitches.h" #include "PixelReadoutGeometry/PixelDetectorManager.h" -#include "InDetReadoutGeometry/InDetDD_Defs.h" +#include "ReadoutGeometryBase/InDetDD_Defs.h" #include "DetDescrConditions/AlignableTransformContainer.h" #include "PixelGeoModelAthenaComps.h" #include "GeoModelUtilities/GeoModelExperiment.h" diff --git a/InnerDetector/InDetDetDescr/PixelGeoModelXml/CMakeLists.txt b/InnerDetector/InDetDetDescr/PixelGeoModelXml/CMakeLists.txt index ceffa48c08f05b6e894f2e446e72648086e18ba8..6e403fab8ca070a2a3be3613f8a905637310a7ec 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModelXml/CMakeLists.txt +++ b/InnerDetector/InDetDetDescr/PixelGeoModelXml/CMakeLists.txt @@ -12,7 +12,7 @@ atlas_add_library( PixelGeoModelXmlLib PUBLIC_HEADERS PixelGeoModelXml PRIVATE_INCLUDE_DIRS ${GEOMODELCORE_INCLUDE_DIRS} LINK_LIBRARIES GaudiKernel GeoModelUtilities GeoModelXml InDetGeoModelUtils PixelReadoutGeometry - PRIVATE_LINK_LIBRARIES ${GEOMODELCORE_LIBRARIES} AthenaPoolUtilities DetDescrConditions GeoModelInterfaces GeometryDBSvcLib InDetReadoutGeometry InDetSimEvent PathResolver RDBAccessSvcLib SGTools StoreGateLib ) + PRIVATE_LINK_LIBRARIES ${GEOMODELCORE_LIBRARIES} AthenaPoolUtilities DetDescrConditions GeoModelInterfaces GeometryDBSvcLib ReadoutGeometryBase InDetReadoutGeometry InDetSimEvent PathResolver RDBAccessSvcLib SGTools StoreGateLib ) atlas_add_component( PixelGeoModelXml src/components/*.cxx diff --git a/InnerDetector/InDetDetDescr/PixelGeoModelXml/src/ITkPixelDetectorTool.cxx b/InnerDetector/InDetDetDescr/PixelGeoModelXml/src/ITkPixelDetectorTool.cxx index 6263ec716c166114679915c1d172cb4db66ca00b..68a13e81614eb94a7655b4b064709a44ba86c5a1 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModelXml/src/ITkPixelDetectorTool.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModelXml/src/ITkPixelDetectorTool.cxx @@ -7,7 +7,7 @@ #include "PixelGeoModelXml/PixelOptions.h" #include "PixelReadoutGeometry/PixelDetectorManager.h" #include "InDetGeoModelUtils/InDetDDAthenaComps.h" -#include "InDetReadoutGeometry/SiCommonItems.h" +#include "ReadoutGeometryBase/SiCommonItems.h" #include "GeoModelUtilities/GeoModelExperiment.h" #include "GeoModelInterfaces/IGeoModelSvc.h" #include "GeoModelUtilities/DecodeVersionKey.h" diff --git a/InnerDetector/InDetDetDescr/PixelGeoModelXml/src/PixelDetectorFactory.cxx b/InnerDetector/InDetDetDescr/PixelGeoModelXml/src/PixelDetectorFactory.cxx index 3dac427c6e718233ada4b2e71c603b2485852059..6380af81d5e2998fd5042522ce229143e92a1942 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModelXml/src/PixelDetectorFactory.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModelXml/src/PixelDetectorFactory.cxx @@ -16,7 +16,7 @@ #include "GeoModelInterfaces/IGeoModelSvc.h" #include "GeoModelUtilities/DecodeVersionKey.h" -#include "InDetReadoutGeometry/SiCommonItems.h" +#include "ReadoutGeometryBase/SiCommonItems.h" #include "PixelReadoutGeometry/PixelDetectorManager.h" #include "InDetReadoutGeometry/Version.h" #include "PixelReadoutGeometry/PixelModuleDesign.h" diff --git a/InnerDetector/InDetDetDescr/PixelGeoModelXml/src/PixelGmxInterface.cxx b/InnerDetector/InDetDetDescr/PixelGeoModelXml/src/PixelGmxInterface.cxx index e8080c3552370f34deb5b3bca3480af2fa94ccfb..309f647edeaffaa62063bbffa26d03db47e6fe54 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModelXml/src/PixelGmxInterface.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModelXml/src/PixelGmxInterface.cxx @@ -15,11 +15,11 @@ #include "PixelReadoutGeometry/PixelDetectorManager.h" #include "PixelReadoutGeometry/PixelModuleDesign.h" -#include "PixelReadoutGeometry/PixelDiodeMatrix.h" -#include "PixelReadoutGeometry/PixelMultipleConnection1D.h" +#include "ReadoutGeometryBase/PixelDiodeMatrix.h" +#include "ReadoutGeometryBase/PixelMultipleConnection1D.h" #include "InDetReadoutGeometry/SiDetectorDesign.h" #include "InDetReadoutGeometry/SiDetectorElement.h" -#include "InDetReadoutGeometry/SiCommonItems.h" +#include "ReadoutGeometryBase/SiCommonItems.h" const int PixelHitIndex = 0; diff --git a/InnerDetector/InDetDetDescr/PixelReadoutGeometry/CMakeLists.txt b/InnerDetector/InDetDetDescr/PixelReadoutGeometry/CMakeLists.txt index d592ead53dce5367110356ff553956cfc9a8c0a9..86bdb935b51edbfcbaa947fe75c5af5d9b1d3de1 100644 --- a/InnerDetector/InDetDetDescr/PixelReadoutGeometry/CMakeLists.txt +++ b/InnerDetector/InDetDetDescr/PixelReadoutGeometry/CMakeLists.txt @@ -10,5 +10,5 @@ find_package( GeoModelCore ) atlas_add_library( PixelReadoutGeometry src/*.cxx PUBLIC_HEADERS PixelReadoutGeometry - LINK_LIBRARIES ${GEOMODELCORE_LIBRARIES} AthenaKernel CxxUtils GeoPrimitives InDetIdentifier InDetReadoutGeometry TrkDetElementBase TrkSurfaces + LINK_LIBRARIES ${GEOMODELCORE_LIBRARIES} AthenaKernel CxxUtils GeoPrimitives InDetIdentifier InDetReadoutGeometry ReadoutGeometryBase TrkDetElementBase TrkSurfaces PRIVATE_LINK_LIBRARIES AthenaBaseComps AthenaPoolUtilities DetDescrConditions Identifier StoreGateLib TrkEventPrimitives ) diff --git a/InnerDetector/InDetDetDescr/PixelReadoutGeometry/PixelReadoutGeometry/PixelDetectorManager.h b/InnerDetector/InDetDetDescr/PixelReadoutGeometry/PixelReadoutGeometry/PixelDetectorManager.h index de103258f7ac18ddfd21683d1bd4cd6414a6a2c0..f79d1653c328ccf43b861fc386b4dcdaa3366efd 100755 --- a/InnerDetector/InDetDetDescr/PixelReadoutGeometry/PixelReadoutGeometry/PixelDetectorManager.h +++ b/InnerDetector/InDetDetDescr/PixelReadoutGeometry/PixelReadoutGeometry/PixelDetectorManager.h @@ -16,7 +16,7 @@ #include "InDetReadoutGeometry/SiDetectorManager.h" #include "InDetReadoutGeometry/SiDetectorElementCollection.h" -#include "InDetReadoutGeometry/InDetDD_Defs.h" +#include "ReadoutGeometryBase/InDetDD_Defs.h" #include "InDetIdentifier/PixelID.h" diff --git a/InnerDetector/InDetDetDescr/PixelReadoutGeometry/PixelReadoutGeometry/PixelModuleDesign.h b/InnerDetector/InDetDetDescr/PixelReadoutGeometry/PixelReadoutGeometry/PixelModuleDesign.h index cfb57df01ae11bb7af86cc45c3d189c121b04829..3e12c3bde4e7c46bd4add7dab68846e91695add2 100755 --- a/InnerDetector/InDetDetDescr/PixelReadoutGeometry/PixelReadoutGeometry/PixelModuleDesign.h +++ b/InnerDetector/InDetDetDescr/PixelReadoutGeometry/PixelReadoutGeometry/PixelModuleDesign.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -9,15 +9,15 @@ /////////////////////////////////////////////////////////////////// -#ifndef INDETREADOUTGEOMETRY_PIXELMODULEDESIGN_H -#define INDETREADOUTGEOMETRY_PIXELMODULEDESIGN_H +#ifndef PIXELREADOUTGEOMETRY_PIXELMODULEDESIGN_H +#define PIXELREADOUTGEOMETRY_PIXELMODULEDESIGN_H // Base class #include "InDetReadoutGeometry/SiDetectorDesign.h" // Data member classes -#include "PixelReadoutGeometry/PixelDiodeMap.h" -#include "PixelReadoutGeometry/PixelReadoutScheme.h" +#include "ReadoutGeometryBase/PixelDiodeMap.h" +#include "ReadoutGeometryBase/PixelReadoutScheme.h" // Other includes #include "CxxUtils/CachedUniquePtr.h" @@ -351,4 +351,4 @@ namespace InDetDD { } // namespace InDetDD -#endif // INDETREADOUTGEOMETRY_PIXELMODULEDESIGN_H +#endif // READOUTGEOMETRYBASE_PIXELMODULEDESIGN_H diff --git a/InnerDetector/InDetDetDescr/PixelReadoutGeometry/src/PixelModuleDesign.cxx b/InnerDetector/InDetDetDescr/PixelReadoutGeometry/src/PixelModuleDesign.cxx index 6b88b06e9aa33ce864712b5d8621f3e8a83219b1..c46c5f075ebc2286f1295bf530b7988c5f84d83c 100755 --- a/InnerDetector/InDetDetDescr/PixelReadoutGeometry/src/PixelModuleDesign.cxx +++ b/InnerDetector/InDetDetDescr/PixelReadoutGeometry/src/PixelModuleDesign.cxx @@ -14,8 +14,8 @@ #include "PixelReadoutGeometry/PixelModuleDesign.h" #include "Identifier/Identifier.h" -#include "InDetReadoutGeometry/SiCellId.h" -#include "InDetReadoutGeometry/SiReadoutCellId.h" +#include "ReadoutGeometryBase/SiCellId.h" +#include "ReadoutGeometryBase/SiReadoutCellId.h" #include <cmath> diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/CMakeLists.txt b/InnerDetector/InDetDetDescr/SCT_GeoModel/CMakeLists.txt index 86efac1d352d6126906487c47ecd8ac9190f8bb0..ca620368145411f9a3a968c23470508bb8b60cde 100644 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/CMakeLists.txt +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/CMakeLists.txt @@ -10,7 +10,7 @@ find_package( GeoModelCore ) atlas_add_component( SCT_GeoModel src/*.cxx src/components/*.cxx - LINK_LIBRARIES ${GEOMODELCORE_LIBRARIES} AthenaKernel CxxUtils GeoModelInterfaces GeoModelUtilities GeoPrimitives GaudiKernel InDetGeoModelUtils InDetReadoutGeometry SCT_ReadoutGeometry SGTools StoreGateLib AthenaPoolUtilities DetDescrConditions Identifier InDetIdentifier GeometryDBSvcLib RDBAccessSvcLib ) + LINK_LIBRARIES ${GEOMODELCORE_LIBRARIES} AthenaKernel CxxUtils GeoModelInterfaces GeoModelUtilities GeoPrimitives GaudiKernel InDetGeoModelUtils ReadoutGeometryBase InDetReadoutGeometry SCT_ReadoutGeometry SGTools StoreGateLib AthenaPoolUtilities DetDescrConditions Identifier InDetIdentifier GeometryDBSvcLib RDBAccessSvcLib ) # Install files from the package: atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_DetectorFactory.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_DetectorFactory.h index a509917a12ad8674006e75f93895d676f1009f32..efaccf82445506f38effe9531b685e0967b53ab9 100644 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_DetectorFactory.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_DetectorFactory.h @@ -7,7 +7,7 @@ #include "InDetGeoModelUtils/InDetDetectorFactoryBase.h" #include "SCT_ReadoutGeometry/SCT_DetectorManager.h" -#include "InDetReadoutGeometry/InDetDD_Defs.h" +#include "ReadoutGeometryBase/InDetDD_Defs.h" #include "CxxUtils/checker_macros.h" #include <memory> diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DetectorFactory.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DetectorFactory.cxx index cc2bafadb17cca1da83fab904fe835cc28e065fe..9bdb49e9734d4ea673d6c7266f91920a987682ba 100644 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DetectorFactory.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DetectorFactory.cxx @@ -33,8 +33,8 @@ #include "GeoModelKernel/GeoVPhysVol.h" #include "GeoModelUtilities/DecodeVersionKey.h" -#include "InDetReadoutGeometry/InDetDD_Defs.h" -#include "InDetReadoutGeometry/SiCommonItems.h" +#include "ReadoutGeometryBase/InDetDD_Defs.h" +#include "ReadoutGeometryBase/SiCommonItems.h" #include "InDetReadoutGeometry/Version.h" #include "RDBAccessSvc/IRDBAccessSvc.h" diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdSensor.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdSensor.cxx index 7c3e2567b2437308380846df41da6834c1b74aeb..bee92a61b250051cf4907d84bd5c812a9c156d65 100644 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdSensor.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdSensor.cxx @@ -2,15 +2,6 @@ Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ -/////////////////////////////////////////////// -// Simulation for the COMBINED TESTBEAM 2004 // -// // -// Zdenka.Broklova@matfyz.cz // -// Carlos.Escobar@ific.uv.es // -// Peter.Kodys@ific.uv.es // -// January 23, 2004 // -/////////////////////////////////////////////// - #include "SCT_GeoModel/SCT_FwdSensor.h" #include "SCT_GeoModel/SCT_GeometryManager.h" @@ -38,8 +29,8 @@ #include "SCT_ReadoutGeometry/SCT_DetectorManager.h" #include "SCT_ReadoutGeometry/SCT_ForwardModuleSideDesign.h" #include "InDetReadoutGeometry/SiDetectorElement.h" -#include "InDetReadoutGeometry/SiCommonItems.h" -#include "InDetReadoutGeometry/InDetDD_Defs.h" +#include "ReadoutGeometryBase/SiCommonItems.h" +#include "ReadoutGeometryBase/InDetDD_Defs.h" #include <cmath> diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_GeometryManager.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_GeometryManager.cxx index 53a76f005252fbac20cd32e3ca823ee4299b8624..36a8b92569537aa74bc783b876b3eceb8981f7bb 100644 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_GeometryManager.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_GeometryManager.cxx @@ -6,7 +6,7 @@ #include "InDetGeoModelUtils/DistortedMaterialManager.h" #include "InDetIdentifier/SCT_ID.h" -#include "InDetReadoutGeometry/SiCommonItems.h" +#include "ReadoutGeometryBase/SiCommonItems.h" #include "SCT_GeoModel/SCT_BarrelParameters.h" #include "SCT_GeoModel/SCT_BarrelModuleParameters.h" #include "SCT_GeoModel/SCT_DataBase.h" diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Sensor.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Sensor.cxx index 92b518668eb09b049cdcaa25b515b0172b8fa46e..a2f730d52149399bf756b39580a98e0022b04b81 100644 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Sensor.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Sensor.cxx @@ -17,8 +17,8 @@ #include "SCT_ReadoutGeometry/SCT_DetectorManager.h" #include "SCT_ReadoutGeometry/SCT_BarrelModuleSideDesign.h" #include "InDetReadoutGeometry/SiDetectorElement.h" -#include "InDetReadoutGeometry/InDetDD_Defs.h" -#include "InDetReadoutGeometry/SiCommonItems.h" +#include "ReadoutGeometryBase/InDetDD_Defs.h" +#include "ReadoutGeometryBase/SiCommonItems.h" #include "GaudiKernel/SystemOfUnits.h" diff --git a/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/SCT_ReadoutGeometry/SCT_DetectorManager.h b/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/SCT_ReadoutGeometry/SCT_DetectorManager.h index 6b43bb4fb906aa816313276031deae920adb523e..f77b564aeb9c1c2c03f5c9dab959d5f60735c95a 100755 --- a/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/SCT_ReadoutGeometry/SCT_DetectorManager.h +++ b/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/SCT_ReadoutGeometry/SCT_DetectorManager.h @@ -15,7 +15,7 @@ #include "InDetReadoutGeometry/SiDetectorManager.h" #include "InDetReadoutGeometry/SiDetectorElementCollection.h" -#include "InDetReadoutGeometry/InDetDD_Defs.h" +#include "ReadoutGeometryBase/InDetDD_Defs.h" #include "InDetIdentifier/SCT_ID.h" diff --git a/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/SCT_ReadoutGeometry/SCT_ForwardModuleSideGeometry.h b/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/SCT_ReadoutGeometry/SCT_ForwardModuleSideGeometry.h index 701101d1e62486ccedf925087a1ee6294e7a10b4..6280819215617cb4de20944368f16d1830e29aa2 100755 --- a/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/SCT_ReadoutGeometry/SCT_ForwardModuleSideGeometry.h +++ b/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/SCT_ReadoutGeometry/SCT_ForwardModuleSideGeometry.h @@ -11,7 +11,7 @@ #ifndef INDETREADOUTGEOMETRY_SCT_FORWARDMODULESIDEGEOMETRY_H #define INDETREADOUTGEOMETRY_SCT_FORWARDMODULESIDEGEOMETRY_H -#include "InDetReadoutGeometry/SiLocalPosition.h" +#include "ReadoutGeometryBase/SiLocalPosition.h" #include "SCT_ReadoutGeometry/SCT_ForwardPolarPosition.h" namespace InDetDD { diff --git a/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/SCT_ReadoutGeometry/SCT_ReadoutScheme.h b/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/SCT_ReadoutGeometry/SCT_ReadoutScheme.h index bb120d550081b35c208d044cfda178a2b3f4ddbb..24adfc68493634b6bc5e0b824e7bc6a284a23da3 100755 --- a/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/SCT_ReadoutGeometry/SCT_ReadoutScheme.h +++ b/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/SCT_ReadoutGeometry/SCT_ReadoutScheme.h @@ -11,8 +11,8 @@ #ifndef INDETREADOUTGEOMETRY_SCT_READOUTSCHEME_H #define INDETREADOUTGEOMETRY_SCT_READOUTSCHEME_H -#include "InDetReadoutGeometry/SiCellId.h" -#include "InDetReadoutGeometry/SiReadoutCellId.h" +#include "ReadoutGeometryBase/SiCellId.h" +#include "ReadoutGeometryBase/SiReadoutCellId.h" #include <list> diff --git a/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/SCT_ReadoutGeometry/StripAnnulusDesign.h b/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/SCT_ReadoutGeometry/StripAnnulusDesign.h index d557e662d20bc18e6a05aa17debb665627280899..1320dd32d9496d140272dfa677ed05060d16f79c 100644 --- a/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/SCT_ReadoutGeometry/StripAnnulusDesign.h +++ b/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/SCT_ReadoutGeometry/StripAnnulusDesign.h @@ -27,7 +27,7 @@ // Base class #include "SCT_ReadoutGeometry/SCT_ModuleSideDesign.h" -#include "InDetReadoutGeometry/SiCellId.h" +#include "ReadoutGeometryBase/SiCellId.h" #include "CLHEP/Geometry/Vector3D.h" // For unused phiMeasureSegment #include "CLHEP/Geometry/Transform3D.h" @@ -56,7 +56,7 @@ public: ~StripAnnulusDesign() = default; - HepGeom::Point3D<double> sensorCenter() const; + Amg::Vector3D sensorCenter() const; // Copy constructor and assignment: StripAnnulusDesign(const StripAnnulusDesign &design); @@ -139,7 +139,7 @@ public: // Transform from SiHit to GeoModel frame - const HepGeom::Transform3D SiHitToGeoModel() const; + const Amg::Transform3D SiHitToGeoModel() const; // ------------------------------------------------------------------------------------------ diff --git a/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/SCT_ReadoutGeometry/StripBoxDesign.h b/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/SCT_ReadoutGeometry/StripBoxDesign.h index be4e38e4883bd837816f5cb5d8454ce12452ea7c..7b1c6070f9fb9d2ada3c9a8999e9d2c9ce31aa4d 100644 --- a/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/SCT_ReadoutGeometry/StripBoxDesign.h +++ b/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/SCT_ReadoutGeometry/StripBoxDesign.h @@ -13,7 +13,7 @@ #include "SCT_ReadoutGeometry/SCT_ModuleSideDesign.h" #include "GeoModelKernel/GeoDefinitions.h" -#include "InDetReadoutGeometry/SiCellId.h" +#include "ReadoutGeometryBase/SiCellId.h" #include "TrkSurfaces/RectangleBounds.h" #include "CLHEP/Geometry/Vector3D.h" // For unused phiMeasureSegment diff --git a/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/SCT_ReadoutGeometry/StripStereoAnnulusDesign.h b/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/SCT_ReadoutGeometry/StripStereoAnnulusDesign.h index 8178d2418b4ed1dc3c1536361c7438f9926ae30f..2567f722a8c2895cf843cdceced2167cd1224a02 100644 --- a/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/SCT_ReadoutGeometry/StripStereoAnnulusDesign.h +++ b/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/SCT_ReadoutGeometry/StripStereoAnnulusDesign.h @@ -30,7 +30,7 @@ // Base class #include "SCT_ReadoutGeometry/SCT_ModuleSideDesign.h" -#include "InDetReadoutGeometry/SiCellId.h" +#include "ReadoutGeometryBase/SiCellId.h" #include "TrkSurfaces/AnnulusBounds.h" #include "CLHEP/Geometry/Vector3D.h" // For unused phiMeasureSegment @@ -63,7 +63,7 @@ public: ~StripStereoAnnulusDesign() = default; - HepGeom::Point3D<double> sensorCenter() const; + Amg::Vector3D sensorCenter() const; // Copy constructor and assignment: StripStereoAnnulusDesign(const StripStereoAnnulusDesign &design); @@ -170,7 +170,7 @@ public: virtual DetectorShape shape() const; // Transform from SiHit to GeoModel frame - const HepGeom::Transform3D SiHitToGeoModel() const; + const Amg::Transform3D SiHitToGeoModel() const; double sinStripAngleReco(double phiCoord, double etaCoord) const; diff --git a/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/src/SCT_BarrelModuleSideDesign.cxx b/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/src/SCT_BarrelModuleSideDesign.cxx index 179ab5350a5b0169cdd29ea3c05a8311c313db50..9115e96f4cd4a0e533dbdf8e9eb1899f535500bb 100755 --- a/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/src/SCT_BarrelModuleSideDesign.cxx +++ b/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/src/SCT_BarrelModuleSideDesign.cxx @@ -8,7 +8,7 @@ /////////////////////////////////////////////////////////////////// #include "SCT_ReadoutGeometry/SCT_BarrelModuleSideDesign.h" -#include "InDetReadoutGeometry/SiDiodesParameters.h" +#include "ReadoutGeometryBase/SiDiodesParameters.h" #include "CLHEP/Units/SystemOfUnits.h" #include "CLHEP/Geometry/Vector3D.h" diff --git a/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/src/SCT_ForwardFrameTransformation.cxx b/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/src/SCT_ForwardFrameTransformation.cxx index 5b4ef51897973cdfdf44ea19650f5239daf4fe9c..a7e3ca88d6fda2e47ea0450b1e8522d856423c73 100755 --- a/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/src/SCT_ForwardFrameTransformation.cxx +++ b/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/src/SCT_ForwardFrameTransformation.cxx @@ -13,7 +13,7 @@ #include "SCT_ReadoutGeometry/SCT_ForwardFrameTransformation.h" #include "SCT_ReadoutGeometry/SCT_ForwardPolarPosition.h" -#include "InDetReadoutGeometry/SiLocalPosition.h" +#include "ReadoutGeometryBase/SiLocalPosition.h" #include <cmath> using std::abs; diff --git a/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/src/SCT_ForwardModuleSideDesign.cxx b/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/src/SCT_ForwardModuleSideDesign.cxx index d5d70b297601d7cb044786eadc68ae21923ac03a..bc02171ca7cd21e6c0830269b727821bcf26af20 100755 --- a/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/src/SCT_ForwardModuleSideDesign.cxx +++ b/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/src/SCT_ForwardModuleSideDesign.cxx @@ -15,7 +15,7 @@ #include "SCT_ReadoutGeometry/SCT_ForwardModuleSideDesign.h" #include "CLHEP/Units/SystemOfUnits.h" #include "CLHEP/Geometry/Vector3D.h" -#include "InDetReadoutGeometry/SiDiodesParameters.h" +#include "ReadoutGeometryBase/SiDiodesParameters.h" namespace InDetDD { diff --git a/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/src/StripAnnulusDesign.cxx b/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/src/StripAnnulusDesign.cxx index 8d924b9434ef735be47f0962a1e2e438e7f1ea16..52bdc1b8aecd2ad43772c1eb112d8502496de1cb 100644 --- a/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/src/StripAnnulusDesign.cxx +++ b/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/src/StripAnnulusDesign.cxx @@ -9,6 +9,7 @@ #include "SCT_ReadoutGeometry/StripAnnulusDesign.h" #include "Identifier/Identifier.h" #include "TrkSurfaces/RectangleBounds.h" +#include "GeoPrimitives/GeoPrimitivesHelpers.h" namespace InDetDD { StripAnnulusDesign::StripAnnulusDesign(const SiDetectorDesign::Axis &stripDirection, @@ -35,9 +36,9 @@ StripAnnulusDesign::StripAnnulusDesign(const SiDetectorDesign::Axis &stripDirect std::unique_ptr<Trk::SurfaceBounds> m_bounds = std::make_unique<Trk::RectangleBounds>(width / 2.0, length / 2.0); // Awaiting new boundclass for Annulus shape } -HepGeom::Point3D<double> StripAnnulusDesign::sensorCenter() const { +Amg::Vector3D StripAnnulusDesign::sensorCenter() const { double centerR = (m_stripStartRadius + m_stripEndRadius) * 0.5; - return HepGeom::Point3D<double>(centerR, 0., 0.); + return Amg::Vector3D(centerR, 0., 0.); } void StripAnnulusDesign::neighboursOfCell(const SiCellId &cellId, std::vector<SiCellId> &neighbours) const { @@ -190,8 +191,8 @@ double StripAnnulusDesign::etaPitch() const { // DEPRECATED return length(); } -const HepGeom::Transform3D StripAnnulusDesign::SiHitToGeoModel() const { - return HepGeom::RotateY3D(90.*CLHEP::deg) ; +const Amg::Transform3D StripAnnulusDesign::SiHitToGeoModel() const { + return Amg::getRotateY3D(90.*CLHEP::deg); } } // namespace InDetDD diff --git a/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/src/StripStereoAnnulusDesign.cxx b/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/src/StripStereoAnnulusDesign.cxx index 0a357abdd34adb78903257b684bae64617a2937c..1ef6f164563b88fb1c229807cc80ce65d8bd0909 100644 --- a/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/src/StripStereoAnnulusDesign.cxx +++ b/InnerDetector/InDetDetDescr/SCT_ReadoutGeometry/src/StripStereoAnnulusDesign.cxx @@ -4,6 +4,7 @@ #include "SCT_ReadoutGeometry/StripStereoAnnulusDesign.h" #include "Identifier/Identifier.h" +#include "GeoPrimitives/GeoPrimitivesHelpers.h" #include <stdexcept> #include <algorithm> // For upper_bound @@ -72,8 +73,8 @@ StripStereoAnnulusDesign::StripStereoAnnulusDesign(const SiDetectorDesign::Axis } -HepGeom::Point3D<double> StripStereoAnnulusDesign::sensorCenter() const { - return HepGeom::Point3D<double>(m_R, 0., 0.); +Amg::Vector3D StripStereoAnnulusDesign::sensorCenter() const { + return Amg::Vector3D(m_R, 0., 0.); } double StripStereoAnnulusDesign::sinStripAngleReco(double phiCoord, double etaCoord) const { @@ -407,8 +408,8 @@ DetectorShape StripStereoAnnulusDesign::shape() const return InDetDD::Annulus; } -const HepGeom::Transform3D StripStereoAnnulusDesign::SiHitToGeoModel() const { - return HepGeom::RotateY3D(90.*CLHEP::deg) ; +const Amg::Transform3D StripStereoAnnulusDesign::SiHitToGeoModel() const { + return Amg::getRotateY3D(90.*CLHEP::deg) ; } double StripStereoAnnulusDesign::stripLength(const InDetDD::SiCellId &cellId) const diff --git a/InnerDetector/InDetDetDescr/StripGeoModelXml/CMakeLists.txt b/InnerDetector/InDetDetDescr/StripGeoModelXml/CMakeLists.txt index 3ff8dd6377378a066620d5e00fc003a4555fb6d5..bb879697c03cbcd12fd6ad1b99f8950d8d216303 100644 --- a/InnerDetector/InDetDetDescr/StripGeoModelXml/CMakeLists.txt +++ b/InnerDetector/InDetDetDescr/StripGeoModelXml/CMakeLists.txt @@ -8,7 +8,7 @@ atlas_add_library( StripGeoModelXmlLib src/*.cxx PUBLIC_HEADERS StripGeoModelXml LINK_LIBRARIES GaudiKernel GeoModelUtilities GeoModelXml InDetGeoModelUtils SCT_ReadoutGeometry - PRIVATE_LINK_LIBRARIES ${GEOMODELCORE_LIBRARIES} AthenaPoolUtilities DetDescrConditions GeoModelInterfaces GeometryDBSvcLib InDetReadoutGeometry InDetSimEvent PathResolver RDBAccessSvcLib SGTools StoreGateLib ) + PRIVATE_LINK_LIBRARIES ${GEOMODELCORE_LIBRARIES} AthenaPoolUtilities DetDescrConditions GeoModelInterfaces GeometryDBSvcLib InDetReadoutGeometry ReadoutGeometryBase InDetSimEvent PathResolver RDBAccessSvcLib SGTools StoreGateLib ) atlas_add_component( StripGeoModelXml src/components/*.cxx diff --git a/InnerDetector/InDetDetDescr/StripGeoModelXml/src/StripDetectorFactory.cxx b/InnerDetector/InDetDetDescr/StripGeoModelXml/src/StripDetectorFactory.cxx index c266ebfa4e77e88094ea477a120cfc6da447a001..9b716469c42af40a0964737c7a9f7ed2d50077fe 100644 --- a/InnerDetector/InDetDetDescr/StripGeoModelXml/src/StripDetectorFactory.cxx +++ b/InnerDetector/InDetDetDescr/StripGeoModelXml/src/StripDetectorFactory.cxx @@ -16,7 +16,7 @@ #include "GeoModelInterfaces/IGeoModelSvc.h" #include "GeoModelUtilities/DecodeVersionKey.h" -#include "InDetReadoutGeometry/SiCommonItems.h" +#include "ReadoutGeometryBase/SiCommonItems.h" #include "SCT_ReadoutGeometry/SCT_DetectorManager.h" #include "InDetReadoutGeometry/Version.h" #include "SCT_ReadoutGeometry/SCT_ModuleSideDesign.h" diff --git a/InnerDetector/InDetDetDescr/StripGeoModelXml/src/StripDetectorTool.cxx b/InnerDetector/InDetDetDescr/StripGeoModelXml/src/StripDetectorTool.cxx index d8cee99ef1f54e35cf41c51f9532ce4439495a84..059174d345afaddd3249a809a50473e41606c124 100644 --- a/InnerDetector/InDetDetDescr/StripGeoModelXml/src/StripDetectorTool.cxx +++ b/InnerDetector/InDetDetDescr/StripGeoModelXml/src/StripDetectorTool.cxx @@ -7,7 +7,7 @@ #include "StripGeoModelXml/StripOptions.h" #include "SCT_ReadoutGeometry/SCT_DetectorManager.h" #include "InDetGeoModelUtils/InDetDDAthenaComps.h" -#include "InDetReadoutGeometry/SiCommonItems.h" +#include "ReadoutGeometryBase/SiCommonItems.h" #include "GeoModelUtilities/GeoModelExperiment.h" #include "GeoModelInterfaces/IGeoModelSvc.h" #include "GeoModelUtilities/DecodeVersionKey.h" diff --git a/InnerDetector/InDetDetDescr/StripGeoModelXml/src/StripGmxInterface.cxx b/InnerDetector/InDetDetDescr/StripGeoModelXml/src/StripGmxInterface.cxx index 30a9604b8c911b156ffd7292d05f4bbef9d05e80..3edb24a2df4eb23a30d1693b1ee26d079760d6f1 100644 --- a/InnerDetector/InDetDetDescr/StripGeoModelXml/src/StripGmxInterface.cxx +++ b/InnerDetector/InDetDetDescr/StripGeoModelXml/src/StripGmxInterface.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "StripGeoModelXml/StripGmxInterface.h" @@ -19,7 +19,7 @@ #include "SCT_ReadoutGeometry/StripStereoAnnulusDesign.h" #include "InDetReadoutGeometry/SiDetectorDesign.h" #include "InDetReadoutGeometry/SiDetectorElement.h" -#include "InDetReadoutGeometry/SiCommonItems.h" +#include "ReadoutGeometryBase/SiCommonItems.h" const int SCT_HitIndex = 1; diff --git a/InnerDetector/InDetDetDescr/TRT_GeoModel/CMakeLists.txt b/InnerDetector/InDetDetDescr/TRT_GeoModel/CMakeLists.txt index 7d9342d5b1016c2f949f8fb5c7fa7da445b79053..8a08309bb96358849ed7a4a86fb39257866246a4 100644 --- a/InnerDetector/InDetDetDescr/TRT_GeoModel/CMakeLists.txt +++ b/InnerDetector/InDetDetDescr/TRT_GeoModel/CMakeLists.txt @@ -10,7 +10,7 @@ find_package( GeoModelCore ) atlas_add_component( TRT_GeoModel src/*.cxx src/components/*.cxx - LINK_LIBRARIES ${GEOMODELCORE_LIBRARIES} AthenaKernel GeoModelInterfaces GeoModelUtilities GeoPrimitives GaudiKernel TRT_ConditionsServicesLib InDetGeoModelUtils InDetReadoutGeometry TRT_ReadoutGeometry CxxUtils SGTools StoreGateLib AthenaPoolUtilities DetDescrConditions IdDictDetDescr TRT_ConditionsData InDetIdentifier GeometryDBSvcLib RDBAccessSvcLib ) + LINK_LIBRARIES ${GEOMODELCORE_LIBRARIES} AthenaKernel GeoModelInterfaces GeoModelUtilities GeoPrimitives GaudiKernel TRT_ConditionsServicesLib InDetGeoModelUtils ReadoutGeometryBase InDetReadoutGeometry TRT_ReadoutGeometry CxxUtils SGTools StoreGateLib AthenaPoolUtilities DetDescrConditions IdDictDetDescr TRT_ConditionsData InDetIdentifier GeometryDBSvcLib RDBAccessSvcLib ) # Install files from the package: atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) diff --git a/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRTDetectorFactory_Full.cxx b/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRTDetectorFactory_Full.cxx index d48ccba8a08df32bbc13294b822a8138998741de..39dde44221f96def22f638a7c5bb3561df17c815 100755 --- a/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRTDetectorFactory_Full.cxx +++ b/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRTDetectorFactory_Full.cxx @@ -12,7 +12,7 @@ #include "TRT_ReadoutGeometry/TRT_EndcapDescriptor.h" #include "TRT_ReadoutGeometry/TRT_EndcapElement.h" #include "InDetReadoutGeometry/Version.h" -#include "InDetReadoutGeometry/InDetDD_Defs.h" +#include "ReadoutGeometryBase/InDetDD_Defs.h" #include "IdDictDetDescr/IdDictManager.h" #include "InDetIdentifier/TRT_ID.h" diff --git a/InnerDetector/InDetDetDescr/TRT_ReadoutGeometry/CMakeLists.txt b/InnerDetector/InDetDetDescr/TRT_ReadoutGeometry/CMakeLists.txt index 48a7789bd8475dcf8571eff6a35d3497bab57cb1..5303f0da81312cecd28751e7b809fe434012eddb 100644 --- a/InnerDetector/InDetDetDescr/TRT_ReadoutGeometry/CMakeLists.txt +++ b/InnerDetector/InDetDetDescr/TRT_ReadoutGeometry/CMakeLists.txt @@ -14,5 +14,5 @@ atlas_add_library( TRT_ReadoutGeometry INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} DEFINITIONS ${CLHEP_DEFINITIONS} LINK_LIBRARIES ${CLHEP_LIBRARIES} ${GEOMODELCORE_LIBRARIES} AthenaBaseComps AthenaKernel CxxUtils EventPrimitives - GeoPrimitives TrkSurfaces Identifier InDetIdentifier InDetReadoutGeometry TrkDetElementBase + GeoPrimitives TrkSurfaces Identifier InDetIdentifier InDetReadoutGeometry ReadoutGeometryBase TrkDetElementBase PRIVATE_LINK_LIBRARIES DetDescrConditions GaudiKernel GeoModelUtilities StoreGateLib TRT_ConditionsData) diff --git a/InnerDetector/InDetDetDescr/TRT_ReadoutGeometry/TRT_ReadoutGeometry/TRT_DetectorManager.h b/InnerDetector/InDetDetDescr/TRT_ReadoutGeometry/TRT_ReadoutGeometry/TRT_DetectorManager.h index 79b19bc58359f481cc842b4d041b0da32010f124..74c81dc076e114f18ae75790811f70fa38baf2e8 100755 --- a/InnerDetector/InDetDetDescr/TRT_ReadoutGeometry/TRT_ReadoutGeometry/TRT_DetectorManager.h +++ b/InnerDetector/InDetDetDescr/TRT_ReadoutGeometry/TRT_ReadoutGeometry/TRT_DetectorManager.h @@ -14,7 +14,7 @@ #include "TRT_ReadoutGeometry/TRT_Conditions.h" #include "TRT_ReadoutGeometry/TRT_BarrelElement.h" #include "TRT_ReadoutGeometry/TRT_EndcapElement.h" -#include "InDetReadoutGeometry/InDetDD_Defs.h" +#include "ReadoutGeometryBase/InDetDD_Defs.h" #include "InDetReadoutGeometry/Version.h" #include "TRT_ReadoutGeometry/TRT_DetElementCollection.h" #include "GeoPrimitives/GeoPrimitives.h" @@ -26,8 +26,6 @@ #include "CLHEP/Geometry/Transform3D.h" -#include "InDetReadoutGeometry/InDetDD_Defs.h" - #include "CxxUtils/checker_macros.h" #include <map> diff --git a/InnerDetector/InDetDetDescr/TRT_ReadoutGeometry/src/TRT_DetectorManager.cxx b/InnerDetector/InDetDetDescr/TRT_ReadoutGeometry/src/TRT_DetectorManager.cxx index 2a4a75309de23db69d965df4e718384e5b14e248..bae4ff4b1b414d50fc9fc5c525e3562840aa6947 100755 --- a/InnerDetector/InDetDetDescr/TRT_ReadoutGeometry/src/TRT_DetectorManager.cxx +++ b/InnerDetector/InDetDetDescr/TRT_ReadoutGeometry/src/TRT_DetectorManager.cxx @@ -9,7 +9,6 @@ #include "TRT_ReadoutGeometry/TRT_BarrelElement.h" #include "TRT_ReadoutGeometry/TRT_EndcapElement.h" #include "InDetReadoutGeometry/ExtendedAlignableTransform.h" -#include "InDetReadoutGeometry/InDetDD_Defs.h" #include "TRT_ReadoutGeometry/TRT_Conditions.h" #include "GeoModelKernel/GeoXF.h" diff --git a/InnerDetector/InDetDigitization/FastSiDigitization/CMakeLists.txt b/InnerDetector/InDetDigitization/FastSiDigitization/CMakeLists.txt index f3fdc9f9f5eb5d50d7b006c98072ae398aca0140..c2d6e2ad3f54a7fbe7bfa3d16d7ac51d16740a9b 100644 --- a/InnerDetector/InDetDigitization/FastSiDigitization/CMakeLists.txt +++ b/InnerDetector/InDetDigitization/FastSiDigitization/CMakeLists.txt @@ -12,7 +12,7 @@ atlas_add_component( FastSiDigitization src/*.cxx src/components/*.cxx INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaBaseComps AthenaKernel PileUpToolsLib EventPrimitives xAODEventInfo GaudiKernel GeoPrimitives InDetReadoutGeometry PixelCablingLib PixelConditionsData PixelReadoutGeometry SCT_ReadoutGeometry InDetCondTools InDetSimData InDetPrepRawData SiClusterizationToolLib InDetSimEvent HitManagement ISF_FatrasDetDescrModel ISF_FatrasEvent TrkTruthData StoreGateLib Identifier GeneratorObjects InDetIdentifier TrkDetDescrInterfaces TrkDigEvent TrkDigInterfaces TrkGeometry TrkSurfaces TrkExUtils ) + LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaBaseComps AthenaKernel PileUpToolsLib EventPrimitives xAODEventInfo GaudiKernel GeoPrimitives InDetReadoutGeometry PixelCablingLib PixelConditionsData ReadoutGeometryBase PixelReadoutGeometry SCT_ReadoutGeometry InDetCondTools InDetSimData InDetPrepRawData SiClusterizationToolLib InDetSimEvent HitManagement ISF_FatrasDetDescrModel ISF_FatrasEvent TrkTruthData StoreGateLib Identifier GeneratorObjects InDetIdentifier TrkDetDescrInterfaces TrkDigEvent TrkDigInterfaces TrkGeometry TrkSurfaces TrkExUtils ) # Install files from the package: atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) diff --git a/InnerDetector/InDetDigitization/FastSiDigitization/src/PixelFastDigitizationTool.cxx b/InnerDetector/InDetDigitization/FastSiDigitization/src/PixelFastDigitizationTool.cxx index 108651dbdb1e38d6ff4eed2895b686094d3c1cbb..b7f063592cb9ba28b3845551e65ed0e3daf7a9d8 100644 --- a/InnerDetector/InDetDigitization/FastSiDigitization/src/PixelFastDigitizationTool.cxx +++ b/InnerDetector/InDetDigitization/FastSiDigitization/src/PixelFastDigitizationTool.cxx @@ -13,9 +13,9 @@ // Det Descr #include "Identifier/Identifier.h" -#include "InDetReadoutGeometry/SiReadoutCellId.h" +#include "ReadoutGeometryBase/SiReadoutCellId.h" #include "InDetReadoutGeometry/SiDetectorDesign.h" -#include "InDetReadoutGeometry/SiCellId.h" +#include "ReadoutGeometryBase/SiCellId.h" #include "InDetIdentifier/PixelID.h" #include "InDetSimData/InDetSimDataCollection.h" diff --git a/InnerDetector/InDetDigitization/FastSiDigitization/src/SCT_FastDigitizationTool.cxx b/InnerDetector/InDetDigitization/FastSiDigitization/src/SCT_FastDigitizationTool.cxx index efb941aad16c92e25c629682d74c925c22d784ad..7b1a8ccb4ae7eecaf1416d8dfdfd09eb3c876c22 100644 --- a/InnerDetector/InDetDigitization/FastSiDigitization/src/SCT_FastDigitizationTool.cxx +++ b/InnerDetector/InDetDigitization/FastSiDigitization/src/SCT_FastDigitizationTool.cxx @@ -20,7 +20,7 @@ #include "SCT_ReadoutGeometry/SCT_ForwardModuleSideDesign.h" // FATRAS -#include "InDetReadoutGeometry/SiCellId.h" +#include "ReadoutGeometryBase/SiCellId.h" #include "TrkSurfaces/Surface.h" #include "TrkSurfaces/SurfaceBounds.h" #include "TrkExUtils/LineIntersection2D.h" diff --git a/InnerDetector/InDetDigitization/FastSiDigitization/src/SiSmearedDigitizationTool.cxx b/InnerDetector/InDetDigitization/FastSiDigitization/src/SiSmearedDigitizationTool.cxx index 703d09ab7ac6086611cdddecaa1d93dfc4c34e99..470093020a18f52c403cf0e22a69848c6b2054eb 100644 --- a/InnerDetector/InDetDigitization/FastSiDigitization/src/SiSmearedDigitizationTool.cxx +++ b/InnerDetector/InDetDigitization/FastSiDigitization/src/SiSmearedDigitizationTool.cxx @@ -16,9 +16,9 @@ #include "InDetReadoutGeometry/SiDetectorElement.h" #include "ISF_FatrasDetDescrModel/PlanarDetElement.h" -#include "InDetReadoutGeometry/SiReadoutCellId.h" +#include "ReadoutGeometryBase/SiReadoutCellId.h" #include "InDetReadoutGeometry/SiDetectorDesign.h" -#include "InDetReadoutGeometry/SiCellId.h" +#include "ReadoutGeometryBase/SiCellId.h" #include "InDetIdentifier/PixelID.h" #include "InDetSimData/InDetSimDataCollection.h" diff --git a/InnerDetector/InDetDigitization/PixelDigitization/CMakeLists.txt b/InnerDetector/InDetDigitization/PixelDigitization/CMakeLists.txt index 27744466c7da483d39d8b9a328dbe98cfb664c67..6cdb88bc9b6e3785fcde079dfa359007a26d45d2 100644 --- a/InnerDetector/InDetDigitization/PixelDigitization/CMakeLists.txt +++ b/InnerDetector/InDetDigitization/PixelDigitization/CMakeLists.txt @@ -12,7 +12,7 @@ atlas_add_component( PixelDigitization src/*.cxx src/components/*.cxx INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaBaseComps GaudiKernel AthenaKernel PileUpToolsLib StoreGateLib GeneratorObjects PixelConditionsData SiPropertiesToolLib InDetIdentifier InDetReadoutGeometry PixelReadoutGeometry SiDigitization InDetCondTools InDetRawData InDetSimData InDetSimEvent HitManagement PathResolver PixelCablingLib InDetConditionsSummaryService ) + LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaBaseComps GaudiKernel AthenaKernel PileUpToolsLib StoreGateLib GeneratorObjects PixelConditionsData SiPropertiesToolLib InDetIdentifier ReadoutGeometryBase InDetReadoutGeometry PixelReadoutGeometry SiDigitization InDetCondTools InDetRawData InDetSimData InDetSimEvent HitManagement PathResolver PixelCablingLib InDetConditionsSummaryService ) # Install files from the package: atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/FrontEndSimTool.h b/InnerDetector/InDetDigitization/PixelDigitization/src/FrontEndSimTool.h index 66dadbf42c96c030ab07a0cb5ca786a547de54ac..4bcf7ad3976bae55fc0c4e5e3c49173e5fd1af62 100644 --- a/InnerDetector/InDetDigitization/PixelDigitization/src/FrontEndSimTool.h +++ b/InnerDetector/InDetDigitization/PixelDigitization/src/FrontEndSimTool.h @@ -23,7 +23,7 @@ #include "SiDigitization/SiHelper.h" #include "PixelReadoutGeometry/PixelModuleDesign.h" -#include "InDetReadoutGeometry/SiCellId.h" +#include "ReadoutGeometryBase/SiCellId.h" #include "PixelConditionsData/PixelModuleData.h" #include "PixelConditionsData/PixelChargeCalibCondData.h" diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/RD53SimTool.cxx b/InnerDetector/InDetDigitization/PixelDigitization/src/RD53SimTool.cxx index dba1b3a1d6cd08aabc38837453874f1fc23ac188..5fa2e54cc1b3e42eca30c8edd45211188289be7d 100644 --- a/InnerDetector/InDetDigitization/PixelDigitization/src/RD53SimTool.cxx +++ b/InnerDetector/InDetDigitization/PixelDigitization/src/RD53SimTool.cxx @@ -7,7 +7,7 @@ #include "PixelReadoutGeometry/PixelModuleDesign.h" #include "SiDigitization/SiHelper.h" -#include "InDetReadoutGeometry/SiReadoutCellId.h" +#include "ReadoutGeometryBase/SiReadoutCellId.h" #include "CLHEP/Random/RandFlat.h" diff --git a/InnerDetector/InDetDigitization/SiDigitization/CMakeLists.txt b/InnerDetector/InDetDigitization/SiDigitization/CMakeLists.txt index e5cdbb23293278d860d37d12195bf593581b4ada..250ac67dd5dfb6912a3d305f6d8f39fb6214edbc 100644 --- a/InnerDetector/InDetDigitization/SiDigitization/CMakeLists.txt +++ b/InnerDetector/InDetDigitization/SiDigitization/CMakeLists.txt @@ -9,5 +9,5 @@ atlas_add_library( SiDigitization src/SiChargedDiodeCollection.cxx src/SiSurfaceCharge.cxx PUBLIC_HEADERS SiDigitization - LINK_LIBRARIES AthenaKernel AthAllocators Identifier GaudiKernel InDetReadoutGeometry InDetSimEvent ) + LINK_LIBRARIES AthenaKernel AthAllocators Identifier GaudiKernel InDetReadoutGeometry ReadoutGeometryBase InDetSimEvent ) diff --git a/InnerDetector/InDetDigitization/SiDigitization/SiDigitization/SiChargedDiode.h b/InnerDetector/InDetDigitization/SiDigitization/SiDigitization/SiChargedDiode.h index 5184b361849273006a8877e6b04a36c76d60892e..5631e5e653757d51a3d086317e8cce4065972d74 100755 --- a/InnerDetector/InDetDigitization/SiDigitization/SiDigitization/SiChargedDiode.h +++ b/InnerDetector/InDetDigitization/SiDigitization/SiDigitization/SiChargedDiode.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -23,8 +23,8 @@ // Data member classes #include "InDetSimEvent/SiTotalCharge.h" -#include "InDetReadoutGeometry/SiCellId.h" -#include "InDetReadoutGeometry/SiReadoutCellId.h" +#include "ReadoutGeometryBase/SiCellId.h" +#include "ReadoutGeometryBase/SiReadoutCellId.h" class SiHelper; // used to set the flag word //class SiChargedDiode; diff --git a/InnerDetector/InDetDigitization/SiDigitization/SiDigitization/SiSurfaceCharge.h b/InnerDetector/InDetDigitization/SiDigitization/SiDigitization/SiSurfaceCharge.h index 782db2a39bd3232be595ca8ad1ae4cbb013efadb..5f139cf76392bae21bcb61f0e29adc1b283e9788 100755 --- a/InnerDetector/InDetDigitization/SiDigitization/SiDigitization/SiSurfaceCharge.h +++ b/InnerDetector/InDetDigitization/SiDigitization/SiDigitization/SiSurfaceCharge.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -16,8 +16,7 @@ #ifndef SIDIGITIZATION_SISURFACECHARGE_H #define SIDIGITIZATION_SISURFACECHARGE_H -//#include "SiTrackerDetDescr/SiLocalPosition.h" -#include "InDetReadoutGeometry/SiLocalPosition.h" +#include "ReadoutGeometryBase/SiLocalPosition.h" #include "InDetSimEvent/SiCharge.h" diff --git a/InnerDetector/InDetDigitization/SiDigitization/src/SiChargedDiodeCollection.cxx b/InnerDetector/InDetDigitization/SiDigitization/src/SiChargedDiodeCollection.cxx index 810345d47fe0db5098e311c4752bcee175d9eb54..de52fa298ff6bb47f379aed2a98e7751342221f9 100755 --- a/InnerDetector/InDetDigitization/SiDigitization/src/SiChargedDiodeCollection.cxx +++ b/InnerDetector/InDetDigitization/SiDigitization/src/SiChargedDiodeCollection.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -16,8 +16,8 @@ // member classes #include "SiDigitization/SiHelper.h" #include "InDetReadoutGeometry/SiDetectorDesign.h" -#include "InDetReadoutGeometry/SiReadoutCellId.h" -#include "InDetReadoutGeometry/SiCellId.h" +#include "ReadoutGeometryBase/SiReadoutCellId.h" +#include "ReadoutGeometryBase/SiCellId.h" #include "GaudiKernel/MsgStream.h" #include "AthenaKernel/getMessageSvc.h" diff --git a/InnerDetector/InDetEventCnv/InDetJiveXML/CMakeLists.txt b/InnerDetector/InDetEventCnv/InDetJiveXML/CMakeLists.txt index 665c40c9cfb9d37626270e31d720ee1ee19f4622..33d992044e8f64c8d888d5ccc48151f208f882ea 100644 --- a/InnerDetector/InDetEventCnv/InDetJiveXML/CMakeLists.txt +++ b/InnerDetector/InDetEventCnv/InDetJiveXML/CMakeLists.txt @@ -11,7 +11,7 @@ atlas_add_component( InDetJiveXML src/*.cxx src/components/*.cxx INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaBaseComps StoreGateLib GaudiKernel InDetRawData TrkSpacePoint TrkTruthData JiveXMLLib AthContainers IdDictDetDescr InDetIdentifier InDetReadoutGeometry TRT_ReadoutGeometry InDetPrepRawData TrkEventPrimitives TrkPrepRawData InDetBeamSpotServiceLib InDetCondTools ) + LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaBaseComps StoreGateLib GaudiKernel InDetRawData TrkSpacePoint TrkTruthData JiveXMLLib AthContainers IdDictDetDescr InDetIdentifier ReadoutGeometryBase InDetReadoutGeometry TRT_ReadoutGeometry InDetPrepRawData TrkEventPrimitives TrkPrepRawData InDetBeamSpotServiceLib InDetCondTools ) # Install files from the package: atlas_install_joboptions( share/*.py ) diff --git a/InnerDetector/InDetEventCnv/InDetJiveXML/src/PixelClusterRetriever.cxx b/InnerDetector/InDetEventCnv/InDetJiveXML/src/PixelClusterRetriever.cxx index 114370e3175c51f71dba7d167895ce6abfb72841..cead2f1ceb1052cb1256c6d2b8412721078e20f2 100755 --- a/InnerDetector/InDetEventCnv/InDetJiveXML/src/PixelClusterRetriever.cxx +++ b/InnerDetector/InDetEventCnv/InDetJiveXML/src/PixelClusterRetriever.cxx @@ -13,7 +13,7 @@ #include "TrkTruthData/PRD_MultiTruthCollection.h" #include "InDetReadoutGeometry/SiDetectorElement.h" -#include "InDetReadoutGeometry/SiLocalPosition.h" +#include "ReadoutGeometryBase/SiLocalPosition.h" #include "InDetIdentifier/PixelID.h" diff --git a/InnerDetector/InDetEventCnv/InDetJiveXML/src/SiClusterRetriever.cxx b/InnerDetector/InDetEventCnv/InDetJiveXML/src/SiClusterRetriever.cxx index acc3b69e8ef5b958b7831ef253466a738ca83dbe..f168f27707c1a500b809ff210f333da48558ea72 100755 --- a/InnerDetector/InDetEventCnv/InDetJiveXML/src/SiClusterRetriever.cxx +++ b/InnerDetector/InDetEventCnv/InDetJiveXML/src/SiClusterRetriever.cxx @@ -13,7 +13,7 @@ #include "TrkTruthData/PRD_MultiTruthCollection.h" #include "InDetReadoutGeometry/SiDetectorElement.h" -#include "InDetReadoutGeometry/SiLocalPosition.h" +#include "ReadoutGeometryBase/SiLocalPosition.h" #include "InDetIdentifier/SCT_ID.h" diff --git a/InnerDetector/InDetExample/InDetDetDescrExample/CMakeLists.txt b/InnerDetector/InDetExample/InDetDetDescrExample/CMakeLists.txt index 74ec5a7739da79c922bfe8be88648e0c06917ed1..284f642bf7aa4c413fb62449f2b279e2a4329ef9 100644 --- a/InnerDetector/InDetExample/InDetDetDescrExample/CMakeLists.txt +++ b/InnerDetector/InDetExample/InDetDetDescrExample/CMakeLists.txt @@ -11,7 +11,7 @@ atlas_add_component( InDetDetDescrExample src/*.cxx src/components/*.cxx INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaBaseComps AthenaKernel StoreGateLib GeoModelInterfaces GeoPrimitives Identifier GaudiKernel InDetCondTools InDetConditionsSummaryService InDetIdentifier InDetReadoutGeometry PixelReadoutGeometry SCT_ReadoutGeometry TRT_ReadoutGeometry) + LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaBaseComps AthenaKernel StoreGateLib GeoModelInterfaces GeoPrimitives Identifier GaudiKernel InDetCondTools InDetConditionsSummaryService InDetIdentifier ReadoutGeometryBase InDetReadoutGeometry PixelReadoutGeometry SCT_ReadoutGeometry TRT_ReadoutGeometry) # Install files from the package: atlas_install_joboptions( share/*.py ) diff --git a/InnerDetector/InDetExample/InDetDetDescrExample/InDetDetDescrExample/ReadSiDetectorElements.h b/InnerDetector/InDetExample/InDetDetDescrExample/InDetDetDescrExample/ReadSiDetectorElements.h index abaed79fdf59dd66e5eee397e354767b8f104653..2e154abdc609045199d276a8395abb7257b973c8 100755 --- a/InnerDetector/InDetExample/InDetDetDescrExample/InDetDetDescrExample/ReadSiDetectorElements.h +++ b/InnerDetector/InDetExample/InDetDetDescrExample/InDetDetDescrExample/ReadSiDetectorElements.h @@ -9,7 +9,7 @@ #include "GaudiKernel/ServiceHandle.h" #include "GaudiKernel/ToolHandle.h" #include "AthenaKernel/IOVSvcDefs.h" -#include "InDetReadoutGeometry/SiCellId.h" +#include "ReadoutGeometryBase/SiCellId.h" #include "InDetReadoutGeometry/SiDetectorElementCollection.h" #include "GeoPrimitives/GeoPrimitives.h" #include "StoreGate/ReadCondHandleKey.h" diff --git a/InnerDetector/InDetExample/InDetDetDescrExample/InDetDetDescrExample/TestSiAlignment.h b/InnerDetector/InDetExample/InDetDetDescrExample/InDetDetDescrExample/TestSiAlignment.h index 0ee092e2726439888b3a11ad76ed10d83a6faa62..0877449015a89710a6338d7332d3f76f6f46db36 100755 --- a/InnerDetector/InDetExample/InDetDetDescrExample/InDetDetDescrExample/TestSiAlignment.h +++ b/InnerDetector/InDetExample/InDetDetDescrExample/InDetDetDescrExample/TestSiAlignment.h @@ -8,9 +8,9 @@ #include "AthenaBaseComps/AthAlgorithm.h" #include "GaudiKernel/ServiceHandle.h" #include "AthenaKernel/IOVSvcDefs.h" -#include "InDetReadoutGeometry/SiCellId.h" +#include "ReadoutGeometryBase/SiCellId.h" #include "InDetReadoutGeometry/SiDetectorElementCollection.h" -#include "InDetReadoutGeometry/SiLocalPosition.h" +#include "ReadoutGeometryBase/SiLocalPosition.h" #include "GeoPrimitives/GeoPrimitives.h" #include "StoreGate/ReadCondHandleKey.h" diff --git a/InnerDetector/InDetExample/InDetDetDescrExample/src/ReadSiDetectorElements.cxx b/InnerDetector/InDetExample/InDetDetDescrExample/src/ReadSiDetectorElements.cxx index f81ea8b6ad41e1c458c62f08dd6022beb606dec4..9c2c334de76a9eeb123b3c8e84ca4d8b207eea9e 100755 --- a/InnerDetector/InDetExample/InDetDetDescrExample/src/ReadSiDetectorElements.cxx +++ b/InnerDetector/InDetExample/InDetDetDescrExample/src/ReadSiDetectorElements.cxx @@ -10,13 +10,13 @@ #include "InDetReadoutGeometry/SiDetectorElement.h" #include "InDetReadoutGeometry/SiDetectorManager.h" #include "InDetReadoutGeometry/SiNumerology.h" -#include "InDetReadoutGeometry/SiCellId.h" -#include "InDetReadoutGeometry/SiIntersect.h" +#include "ReadoutGeometryBase/SiCellId.h" +#include "ReadoutGeometryBase/SiIntersect.h" #include "InDetIdentifier/PixelID.h" #include "InDetIdentifier/SCT_ID.h" #include "Identifier/Identifier.h" -#include "InDetReadoutGeometry/SiLocalPosition.h" +#include "ReadoutGeometryBase/SiLocalPosition.h" #include <vector> diff --git a/InnerDetector/InDetExample/InDetDetDescrExample/src/TestSiAlignment.cxx b/InnerDetector/InDetExample/InDetDetDescrExample/src/TestSiAlignment.cxx index c91b5072ffe5d96b0a6874fdeaee097ed1316a24..9f464d3105e8bc85044071494c46e42829f90534 100755 --- a/InnerDetector/InDetExample/InDetDetDescrExample/src/TestSiAlignment.cxx +++ b/InnerDetector/InDetExample/InDetDetDescrExample/src/TestSiAlignment.cxx @@ -8,9 +8,9 @@ #include "InDetReadoutGeometry/SiDetectorElement.h" #include "InDetReadoutGeometry/SiDetectorManager.h" -#include "InDetReadoutGeometry/SiCellId.h" -#include "InDetReadoutGeometry/SiIntersect.h" -#include "InDetReadoutGeometry/SiLocalPosition.h" +#include "ReadoutGeometryBase/SiCellId.h" +#include "ReadoutGeometryBase/SiIntersect.h" +#include "ReadoutGeometryBase/SiLocalPosition.h" #include "InDetIdentifier/PixelID.h" #include "InDetIdentifier/SCT_ID.h" #include "Identifier/Identifier.h" diff --git a/InnerDetector/InDetExample/InDetDetDescrExample/src/TestTRT_Alignment.cxx b/InnerDetector/InDetExample/InDetDetDescrExample/src/TestTRT_Alignment.cxx index 963e57372355866bb89151a04cc12979733d2377..0047e056301d40caed335fca18e5a5d1c2b87ce5 100755 --- a/InnerDetector/InDetExample/InDetDetDescrExample/src/TestTRT_Alignment.cxx +++ b/InnerDetector/InDetExample/InDetDetDescrExample/src/TestTRT_Alignment.cxx @@ -9,7 +9,7 @@ #include "InDetIdentifier/TRT_ID.h" #include "Identifier/Identifier.h" #include "TRT_ReadoutGeometry/TRT_DetectorManager.h" -#include "InDetReadoutGeometry/InDetDD_Defs.h" +#include "ReadoutGeometryBase/InDetDD_Defs.h" #include <iostream> #include <vector> diff --git a/InnerDetector/InDetRecAlgs/SiSpacePointFormation/CMakeLists.txt b/InnerDetector/InDetRecAlgs/SiSpacePointFormation/CMakeLists.txt index 58ec3f9664ada00156b881c5bdd9c7ba19b6e1a5..6fd470325005940bfd2d351da653221c09ed1d24 100644 --- a/InnerDetector/InDetRecAlgs/SiSpacePointFormation/CMakeLists.txt +++ b/InnerDetector/InDetRecAlgs/SiSpacePointFormation/CMakeLists.txt @@ -7,7 +7,7 @@ atlas_subdir( SiSpacePointFormation ) atlas_add_library( SiSpacePointFormationLib src/*.cxx PUBLIC_HEADERS SiSpacePointFormation - LINK_LIBRARIES AthContainers AthenaBaseComps AthenaKernel AthenaMonitoringKernelLib BeamSpotConditionsData GaudiKernel GeoPrimitives Identifier InDetPrepRawData InDetReadoutGeometry SiSpacePointToolLib StoreGateLib TrkSpacePoint + LINK_LIBRARIES AthContainers AthenaBaseComps AthenaKernel AthenaMonitoringKernelLib BeamSpotConditionsData GaudiKernel GeoPrimitives Identifier InDetPrepRawData ReadoutGeometryBase InDetReadoutGeometry SiSpacePointToolLib StoreGateLib TrkSpacePoint PRIVATE_LINK_LIBRARIES AtlasDetDescr xAODEventInfo InDetIdentifier ) atlas_add_component( SiSpacePointFormation diff --git a/InnerDetector/InDetRecAlgs/SiSpacePointFormation/src/SiElementPropertiesTable.cxx b/InnerDetector/InDetRecAlgs/SiSpacePointFormation/src/SiElementPropertiesTable.cxx index 47d0c581e44ee098243e4082e3144a436e440eaf..2853f4fcca6f0ed77071c398251325572abf3fbf 100755 --- a/InnerDetector/InDetRecAlgs/SiSpacePointFormation/src/SiElementPropertiesTable.cxx +++ b/InnerDetector/InDetRecAlgs/SiSpacePointFormation/src/SiElementPropertiesTable.cxx @@ -12,7 +12,7 @@ #include "InDetIdentifier/SCT_ID.h" #include "InDetReadoutGeometry/SiDetectorDesign.h" -#include "InDetReadoutGeometry/SiLocalPosition.h" +#include "ReadoutGeometryBase/SiLocalPosition.h" namespace InDet{ diff --git a/InnerDetector/InDetRecAlgs/SiSpacePointFormation/src/SiTrackerSpacePointFinder.cxx b/InnerDetector/InDetRecAlgs/SiSpacePointFormation/src/SiTrackerSpacePointFinder.cxx index 95e28a0906eb6a45ee1816f875181e69cee9c7d6..f8774f6c50f643caf01daff2daeecbb069348bb2 100755 --- a/InnerDetector/InDetRecAlgs/SiSpacePointFormation/src/SiTrackerSpacePointFinder.cxx +++ b/InnerDetector/InDetRecAlgs/SiSpacePointFormation/src/SiTrackerSpacePointFinder.cxx @@ -13,7 +13,7 @@ ATLAS Collaboration #include "SiSpacePointFormation/SiTrackerSpacePointFinder.h" // For processing clusters -#include "InDetReadoutGeometry/SiLocalPosition.h" +#include "ReadoutGeometryBase/SiLocalPosition.h" #include "InDetReadoutGeometry/SiDetectorDesign.h" #include "InDetReadoutGeometry/SiDetectorElement.h" diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/CMakeLists.txt b/InnerDetector/InDetRecTools/SiClusterizationTool/CMakeLists.txt index 99e0766f13cc21d27cb3c0a4a20cc5536fbfe3cb..d248f3014f2b39e1d4a3934de23917543f0a0d4c 100644 --- a/InnerDetector/InDetRecTools/SiClusterizationTool/CMakeLists.txt +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/CMakeLists.txt @@ -18,7 +18,7 @@ atlas_add_library( SiClusterizationToolLib INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${LWTNN_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} PRIVATE_INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} ${COOL_INCLUDE_DIRS} PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES ${CLHEP_LIBRARIES} ${LWTNN_LIBRARIES} ${EIGEN_LIBRARIES} ${ROOT_LIBRARIES} AthenaBaseComps AthenaKernel BeamSpotConditionsData EventPrimitives GaudiKernel GeoPrimitives Identifier InDetCondTools InDetConditionsSummaryService InDetIdentifier InDetPrepRawData InDetRawData InDetReadoutGeometry InDetRecToolInterfaces InDetSimData PixelCablingLib PixelConditionsData PixelGeoModelLib PoolSvcLib StoreGateLib TrkNeuralNetworkUtilsLib TrkParameters TrkSurfaces LwtnnUtils + LINK_LIBRARIES ${CLHEP_LIBRARIES} ${LWTNN_LIBRARIES} ${EIGEN_LIBRARIES} ${ROOT_LIBRARIES} AthenaBaseComps AthenaKernel BeamSpotConditionsData EventPrimitives GaudiKernel GeoPrimitives Identifier InDetCondTools InDetConditionsSummaryService InDetIdentifier InDetPrepRawData InDetRawData ReadoutGeometryBase InDetReadoutGeometry InDetRecToolInterfaces InDetSimData PixelCablingLib PixelConditionsData PixelGeoModelLib PoolSvcLib StoreGateLib TrkNeuralNetworkUtilsLib TrkParameters TrkSurfaces LwtnnUtils PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${COOL_LIBRARIES} AthenaPoolUtilities AtlasDetDescr AtlasHepMCLib DetDescrCondToolsLib FileCatalog PixelReadoutGeometry SCT_ReadoutGeometry TrkEventPrimitives VxVertex ) atlas_add_component( SiClusterizationTool diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/src/ClusterMakerTool.cxx b/InnerDetector/InDetRecTools/SiClusterizationTool/src/ClusterMakerTool.cxx index 5d5841a7b8ce57d947785c86ce9f70f12bb7bd42..dd4fea100091f9d913570f75d8fba91c0e21f9ef 100644 --- a/InnerDetector/InDetRecTools/SiClusterizationTool/src/ClusterMakerTool.cxx +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/src/ClusterMakerTool.cxx @@ -14,7 +14,7 @@ #include "GaudiKernel/ServiceHandle.h" #include "SiClusterizationTool/ClusterMakerTool.h" #include "InDetReadoutGeometry/SiDetectorElement.h" -#include "InDetReadoutGeometry/SiLocalPosition.h" +#include "ReadoutGeometryBase/SiLocalPosition.h" #include "PixelReadoutGeometry/PixelModuleDesign.h" #include "InDetPrepRawData/PixelCluster.h" #include "InDetPrepRawData/SCT_Cluster.h" diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/src/MergedPixelsTool.cxx b/InnerDetector/InDetRecTools/SiClusterizationTool/src/MergedPixelsTool.cxx index c9f25be80436f54b5da7fbf584fda5e29cc7baf9..4d2bee955492b59eca81ddad3c3c714ea796e78e 100644 --- a/InnerDetector/InDetRecTools/SiClusterizationTool/src/MergedPixelsTool.cxx +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/src/MergedPixelsTool.cxx @@ -18,7 +18,7 @@ #include "InDetPrepRawData/SiWidth.h" #include "InDetPrepRawData/PixelCluster.h" #include "InDetReadoutGeometry/SiDetectorElement.h" -#include "InDetReadoutGeometry/SiLocalPosition.h" +#include "ReadoutGeometryBase/SiLocalPosition.h" #include "InDetIdentifier/PixelID.h" #include "SiClusterizationTool/ClusterMakerTool.h" #include "InDetConditionsSummaryService/IInDetConditionsTool.h" diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/src/NnClusterizationFactory.cxx b/InnerDetector/InDetRecTools/SiClusterizationTool/src/NnClusterizationFactory.cxx index 07c628e0fb5cfd08f24296225e72f46e195bc096..45b577ae0fc83f40c23ef1b7b72c3df602765721 100644 --- a/InnerDetector/InDetRecTools/SiClusterizationTool/src/NnClusterizationFactory.cxx +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/src/NnClusterizationFactory.cxx @@ -28,7 +28,7 @@ #include "InDetPrepRawData/PixelCluster.h" #include "InDetReadoutGeometry/SiDetectorElement.h" #include "PixelReadoutGeometry/PixelModuleDesign.h" -#include "InDetReadoutGeometry/SiLocalPosition.h" +#include "ReadoutGeometryBase/SiLocalPosition.h" #include "TrkEventPrimitives/ParamDefs.h" #include "DetDescrCondTools/ICoolHistSvc.h" #include "AthenaPoolUtilities/CondAttrListCollection.h" diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/src/PixelGangedAmbiguitiesFinder.cxx b/InnerDetector/InDetRecTools/SiClusterizationTool/src/PixelGangedAmbiguitiesFinder.cxx index cacbf884680dd572abfe6aec0d724fa9f7a9250f..591d653c7b8ffddfeabe3cbf74e4d4219f8599bc 100644 --- a/InnerDetector/InDetRecTools/SiClusterizationTool/src/PixelGangedAmbiguitiesFinder.cxx +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/src/PixelGangedAmbiguitiesFinder.cxx @@ -13,7 +13,7 @@ #include "AtlasDetDescr/AtlasDetectorID.h" #include "InDetIdentifier/PixelID.h" -#include "InDetReadoutGeometry/SiCellId.h" +#include "ReadoutGeometryBase/SiCellId.h" #include "InDetReadoutGeometry/SiDetectorElement.h" #include "PixelReadoutGeometry/PixelModuleDesign.h" diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/src/SCT_ClusteringTool.cxx b/InnerDetector/InDetRecTools/SiClusterizationTool/src/SCT_ClusteringTool.cxx index dd536f804be705cb517f4416d092c223d6d06a8f..44c596f20e3aa2c8b73f7426342ba09e5cc2aa91 100644 --- a/InnerDetector/InDetRecTools/SiClusterizationTool/src/SCT_ClusteringTool.cxx +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/src/SCT_ClusteringTool.cxx @@ -15,10 +15,10 @@ #include "SCT_ReadoutGeometry/SCT_ModuleSideDesign.h" #include "SCT_ReadoutGeometry/SCT_BarrelModuleSideDesign.h" #include "SCT_ReadoutGeometry/SCT_ForwardModuleSideDesign.h" -#include "InDetReadoutGeometry/SiCellId.h" +#include "ReadoutGeometryBase/SiCellId.h" #include "InDetReadoutGeometry/SiDetectorElement.h" #include "InDetReadoutGeometry/SiDetectorDesign.h" -#include "InDetReadoutGeometry/SiLocalPosition.h" +#include "ReadoutGeometryBase/SiLocalPosition.h" #include "InDetPrepRawData/SiWidth.h" #include "Identifier/IdentifierHash.h" #include "AtlasDetDescr/AtlasDetectorID.h" diff --git a/InnerDetector/InDetRecTools/SiSpacePointTool/CMakeLists.txt b/InnerDetector/InDetRecTools/SiSpacePointTool/CMakeLists.txt index 0c6fb198bad0f8c942c23b5a3da9843ff0a8a7da..c55eeb2f5b55a483e2c9a1678c46715a56bc4bf7 100644 --- a/InnerDetector/InDetRecTools/SiSpacePointTool/CMakeLists.txt +++ b/InnerDetector/InDetRecTools/SiSpacePointTool/CMakeLists.txt @@ -8,7 +8,7 @@ atlas_add_library( SiSpacePointToolLib src/*.cxx PUBLIC_HEADERS SiSpacePointTool LINK_LIBRARIES AthenaBaseComps GeoPrimitives InDetPrepRawData TrkSpacePoint - PRIVATE_LINK_LIBRARIES InDetIdentifier InDetReadoutGeometry SiSpacePoint ) + PRIVATE_LINK_LIBRARIES InDetIdentifier ReadoutGeometryBase InDetReadoutGeometry SiSpacePoint ) atlas_add_component( SiSpacePointTool src/components/*.cxx diff --git a/InnerDetector/InDetRecTools/SiSpacePointTool/src/SiSpacePointMakerTool.cxx b/InnerDetector/InDetRecTools/SiSpacePointTool/src/SiSpacePointMakerTool.cxx index e249385f36afb22ccdcc01be16cc4278ac83f86e..1b8c5fa218ad50f0b33158882e74669b8cfd6d79 100644 --- a/InnerDetector/InDetRecTools/SiSpacePointTool/src/SiSpacePointMakerTool.cxx +++ b/InnerDetector/InDetRecTools/SiSpacePointTool/src/SiSpacePointMakerTool.cxx @@ -10,7 +10,7 @@ // For processing clusters #include "InDetIdentifier/SCT_ID.h" -#include "InDetReadoutGeometry/SiLocalPosition.h" +#include "ReadoutGeometryBase/SiLocalPosition.h" #include "InDetReadoutGeometry/SiDetectorElement.h" #include "InDetReadoutGeometry/SiDetectorElementCollection.h" diff --git a/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/CMakeLists.txt b/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/CMakeLists.txt index f9ba88ca67c3d0f71165ebb0575905a4ca0953b8..7f0df21e51a418e992c17419b1e10e4e0f133949 100644 --- a/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/CMakeLists.txt +++ b/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/CMakeLists.txt @@ -9,7 +9,7 @@ include_directories(src) atlas_add_component( SiTrigSpacePointFormation src/*.cxx src/components/*.cxx - LINK_LIBRARIES AthenaBaseComps BeamSpotConditionsData EventPrimitives GaudiKernel IRegionSelector Identifier InDetIdentifier InDetPrepRawData InDetReadoutGeometry InDetTrigToolInterfacesLib SiSpacePointFormationLib SiSpacePointToolLib StoreGateLib TrigInterfacesLib TrigSteeringEvent TrigTimeAlgsLib TrkSpacePoint ) + LINK_LIBRARIES AthenaBaseComps BeamSpotConditionsData EventPrimitives GaudiKernel IRegionSelector Identifier InDetIdentifier InDetPrepRawData ReadoutGeometryBase InDetReadoutGeometry InDetTrigToolInterfacesLib SiSpacePointFormationLib SiSpacePointToolLib StoreGateLib TrigInterfacesLib TrigSteeringEvent TrigTimeAlgsLib TrkSpacePoint ) # Install files from the package: atlas_install_python_modules( python/*.py ) diff --git a/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/src/SCT_TrigSpacePointTool.cxx b/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/src/SCT_TrigSpacePointTool.cxx index 708a1c26d5816558a3e10fbb194299374c45738e..ebe711c6abc4984f038d86f75e7dd83edb9a3ada 100755 --- a/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/src/SCT_TrigSpacePointTool.cxx +++ b/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/src/SCT_TrigSpacePointTool.cxx @@ -5,7 +5,7 @@ #include "SCT_TrigSpacePointTool.h" // For processing clusters -#include "InDetReadoutGeometry/SiLocalPosition.h" +#include "ReadoutGeometryBase/SiLocalPosition.h" #include "InDetReadoutGeometry/SiDetectorDesign.h" #include "InDetReadoutGeometry/SiDetectorElement.h" #include "InDetReadoutGeometry/SiDetectorElementCollection.h" diff --git a/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/src/SiTrigSpacePointFinder.cxx b/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/src/SiTrigSpacePointFinder.cxx index e6c6919f1ce277d23c4c3f8dfc0dc482a0bd543f..970ad45e84b1315940361da48a2b093dfbbc7f39 100755 --- a/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/src/SiTrigSpacePointFinder.cxx +++ b/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/src/SiTrigSpacePointFinder.cxx @@ -16,7 +16,7 @@ ATLAS Collaboration #include "InDetPrepRawData/PixelClusterCollection.h" #include "InDetPrepRawData/SCT_ClusterCollection.h" -#include "InDetReadoutGeometry/SiLocalPosition.h" +#include "ReadoutGeometryBase/SiLocalPosition.h" #include "InDetReadoutGeometry/SiDetectorElement.h" // Space point Classes, diff --git a/InnerDetector/InDetTruth/InDetTruthTools/CMakeLists.txt b/InnerDetector/InDetTruth/InDetTruthTools/CMakeLists.txt index ecd18ada112bcc3f165a58b72c6dce8dcd731a57..f0eaa8fd8a3d19957f8ed23f752ceece011862ee 100644 --- a/InnerDetector/InDetTruth/InDetTruthTools/CMakeLists.txt +++ b/InnerDetector/InDetTruth/InDetTruthTools/CMakeLists.txt @@ -7,7 +7,7 @@ atlas_subdir( InDetTruthTools ) atlas_add_component( InDetTruthTools src/*.cxx src/components/*.cxx - LINK_LIBRARIES AtlasHepMCLib AthenaBaseComps TrkEventPrimitives AtlasDetDescr InDetIdentifier InDetReadoutGeometry InDetSimData InDetPrepRawData TrkPrepRawData TrkTruthData InDetTruthInterfaces TrkTruthTrackInterfaces ) + LINK_LIBRARIES AtlasHepMCLib AthenaBaseComps TrkEventPrimitives AtlasDetDescr InDetIdentifier ReadoutGeometryBase InDetReadoutGeometry InDetSimData InDetPrepRawData TrkPrepRawData TrkTruthData InDetTruthInterfaces TrkTruthTrackInterfaces ) # Install files from the package: atlas_install_joboptions( share/*.py ) diff --git a/InnerDetector/InDetTruth/InDetTruthTools/src/PRD_MultiTruthBuilder.cxx b/InnerDetector/InDetTruth/InDetTruthTools/src/PRD_MultiTruthBuilder.cxx index 1bd4a6c95e11eb772ce8ca425fef48b228505d2d..2736f32e583839e7c9f93b22160371b307430014 100755 --- a/InnerDetector/InDetTruth/InDetTruthTools/src/PRD_MultiTruthBuilder.cxx +++ b/InnerDetector/InDetTruth/InDetTruthTools/src/PRD_MultiTruthBuilder.cxx @@ -9,7 +9,7 @@ #include "InDetSimData/InDetSimDataCollection.h" #include "InDetIdentifier/PixelID.h" #include "InDetReadoutGeometry/SiDetectorElement.h" -#include "InDetReadoutGeometry/SiReadoutCellId.h" +#include "ReadoutGeometryBase/SiReadoutCellId.h" //#include <stdexcept> //#include <ext/functional> diff --git a/Projects/AthSimulation/package_filters.txt b/Projects/AthSimulation/package_filters.txt index e94f7928a6e7d7e304cd3245045653f3056c8851..3ef26ddc5e7d264d2917007da89489c34a7d0967 100644 --- a/Projects/AthSimulation/package_filters.txt +++ b/Projects/AthSimulation/package_filters.txt @@ -124,6 +124,7 @@ + DetectorDescription/IdDictDetDescrCnv + DetectorDescription/IdDictParser + DetectorDescription/Identifier ++ DetectorDescription/ReadoutGeometryBase + Event/EventAthenaPool + Event/EventBookkeeperAthenaPool + Event/EventBookkeeperMetaData diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrInterfaces/CMakeLists.txt b/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrInterfaces/CMakeLists.txt index b5a8e4a94c988fbd8cb2f1cf1b19e0858688b743..0a7f813a10109d6bfb3ea124ac6d255d917bbb0b 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrInterfaces/CMakeLists.txt +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrInterfaces/CMakeLists.txt @@ -15,5 +15,5 @@ atlas_add_library( ISF_FatrasDetDescrInterfaces INTERFACE PUBLIC_HEADERS ISF_FatrasDetDescrInterfaces INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${EIGEN_LIBRARIES} GeoPrimitives EventPrimitives GaudiKernel InDetReadoutGeometry ) + LINK_LIBRARIES ${ROOT_LIBRARIES} ${EIGEN_LIBRARIES} GeoPrimitives EventPrimitives GaudiKernel InDetReadoutGeometry ReadoutGeometryBase ) diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrInterfaces/ISF_FatrasDetDescrInterfaces/ISegmentation.h b/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrInterfaces/ISF_FatrasDetDescrInterfaces/ISegmentation.h index d6f90cb5688ac7d798af34ccc4b1ec92714d3574..bf55f8b2dd9751c58d382e57f873b8f3cef01daf 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrInterfaces/ISF_FatrasDetDescrInterfaces/ISegmentation.h +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrInterfaces/ISF_FatrasDetDescrInterfaces/ISegmentation.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -14,7 +14,7 @@ // Math & Geometry library #include "GeoPrimitives/GeoPrimitives.h" #include "EventPrimitives/EventPrimitives.h" -#include "InDetReadoutGeometry/SiCellId.h" +#include "ReadoutGeometryBase/SiCellId.h" namespace iFatras { diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrModel/CMakeLists.txt b/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrModel/CMakeLists.txt index c6403f74dda61d5c1fb9afb531abdf0b1b7750de..e1cf6f4d94c070ac201f4532fb93853d0846c294 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrModel/CMakeLists.txt +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrModel/CMakeLists.txt @@ -15,6 +15,6 @@ atlas_add_library( ISF_FatrasDetDescrModel src/*.cxx PUBLIC_HEADERS ISF_FatrasDetDescrModel INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${EIGEN_LIBRARIES} ${CLHEP_LIBRARIES} AthenaKernel GeoPrimitives Identifier EventPrimitives InDetIdentifier InDetReadoutGeometry ISF_FatrasDetDescrInterfaces TrkDetDescrUtils TrkDetElementBase TrkGeometry TrkSurfaces TrkEventPrimitives TrkParameters StoreGateLib SGtests + LINK_LIBRARIES ${ROOT_LIBRARIES} ${EIGEN_LIBRARIES} ${CLHEP_LIBRARIES} AthenaKernel GeoPrimitives Identifier EventPrimitives InDetIdentifier InDetReadoutGeometry ReadoutGeometryBase ISF_FatrasDetDescrInterfaces TrkDetDescrUtils TrkDetElementBase TrkGeometry TrkSurfaces TrkEventPrimitives TrkParameters StoreGateLib SGtests PRIVATE_LINK_LIBRARIES GaudiKernel ) diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrModel/src/PlanarDetElement.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrModel/src/PlanarDetElement.cxx index 2ece470ce5913e82180b0dfe2c2cde1e294bb777..570955ea3a8764ba421149160f7decdb723706af 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrModel/src/PlanarDetElement.cxx +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrModel/src/PlanarDetElement.cxx @@ -27,7 +27,7 @@ #include "InDetIdentifier/PixelID.h" #include "InDetIdentifier/SCT_ID.h" -#include "InDetReadoutGeometry/SiCellId.h" +#include "ReadoutGeometryBase/SiCellId.h" #include "GaudiKernel/ISvcLocator.h" #include "StoreGate/StoreGateSvc.h" diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/CMakeLists.txt b/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/CMakeLists.txt index a73f23f16bbaa2be662dbf1c2ad8166d400522fb..12283ba21062ae17d13b670f949a42253be39c4f 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/CMakeLists.txt +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/CMakeLists.txt @@ -14,5 +14,5 @@ atlas_add_component( ISF_FatrasToolsID src/*.cxx src/components/*.cxx INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthenaBaseComps AthenaKernel AthContainers Identifier GaudiKernel InDetSimEvent ISF_FatrasInterfaces TrkParameters TrkExInterfaces StoreGateLib SGtests AtlasDetDescr IdDictDetDescr TRT_ConditionsServicesLib InDetIdentifier InDetReadoutGeometry TRT_ReadoutGeometry InDetPrepRawData InDetRIO_OnTrack SiClusterizationToolLib ISF_Event ISF_InterfacesLib ISF_FatrasDetDescrModel TrkDetElementBase TrkSurfaces TrkEventPrimitives TrkMeasurementBase TrkRIO_OnTrack TrkTrack TrkExUtils TrkToolInterfaces ) + LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthenaBaseComps AthenaKernel AthContainers Identifier GaudiKernel InDetSimEvent ISF_FatrasInterfaces TrkParameters TrkExInterfaces StoreGateLib SGtests AtlasDetDescr IdDictDetDescr TRT_ConditionsServicesLib InDetIdentifier ReadoutGeometryBase InDetReadoutGeometry TRT_ReadoutGeometry InDetPrepRawData InDetRIO_OnTrack SiClusterizationToolLib ISF_Event ISF_InterfacesLib ISF_FatrasDetDescrModel TrkDetElementBase TrkSurfaces TrkEventPrimitives TrkMeasurementBase TrkRIO_OnTrack TrkTrack TrkExUtils TrkToolInterfaces ) diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/src/HitCreatorSilicon.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/src/HitCreatorSilicon.cxx index e28ab75cb83e784bc5ecb28fe3555742b4c97d58..6c4bc93ad693341c9deeffd40fc519bf120ba01c 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/src/HitCreatorSilicon.cxx +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/src/HitCreatorSilicon.cxx @@ -29,7 +29,7 @@ #include "SiClusterizationTool/ClusterMakerTool.h" #include "InDetReadoutGeometry/SiDetectorElement.h" #include "InDetReadoutGeometry/SiDetectorDesign.h" -#include "InDetReadoutGeometry/SiDiodesParameters.h" +#include "ReadoutGeometryBase/SiDiodesParameters.h" #include "InDetPrepRawData/SiWidth.h" #include "InDetPrepRawData/PixelCluster.h" #include "InDetRIO_OnTrack/PixelClusterOnTrack.h"