Skip to content

Commit b1cf940

Browse files
committed
plots to check dead dcols or regions at SOR and EOR
1 parent b1c2ee6 commit b1cf940

2 files changed

Lines changed: 60 additions & 2 deletions

File tree

Modules/ITS/include/ITS/ITSClusterTask.h

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,18 +74,20 @@ class ITSClusterTask : public TaskInterface
7474

7575
static constexpr int NLayer = 7;
7676
static constexpr int NLayerIB = 3;
77+
static constexpr int NLayerOB = 4;
7778
static constexpr int NStavesIB = 12 + 16 + 20;
7879
static constexpr int NStavesOB = 24 + 30 + 42 + 48;
7980

8081
std::vector<TObject*> mPublishedObjects;
81-
8282
// Task
8383
TH1D* hTFCounter = nullptr;
8484

8585
// Inner barrel
8686
TH1D* hClusterTopologySummaryIB[NLayer][48][9] = { { { nullptr } } };
8787
TH1D* hGroupedClusterSizeSummaryIB[NLayer][48][9] = { { { nullptr } } };
8888
TH1D* hClusterSizeSummaryIB[NLayer][48][9] = { { { nullptr } } };
89+
TH2I* hDcolMapIBSor = nullptr;
90+
TH2I* hDcolMapIBEor = nullptr;
8991

9092
std::shared_ptr<TH2DRatio> hAverageClusterOccupancySummaryIB[NLayer];
9193
std::shared_ptr<TH2DRatio> hAverageClusterSizeSummaryIB[NLayer];
@@ -98,6 +100,9 @@ class ITSClusterTask : public TaskInterface
98100
std::shared_ptr<TH2DRatio> hAverageClusterOccupancySummaryOB[NLayer];
99101
std::shared_ptr<TH2DRatio> hAverageClusterSizeSummaryOB[NLayer];
100102

103+
TH2I* hDcolMapOBSor[NLayerOB] = { nullptr };
104+
TH2I* hDcolMapOBEor[NLayerOB] = { nullptr };
105+
101106
// Layer summary
102107
TH1L* hClusterSizeLayerSummary[NLayer] = { nullptr };
103108
TH1L* hClusterTopologyLayerSummary[NLayer] = { nullptr };
@@ -135,9 +140,13 @@ class ITSClusterTask : public TaskInterface
135140
int nRphiBinsOB = 1;
136141
int nZBinsOB = 1;
137142
static constexpr int NFlags = 4;
143+
int nResetCycle = 3; // to reset plots every nResetCycle cycles
144+
int nCycle = 0; // cycle counter
145+
int nCycleStop = 3; // number of cycles after which to stop filling histos
138146

139147
const int mOccUpdateFrequency = 100000;
140-
const int mNLanes[4] = { 432, 864, 2520, 3816 }; // IB, ML, OL, TOTAL lane
148+
const int mNLanes[4] = { 432, 864, 2520, 3816 }; // IB, ML, OL, TOTAL lane
149+
const int mChips[NLayer] = { 108, 144, 180, 2688, 3360, 8232, 9408 }; // # chips in L0, L2, L2, L3, L4, L5, L6
141150
int mDoPublish1DSummary = 0;
142151
int mNThreads = 1;
143152
int nBCbins = 103;

Modules/ITS/src/ITSClusterTask.cxx

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ ITSClusterTask::ITSClusterTask() : TaskInterface() {}
4040

4141
ITSClusterTask::~ITSClusterTask()
4242
{
43+
delete hDcolMapIBSor;
44+
delete hDcolMapIBEor;
4345
delete hTFCounter;
4446
delete hEmptyLaneFractionGlobal;
4547
delete hClusterVsBunchCrossing;
@@ -53,6 +55,8 @@ ITSClusterTask::~ITSClusterTask()
5355
delete hClusterCenterMap[iLayer];
5456
delete hLongClustersPerChip[iLayer];
5557
delete hMultPerChipWhenLongClusters[iLayer];
58+
delete hDcolMapOBSor[iLayer - NLayerIB];
59+
delete hDcolMapOBEor[iLayer - NLayerIB];
5660
}
5761

