Skip to content

Commit 8c36faf

Browse files
iravasenBarthelemy
authored andcommitted
[IMPORTANT] Fix ITS fee (and fhr) task (#1690)
* added option to normalize angular distributions by nROF + added 6 new plots for experts * removed channel G:FLP/DISTSUBTIMEFRAME/0 from FEE and FHR task
1 parent 81e6f07 commit 8c36faf

5 files changed

Lines changed: 9 additions & 57 deletions

File tree

Modules/ITS/include/ITS/ITSFhrTask.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ class ITSFhrTask final : public TaskInterface
100100
ChipPixelData* mChipDataBuffer = nullptr;
101101
std::vector<ChipPixelData> mChipsBuffer;
102102
int mHitNumberOfChip[7][48][2][14][14] = { { { { { 0 } } } } }; // layer, stave, substave, hic, chip
103-
unsigned int mTimeFrameId = 0;
104103

105104
int mNTrigger = 13;
106105
unsigned int mErrors[19] = { 0 };
@@ -145,7 +144,6 @@ class ITSFhrTask final : public TaskInterface
145144
float etabinsOB6[49 + 1] = { -1.369600, -1.332400, -1.293960, -1.254200, -1.213050, -1.170430, -1.126260, -1.080380, -1.032840, -0.983488, -0.932225, -0.878966, -0.823626, -0.766135, -0.706331, -0.644375, -0.580163, -0.513723, -0.445132, -0.374519, -0.302079, -0.227946, -0.152690, -0.076567, 0.000000, 0.076567, 0.152690, 0.227946, 0.302079, 0.374519, 0.445132, 0.513723, 0.580163, 0.644375, 0.706331, 0.766135, 0.823626, 0.878966, 0.932225, 0.983488, 1.032840, 1.080380, 1.126260, 1.170430, 1.213050, 1.254200, 1.293960, 1.332400, 1.369600, 1.4 };
146145

147146
// General plots
148-
TH1F* mTFInfo; // count vs TF ID
149147
TH1D* mErrorPlots;
150148
TH2I* mErrorVsFeeid;
151149
TH2Poly* mGeneralOccupancy; // Max Occuapncy(chip/hic) in one stave

Modules/ITS/itsFee.json

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"config": {
44
"database": {
55
"implementation": "CCDB",
6-
"host": "188.184.2.55:8080",
6+
"host": "ccdb-test.cern.ch:8080",
77
"username": "not_applicable",
88
"password": "not_applicable",
99
"name": "not_applicable"
@@ -19,7 +19,7 @@
1919
"url": ""
2020
},
2121
"conditionDB": {
22-
"url": "188.184.2.55:8080"
22+
"url": "ccdb-test.cern.ch:8080"
2323
}
2424
},
2525
"tasks": {
@@ -32,7 +32,7 @@
3232
"maxNumberCycles": "-1",
3333
"dataSource": {
3434
"type": "direct",
35-
"query": "filter:ITS/RAWDATA;G:FLP/DISTSUBTIMEFRAME/0"
35+
"query": "filter:ITS/RAWDATA"
3636
},
3737
"location": "local",
3838
"taskParameters": {
@@ -77,21 +77,5 @@
7777
]
7878
}
7979
}
80-
},
81-
"dataSamplingPolicies": [
82-
{
83-
"id": "RAWDATA",
84-
"active": "true",
85-
"machines": [],
86-
"query": "filter:ITS/RAWDATA;G:FLP/DISTSUBTIMEFRAME/0",
87-
"samplingConditions": [
88-
{
89-
"condition": "random",
90-
"fraction": "1",
91-
"seed": "1441"
92-
}
93-
],
94-
"blocking": "false"
95-
}
96-
]
80+
}
9781
}

