@@ -40,6 +40,8 @@ ITSClusterTask::ITSClusterTask() : TaskInterface() {}
4040
4141ITSClusterTask::~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*/)
123127void 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
128141void 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
486513void 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