@@ -40,8 +40,10 @@ ITSClusterTask::ITSClusterTask() : TaskInterface() {}
4040
4141ITSClusterTask::~ITSClusterTask ()
4242{
43+ delete hTFCounter;
4344 delete hEmptyLaneFractionGlobal;
4445 delete hClusterVsBunchCrossing;
46+
4547 for (int iLayer = 0 ; iLayer < NLayer; iLayer++) {
4648
4749 if (!mEnableLayers [iLayer])
@@ -54,6 +56,7 @@ ITSClusterTask::~ITSClusterTask()
5456 delete hClusterSizeLayerSummary[iLayer];
5557 delete hClusterTopologyLayerSummary[iLayer];
5658 delete hGroupedClusterSizeLayerSummary[iLayer];
59+ delete hClusterOccupancyDistribution[iLayer];
5760
5861 if (mDoPublish1DSummary == 1 ) {
5962 if (iLayer < NLayerIB) {
@@ -154,7 +157,9 @@ void ITSClusterTask::monitorData(o2::framework::ProcessingContext& ctx)
154157
155158 const auto & ROF = clusRofArr[iROF];
156159 const auto bcdata = ROF.getBCData ();
157- int nClustersForBunchCrossing = 0 ;
160+ int nDigits3pixLay[7 ] = { 0 };
161+ int nClusters3pixLay[7 ] = { 0 };
162+ int nClusters3pix = 0 ;
158163 int nLongClusters[ChipBoundary[NLayerIB]] = {};
159164 int nHitsFromClusters[ChipBoundary[NLayerIB]] = {}; // only IB is implemented at the moment
160165
@@ -213,7 +218,9 @@ void ITSClusterTask::monitorData(o2::framework::ProcessingContext& ctx)
213218 }
214219
215220 if (npix > 2 ) {
216- nClustersForBunchCrossing++;
221+ nClusters3pixLay[lay]++;
222+ nClusters3pix++;
223+ nDigits3pixLay[lay] += npix;
217224 }
218225
219226 if (lay < NLayerIB) {
@@ -273,7 +280,13 @@ void ITSClusterTask::monitorData(o2::framework::ProcessingContext& ctx)
273280 hAverageClusterSizeSummaryFine[lay]->getNum ()->Fill (getHorizontalBin (locC.Z (), chip, lay, lane), getVerticalBin (locC.X (), sta, lay), (float )npix);
274281 }
275282 }
276- hClusterVsBunchCrossing->Fill (bcdata.bc , nClustersForBunchCrossing); // we count only the number of clusters, not their sizes
283+ hClusterVsBunchCrossing->Fill (bcdata.bc , nClusters3pix); // we count only the number of clusters, not their sizes
284+ for (int lay = 0 ; lay < 7 ; lay++) {
285+ if (nClusters3pixLay[lay] > 0 ) {
286+ int nchips = mNStaves [lay] * mNHicPerStave [lay] * mNChipsPerHic [lay];
287+ hClusterOccupancyDistribution[lay]->Fill (1 . * nClusters3pixLay[lay] / nchips, 1 . * nDigits3pixLay[lay] / nchips);
288+ }
289+ }
277290
278291 // filling these anomaly plots once per ROF, ignoring chips w/o long clusters
279292 for (int ichip = 0 ; ichip < ChipBoundary[NLayerIB]; ichip++) {
@@ -358,6 +371,8 @@ void ITSClusterTask::monitorData(o2::framework::ProcessingContext& ctx)
358371 }
359372 }
360373
374+ hTFCounter->Fill (0 );
375+
361376 end = std::chrono::high_resolution_clock::now ();
362377 difference = std::chrono::duration_cast<std::chrono::microseconds>(end - start).count ();
363378 ILOG (Debug, Devel) << " Time in QC Cluster Task: " << difference << ENDM;
@@ -392,13 +407,15 @@ void ITSClusterTask::endOfActivity(const Activity& /*activity*/)
392407void ITSClusterTask::reset ()
393408{
394409 ILOG (Debug, Devel) << " Resetting the histograms" << ENDM;
410+ hTFCounter->Reset ();
395411 hClusterVsBunchCrossing->Reset ();
396412 hEmptyLaneFractionGlobal->Reset (" ICES" );
397413 mGeneralOccupancy ->Reset ();
398414 for (int iLayer = 0 ; iLayer < NLayer; iLayer++) {
399415 if (!mEnableLayers [iLayer])
400416 continue ;
401417
418+ hClusterOccupancyDistribution[iLayer]->Reset ();
402419 hClusterSizeLayerSummary[iLayer]->Reset ();
403420 hGroupedClusterSizeLayerSummary[iLayer]->Reset ();
404421 hClusterTopologyLayerSummary[iLayer]->Reset ();
@@ -438,7 +455,12 @@ void ITSClusterTask::reset()
438455
439456void ITSClusterTask::createAllHistos ()
440457{
441- hClusterVsBunchCrossing = new TH2D (" BunchCrossingIDvsClusters" , " BunchCrossingIDvsClusters" , nBCbins, 0 , 4095 , 100 , 0 , 2000 );
458+ hTFCounter = new TH1D (" TFcounter" , " TFcounter" , 1 , 0 , 1 );
459+ hTFCounter->SetTitle (" TF counter" );
460+ addObject (hTFCounter);
461+ formatAxes (hTFCounter, " " , " TF" , 1 , 1.10 );
462+
463+ hClusterVsBunchCrossing = new TH2D (" BunchCrossingIDvsClusters" , " BunchCrossingIDvsClusters" , nBCbins, 0 , 4095 , 150 , 0 , 3000 );
442464 hClusterVsBunchCrossing->SetTitle (" #clusters vs BC id for clusters with npix > 2" );
443465 addObject (hClusterVsBunchCrossing);
444466 formatAxes (hClusterVsBunchCrossing, " Bunch Crossing ID" , " Number of clusters with npix > 2 in ROF" , 1 , 1.10 );
@@ -478,6 +500,17 @@ void ITSClusterTask::createAllHistos()
478500 formatAxes (hClusterSizeLayerSummary[iLayer], " Cluster Size (pixels)" , " counts" , 1 , 1.10 );
479501 hClusterSizeLayerSummary[iLayer]->SetStats (0 );
480502
503+ double dynbin[7 ][4 ] = { { 300 , 100 , 500 , 1000 }, { 300 , 100 , 500 , 1000 }, { 300 , 100 , 500 , 1000 }, // IB
504+ { 300 , 5 , 500 , 50 },
505+ { 300 , 5 , 500 , 50 }, // ML
506+ { 300 , 1.5 , 500 , 15 },
507+ { 300 , 1.5 , 500 , 15 } }; // OL
508+ 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 ]);
509+ hClusterOccupancyDistribution[iLayer]->SetTitle (Form (" hits/chip/evt, form clusters with npix>2 - Layer%d" , iLayer));
510+ addObject (hClusterOccupancyDistribution[iLayer]);
511+ formatAxes (hClusterOccupancyDistribution[iLayer], " N clus" , " N hit" , 1 , 1.10 );
512+ hClusterOccupancyDistribution[iLayer]->SetStats (0 );
513+
481514 hGroupedClusterSizeLayerSummary[iLayer] = new TH1L (Form (" Layer%d/AverageGroupedClusterSizeSummary" , iLayer), Form (" Layer%dAverageGroupedClusterSizeSummary" , iLayer), 128 * 128 , 0 , 128 * 128 );
482515 hGroupedClusterSizeLayerSummary[iLayer]->SetTitle (Form (" Cluster size summary for Layer %d" , iLayer));
483516 addObject (hGroupedClusterSizeLayerSummary[iLayer]);
0 commit comments