From 2138cb218e861a740513926b2a4a1c98b0ed7a03 Mon Sep 17 00:00:00 2001 From: tbold <tomasz.bold@cern.ch> Date: Tue, 29 Oct 2024 20:00:53 +0100 Subject: [PATCH 1/2] Remove SPs from noisy regions in IBL --- .../TrigMinBias/src/TrigCountSpacePoints.cxx | 25 +++++++++++++++++++ .../TrigMinBias/src/TrigCountSpacePoints.h | 1 + 2 files changed, 26 insertions(+) diff --git a/Trigger/TrigAlgorithms/TrigMinBias/src/TrigCountSpacePoints.cxx b/Trigger/TrigAlgorithms/TrigMinBias/src/TrigCountSpacePoints.cxx index 219f732e411d..e75a2953f9a4 100644 --- a/Trigger/TrigAlgorithms/TrigMinBias/src/TrigCountSpacePoints.cxx +++ b/Trigger/TrigAlgorithms/TrigMinBias/src/TrigCountSpacePoints.cxx @@ -5,6 +5,26 @@ #include "TrigCountSpacePoints.h" #include "InDetPrepRawData/PixelCluster.h" +namespace { + bool isInNoiseArea(float r, float zz) { + if(r<40){ + if(zz>-3.5 && zz<-1.5) return true; + if(zz>38. && zz<40.) return true; + if(zz>79.5 && zz<81.5) return true; + if(zz>121. && zz<123.) return true; + if(zz>162. && zz<165.) return true; + if(zz>204. && zz<206.) return true; + if(zz>245.5 && zz<247.5) return true; + if(zz>-45. && zz<-43.5) return true; + if(zz>-86.5 && zz<-84.5) return true; + if(zz>-128. && zz<-126.) return true; + if(zz>-170. && zz<-167.) return true; + if(zz>-211. && zz<-209.) return true; + if(zz>-252.5 && zz<-250.5) return true; + } + return false; + } +} TrigCountSpacePoints::TrigCountSpacePoints(const std::string &name, ISvcLocator *pSvcLocator) : AthReentrantAlgorithm(name, pSvcLocator) {} @@ -58,6 +78,11 @@ StatusCode TrigCountSpacePoints::execute(const EventContext &context) const { for (const auto pSP : *pixSPointColl) { pixCLBeforeCuts++; + if (m_removeBLayerModuleEdgeNoise) { + isInNoiseArea(pSP->r(), pSP->globalPosition()[Amg::z]); + continue; + } + const InDet::PixelCluster *pixClust = static_cast<const InDet::PixelCluster *>(pSP->clusterList().first); const int pixClSize = (pixClust->rdoList()).size(); diff --git a/Trigger/TrigAlgorithms/TrigMinBias/src/TrigCountSpacePoints.h b/Trigger/TrigAlgorithms/TrigMinBias/src/TrigCountSpacePoints.h index 6774532fa8c7..a9178b5e053f 100644 --- a/Trigger/TrigAlgorithms/TrigMinBias/src/TrigCountSpacePoints.h +++ b/Trigger/TrigAlgorithms/TrigMinBias/src/TrigCountSpacePoints.h @@ -24,6 +24,7 @@ class TrigCountSpacePoints : public AthReentrantAlgorithm { private: Gaudi::Property<bool> m_doOnlyBLayer{this, "doOnlyBLayer", false, " "}; + Gaudi::Property<bool> m_removeBLayerModuleEdgeNoise{this, "removeBLayerModuleEdgeNoise", true, " "}; Gaudi::Property<int> m_pixModuleThreshold{this, "pixModuleThreshold", 100, "Dont take modules with SP Count higher than this threshold in Pixel Det."}; Gaudi::Property<int> m_sctModuleHigherThreshold{this, "sctModuleHigherThreshold", 2000000, "Dont take modules with SP Count higher than this threshold in SCT"}; Gaudi::Property<int> m_sctModuleLowerThreshold{this, "sctModuleLowerThreshold", 0, "Dont take modules with SP Count lowerer than this threshold in SCT"}; -- GitLab From a1a2f079abf6775cb0bc604abff564a16a05b929 Mon Sep 17 00:00:00 2001 From: tbold <tomasz.bold@cern.ch> Date: Wed, 30 Oct 2024 09:48:08 +0100 Subject: [PATCH 2/2] Fix obvious mistake --- .../TrigAlgorithms/TrigMinBias/src/TrigCountSpacePoints.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Trigger/TrigAlgorithms/TrigMinBias/src/TrigCountSpacePoints.cxx b/Trigger/TrigAlgorithms/TrigMinBias/src/TrigCountSpacePoints.cxx index e75a2953f9a4..396b886007e4 100644 --- a/Trigger/TrigAlgorithms/TrigMinBias/src/TrigCountSpacePoints.cxx +++ b/Trigger/TrigAlgorithms/TrigMinBias/src/TrigCountSpacePoints.cxx @@ -79,8 +79,9 @@ StatusCode TrigCountSpacePoints::execute(const EventContext &context) const { for (const auto pSP : *pixSPointColl) { pixCLBeforeCuts++; if (m_removeBLayerModuleEdgeNoise) { - isInNoiseArea(pSP->r(), pSP->globalPosition()[Amg::z]); - continue; + if ( isInNoiseArea(pSP->r(), pSP->globalPosition()[Amg::z]) ) { + continue; + } } const InDet::PixelCluster *pixClust = static_cast<const InDet::PixelCluster *>(pSP->clusterList().first); -- GitLab