Skip to content

Commit 8655e47

Browse files
authored
[MFT] unified histogram binning with aQC (#2631)
* unify histo binning * Clang fix * Revert "unify histo binning" This reverts commit fa59b90. * use the Util Tables header for bin definitions * CLang fix * try casting as non-const for histo definitions
1 parent f5db0cf commit 8655e47

File tree

5 files changed

+47
-8
lines changed

5 files changed

+47
-8
lines changed

Modules/MFT/include/MFT/QcMFTUtilTables.h

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
/// \author Guillermo Contreras
1616
/// \author Katarina Krizkova Gajdosova
1717
/// \author Diana Maria Krupova
18+
/// \author Jakub Juracka
1819
///
1920

2021
#ifndef QC_MFT_UTIL_TABLES_H
@@ -451,6 +452,41 @@ class QcMFTUtilTables
451452
{ 1, 1, 1, 1, 1, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, -1, -1, -1, -1 },
452453
{ 1, 1, 1, 1, 1, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, -1, -1, -1, -1 },
453454
};
455+
456+
// bin limits for digits per ROF axis
457+
static constexpr float mROFBins[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
458+
11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
459+
21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
460+
31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
461+
41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
462+
51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
463+
61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
464+
71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
465+
81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
466+
91, 92, 93, 94, 95, 96, 97, 98, 99, 100,
467+
110, 120, 130, 140, 150, 160, 170, 180, 190, 200,
468+
210, 220, 230, 240, 250, 260, 270, 280, 290, 300,
469+
310, 320, 330, 340, 350, 360, 370, 380, 390, 400,
470+
410, 420, 430, 440, 450, 460, 470, 480, 490, 500,
471+
510, 520, 530, 540, 550, 560, 570, 580, 590, 600,
472+
610, 620, 630, 640, 650, 660, 670, 680, 690, 700,
473+
710, 720, 730, 740, 750, 760, 770, 780, 790, 800,
474+
810, 820, 830, 840, 850, 860, 870, 880, 890, 900,
475+
910, 920, 930, 940, 950, 960, 970, 980, 990, 1000,
476+
1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900, 2000,
477+
2100, 2200, 2300, 2400, 2500, 2600, 2700, 2800, 2900, 3000,
478+
3100, 3200, 3300, 3400, 3500, 3600, 3700, 3800, 3900, 4000,
479+
4100, 4200, 4300, 4400, 4500, 4600, 4700, 4800, 4900, 5000,
480+
5100, 5200, 5300, 5400, 5500, 5600, 5700, 5800, 5900, 6000,
481+
6100, 6200, 6300, 6400, 6500, 6600, 6700, 6800, 6900, 7000,
482+
7100, 7200, 7300, 7400, 7500, 7600, 7700, 7800, 7900, 8000,
483+
8100, 8200, 8300, 8400, 8500, 8600, 8700, 8800, 8900, 9000,
484+
9100, 9200, 9300, 9400, 9500, 9600, 9700, 9800, 9900, 10000,
485+
11000, 12000, 13000, 14000, 15000, 16000, 17000, 18000, 19000, 20000,
486+
21000, 22000, 23000, 24000, 25000, 26000, 27000, 28000, 29000, 30000,
487+
31000, 32000, 33000, 34000, 35000, 36000, 37000, 38000, 39000, 40000,
488+
41000, 42000, 43000, 44000, 45000, 46000, 47000, 48000, 49000, 50000 };
489+
static constexpr int nROFBins = sizeof(mROFBins) / sizeof(mROFBins[0]) - 1;
454490
};
455491
} // namespace o2::quality_control_modules::mft
456492

Modules/MFT/src/QcMFTClusterTask.cxx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
/// \author Katarina Krizkova Gajdosova
1717
/// \author Diana Maria Krupova
1818
/// \author David Grund
19+
/// \author Jakub Juracka
1920
///
2021

2122
// C++
@@ -194,7 +195,7 @@ void QcMFTClusterTask::initialize(o2::framework::InitContext& /*ctx*/)
194195
getObjectsManager()->setDisplayHint(mClusterZ.get(), "hist");
195196

