diff --git a/Modules/ITS/include/ITS/ITSClusterTask.h b/Modules/ITS/include/ITS/ITSClusterTask.h index c275ae93d5..9251776918 100644 --- a/Modules/ITS/include/ITS/ITSClusterTask.h +++ b/Modules/ITS/include/ITS/ITSClusterTask.h @@ -74,6 +74,8 @@ class ITSClusterTask : public TaskInterface static constexpr int NLayer = 7; static constexpr int NLayerIB = 3; + static constexpr int NStavesIB = 12 + 16 + 20; + static constexpr int NStavesOB = 24 + 30 + 42 + 48; std::vector mPublishedObjects; @@ -103,8 +105,9 @@ class ITSClusterTask : public TaskInterface TH2D* hClusterOccupancyDistribution[NLayer] = { nullptr }; // number of clusters and hits per chip, per ROF. From clusters with npix > 2 // Anomalies plots - TH2D* hLongClustersPerChip[3] = { nullptr }; + TH2D* hLongClustersPerChip[3] = { nullptr }; // IB layers TH2D* hMultPerChipWhenLongClusters[3] = { nullptr }; + TH2D* hLongClustersPerStave[4] = { nullptr }; // OB layers // General TH2D* hClusterVsBunchCrossing = nullptr; @@ -148,6 +151,7 @@ class ITSClusterTask : public TaskInterface static constexpr int mNStaves[NLayer] = { 12, 16, 20, 24, 30, 42, 48 }; static constexpr int mNHicPerStave[NLayer] = { 1, 1, 1, 8, 8, 14, 14 }; static constexpr int mNChipsPerHic[NLayer] = { 9, 9, 9, 14, 14, 14, 14 }; + static constexpr int mNChipsPerStave[NLayer] = { 9, 9, 9, 112, 112, 196, 196 }; static constexpr int mNLanePerHic[NLayer] = { 3, 3, 3, 2, 2, 2, 2 }; static constexpr int ChipBoundary[NLayer + 1] = { 0, 108, 252, 432, 3120, 6480, 14712, 24120 }; static constexpr int StaveBoundary[NLayer + 1] = { 0, 12, 28, 48, 72, 102, 144, 192 }; diff --git a/Modules/ITS/src/ITSClusterTask.cxx b/Modules/ITS/src/ITSClusterTask.cxx index c1804a65a4..c7337b4bdc 100644 --- a/Modules/ITS/src/ITSClusterTask.cxx +++ b/Modules/ITS/src/ITSClusterTask.cxx @@ -53,6 +53,10 @@ ITSClusterTask::~ITSClusterTask() delete hLongClustersPerChip[iLayer]; delete hMultPerChipWhenLongClusters[iLayer]; } + + else { + delete hLongClustersPerStave[iLayer - NLayerIB]; + } delete hClusterSizeLayerSummary[iLayer]; delete hClusterTopologyLayerSummary[iLayer]; delete hGroupedClusterSizeLayerSummary[iLayer]; @@ -161,8 +165,9 @@ void ITSClusterTask::monitorData(o2::framework::ProcessingContext& ctx) int nDigits3pixLay[7] = { 0 }; int nClusters3pixLay[7] = { 0 }; int nClusters3pix = 0; - int nLongClusters[ChipBoundary[NLayerIB]] = {}; + int nLongClusters[ChipBoundary[NLayerIB]] = {}; // for IB int nHitsFromClusters[ChipBoundary[NLayerIB]] = {}; // only IB is implemented at the moment + int nLongClustersStave[4][mNStaves[6]] = { {} }; // for OB. nLongClustersStave[n][m] means stave L<3+n>_ for (int icl = ROF.getFirstEntry(); icl < ROF.getFirstEntry() + ROF.getNEntries(); icl++) { @@ -228,9 +233,13 @@ void ITSClusterTask::monitorData(o2::framework::ProcessingContext& ctx) nHitsFromClusters[ChipID] += npix; } - if (lay < NLayerIB && colspan >= minColSpanLongCluster && rowspan <= maxRowSpanLongCluster) { + if (colspan >= minColSpanLongCluster && rowspan <= maxRowSpanLongCluster) { // definition of long cluster - nLongClusters[ChipID]++; + if (lay < NLayerIB) { + nLongClusters[ChipID]++; + } else { + nLongClustersStave[lay - NLayerIB][sta]++; + } } if (lay < NLayerIB) { @@ -293,7 +302,7 @@ void ITSClusterTask::monitorData(o2::framework::ProcessingContext& ctx) } } - // filling these anomaly plots once per ROF, ignoring chips w/o long clusters + // filling these anomaly plots once per ROF, ignoring chips w/o long clusters -- IB for (int ichip = 0; ichip < ChipBoundary[NLayerIB]; ichip++) { int nLong = TMath::Min(nLongClusters[ichip], 40); @@ -307,6 +316,17 @@ void ITSClusterTask::monitorData(o2::framework::ProcessingContext& ctx) hLongClustersPerChip[ilayer]->Fill(ichip, nLong); hMultPerChipWhenLongClusters[ilayer]->Fill(ichip, nHitsFromClusters[ichip]); } + // filling anomaly plots once per ROF, ignoring staves w/o long clusters -- OB + for (int ilay = 3; ilay < 7; ilay++) { + for (int ist = 0; ist < mNStaves[ilay]; ist++) { + + int nLong = TMath::Min(nLongClustersStave[ilay - NLayerIB][ist], 40); + if (nLong < 1) { + continue; + } + hLongClustersPerStave[ilay - NLayerIB]->Fill(ist, nLong); + } + } } if ((int)clusRofArr.size() > 0) { @@ -440,6 +460,7 @@ void ITSClusterTask::reset() } } } else { + hLongClustersPerStave[iLayer - NLayerIB]->Reset(); hAverageClusterOccupancySummaryOB[iLayer]->Reset(); hAverageClusterSizeSummaryOB[iLayer]->Reset(); if (mDoPublish1DSummary == 1) { @@ -500,6 +521,14 @@ void ITSClusterTask::createAllHistos() hMultPerChipWhenLongClusters[iLayer]->SetStats(0); } + else { + + hLongClustersPerStave[iLayer - NLayerIB] = new TH2D(Form("Anomalies/Layer%d/LongClusters", iLayer), Form("Layer%d/LongClusters", iLayer), mNStaves[iLayer], 0, mNStaves[iLayer], 41, 0, 41); + addObject(hLongClustersPerStave[iLayer - NLayerIB]); + formatAxes(hLongClustersPerStave[iLayer - NLayerIB], "Stave", "number of long clusters", 1, 1.10); + hLongClustersPerStave[iLayer - NLayerIB]->SetStats(0); + } + hClusterSizeLayerSummary[iLayer] = new TH1L(Form("Layer%d/AverageClusterSizeSummary", iLayer), Form("Layer%dAverageClusterSizeSummary", iLayer), 128 * 128, 0, 128 * 128); hClusterSizeLayerSummary[iLayer]->SetTitle(Form("Cluster size summary for Layer %d", iLayer)); addObject(hClusterSizeLayerSummary[iLayer]);