Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Modules/ITS/include/ITS/ITSClusterTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<TObject*> mPublishedObjects;

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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 };
Expand Down
37 changes: 33 additions & 4 deletions Modules/ITS/src/ITSClusterTask.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down Expand Up @@ -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. nLongClustersStaveave[n][m] means stave L<3+n>_<m>

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

Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
Expand All @@ -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) {
Expand Down Expand Up @@ -440,6 +460,7 @@ void ITSClusterTask::reset()
}
}
} else {
hLongClustersPerStave[iLayer - NLayerIB]->Reset();
hAverageClusterOccupancySummaryOB[iLayer]->Reset();
hAverageClusterSizeSummaryOB[iLayer]->Reset();
if (mDoPublish1DSummary == 1) {
Expand Down Expand Up @@ -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]);
Expand Down