Skip to content

Commit 6d52118

Browse files
authored
ITS - long clusters plots for OB (#2614)
* ITS - long clusters plots for OB * small fix * dummy commit to retrigger unrelated failed check
1 parent 1b93ba5 commit 6d52118

File tree

2 files changed

+38
-5
lines changed

2 files changed

+38
-5
lines changed

Modules/ITS/include/ITS/ITSClusterTask.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ class ITSClusterTask : public TaskInterface
7474

7575
static constexpr int NLayer = 7;
7676
static constexpr int NLayerIB = 3;
77+
static constexpr int NStavesIB = 12 + 16 + 20;
78+
static constexpr int NStavesOB = 24 + 30 + 42 + 48;
7779

7880
std::vector<TObject*> mPublishedObjects;
7981

@@ -103,8 +105,9 @@ class ITSClusterTask : public TaskInterface
103105
TH2D* hClusterOccupancyDistribution[NLayer] = { nullptr }; // number of clusters and hits per chip, per ROF. From clusters with npix > 2
104106

105107
// Anomalies plots
106-
TH2D* hLongClustersPerChip[3] = { nullptr };
108+
TH2D* hLongClustersPerChip[3] = { nullptr }; // IB layers
107109
TH2D* hMultPerChipWhenLongClusters[3] = { nullptr };
110+
TH2D* hLongClustersPerStave[4] = { nullptr }; // OB layers
108111

109112
// General
110113
TH2D* hClusterVsBunchCrossing = nullptr;
@@ -148,6 +151,7 @@ class ITSClusterTask : public TaskInterface
148151
static constexpr int mNStaves[NLayer] = { 12, 16, 20, 24, 30, 42, 48 };
149152
static constexpr int mNHicPerStave[NLayer] = { 1, 1, 1, 8, 8, 14, 14 };
150153
static constexpr int mNChipsPerHic[NLayer] = { 9, 9, 9, 14, 14, 14, 14 };
154+
static constexpr int mNChipsPerStave[NLayer] = { 9, 9, 9, 112, 112, 196, 196 };
151155
static constexpr int mNLanePerHic[NLayer] = { 3, 3, 3, 2, 2, 2, 2 };
152156
static constexpr int ChipBoundary[NLayer + 1] = { 0, 108, 252, 432, 3120, 6480, 14712, 24120 };
153157
static constexpr int StaveBoundary[NLayer + 1] = { 0, 12, 28, 48, 72, 102, 144, 192 };

Modules/ITS/src/ITSClusterTask.cxx

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ ITSClusterTask::~ITSClusterTask()
5353
delete hLongClustersPerChip[iLayer];
5454
delete hMultPerChipWhenLongClusters[iLayer];
5555
}
56+
57+
else {
58+
delete hLongClustersPerStave[iLayer - NLayerIB];
59+
}
5660
delete hClusterSizeLayerSummary[iLayer];
5761
delete hClusterTopologyLayerSummary[iLayer];
5862
delete hGroupedClusterSizeLayerSummary[iLayer];
@@ -161,8 +165,9 @@ void ITSClusterTask::monitorData(o2::framework::ProcessingContext& ctx)
161165
int nDigits3pixLay[7] = { 0 };
162166
int nClusters3pixLay[7] = { 0 };
163167
int nClusters3pix = 0;
164-
int nLongClusters[ChipBoundary[NLayerIB]] = {};
168+
int nLongClusters[ChipBoundary[NLayerIB]] = {}; // for IB
165169
int nHitsFromClusters[ChipBoundary[NLayerIB]] = {}; // only IB is implemented at the moment
170+
int nLongClustersStave[4][mNStaves[6]] = { {} }; // for OB. nLongClustersStave[n][m] means stave L<3+n>_<m>
166171

167172
for (int icl = ROF.getFirstEntry(); icl < ROF.getFirstEntry() + ROF.getNEntries(); icl++) {
168173

@@ -228,9 +233,13 @@ void ITSClusterTask::monitorData(o2::framework::ProcessingContext& ctx)
228233
nHitsFromClusters[ChipID] += npix;
229234
}
230235

