Skip to content

Commit a1e4219

Browse files
committed
Working version
1 parent a5fbc47 commit a1e4219

File tree

2 files changed

+19
-12
lines changed

2 files changed

+19
-12
lines changed

Modules/ITS/include/ITS/ITSClusterTask.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class ITSClusterTask : public TaskInterface
9696
TH1L* hClusterSizeLayerSummary[NLayer] = { nullptr };
9797
TH1L* hClusterTopologyLayerSummary[NLayer] = { nullptr };
9898
TH1L* hGroupedClusterSizeLayerSummary[NLayer] = { nullptr };
99-
TH1D* hClusterOccupancyDistribution[NLayer] = { nullptr }; // number of clusters with npix > 1, per chip, per ROF
99+
TH2D* hClusterOccupancyDistribution[NLayer] = { nullptr }; // number of clusters and hits per chip, per ROF. From clusters with npix > 2
100100

101101
// Anomalies plots
102102
TH2D* hLongClustersPerChip[3] = { nullptr };

Modules/ITS/src/ITSClusterTask.cxx

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ ITSClusterTask::~ITSClusterTask()
4242
{
4343
delete hEmptyLaneFractionGlobal;
4444
delete hClusterVsBunchCrossing;
45+
4546
for (int iLayer = 0; iLayer < NLayer; iLayer++) {
4647

4748
if (!mEnableLayers[iLayer])
@@ -155,7 +156,8 @@ void ITSClusterTask::monitorData(o2::framework::ProcessingContext& ctx)
155156

156157
const auto& ROF = clusRofArr[iROF];
157158
const auto bcdata = ROF.getBCData();
158-
int nClusters3pixLay[7] = {0};
159+
int nClusters3pixLay[7] = { 0 };
160+
int nDigits3pixLay[7] = { 0 };
159161
int nClusters3pix = 0;
160162
int nLongClusters[ChipBoundary[NLayerIB]] = {};
161163
int nHitsFromClusters[ChipBoundary[NLayerIB]] = {}; // only IB is implemented at the moment
@@ -216,7 +218,8 @@ void ITSClusterTask::monitorData(o2::framework::ProcessingContext& ctx)
216218

217219
if (npix > 2) {
218220
nClusters3pixLay[lay]++;
219-
nClusters3pix++;
221+
nClusters3pix++;
222+
nDigits3pixLay[lay] += npix;
220223
}
221224

222225
if (lay < NLayerIB) {
@@ -277,14 +280,12 @@ void ITSClusterTask::monitorData(o2::framework::ProcessingContext& ctx)
277280
}
278281
}
279282
hClusterVsBunchCrossing->Fill(bcdata.bc, nClusters3pix); // we count only the number of clusters, not their sizes
280-
for (int lay = 0; lay < 7; lay++){
281-
if (nClusters3pixLay[lay] > 0){
282-
int nchips = mNStaves[lay]*mNHicPerStave[lay]*mNChipsPerHic[lay];
283-
hClusterOccupancyDistribution[lay]->Fill(TMath::Log10(1.*nClusters3pixLay[lay]/nchips));
283+
for (int lay = 0; lay < 7; lay++) {
284+
if (nClusters3pixLay[lay] > 0) {
285+
int nchips = mNStaves[lay] * mNHicPerStave[lay] * mNChipsPerHic[lay];
286+
hClusterOccupancyDistribution[lay]->Fill(1. * nClusters3pixLay[lay] / nchips, 1. * nDigits3pixLay[lay] / nchips);
284287
}
285288
}
286-
287-
288289

289290
// filling these anomaly plots once per ROF, ignoring chips w/o long clusters
290291
for (int ichip = 0; ichip < ChipBoundary[NLayerIB]; ichip++) {
@@ -410,6 +411,7 @@ void ITSClusterTask::reset()
410411
if (!mEnableLayers[iLayer])
411412
continue;
412413

414+
hClusterOccupancyDistribution[iLayer]->Reset();
413415
hClusterSizeLayerSummary[iLayer]->Reset();
414416
hGroupedClusterSizeLayerSummary[iLayer]->Reset();
415417
hClusterTopologyLayerSummary[iLayer]->Reset();
@@ -489,10 +491,15 @@ void ITSClusterTask::createAllHistos()
489491
formatAxes(hClusterSizeLayerSummary[iLayer], "Cluster Size (pixels)", "counts", 1, 1.10);
490492
hClusterSizeLayerSummary[iLayer]->SetStats(0);
491493

492-
hClusterOccupancyDistribution[iLayer] = new TH1D(Form("Layer%d/ClustersPerChipPerEvt", iLayer), Form("Layer%d/ClustersPerChipPerEvt", iLayer), 100, -4, 5);
493-
hClusterOccupancyDistribution[iLayer]->SetTitle(Form("log10 n_clusters with npix > 2 / chip / evt - Layer%d",iLayer));
494+
double dynbin[7][4] = { { 300, 100, 500, 1000 }, { 300, 100, 500, 1000 }, { 300, 100, 500, 1000 }, // IB
495+
{ 300, 5, 500, 50 },
496+
{ 300, 5, 500, 50 }, // ML
497+
{ 300, 1.5, 500, 15 },
498+
{ 300, 1.5, 500, 15 } }; // OL
499+
hClusterOccupancyDistribution[iLayer] = new TH2D(Form("Layer%d/OccupancyPerChipPerEvt", iLayer), Form("Layer%d/OccupancyPerChipPerEvt", iLayer), (int)dynbin[iLayer][0], 0, dynbin[iLayer][1], (int)dynbin[iLayer][2], 0, dynbin[iLayer][3]);
500+
hClusterOccupancyDistribution[iLayer]->SetTitle(Form("hits/chip/evt, form clusters with npix>2 - Layer%d", iLayer));
494501
addObject(hClusterOccupancyDistribution[iLayer]);
495-
formatAxes(hClusterOccupancyDistribution[iLayer],"n clus","events",1,1.10);
502+
formatAxes(hClusterOccupancyDistribution[iLayer], "N clus", "N hit", 1, 1.10);
496503
hClusterOccupancyDistribution[iLayer]->SetStats(0);
497504

498505
hGroupedClusterSizeLayerSummary[iLayer] = new TH1L(Form("Layer%d/AverageGroupedClusterSizeSummary", iLayer), Form("Layer%dAverageGroupedClusterSizeSummary", iLayer), 128 * 128, 0, 128 * 128);

0 commit comments

Comments
 (0)