Skip to content

Commit a5fbc47

Browse files
committed
WIP - Cluster occupancy distribution for ITS
1 parent 27ea2a4 commit a5fbc47

2 files changed

Lines changed: 22 additions & 4 deletions

File tree

Modules/ITS/include/ITS/ITSClusterTask.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +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
99100

100101
// Anomalies plots
101102
TH2D* hLongClustersPerChip[3] = { nullptr };

Modules/ITS/src/ITSClusterTask.cxx

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ ITSClusterTask::~ITSClusterTask()
5454
delete hClusterSizeLayerSummary[iLayer];
5555
delete hClusterTopologyLayerSummary[iLayer];
5656
delete hGroupedClusterSizeLayerSummary[iLayer];
57+
delete hClusterOccupancyDistribution[iLayer];
5758

5859
if (mDoPublish1DSummary == 1) {
5960
if (iLayer < NLayerIB) {
@@ -154,7 +155,8 @@ void ITSClusterTask::monitorData(o2::framework::ProcessingContext& ctx)
154155

155156
const auto& ROF = clusRofArr[iROF];
156157
const auto bcdata = ROF.getBCData();
157-
int nClustersForBunchCrossing = 0;
158+
int nClusters3pixLay[7] = {0};
159+
int nClusters3pix = 0;
158160
int nLongClusters[ChipBoundary[NLayerIB]] = {};
159161
int nHitsFromClusters[ChipBoundary[NLayerIB]] = {}; // only IB is implemented at the moment
160162

@@ -213,7 +215,8 @@ void ITSClusterTask::monitorData(o2::framework::ProcessingContext& ctx)
213215
}
214216

215217
if (npix > 2) {
216-
nClustersForBunchCrossing++;
218+
nClusters3pixLay[lay]++;
219+
nClusters3pix++;
217220
}
218221

219222
if (lay < NLayerIB) {
@@ -273,7 +276,15 @@ void ITSClusterTask::monitorData(o2::framework::ProcessingContext& ctx)
273276
hAverageClusterSizeSummaryFine[lay]->getNum()->Fill(getHorizontalBin(locC.Z(), chip, lay, lane), getVerticalBin(locC.X(), sta, lay), (float)npix);
274277
}
275278
}
276-
hClusterVsBunchCrossing->Fill(bcdata.bc, nClustersForBunchCrossing); // we count only the number of clusters, not their sizes
279+
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));
284+
}
285+
}
286+
287+
277288

278289
// filling these anomaly plots once per ROF, ignoring chips w/o long clusters
279290
for (int ichip = 0; ichip < ChipBoundary[NLayerIB]; ichip++) {
@@ -438,7 +449,7 @@ void ITSClusterTask::reset()
438449

439450
void ITSClusterTask::createAllHistos()
440451
{
441-
hClusterVsBunchCrossing = new TH2D("BunchCrossingIDvsClusters", "BunchCrossingIDvsClusters", nBCbins, 0, 4095, 100, 0, 2000);
452+
hClusterVsBunchCrossing = new TH2D("BunchCrossingIDvsClusters", "BunchCrossingIDvsClusters", nBCbins, 0, 4095, 150, 0, 3000);
442453
hClusterVsBunchCrossing->SetTitle("#clusters vs BC id for clusters with npix > 2");
443454
addObject(hClusterVsBunchCrossing);
444455
formatAxes(hClusterVsBunchCrossing, "Bunch Crossing ID", "Number of clusters with npix > 2 in ROF", 1, 1.10);
@@ -478,6 +489,12 @@ void ITSClusterTask::createAllHistos()
478489
formatAxes(hClusterSizeLayerSummary[iLayer], "Cluster Size (pixels)", "counts", 1, 1.10);
479490
hClusterSizeLayerSummary[iLayer]->SetStats(0);
480491

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+
addObject(hClusterOccupancyDistribution[iLayer]);
495+
formatAxes(hClusterOccupancyDistribution[iLayer],"n clus","events",1,1.10);
496+
hClusterOccupancyDistribution[iLayer]->SetStats(0);
497+
481498
hGroupedClusterSizeLayerSummary[iLayer] = new TH1L(Form("Layer%d/AverageGroupedClusterSizeSummary", iLayer), Form("Layer%dAverageGroupedClusterSizeSummary", iLayer), 128 * 128, 0, 128 * 128);
482499
hGroupedClusterSizeLayerSummary[iLayer]->SetTitle(Form("Cluster size summary for Layer %d", iLayer));
483500
addObject(hGroupedClusterSizeLayerSummary[iLayer]);

0 commit comments

Comments
 (0)