196197
mClustersROFSize = std::make_unique<TH1FRatio>(
197-
"mClustersROFSize", "Distribution of the #clusters per ROF; # clusters per ROF; # entries per orbit", maxClusterROFSize, 0, maxClusterROFSize, true);
198+
"mClustersROFSize", "Distribution of the #clusters per ROF; # clusters per ROF; # entries per orbit", QcMFTUtilTables::nROFBins, const_cast<float*>(QcMFTUtilTables::mROFBins), true);
198199
mClustersROFSize->SetStats(0);
199200
getObjectsManager()->startPublishing(mClustersROFSize.get());
200201
getObjectsManager()->setDisplayHint(mClustersROFSize.get(), "hist logx logy");
@@ -233,8 +234,8 @@ void QcMFTClusterTask::initialize(o2::framework::InitContext& /*ctx*/)
233234
getObjectsManager()->startPublishing(mClusterChipOccupancyMap[idx].get());
234235
getObjectsManager()->setDefaultDrawOptions(mClusterChipOccupancyMap[idx].get(), "colz");
235236
} // loop over faces
236-
} // loop over disks
237-
} // loop over halfs
237+
} // loop over disks
238+
} // loop over halfs
238239

239240
// layer histograms
240241
for (auto nMFTLayer = 0; nMFTLayer < 10; nMFTLayer++) {

Modules/MFT/src/QcMFTDigitTask.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ void QcMFTDigitTask::initialize(o2::framework::InitContext& /*ctx*/)
160160

161161
mDigitsROFSize = std::make_unique<TH1FRatio>("mDigitsROFSize",
162162
"Distribution of the #digits per ROF; # digits per ROF; # entries per orbit",
163-
maxDigitROFSize, 0, maxDigitROFSize, true);
163+
QcMFTUtilTables::nROFBins, const_cast<float*>(QcMFTUtilTables::mROFBins), true);
164164
mDigitsROFSize->SetStats(0);
165165
getObjectsManager()->startPublishing(mDigitsROFSize.get());
166166
getObjectsManager()->setDisplayHint(mDigitsROFSize.get(), "hist logx logy");

Modules/MFT/src/QcMFTReadoutTask.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,9 +246,9 @@ void QcMFTReadoutTask::monitorData(o2::framework::ProcessingContext& ctx)
246246
mZoneSummaryChipFault->Fill(xBin, yBin);
247247
}
248248
} // end loop over lanes
249-
} // end if is a DDW
250-
} // end if rdh->stop
251-
} // end loop over input
249+
} // end if is a DDW
250+
} // end if rdh->stop
251+
} // end loop over input
252252
}
253253

254254
void QcMFTReadoutTask::endOfCycle()

Modules/MFT/src/QcMFTTrackTask.cxx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
/// \author Diana Maria Krupova
1717
/// \author Katarina Krizkova Gajdosova
1818
/// \author David Grund
19+
/// \author Jakub Juracka
1920
///
2021

2122
// C++
@@ -37,6 +38,7 @@
3738
// Quality Control
3839
#include "QualityControl/QcInfoLogger.h"
3940
#include "MFT/QcMFTTrackTask.h"
41+
#include "MFT/QcMFTUtilTables.h"
4042
#include "Common/TH1Ratio.h"
4143
#include "Common/TH2Ratio.h"
4244
#include "DetectorsBase/GRPGeomHelper.h"
@@ -176,7 +178,7 @@ void QcMFTTrackTask::initialize(o2::framework::InitContext& /*ctx*/)
176178
getObjectsManager()->startPublishing(mTrackTanl.get());
177179
getObjectsManager()->setDisplayHint(mTrackTanl.get(), "hist");
178180

179-
mTrackROFNEntries = std::make_unique<TH1FRatio>("mMFTTrackROFSize", "Distribution of the #tracks per ROF; # tracks per ROF; # entries per orbit", MaxTrackROFSize, 0, MaxTrackROFSize, true);
181+
mTrackROFNEntries = std::make_unique<TH1FRatio>("mMFTTrackROFSize", "Distribution of the #tracks per ROF; # tracks per ROF; # entries per orbit", QcMFTUtilTables::nROFBins, const_cast<float*>(QcMFTUtilTables::mROFBins), true);
180182
getObjectsManager()->startPublishing(mTrackROFNEntries.get());
181183
getObjectsManager()->setDisplayHint(mTrackROFNEntries.get(), "hist logx logy");
182184

0 commit comments

Comments
 (0)