Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ class ITSThresholdCalibrator : public Task
private:
void updateTimeDependentParams(ProcessingContext& pc);
// detector information
static constexpr short int N_COL = 1024; // column number in Alpide chip
static constexpr short int N_COL = 1024; // number of columns in Alpide chip
static constexpr short int N_ROW = 512; // number of rows in Alpide chip

static const short int N_RU = o2::itsmft::ChipMappingITS::getNRUs();

Expand Down Expand Up @@ -231,7 +232,8 @@ class ITSThresholdCalibrator : public Task
short int mRunType = -1;
short int mRunTypeUp = -1;
short int mRunTypeRU[N_RU] = {0};
short int mCdwCntRU[N_RU] = {0};
short int mRunTypeRUCopy[N_RU] = {0};
short int mCdwCntRU[N_RU][N_ROW] = {{0}};
short int mRowRU[N_RU] = {0};
bool mActiveLinks[N_RU][3] = {{false}};
std::set<short int> mRuSet;
Expand Down
10 changes: 6 additions & 4 deletions 10 Detectors/ITSMFT/ITS/workflow/src/ThresholdCalibratorSpec.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1338,6 +1338,7 @@ void ITSThresholdCalibrator::run(ProcessingContext& pc)
// count the zeros
if (!mRunTypeUp) {
mRunTypeRU[iRU]++;
mRunTypeRUCopy[iRU]++;
}
// Divide calibration word (24-bit) by 2^16 to get the first 8 bits
if (this->mScanType == 'T') {
Expand All @@ -1361,7 +1362,7 @@ void ITSThresholdCalibrator::run(ProcessingContext& pc)
// count the last N injections
short int checkVal = (mScanType == 'I') ? mMin : mMax;
if (loopval == checkVal && realcharge == mMin2) { // the second condition is relevant only for mScanType=p
mCdwCntRU[iRU]++;
mCdwCntRU[iRU][row]++;
mRowRU[iRU] = row; // keep the row
}
if (this->mVerboseOutput) {
Expand Down Expand Up @@ -1476,16 +1477,17 @@ void ITSThresholdCalibrator::run(ProcessingContext& pc)
}
std::vector<short int> chipEnabled = getChipListFromRu(iRU, mActiveLinks[iRU]); // chip boundaries
// Fill the chipDone info string
if (mRunTypeRU[iRU] == nInjScaled * nL) {
if (mRunTypeRUCopy[iRU] == nInjScaled * nL) {
for (short int iChip = 0; iChip < chipEnabled.size(); iChip++) {
if ((chipEnabled[iChip] % mChipModBase) != mChipModSel) {
continue;
}
addDatabaseEntry(chipEnabled[iChip], "", std::vector<float>(), true);
}
mRunTypeRUCopy[iRU] = 0; // reset here is safer (the other counter is reset in finalize)
}
// Check if scan of a row is finished: only for specific scans!
bool passCondition = (mCdwCntRU[iRU] == nInjScaled * nL);
bool passCondition = (mCdwCntRU[iRU][mRowRU[iRU]] >= nInjScaled * nL);
if (mScanType != 'D' && mScanType != 'A' && mScanType != 'P' && mScanType != 'p' && mScanType != 'R' && mScanType != 'r' && passCondition) {
// extract data from the row
for (short int iChip = 0; iChip < chipEnabled.size(); iChip++) {
Expand All @@ -1503,7 +1505,7 @@ void ITSThresholdCalibrator::run(ProcessingContext& pc)
}
}
}
mCdwCntRU[iRU] = 0; // reset
mCdwCntRU[iRU][mRowRU[iRU]] = 0; // reset
}
} // end loop on RuSet

Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.