diff --git a/InnerDetector/InDetDigitization/FastSiDigitization/src/SCT_FastDigitizationTool.cxx b/InnerDetector/InDetDigitization/FastSiDigitization/src/SCT_FastDigitizationTool.cxx index e04813c639bac2b506df2426b0893cdfe517e6db..c11d2ef31476c2b06b9e786ef326166e8cbc26a1 100644 --- a/InnerDetector/InDetDigitization/FastSiDigitization/src/SCT_FastDigitizationTool.cxx +++ b/InnerDetector/InDetDigitization/FastSiDigitization/src/SCT_FastDigitizationTool.cxx @@ -844,7 +844,7 @@ StatusCode SCT_FastDigitizationTool::digitize(const EventContext& ctx, // create a custom cluster potentialClusterUniq = std::make_unique<InDet::SCT_Cluster>( potentialClusterId, lcorrectedPosition, - potentialClusterRDOList, siWidth, hitSiDetElement, + std::vector<Identifier>(potentialClusterRDOList), siWidth, hitSiDetElement, Amg::MatrixX(mat)); } diff --git a/InnerDetector/InDetDigitization/FastSiDigitization/src/SiSmearedDigitizationTool.cxx b/InnerDetector/InDetDigitization/FastSiDigitization/src/SiSmearedDigitizationTool.cxx index 2f51dafe9f5700182476e1625f9df07430b6da82..920971e227569c01e0a0626451bf994c8af91f17 100644 --- a/InnerDetector/InDetDigitization/FastSiDigitization/src/SiSmearedDigitizationTool.cxx +++ b/InnerDetector/InDetDigitization/FastSiDigitization/src/SiSmearedDigitizationTool.cxx @@ -698,10 +698,10 @@ StatusCode SiSmearedDigitizationTool::mergeClusters(SCT_detElement_RIO_map * clu InDet::SCT_Cluster* sctCluster = new InDet::SCT_Cluster(intersectionId, intersection, - rdoList, + std::vector<Identifier>(rdoList), siWidth, hitSiDetElement, - clusterErr); + Amg::MatrixX(clusterErr)); ((*inner_iter).second) = sctCluster; cluster_map->erase(iter); @@ -1088,7 +1088,7 @@ StatusCode SiSmearedDigitizationTool::digitize(const EventContext& ctx, sctCluster = new InDet::SCT_Cluster(intersectionId, intersection, - rdoList, + std::vector<Identifier>(rdoList), siWidth, hitSiDetElement, Amg::MatrixX(mat)); diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/SCT_ClusterCnv_p1_test.cxx b/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/SCT_ClusterCnv_p1_test.cxx index 51890d224818ca1caf9684ed422492f5034cb4ed..9ef86b33975cf58502b2467ff51dc46110174dea 100644 --- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/SCT_ClusterCnv_p1_test.cxx +++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/SCT_ClusterCnv_p1_test.cxx @@ -88,7 +88,7 @@ void test2() InDet::SCT_Cluster trans1 (Identifier (1234), locpos, - rdoList, + std::vector<Identifier>(rdoList), width, nullptr, Amg::MatrixX(cov)); diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/SCT_ClusterCnv_p2_test.cxx b/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/SCT_ClusterCnv_p2_test.cxx index 94576210feee6fc0b203a3e4c9d7bb4b8dfd93d8..a6d0bd32eb99c11cf42d1881ef24dbd54dfb76b8 100644 --- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/SCT_ClusterCnv_p2_test.cxx +++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/SCT_ClusterCnv_p2_test.cxx @@ -94,7 +94,7 @@ void test1 ATLAS_NOT_THREAD_SAFE (const SCT_ID& sct_id) InDet::SCT_Cluster trans1 (Identifier (1234), locpos, - rdoList, + std::vector<Identifier>(rdoList), width, nullptr, Amg::MatrixX(cov)); diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/SCT_ClusterCnv_p3_test.cxx b/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/SCT_ClusterCnv_p3_test.cxx index bec5b1a331576de229b3c553707028ff50861b0d..0d45b3708c69ae98e8632691ff6a43e908af441d 100644 --- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/SCT_ClusterCnv_p3_test.cxx +++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/SCT_ClusterCnv_p3_test.cxx @@ -94,7 +94,7 @@ void test1 ATLAS_NOT_THREAD_SAFE (const SCT_ID& sct_id) InDet::SCT_Cluster trans1 (Identifier (1234), locpos, - rdoList, + std::vector<Identifier>(rdoList), width, nullptr, Amg::MatrixX(cov)); diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/SCT_ClusterContainerCnv_p2_test.cxx b/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/SCT_ClusterContainerCnv_p2_test.cxx index 7a9edc7143d9d64fed3a7dad97854e081dc0c075..e1a62935388bd6656777a2eb11cc8c523100574e 100644 --- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/SCT_ClusterContainerCnv_p2_test.cxx +++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/SCT_ClusterContainerCnv_p2_test.cxx @@ -127,7 +127,7 @@ makeclusts(const SCT_ID& sct_id) auto cl = std::make_unique<InDet::SCT_Cluster> (Identifier (offs+1234), locpos, - rdoList, + std::vector<Identifier>(rdoList), width, nullptr, Amg::MatrixX(cov)); diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/SCT_ClusterContainerCnv_p3_test.cxx b/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/SCT_ClusterContainerCnv_p3_test.cxx index b9947c517bcea4093423a8cf851dc5a3755714c6..b85cfaef630b2f9f17118d49f7bbfa3f2fbe0225 100644 --- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/SCT_ClusterContainerCnv_p3_test.cxx +++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/SCT_ClusterContainerCnv_p3_test.cxx @@ -127,7 +127,7 @@ makeclusts(const SCT_ID& sct_id) auto cl = std::make_unique<InDet::SCT_Cluster> (Identifier (offs+1234), locpos, - rdoList, + std::vector<Identifier>(rdoList), width, nullptr, Amg::MatrixX(cov)); @@ -152,7 +152,7 @@ void test1 ATLAS_NOT_THREAD_SAFE (const SCT_ID& sct_id) std::unique_ptr<const InDet::SCT_ClusterContainer> cont = makeclusts(sct_id); testit (*cont, sct_id); } - + // And again with leak checking. Athena_test::Leakcheck check; std::unique_ptr<const InDet::SCT_ClusterContainer> cont = makeclusts(sct_id); diff --git a/InnerDetector/InDetMeasurementUtilities/src/ClusterConversionUtilities.cxx b/InnerDetector/InDetMeasurementUtilities/src/ClusterConversionUtilities.cxx index 7f01763006f1240918bd93063a2a89f2e57cfa7b..b72255d9c71c1ca96f022fdc34526273af4c2868 100644 --- a/InnerDetector/InDetMeasurementUtilities/src/ClusterConversionUtilities.cxx +++ b/InnerDetector/InDetMeasurementUtilities/src/ClusterConversionUtilities.cxx @@ -266,10 +266,10 @@ namespace TrackingUtilities { indetCluster = new InDet::SCT_Cluster(id, locpos, - rdoList, + std::vector<Identifier>(rdoList), width, &element, - errorMatrix); + std::move(errorMatrix)); return StatusCode::SUCCESS; } diff --git a/InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/SCT_Cluster.h b/InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/SCT_Cluster.h index 033049fdfe0f19a798375f7f93abaffae98af13a..a03bece228f1f9418ba3f1c84da1139c2b070054 100755 --- a/InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/SCT_Cluster.h +++ b/InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/SCT_Cluster.h @@ -47,19 +47,6 @@ class SCT_Cluster final : public SiCluster { /// Destructor: virtual ~SCT_Cluster(); //default in dtor - - /** - * Constructor with parameters using pointer of Amg::MatrixX. - * Last parameter might not be always filled and will be nullptr by default. - * The others including SiDetectorElement have to be given! - */ - SCT_Cluster(const Identifier& RDOId, - const Amg::Vector2D& locpos, - const std::vector<Identifier>& rdoList, - const InDet::SiWidth& width, - const InDetDD::SiDetectorElement* detEl, - const Amg::MatrixX& locErrMat); - /** * Constructor with parameters using unique_ptr of Amg::MatrixX. * All parameters have to be given! @@ -71,7 +58,7 @@ class SCT_Cluster final : public SiCluster { const InDet::SiWidth& width, const InDetDD::SiDetectorElement* detEl, Amg::MatrixX&& locErrMat); - + /** Interface method checking the type*/ virtual bool type(Trk::PrepRawDataType type) const override final; @@ -105,20 +92,20 @@ private: inline uint16_t SCT_Cluster::hitsInThirdTimeBin() const { - return m_hitsInThirdTimeBin; + return m_hitsInThirdTimeBin; } - - inline void SCT_Cluster::setHitsInThirdTimeBin(uint16_t hitsInThirdTimeBin) + + inline void SCT_Cluster::setHitsInThirdTimeBin(uint16_t hitsInThirdTimeBin) { m_hitsInThirdTimeBin = hitsInThirdTimeBin; } - + inline int SCT_Cluster::stripHasHitInThirdTimeBin(int stripNumberWithinCluster) const { return stripNumberWithinCluster <= 16 ? (int)((m_hitsInThirdTimeBin >> stripNumberWithinCluster) & 0x1): 0; - + } - + MsgStream& operator << (MsgStream& stream, const SCT_Cluster& prd); diff --git a/InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/SiCluster.h b/InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/SiCluster.h index 1142c79c0a905b0222a277f019e6a11a987fb2cd..7d0c2424105d102f097eb3f1592c7167ba161788 100755 --- a/InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/SiCluster.h +++ b/InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/SiCluster.h @@ -64,7 +64,7 @@ public: /// Move assignment operator SiCluster& operator=(SiCluster&&) = default; /// Destructor: - virtual ~SiCluster(); //default in dtor + virtual ~SiCluster() = default; /** * Constructor with parameters using ref or omitting Amg::MatrixX. @@ -72,38 +72,20 @@ public: */ SiCluster(const Identifier& RDOId, const Amg::Vector2D& locpos, - const std::vector<Identifier>& rdoList, + std::vector<Identifier>&& rdoList, const InDet::SiWidth& width, const InDetDD::SiDetectorElement* detEl, - const Amg::MatrixX& locErrMat); + Amg::MatrixX&& locErrMat); SiCluster(const Identifier& RDOId, const Amg::Vector2D& locpos, - const std::vector<Identifier>& rdoList, + std::vector<Identifier>&& rdoList, const InDet::SiWidth& width, const InDetDD::SiDetectorElement* detEl); SiCluster(const Identifier& RDOId, const Amg::Vector2D& locpos, const Amg::Vector3D& globpos, - const std::vector<Identifier>& rdoList, - const InDet::SiWidth& width, - const InDetDD::SiDetectorElement* detEl, - const Amg::MatrixX& locErrMat); - - SiCluster(const Identifier& RDOId, - const Amg::Vector2D& locpos, - const Amg::Vector3D& globpos, - const std::vector<Identifier>& rdoList, - const InDet::SiWidth& width, - const InDetDD::SiDetectorElement* detEl); - - /** - * Constructor with parameters using r-value reference of Amg::MatrixX. - * All parameters have to be given! - */ - SiCluster(const Identifier& RDOId, - const Amg::Vector2D& locpos, std::vector<Identifier>&& rdoList, const InDet::SiWidth& width, const InDetDD::SiDetectorElement* detEl, @@ -114,8 +96,7 @@ public: const Amg::Vector3D& globpos, std::vector<Identifier>&& rdoList, const InDet::SiWidth& width, - const InDetDD::SiDetectorElement* detEl, - Amg::MatrixX&& locErrMat); + const InDetDD::SiDetectorElement* detEl); /** * @name Virtual methods diff --git a/InnerDetector/InDetRecEvent/InDetPrepRawData/src/PixelCluster.cxx b/InnerDetector/InDetRecEvent/InDetPrepRawData/src/PixelCluster.cxx index 77ee38a25919837cf61acc87ec1a9fa309b09487..84f40f24f8042fc30dd50e54832db680fe90eb73 100755 --- a/InnerDetector/InDetRecEvent/InDetPrepRawData/src/PixelCluster.cxx +++ b/InnerDetector/InDetRecEvent/InDetPrepRawData/src/PixelCluster.cxx @@ -178,8 +178,8 @@ PixelCluster::PixelCluster(const Identifier& RDOId, const float omegax, const float omegay, int splitInfoRaw) - : SiCluster(RDOId, locpos, rdoList, width, detEl, - locErrMat), // call base class constructor + : SiCluster(RDOId, locpos, std::move(rdoList), width, detEl, + std::move(locErrMat)), // call base class constructor m_omegax(omegax), m_omegay(omegay), m_totList(), diff --git a/InnerDetector/InDetRecEvent/InDetPrepRawData/src/SCT_Cluster.cxx b/InnerDetector/InDetRecEvent/InDetPrepRawData/src/SCT_Cluster.cxx index 8a4ba447c8929f11e59f30b692e7e78590212c51..fe84e185c5c6371fdf5a623b162f795ba69ab70d 100755 --- a/InnerDetector/InDetRecEvent/InDetPrepRawData/src/SCT_Cluster.cxx +++ b/InnerDetector/InDetRecEvent/InDetPrepRawData/src/SCT_Cluster.cxx @@ -22,17 +22,6 @@ namespace InDet{ -SCT_Cluster::SCT_Cluster(const Identifier& RDOId, - const Amg::Vector2D& locpos, - const std::vector<Identifier>& rdoList, - const InDet::SiWidth& width, - const InDetDD::SiDetectorElement* detEl, - const Amg::MatrixX& locErrMat) - : SiCluster(RDOId, locpos, rdoList, width, detEl, locErrMat) -{ - m_hitsInThirdTimeBin = 0; -} - SCT_Cluster::SCT_Cluster(const Identifier& RDOId, const Amg::Vector2D& locpos, std::vector<Identifier>&& rdoList, @@ -60,7 +49,7 @@ std::ostream& operator << (std::ostream& stream, const SCT_Cluster& prd) return prd.dump(stream); } -bool +bool SCT_Cluster::type(Trk::PrepRawDataType type) const{ return (type == Trk::PrepRawDataType::SCT_Cluster or type == Trk::PrepRawDataType::SiCluster); } diff --git a/InnerDetector/InDetRecEvent/InDetPrepRawData/src/SiCluster.cxx b/InnerDetector/InDetRecEvent/InDetPrepRawData/src/SiCluster.cxx index 4ecf0a425149e249c214eb99cfc7898f977c260d..89286e9b9b5fb189d4be7a63a4f4e09cf635ffad 100755 --- a/InnerDetector/InDetRecEvent/InDetPrepRawData/src/SiCluster.cxx +++ b/InnerDetector/InDetRecEvent/InDetPrepRawData/src/SiCluster.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -21,12 +21,12 @@ namespace InDet { // Constructor for EF: SiCluster::SiCluster(const Identifier& RDOId, const Amg::Vector2D& locpos, - const std::vector<Identifier>& rdoList, + std::vector<Identifier>&& rdoList, const InDet::SiWidth& width, const InDetDD::SiDetectorElement* detEl, - const Amg::MatrixX& locErrMat) + Amg::MatrixX&& locErrMat) : // call base class constructor - PrepRawData(RDOId, locpos, rdoList, locErrMat) + PrepRawData(RDOId, locpos, std::move(rdoList), std::move(locErrMat)) , m_width(width) , m_detEl(detEl) , m_gangedPixel(false) @@ -40,11 +40,11 @@ SiCluster::SiCluster(const Identifier& RDOId, // Constructor for EF: SiCluster::SiCluster(const Identifier& RDOId, const Amg::Vector2D& locpos, - const std::vector<Identifier>& rdoList, + std::vector<Identifier>&& rdoList, const InDet::SiWidth& width, const InDetDD::SiDetectorElement* detEl) : // call base class constructor - PrepRawData(RDOId, locpos, rdoList, {}) + PrepRawData(RDOId, locpos, std::move(rdoList), {}) , m_width(width) , m_detEl(detEl) , m_gangedPixel(false) @@ -58,68 +58,32 @@ SiCluster::SiCluster(const Identifier& RDOId, SiCluster::SiCluster(const Identifier& RDOId, const Amg::Vector2D& locpos, const Amg::Vector3D& globpos, - const std::vector<Identifier>& rdoList, - const InDet::SiWidth& width, - const InDetDD::SiDetectorElement* detEl, - const Amg::MatrixX& locErrMat) - : // call base class constructor - PrepRawData(RDOId, locpos, rdoList, locErrMat) - , m_globalPosition(globpos) - , m_width(width) - , m_detEl(detEl) - , m_gangedPixel(false) -{} - -SiCluster::SiCluster(const Identifier& RDOId, - const Amg::Vector2D& locpos, - const Amg::Vector3D& globpos, - const std::vector<Identifier>& rdoList, - const InDet::SiWidth& width, - const InDetDD::SiDetectorElement* detEl) - : // call base class constructor - PrepRawData(RDOId, locpos, rdoList,{}) - , m_globalPosition(globpos) - , m_width(width) - , m_detEl(detEl) - , m_gangedPixel(false) -{} - -SiCluster::SiCluster(const Identifier& RDOId, - const Amg::Vector2D& locpos, std::vector<Identifier>&& rdoList, const InDet::SiWidth& width, const InDetDD::SiDetectorElement* detEl, Amg::MatrixX&& locErrMat) : // call base class constructor PrepRawData(RDOId, locpos, std::move(rdoList), std::move(locErrMat)) + , m_globalPosition(globpos) , m_width(width) , m_detEl(detEl) , m_gangedPixel(false) -{ - if (m_detEl) { - m_globalPosition = - m_detEl->surface(identify()).localToGlobal(localPosition()); - } -} +{} SiCluster::SiCluster(const Identifier& RDOId, const Amg::Vector2D& locpos, const Amg::Vector3D& globpos, std::vector<Identifier>&& rdoList, const InDet::SiWidth& width, - const InDetDD::SiDetectorElement* detEl, - Amg::MatrixX&& locErrMat) + const InDetDD::SiDetectorElement* detEl) : // call base class constructor - PrepRawData(RDOId, locpos, std::move(rdoList), std::move(locErrMat)) + PrepRawData(RDOId, locpos, std::move(rdoList),{}) , m_globalPosition(globpos) , m_width(width) , m_detEl(detEl) , m_gangedPixel(false) {} -// Destructor: -SiCluster::~SiCluster() = default; - MsgStream& SiCluster::dump(MsgStream& stream) const {