5862
else {
@@ -123,6 +127,15 @@ void ITSClusterTask::startOfActivity(const Activity& /*activity*/)
123127
void ITSClusterTask::startOfCycle()
124128
{
125129
ILOG(Debug, Devel) << "startOfCycle" << ENDM;
130+
131+
if (nCycle % nResetCycle == 0) {
132+
hDcolMapIBEor->Reset();
133+
for (int i = 0; i < NLayerOB; i++) {
134+
hDcolMapOBEor[i]->Reset();
135+
}
136+
}
137+
138+
nCycle++;
126139
}
127140

128141
void ITSClusterTask::monitorData(o2::framework::ProcessingContext& ctx)
@@ -248,6 +261,12 @@ void ITSClusterTask::monitorData(o2::framework::ProcessingContext& ctx)
248261
hAverageClusterSizeSummaryIB[lay]->getNum()->Fill(chip, sta, (double)npix);
249262
hAverageClusterSizeSummaryIB[lay]->getDen()->Fill(chip, sta, 1.);
250263
hClusterCenterMap[lay]->Fill(cluster.getCol(), cluster.getRow());
264+
265+
if (nCycle < nCycleStop) {
266+
hDcolMapIBSor->Fill((int)(cluster.getCol() / 2), ChipID);
267+
}
268+
hDcolMapIBEor->Fill((int)(cluster.getCol() / 2), ChipID);
269+
251270
if (mDoPublish1DSummary == 1) {
252271
hClusterTopologySummaryIB[lay][sta][chip]->Fill(ClusterID);
253272
}
@@ -266,6 +285,12 @@ void ITSClusterTask::monitorData(o2::framework::ProcessingContext& ctx)
266285
hGroupedClusterSizeLayerSummary[lay]->Fill(npix);
267286
}
268287
} else {
288+
289+
if (nCycle < nCycleStop) {
290+
hDcolMapOBSor[lay - NLayerIB]->Fill((int)(cluster.getCol() / 32), ChipID);
291+
}
292+
hDcolMapOBEor[lay - NLayerIB]->Fill((int)(cluster.getCol() / 32), ChipID);
293+
269294
hAverageClusterOccupancySummaryOB[lay]->getNum()->Fill(lane, sta, 1. / (mNChipsPerHic[lay] / mNLanePerHic[lay])); // 14 To have occupation per chip -> 7 because we're considering lanes
270295
hAverageClusterSizeSummaryOB[lay]->getNum()->Fill(lane, sta, (double)npix);
271296
hAverageClusterSizeSummaryOB[lay]->getDen()->Fill(lane, sta, 1);
@@ -435,6 +460,7 @@ void ITSClusterTask::reset()
435460
{
436461
ILOG(Debug, Devel) << "Resetting the histograms" << ENDM;
437462
hTFCounter->Reset();
463+
hDcolMapIBSor->Reset();
438464
hClusterVsBunchCrossing->Reset();
439465
hEmptyLaneFractionGlobal->Reset("ICES");
440466
mGeneralOccupancy->Reset();
@@ -463,6 +489,7 @@ void ITSClusterTask::reset()
463489
}
464490
}
465491
} else {
492+
hDcolMapOBSor[iLayer - NLayerIB]->Reset();
466493
hLongClustersPerStave[iLayer - NLayerIB]->Reset();
467494
hAverageClusterOccupancySummaryOB[iLayer]->Reset();
468495
hAverageClusterSizeSummaryOB[iLayer]->Reset();
@@ -485,6 +512,12 @@ void ITSClusterTask::reset()
485512

486513
void ITSClusterTask::createAllHistos()
487514
{
515+
hDcolMapIBSor = new TH2I("hDcolMapIBSor", "Double column hitmap IB chips - SOR;Dcol;ChipID", 512, -0.5, 511.5, mNLanes[0], -0.5, mNLanes[0] - 0.5);
516+
addObject(hDcolMapIBSor);
517+
518+
hDcolMapIBEor = new TH2I("hDcolMapIBEor", "Double column hitmap IB chips - EOR;Dcol;ChipID", 512, -0.5, 511.5, mNLanes[0], -0.5, mNLanes[0] - 0.5);
519+
addObject(hDcolMapIBEor);
520+
488521
hTFCounter = new TH1D("TFcounter", "TFcounter", 1, 0, 1);
489522
hTFCounter->SetTitle("TF counter");
490523
addObject(hTFCounter);
@@ -535,6 +568,19 @@ void ITSClusterTask::createAllHistos()
535568
addObject(hLongClustersPerStave[iLayer - NLayerIB]);
536569
formatAxes(hLongClustersPerStave[iLayer - NLayerIB], "Stave", "number of long clusters", 1, 1.10);
537570
hLongClustersPerStave[iLayer - NLayerIB]->SetStats(0);
571+
572+
// dcols maps
573+
int chipStart = 0, chipStop = 0;
574+
for (int j = 0; j < iLayer; j++) {
575+
chipStart += mChips[j];
576+
}
577+
chipStop = chipStart + mChips[iLayer];
578+
579+
hDcolMapOBSor[iLayer - NLayerIB] = new TH2I(Form("hDcolMapL%dSor", iLayer), Form("Double column hitmap L%d chips - SOR;RegionID;ChipID", iLayer), 32, -0.5, 31.5, mChips[iLayer], chipStart - 0.5, chipStop - 0.5);
580+
addObject(hDcolMapOBSor[iLayer - NLayerIB]);
581+
582+
hDcolMapOBEor[iLayer - NLayerIB] = new TH2I(Form("hDcolMapL%dEor", iLayer), Form("Double column hitmap L%d chips - EOR;RegionID;ChipID", iLayer), 32, -0.5, 31.5, mChips[iLayer], chipStart - 0.5, chipStop - 0.5);
583+
addObject(hDcolMapOBEor[iLayer - NLayerIB]);
538584
}
539585

540586
hClusterSizeLayerSummary[iLayer] = new TH1L(Form("Layer%d/AverageClusterSizeSummary", iLayer), Form("Layer%dAverageClusterSizeSummary", iLayer), 128 * 128, 0, 128 * 128);
@@ -712,6 +758,9 @@ void ITSClusterTask::getJsonParameters()
712758
std::string LayerConfig = o2::quality_control_modules::common::getFromConfig<std::string>(mCustomParameters, "layer", "0000000");
713759
mDoPublishDetailedSummary = o2::quality_control_modules::common::getFromConfig<int>(mCustomParameters, "publishDetailedSummary", mDoPublishDetailedSummary);
714760

761+
nCycleStop = o2::quality_control_modules::common::getFromConfig<int>(mCustomParameters, "nCycleStop", nCycleStop);
762+
nResetCycle = o2::quality_control_modules::common::getFromConfig<int>(mCustomParameters, "nResetCycle", nResetCycle);
763+
715764
for (int ilayer = 0; ilayer < NLayer; ilayer++) {
716765
if (LayerConfig[ilayer] != '0') {
717766
mEnableLayers[ilayer] = 1;

0 commit comments

Comments
 (0)