231-
if (lay < NLayerIB && colspan >= minColSpanLongCluster && rowspan <= maxRowSpanLongCluster) {
236+
if (colspan >= minColSpanLongCluster && rowspan <= maxRowSpanLongCluster) {
232237
// definition of long cluster
233-
nLongClusters[ChipID]++;
238+
if (lay < NLayerIB) {
239+
nLongClusters[ChipID]++;
240+
} else {
241+
nLongClustersStave[lay - NLayerIB][sta]++;
242+
}
234243
}
235244

236245
if (lay < NLayerIB) {
@@ -293,7 +302,7 @@ void ITSClusterTask::monitorData(o2::framework::ProcessingContext& ctx)
293302
}
294303
}
295304

296-
// filling these anomaly plots once per ROF, ignoring chips w/o long clusters
305+
// filling these anomaly plots once per ROF, ignoring chips w/o long clusters -- IB
297306
for (int ichip = 0; ichip < ChipBoundary[NLayerIB]; ichip++) {
298307

299308
int nLong = TMath::Min(nLongClusters[ichip], 40);
@@ -307,6 +316,17 @@ void ITSClusterTask::monitorData(o2::framework::ProcessingContext& ctx)
307316
hLongClustersPerChip[ilayer]->Fill(ichip, nLong);
308317
hMultPerChipWhenLongClusters[ilayer]->Fill(ichip, nHitsFromClusters[ichip]);
309318
}
319+
// filling anomaly plots once per ROF, ignoring staves w/o long clusters -- OB
320+
for (int ilay = 3; ilay < 7; ilay++) {
321+
for (int ist = 0; ist < mNStaves[ilay]; ist++) {
322+
323+
int nLong = TMath::Min(nLongClustersStave[ilay - NLayerIB][ist], 40);
324+
if (nLong < 1) {
325+
continue;
326+
}
327+
hLongClustersPerStave[ilay - NLayerIB]->Fill(ist, nLong);
328+
}
329+
}
310330
}
311331

312332
if ((int)clusRofArr.size() > 0) {
@@ -440,6 +460,7 @@ void ITSClusterTask::reset()
440460
}
441461
}
442462
} else {
463+
hLongClustersPerStave[iLayer - NLayerIB]->Reset();
443464
hAverageClusterOccupancySummaryOB[iLayer]->Reset();
444465
hAverageClusterSizeSummaryOB[iLayer]->Reset();
445466
if (mDoPublish1DSummary == 1) {
@@ -500,6 +521,14 @@ void ITSClusterTask::createAllHistos()
500521
hMultPerChipWhenLongClusters[iLayer]->SetStats(0);
501522
}
502523

524+
else {
525+
526+
hLongClustersPerStave[iLayer - NLayerIB] = new TH2D(Form("Anomalies/Layer%d/LongClusters", iLayer), Form("Layer%d/LongClusters", iLayer), mNStaves[iLayer], 0, mNStaves[iLayer], 41, 0, 41);
527+
addObject(hLongClustersPerStave[iLayer - NLayerIB]);
528+
formatAxes(hLongClustersPerStave[iLayer - NLayerIB], "Stave", "number of long clusters", 1, 1.10);
529+
hLongClustersPerStave[iLayer - NLayerIB]->SetStats(0);
530+
}
531+
503532
hClusterSizeLayerSummary[iLayer] = new TH1L(Form("Layer%d/AverageClusterSizeSummary", iLayer), Form("Layer%dAverageClusterSizeSummary", iLayer), 128 * 128, 0, 128 * 128);
504533
hClusterSizeLayerSummary[iLayer]->SetTitle(Form("Cluster size summary for Layer %d", iLayer));
505534
addObject(hClusterSizeLayerSummary[iLayer]);

0 commit comments

Comments
 (0)