Modules/ITS/itsFhr.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@
3737
"location": "remote",
3838
"taskParameters": {
3939
"Layer": "3",
40-
"HitNumberCut": "0",
41-
"GetTFFromBinding": "0",
40+
"HitNumberCut": "0",
4241
"decoderThreads": "8",
4342
"HitNumberCutForNoisyPixel": "0",
4443
"OccupancyNumberCutForNoisyPixel": "0.000001",
@@ -84,7 +83,7 @@
8483
"id": "RAWDATA",
8584
"active": "true",
8685
"machines": [],
87-
"query": "filter:ITS/RAWDATA;G:FLP/DISTSUBTIMEFRAME/0",
86+
"query": "filter:ITS/RAWDATA",
8887
"samplingConditions": [
8988
{
9089
"condition": "random",

Modules/ITS/src/ITSFeeTask.cxx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -321,10 +321,7 @@ void ITSFeeTask::monitorData(o2::framework::ProcessingContext& ctx)
321321
int nStops[NFees] = {};
322322
int payloadTot[NFees] = {};
323323

324-
std::vector<InputSpec> rawDataFilter{ InputSpec{ "", ConcreteDataTypeMatcher{ "DS", "RAWDATA0" }, Lifetime::Timeframe } };
325-
326-
rawDataFilter.push_back(InputSpec{ "", ConcreteDataTypeMatcher{ "ITS", "RAWDATA" }, Lifetime::Timeframe });
327-
DPLRawParser parser(ctx.inputs(), rawDataFilter);
324+
DPLRawParser parser(ctx.inputs());
328325

329326
resetLanePlotsAndCounters(); // action taken depending on mResetLaneStatus and mResetPayload
330327

@@ -366,8 +363,8 @@ void ITSFeeTask::monitorData(o2::framework::ProcessingContext& ctx)
366363
if ((int)(o2::raw::RDHUtils::getStop(rdh)) && it.size()) { // looking into the DDW0 from the closing packet
367364
auto const* ddw = reinterpret_cast<const GBTDiagnosticWord*>(it.data());
368365
uint64_t laneInfo = ddw->laneWord.laneBits.laneStatus;
369-
uint8_t flag1 = ddw->indexWord.indexBits.flag1;
370366

367+
uint8_t flag1 = ddw->indexWord.indexBits.flag1;
371368
for (int i = 0; i < 3; i++) {
372369
if (flag1 >> i & 0x1) {
373370
mFlag1Check->Fill(ifee, i);
@@ -467,7 +464,7 @@ void ITSFeeTask::monitorData(o2::framework::ProcessingContext& ctx)
467464
}
468465
}
469466

470-
mTimeFrameId = ctx.inputs().get<int>("G");
467+
mTimeFrameId++;
471468

472469
mTFInfo->Fill(mTimeFrameId);
473470
end = std::chrono::high_resolution_clock::now();

Modules/ITS/src/ITSFhrTask.cxx

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ ITSFhrTask::~ITSFhrTask()
4747
delete mGeneralNoisyPixel;
4848
delete mDecoder;
4949
delete mChipDataBuffer;
50-
delete mTFInfo;
5150
delete mErrorPlots;
5251
delete mErrorVsFeeid;
5352
delete mChipStaveOccupancy;
@@ -270,9 +269,6 @@ void ITSFhrTask::createGeneralPlots()
270269

271270
createErrorTriggerPlots();
272271

273-
mTFInfo = new TH1F("General/TFInfo", "TF vs count", 15000, 0, 15000);
274-
getObjectsManager()->startPublishing(mTFInfo); // mTFInfo
275-
276272
mErrorVsFeeid = new TH2I("General/ErrorVsFeeid", "Error count vs Error id and Fee id", (3 * StaveBoundary[3]) + (2 * (StaveBoundary[7] - StaveBoundary[3])), 0, (3 * StaveBoundary[3]) + (2 * (StaveBoundary[7] - StaveBoundary[3])), o2::itsmft::GBTLinkDecodingStat::NErrorsDefined, 0.5, o2::itsmft::GBTLinkDecodingStat::NErrorsDefined + 0.5);
277273
mErrorVsFeeid->SetMinimum(0);
278274
mErrorVsFeeid->SetStats(0);
@@ -371,9 +367,6 @@ void ITSFhrTask::setPlotsFormat()
371367
if (mErrorPlots) {
372368
setAxisTitle(mErrorPlots, "Error ID", "Counts");
373369
}
374-
if (mTFInfo) {
375-
setAxisTitle(mTFInfo, "TF ID", "Counts");
376-
}
377370
if (mErrorVsFeeid) {
378371
setAxisTitle(mErrorVsFeeid, "FeeID", "Error ID");
379372
}
@@ -426,17 +419,6 @@ void ITSFhrTask::monitorData(o2::framework::ProcessingContext& ctx)
426419
std::chrono::time_point<std::chrono::high_resolution_clock> end;
427420
int difference;
428421
start = std::chrono::high_resolution_clock::now();
429-
// get TF id by dataorigin and datadescription
430-
const InputSpec TFIdFilter{ "", ConcreteDataTypeMatcher{ "DS", "RAWDATA1" }, Lifetime::Timeframe }; // after Data Sampling the dataorigin will become to "DS" and the datadescription will become to "RAWDATAX"
431-
if (!mGetTFFromBinding) {
432-
for (auto& input : ctx.inputs()) {
433-
if (DataRefUtils::match(input, TFIdFilter)) {
434-
mTimeFrameId = (unsigned int)*input.payload;
435-
}
436-
}
437-
} else {
438-
mTimeFrameId = ctx.inputs().get<int>("G");
439-
}
440422

441423
// set Decoder
442424
mDecoder->startNewTF(ctx.inputs());
@@ -750,11 +732,6 @@ void ITSFhrTask::monitorData(o2::framework::ProcessingContext& ctx)
750732
}
751733
delete[] occupancyPlotTmp;
752734

753-
// temporarily reverting to get TFId by querying binding
754-
// mTimeFrameId = ctx.inputs().get<int>("G");
755-
// Timer LOG
756-
mTFInfo->Fill(mTimeFrameId);
757-
758735
end = std::chrono::high_resolution_clock::now();
759736
difference = std::chrono::duration_cast<std::chrono::microseconds>(end - start).count();
760737

@@ -770,7 +747,6 @@ void ITSFhrTask::getParameters()
770747
mNThreads = o2::quality_control_modules::common::getFromConfig<int>(mCustomParameters, "decoderThreads", mNThreads);
771748
mLayer = o2::quality_control_modules::common::getFromConfig<int>(mCustomParameters, "Layer", mLayer);
772749
mHitCutForCheck = o2::quality_control_modules::common::getFromConfig<int>(mCustomParameters, "HitNumberCut", mHitCutForCheck);
773-
mGetTFFromBinding = o2::quality_control_modules::common::getFromConfig<int>(mCustomParameters, "GetTFFromBinding", mGetTFFromBinding);
774750
mHitCutForNoisyPixel = o2::quality_control_modules::common::getFromConfig<int>(mCustomParameters, "HitNumberCutForNoisyPixel", mHitCutForNoisyPixel);
775751
mOccupancyCutForNoisyPixel = o2::quality_control_modules::common::getFromConfig<float>(mCustomParameters, "OccupancyNumberCutForNoisyPixel", mOccupancyCutForNoisyPixel);
776752
mMaxGeneralAxisRange = o2::quality_control_modules::common::getFromConfig<float>(mCustomParameters, "MaxGeneralAxisRange", mMaxGeneralAxisRange);
@@ -798,7 +774,6 @@ void ITSFhrTask::endOfActivity(Activity& /*activity*/)
798774

799775
void ITSFhrTask::resetGeneralPlots()
800776
{
801-
resetObject(mTFInfo);
802777
resetObject(mErrorPlots);
803778
resetObject(mErrorVsFeeid);
804779
}
@@ -807,7 +782,6 @@ void ITSFhrTask::resetOccupancyPlots()
807782
{
808783
memset(mHitNumberOfChip, 0, sizeof(mHitNumberOfChip));
809784
memset(mErrors, 0, sizeof(mErrors));
810-
mTimeFrameId = 0;
811785
mChipStaveOccupancy->Reset();
812786
mChipStaveEventHitCheck->Reset();
813787
mOccupancyPlot->Reset();

0 commit comments

Comments
 (0)