Project
Loading...
Searching...
No Matches
TOFDCSProcessor.cxx
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
14#include "Rtypes.h"
15#include <deque>
16#include <string>
17#include <algorithm>
18#include <iterator>
19#include <cstring>
20#include <bitset>
21
22using namespace o2::tof;
23using namespace o2::dcs;
24
28
30
32{
33 LOG(info) << "First Value: timestamp = " << firstValue.first << ", value = " << firstValue.second;
34 LOG(info) << "Last Value: timestamp = " << lastValue.first << ", value = " << lastValue.second;
35 LOG(info) << "Mid Value: timestamp = " << midValue.first << ", value = " << midValue.second;
36 LOG(info) << "Min Value: timestamp = " << minValue.first << ", value = " << minValue.second;
37 LOG(info) << "Max Value: timestamp = " << maxValue.first << ", value = " << maxValue.second;
38 LOG(info) << "Max Change: timestamp[0] = " << maxChange.first[0] << ", timestamp[1] = " << maxChange.first[1] << ", value = " << maxChange.second;
39 std::string updatedStr = updated ? "UPDATED" : "NOT UPDATED";
40 LOG(info) << "Status = " << updatedStr;
41}
42
43//__________________________________________________________________
44
45void TOFDCSProcessor::init(const std::vector<DPID>& pids)
46{
47 // fill the array of the DPIDs that will be used by TOF
48 // pids should be provided by CCDB
49
50 for (const auto& it : pids) {
51 mPids[it] = false;
52 mTOFDCS[it].makeEmpty();
53 }
54
55 for (int iddl = 0; iddl < NDDLS; ++iddl) {
56 for (int ifeac = 0; ifeac < NFEACS; ++ifeac) {
57 getStripsConnectedToFEAC(iddl, ifeac, mFeacInfo[iddl][ifeac]);
58 }
59 }
60}
61
62//__________________________________________________________________
63
64int TOFDCSProcessor::process(const gsl::span<const DPCOM> dps)
65{
66
67 // first we check which DPs are missing - if some are, it means that
68 // the delta map was sent
69 if (mVerboseDP || mVerboseHVLV) {
70 LOG(info) << "\n\n\nProcessing new DCS DP map\n-----------------";
71 }
72 if (false) {
73 std::unordered_map<DPID, DPVAL> mapin;
74 for (auto& it : dps) {
75 mapin[it.id] = it.data;
76 }
77 for (auto& it : mPids) {
78 const auto& el = mapin.find(it.first);
79 if (el == mapin.end()) {
80 LOG(debug) << "DP " << it.first << " not found in map";
81 } else {
82 LOG(debug) << "DP " << it.first << " found in map";
83 }
84 }
85 }
86
87 mUpdateFeacStatus = false; // by default, we do not foresee a new entry in the CCDB for the FEAC
88 mUpdateHVStatus = false; // by default, we do not foresee a new entry in the CCDB for the HV
89
90 // now we process all DPs, one by one
91 for (const auto& it : dps) {
92 // we process only the DPs defined in the configuration
93 const auto& el = mPids.find(it.id);
94 if (el == mPids.end()) {
95 LOG(info) << "DP " << it.id << " not found in TOFDCSProcessor, we will not process it";
96 continue;
97 }
98 processDP(it);
99 mPids[it.id] = true;
100 }
101
102 if (mUpdateFeacStatus) {
104 }
105
106 if (mUpdateHVStatus) {
107 updateHVCCDB();
108 }
109
110 return 0;
111}
112
113//__________________________________________________________________
114
116{
117
118 // processing single DP
119
120 auto& dpid = dpcom.id;
121 const auto& type = dpid.get_type();
122 auto& val = dpcom.data;
123 if (mVerboseDP || mVerboseHVLV) {
124 if (type == DPVAL_DOUBLE) {
125 LOG(info);
126 LOG(info) << "Processing DP = " << dpcom << ", with value = " << o2::dcs::getValue<double>(dpcom) << ", epoch time = " << val.get_epoch_time();
127 } else if (type == DPVAL_INT) {
128 LOG(info);
129 LOG(info) << "Processing DP = " << dpcom << ", with value = " << o2::dcs::getValue<int32_t>(dpcom);
130 }
131 }
132 auto flags = val.get_flags();
133 if (processFlags(flags, dpid.get_alias()) == 0) {
134 // now I need to access the correct element
135 if (type == DPVAL_DOUBLE) {
136 // for these DPs, we will store the first, last, mid value, plus the value where the maximum variation occurred
137 auto& dvect = mDpsdoublesmap[dpid];
138 if (mVerboseDP) {
139 LOG(debug) << "mDpsdoublesmap[dpid].size() = " << dvect.size();
140 }
141 auto etime = val.get_epoch_time();
142 if (dvect.size() == 0 ||
143 etime != dvect.back().get_epoch_time()) { // we check
144 // that we did not get the
145 // same timestamp as the
146 // latest one
147 dvect.push_back(val);
148 }
149 }
150
151 if (type == DPVAL_INT) {
152 // for these DPs, we need some processing
153 if (std::strstr(dpid.get_alias(), "FEACSTATUS") != nullptr) { // DP is FEACSTATUS
154 std::string aliasStr(dpid.get_alias());
155 // extracting DDL number (regex is quite slow, using this way)
156 const auto offs = std::strlen("TOF_FEACSTATUS_");
157 std::size_t const nn = aliasStr.find_first_of("0123456789", offs);
158 std::size_t const mm = aliasStr.find_first_not_of("0123456789", nn);
159 std::string ddlStr = aliasStr.substr(nn, mm != std::string::npos ? mm - nn : mm);
160 auto iddl = std::stoi(ddlStr);
161 std::bitset<8> feacstatus(o2::dcs::getValue<int32_t>(dpcom));
162 if (mVerboseHVLV) {
163 LOG(info) << "DDL: " << iddl << ": Prev FEAC = " << mPrevFEACstatus[iddl] << ", new = " << feacstatus;
164 }
165 if (feacstatus == mPrevFEACstatus[iddl]) {
166 if (mVerboseHVLV) {
167 LOG(info) << "Same FEAC status as before, we do nothing";
168 }
169 return 0;
170 }
171 if (mVerboseHVLV) {
172 LOG(info) << "Something changed in LV for DDL " << iddl << ", we need to check what";
173 }
174 mUpdateFeacStatus = true;
175 int plate = -1, strip = -1;
176 int det[5] = {iddl / 4, -1, -1, -1, -1};
177 for (auto ifeac = 0; ifeac < NFEACS; ++ifeac) { // we have one bit per FEAC
178 auto singlefeacstatus = feacstatus[ifeac];
179 for (int istrip = 0; istrip < 6; ++istrip) {
180 if (mFeacInfo[iddl][ifeac].stripInSM[istrip] == -1) {
181 continue;
182 }
183 for (int ipadz = 0; ipadz < Geo::NPADZ; ++ipadz) {
184 for (int ipadx = mFeacInfo[iddl][ifeac].firstPadX; ipadx <= mFeacInfo[iddl][ifeac].lastPadX; ++ipadx) {
185 if (mVerboseHVLV) {
186 LOG(info) << "mFeacInfo[" << iddl << "][" << ifeac << "].stripInSM[" << istrip << "] = " << mFeacInfo[iddl][ifeac].stripInSM[istrip];
187 }
188 Geo::getStripAndModule(mFeacInfo[iddl][ifeac].stripInSM[istrip], plate, strip);
189 det[1] = plate;
190 det[2] = strip;
191 det[3] = ipadz;
192 det[4] = ipadx;
193 if (mVerboseHVLV) {
194 LOG(info) << "det[0] = " << det[0] << ", det[1] = " << det[1] << ", det[2] = " << det[2] << ", det[3] = " << det[3] << ", det[4] = " << det[4];
195 }
196 int channelIdx = Geo::getIndex(det);
197 if (mFeac[channelIdx] != singlefeacstatus) {
198 mFeac[channelIdx] = singlefeacstatus;
199 }
200 }
201 }
202 }
203 } // end loop on FEACs
204 if (mVerboseHVLV) {
205 LOG(info) << "Updating previous FEAC status for DDL " << iddl;
206 }
207 mPrevFEACstatus[iddl] = feacstatus;
208 } // end processing current DP, when it is of type FEACSTATUS
209
210 if (std::strstr(dpid.get_alias(), "HVSTATUS") != nullptr) { // DP is HVSTATUS
211 std::string aliasStr(dpid.get_alias());
212 // extracting SECTOR and PLATE number (regex is quite slow, using this way)
213 const auto offs = std::strlen("TOF_HVSTATUS_SM");
214 std::size_t const nn = aliasStr.find_first_of("0123456789", offs);
215 std::size_t const mm = aliasStr.find_first_not_of("0123456789", nn);
216 std::size_t const oo = aliasStr.find_first_of("0123456789", mm);
217 std::size_t const pp = aliasStr.find_first_not_of("0123456789", oo);
218 std::string sectorStr = aliasStr.substr(nn, mm != std::string::npos ? mm - nn : mm);
219 auto isect = std::stoi(sectorStr);
220 std::string plateStr = aliasStr.substr(oo, pp != std::string::npos ? pp - oo : pp);
221 auto iplat = std::stoi(plateStr);
222 std::bitset<19> hvstatus(o2::dcs::getValue<int32_t>(dpcom));
223 if (mVerboseHVLV) {
224 LOG(info) << "Sector: " << isect << ", plate = " << iplat << ": Prev HV = "
225 << mPrevHVstatus[iplat][isect] << ", new = " << hvstatus;
226 }
227 if (hvstatus == mPrevHVstatus[iplat][isect]) {
228 if (mVerboseHVLV) {
229 LOG(info) << "Same HV status as before, we do nothing";
230 }
231 return 0;
232 }
233 if (mVerboseHVLV) {
234 LOG(info) << "Something changed in HV for Sect " << isect << " and plate "
235 << iplat << ", we need to check what";
236 }
237 mUpdateHVStatus = true;
238 int det[5] = {isect, iplat, -1, -1, -1};
239 auto nStrips = (iplat == 2 ? Geo::NSTRIPA : (iplat == 0 || iplat == 4) ? Geo::NSTRIPC : Geo::NSTRIPB);
240 for (auto istrip = 0; istrip < nStrips; ++istrip) {
241 auto singlestripHV = hvstatus[istrip];
242 for (int ipadz = 0; ipadz < Geo::NPADZ; ++ipadz) {
243 for (int ipadx = 0; ipadx < Geo::NPADX; ++ipadx) {
244 det[2] = istrip;
245 det[3] = ipadz;
246 det[4] = ipadx;
247 int channelIdx = Geo::getIndex(det);
248 if (mHV[channelIdx] != singlestripHV) {
249 mHV[channelIdx] = singlestripHV;
250 }
251 }
252 }
253 } // end loop on strips
254 if (mVerboseHVLV) {
255 LOG(info) << "Updating previous HV status for Sector: " << isect << ", plate = " << iplat;
256 }
257 mPrevHVstatus[iplat][isect] = hvstatus;
258 } //end processing current DP, when it is of type HVSTATUS
259 }
260 }
261 return 0;
262}
263
264//______________________________________________________________________
265
266uint64_t TOFDCSProcessor::processFlags(const uint64_t flags, const char* pid)
267{
268
269 // function to process the flag. the return code zero means that all is fine.
270 // anything else means that there was an issue
271
272 // for now, I don't know how to use the flags, so I do nothing
273 if (!mVerboseDP) {
274 return 0;
275 }
277 LOG(debug) << "KEEP_ALIVE_FLAG active for DP " << pid;
278 }
280 LOG(debug) << "END_FLAG active for DP " << pid;
281 }
283 LOG(debug) << "FBI_FLAG active for DP " << pid;
284 }
286 LOG(debug) << "NEW_FLAG active for DP " << pid;
287 }
289 LOG(debug) << "DIRTY_FLAG active for DP " << pid;
290 }
292 LOG(debug) << "TURN_FLAG active for DP " << pid;
293 }
295 LOG(debug) << "WRITE_FLAG active for DP " << pid;
296 }
298 LOG(debug) << "READ_FLAG active for DP " << pid;
299 }
301 LOG(debug) << "OVERWRITE_FLAG active for DP " << pid;
302 }
304 LOG(debug) << "VICTIM_FLAG active for DP " << pid;
305 }
307 LOG(debug) << "DIM_ERROR_FLAG active for DP " << pid;
308 }
310 LOG(debug) << "BAD_DPID_FLAG active for DP " << pid;
311 }
313 LOG(debug) << "BAD_FLAGS_FLAG active for DP " << pid;
314 }
316 LOG(debug) << "BAD_TIMESTAMP_FLAG active for DP " << pid;
317 }
319 LOG(debug) << "BAD_PAYLOAD_FLAG active for DP " << pid;
320 }
322 LOG(debug) << "BAD_FBI_FLAG active for DP " << pid;
323 }
324
325 return 0;
326}
327
328//______________________________________________________________________
329
331{
332
333 // here we create the object to then be sent to CCDB
334 LOG(info) << "Finalizing";
335 union Converter {
336 uint64_t raw_data;
337 double double_value;
338 } converter0, converter1;
339
340 for (auto& it : mPids) {
341 const auto& type = it.first.get_type();
343 auto& tofdcs = mTOFDCS[it.first];
344 if (it.second) { // we processed the DP at least 1x
345 if (mVerboseDP) {
346 LOG(info) << "Processing DP " << it.first.get_alias();
347 }
348 it.second = false; // reset for the next period
349 tofdcs.updated = true;
350 auto& dpvect = mDpsdoublesmap[it.first];
351 tofdcs.firstValue.first = dpvect[0].get_epoch_time();
352 converter0.raw_data = dpvect[0].payload_pt1;
353 tofdcs.firstValue.second = converter0.double_value;
354 tofdcs.lastValue.first = dpvect.back().get_epoch_time();
355 converter0.raw_data = dpvect.back().payload_pt1;
356 tofdcs.lastValue.second = converter0.double_value;
357 // find min and max
358 for (const auto& el : dpvect) {
359 converter0.raw_data = el.payload_pt1;
360 if (converter0.double_value < tofdcs.minValue.second) {
361 tofdcs.minValue.first = el.get_epoch_time();
362 tofdcs.minValue.second = converter0.double_value;
363 }
364 if (converter0.double_value > tofdcs.maxValue.second) {
365 tofdcs.maxValue.first = el.get_epoch_time();
366 tofdcs.maxValue.second = converter0.double_value;
367 }
368 }
369 // now I will look for the max change
370 if (dpvect.size() > 1) {
371 auto deltatime = dpvect.back().get_epoch_time() - dpvect[0].get_epoch_time();
372 if (deltatime < 60000) {
373 // if we did not cover at least 1 minute,
374 // max variation is defined as the difference between first and last value
375 converter0.raw_data = dpvect[0].payload_pt1;
376 converter1.raw_data = dpvect.back().payload_pt1;
377 double delta = converter0.double_value - converter1.double_value;
378 tofdcs.maxChange.first[0] = dpvect[0].get_epoch_time();
379 tofdcs.maxChange.first[1] = dpvect.back().get_epoch_time();
380 tofdcs.maxChange.second = delta;
381 } else {
382 for (auto i = 0; i < dpvect.size() - 1; ++i) {
383 for (auto j = i + 1; j < dpvect.size(); ++j) {
384 auto deltatime = dpvect[j].get_epoch_time() - dpvect[i].get_epoch_time();
385 if (deltatime >= 60000) { // we compare to values coming from at least 1 minute later; epoch_time in ms
386 converter0.raw_data = dpvect[i].payload_pt1;
387 converter1.raw_data = dpvect[j].payload_pt1;
388 double delta = converter0.double_value - converter1.double_value;
389 if (std::abs(delta) > std::abs(tofdcs.maxChange.second)) {
390 tofdcs.maxChange.first[0] = dpvect[i].get_epoch_time();
391 tofdcs.maxChange.first[1] = dpvect[j].get_epoch_time();
392 tofdcs.maxChange.second = delta;
393 }
394 }
395 }
396 }
397 }
398 // mid point
399 auto midIdx = dpvect.size() / 2 - 1;
400 tofdcs.midValue.first = dpvect[midIdx].get_epoch_time();
401 converter0.raw_data = dpvect[midIdx].payload_pt1;
402 tofdcs.midValue.second = converter0.double_value;
403 } else {
404 tofdcs.maxChange.first[0] = dpvect[0].get_epoch_time();
405 tofdcs.maxChange.first[1] = dpvect[0].get_epoch_time();
406 converter0.raw_data = dpvect[0].payload_pt1;
407 tofdcs.maxChange.second = converter0.double_value;
408 tofdcs.midValue.first = dpvect[0].get_epoch_time();
409 converter0.raw_data = dpvect[0].payload_pt1;
410 tofdcs.midValue.second = converter0.double_value;
411 }
412 } else {
413 tofdcs.updated = false;
414 }
415 if (mVerboseDP) {
416 LOG(info) << "PID " << it.first.get_alias() << " was updated to:";
417 tofdcs.print();
418 }
419 }
420 }
421 if (mVerboseDP) {
422 LOG(info) << "Printing object to be sent to CCDB";
423 for (auto& it : mPids) {
424 const auto& type = it.first.get_type();
426 LOG(info) << "PID = " << it.first.get_alias();
427 auto& tofdcs = mTOFDCS[it.first];
428 tofdcs.print();
429 }
430 }
431 LOG(info) << "done";
432 }
433
434 std::map<std::string, std::string> md;
435 md["responsible"] = "Chiara Zampolli";
436 o2::calibration::Utils::prepareCCDBobjectInfo(mTOFDCS, mccdbDPsInfo, "TOF/Calib/DCSDPs", md, mStartValidityDPs, mStartValidityDPs + 3 * o2::ccdb::CcdbObjectInfo::DAY);
437
438 return;
439}
440
441//______________________________________________________________________
442
444{
445
446 // we need to update a CCDB for the FEAC status --> let's prepare the CCDBInfo
447
448 if (mVerboseHVLV) {
449 LOG(info) << "At least one FEAC changed status --> we will update CCDB";
450 }
451 std::map<std::string, std::string> md;
452 md["responsible"] = "Chiara Zampolli";
453 o2::calibration::Utils::prepareCCDBobjectInfo(mFeac, mccdbLVInfo, "TOF/Calib/LVStatus", md, mStartValidityLV, mStartValidityLV + o2::ccdb::CcdbObjectInfo::MONTH);
454 return;
455}
456
457//______________________________________________________________________
458
460{
461
462 // we need to update a CCDB for the HV status --> let's prepare the CCDBInfo
463
464 if (mVerboseHVLV) {
465 LOG(info) << "At least one HV changed status --> we will update CCDB";
466 }
467 std::map<std::string, std::string> md;
468 md["responsible"] = "Chiara Zampolli";
469 o2::calibration::Utils::prepareCCDBobjectInfo(mHV, mccdbHVInfo, "TOF/Calib/HVStatus", md, mStartValidityHV, mStartValidityHV + o2::ccdb::CcdbObjectInfo::MONTH);
470 return;
471}
472
473//_______________________________________________________________________
474
475void TOFDCSProcessor::getStripsConnectedToFEAC(int nDDL, int nFEAC, TOFFEACinfo& info) const
476{
477
478 //
479 // Taken from AliRoot/TOF/AliTOFLvHvDataPoints.cxx
480 //
481 // FEAC-strip mapping:
482 // return the strips and first PadX numbers
483 // connected to the FEAC number nFEAC in the crate number nDDL
484 //
485
486 switch (nDDL % 4) {
487 case 0:
488 info.firstPadX = 0;
489 info.lastPadX = Geo::NPADX / 2 - 1;
490
491 if (nFEAC <= 2) {
492 for (int ii = 0; ii < 6; ++ii) {
493 info.stripInSM[ii] = ii + 6 * nFEAC;
494 }
495 } else if (nFEAC == 3) {
496 for (int ii = 0; ii < 5; ++ii) {
497 info.stripInSM[ii] = ii + 6 * nFEAC;
498 }
499 } else if (nFEAC == 4) {
500 for (int ii = 0; ii < 6; ++ii) {
501 info.stripInSM[ii] = ii + 6 * nFEAC - 1;
502 }
503 } else if (nFEAC == 5) {
504 for (int ii = 0; ii < 5; ++ii) {
505 info.stripInSM[ii] = ii + 6 * nFEAC - 1;
506 }
507 } else if (nFEAC == 6) {
508 for (int ii = 0; ii < 6; ++ii) {
509 info.stripInSM[ii] = ii + 6 * nFEAC - 2;
510 }
511 } else if (nFEAC == 7) {
512 for (int ii = 0; ii < 5; ++ii) {
513 info.stripInSM[ii] = ii + 6 * nFEAC - 2;
514 }
515 }
516
517 break;
518 case 1:
519 info.firstPadX = Geo::NPADX / 2;
520 info.lastPadX = Geo::NPADX - 1;
521
522 if (nFEAC <= 2) {
523 for (int ii = 0; ii < 6; ++ii) {
524 info.stripInSM[ii] = ii + 6 * nFEAC;
525 }
526 } else if (nFEAC == 3) {
527 for (int ii = 0; ii < 5; ++ii) {
528 info.stripInSM[ii] = ii + 6 * nFEAC;
529 }
530 } else if (nFEAC == 4) {
531 for (int ii = 0; ii < 6; ++ii) {
532 info.stripInSM[ii] = ii + 6 * nFEAC - 1;
533 }
534 } else if (nFEAC == 5) {
535 for (int ii = 0; ii < 6; ++ii) {
536 info.stripInSM[ii] = ii + 6 * nFEAC - 1;
537 }
538 } else if (nFEAC == 6) {
539 for (int ii = 0; ii < 5; ++ii) {
540 info.stripInSM[ii] = ii + 6 * nFEAC - 1;
541 }
542 } else if (nFEAC == 7) {
543 for (int ii = 0; ii < 6; ++ii) {
544 info.stripInSM[ii] = ii + 6 * nFEAC - 2;
545 }
546 }
547
548 break;
549 case 2:
550 info.firstPadX = Geo::NPADX / 2;
551 info.lastPadX = Geo::NPADX - 1;
552
553 if (nFEAC <= 2) {
554 for (int ii = 0; ii < 6; ++ii) {
555 info.stripInSM[ii] = 90 - (ii + 6 * nFEAC);
556 }
557 } else if (nFEAC == 3) {
558 for (int ii = 0; ii < 5; ++ii) {
559 info.stripInSM[ii] = 90 - (ii + 6 * nFEAC);
560 }
561 } else if (nFEAC == 4) {
562 for (int ii = 0; ii < 6; ++ii) {
563 info.stripInSM[ii] = 90 - (ii + 6 * nFEAC - 1);
564 }
565 } else if (nFEAC == 5) {
566 for (int ii = 0; ii < 5; ++ii) {
567 info.stripInSM[ii] = 90 - (ii + 6 * nFEAC - 1);
568 }
569 } else if (nFEAC == 6) {
570 for (int ii = 0; ii < 6; ++ii) {
571 info.stripInSM[ii] = 90 - (ii + 6 * nFEAC - 2);
572 }
573 } else if (nFEAC == 7) {
574 for (int ii = 0; ii < 5; ++ii) {
575 info.stripInSM[ii] = 90 - (ii + 6 * nFEAC - 2);
576 }
577 }
578
579 break;
580 case 3:
581 info.firstPadX = 0;
582 info.lastPadX = Geo::NPADX / 2 - 1;
583
584 if (nFEAC <= 2) {
585 for (int ii = 0; ii < 6; ++ii) {
586 info.stripInSM[ii] = 90 - (ii + 6 * nFEAC);
587 }
588 } else if (nFEAC == 3) {
589 for (int ii = 0; ii < 5; ++ii) {
590 info.stripInSM[ii] = 90 - (ii + 6 * nFEAC);
591 }
592 } else if (nFEAC == 4) {
593 for (int ii = 0; ii < 6; ++ii) {
594 info.stripInSM[ii] = 90 - (ii + 6 * nFEAC - 1);
595 }
596 } else if (nFEAC == 5) {
597 for (int ii = 0; ii < 6; ++ii) {
598 info.stripInSM[ii] = 90 - (ii + 6 * nFEAC - 1);
599 }
600 } else if (nFEAC == 6) {
601 for (int ii = 0; ii < 5; ++ii) {
602 info.stripInSM[ii] = 90 - (ii + 6 * nFEAC - 1);
603 }
604 } else if (nFEAC == 7) {
605 for (int ii = 0; ii < 6; ++ii) {
606 info.stripInSM[ii] = 90 - (ii + 6 * nFEAC - 2);
607 }
608 }
609
610 break;
611 }
612 if (mVerboseHVLV) {
613 for (int ii = 0; ii < 6; ++ii) {
614 LOG(info) << "nDDL = " << nDDL << ", nFEAC = " << nFEAC << ", stripInSM[" << ii << "] = " << info.stripInSM[ii];
615 }
616 }
617}
Utils and constants for calibration and related workflows.
std::ostringstream debug
int32_t i
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char Directory with events to Events directory is and not inside events Show standalone event Run event generator maximum time bin of continuous for triggered for automatic continuous for automatic continuous triggered uint64_t
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char pp
configStandalone Reconstruction rec_tpc multiplier for the combined cluster track error during track following area in cm for the search of for z only used if decrease removal by when above this local occupancy rowx Shift of TPC revert cluster flag edge bit distance to edge exceeds this ZOffset for secondary multiple of radius max P of electron K BB bands crossing max P of electron p BB bands crossing max P of electron d BB bands crossing max P of electron t BB bands crossing min accepted dEdxMaxTPC of the track Additive extra cluster error for Y2 if edge flag set Additive extra cluster error for Y2 if single set Additive extra cluster error for Y2 if or single set Additive extra cluster error for Z2 if or single set Extra errors to add to track when crossing depending on addErrorsCECrossing Inner portion of y range in sector that is not used in searching for extrapolated track candidates factor2YS for track merging factor2K for track merging Margin in cm of Y position when rejecting edge clusters based on uncorrected track Y Max fraction of shared clusters for tracklet Except pad from cluster finding if total number of charges in a fragment is above this Except pad from cluster finding if number of consecutive charges in a fragment is above this Threshold where a timebin is considered disabling the noisy pad check for that pad Treat signal above this minimum as saturated Smoothing factor for the exponential Highly Ionising Particle tail filter Number of timebins to use for the averaging Add additional custom track errors when crossing relative as fraction of Do N fit passes in final fit of< 0:reject at max -n hits") AddOptionRTC(rejectIFCLowRadiusCluster, uint8_t, 1, "", 0, "Reject clusters that get the IFC mask error during refit") AddOptionRTC(dEdxTruncLow, uint8_t, 2, "", 0, "Low truncation threshold, fraction of 128") AddOptionRTC(dEdxTruncHigh, uint8_t, 77, "", 0, "High truncation threshold, fraction of 128") AddOptionRTC(extrapolationTracking, int8_t, 1, "", 0, "Enable Extrapolation Tracking(prolong tracks to adjacent sectors to find short segments)") AddOptionRTC(disableRefitAttachment, uint8_t, 0, "", 0, "Bitmask to disable certain attachment steps during refit(1:attachment, 2:propagation, 4:loop following, 8:mirroring)") AddOptionRTC(rejectionStrategy, uint8_t, o2::gpu::GPUSettings::RejectionStrategyA, "", 0, "Enable rejection of TPC clusters for compression(0=no, 1=strategy A, 2=strategy B)") AddOptionRTC(mergeLoopersAfterburner, uint8_t, 1, "", 0, "Run afterburner for additional looper merging") AddOptionRTC(compressionTypeMask, uint8_t, o2::gpu::GPUSettings::CompressionFull, "", 0, "TPC Compression mode bits(1=truncate charge/width LSB, 2=differences, 4=track-model)") AddOptionRTC(compressionSortOrder, uint8_t, o2::gpu::GPUSettings::SortTime, "", 0, "Sort order of TPC compression(0=time, 1=pad, 2=Z-time-pad, 3=Z-pad-time, 4=no sorting(use incoming order))") AddOptionRTC(sigBitsCharge, uint8_t, 4, "", 0, "Number of significant bits for TPC cluster charge in compression mode 1") AddOptionRTC(sigBitsWidth, uint8_t, 3, "", 0, "Number of significant bits for TPC cluster width in compression mode 1") AddOptionRTC(dropLoopers, uint8_t, 0, "", 0, "Drop looping tracks starting from second loop") AddOptionRTC(mergerInterpolateErrors, uint8_t, 1, "", 0, "Use interpolation instead of extrapolation for chi2 based cluster rejection") AddOptionRTC(mergerInterpolateRejectAlsoOnCurrentPosition, uint8_t, 1, "", 0, "When using mergerInterpolateErrors, reject based on chi2 twice computed with interpolated and current track position starting from NDF > mergerNonInterpolateRejectMinNDF Merge tracks accross the central electrode Enable PID response Add sub threshold clusters in TPC dEdx computation OR mask of TPC flags that will reject the cluster in alternative dEdx Reject edge clusters based on uncorrected track Y during track fit Increase decrease removal by when on this number of pads from the edge h configStandalone Reconstruction rec_trd Max chi2 for TRD tracklets to be matched to a track Chi2 cut for strict matching mode Number of sigmas for ITS TPC track time error estimate Addition to search road around track prolongation along Y in cm Optimal tracklet rphi resolution in maximum chi2 per attached tracklet for TRD tracks take into account the full likelihood of the slope including exponential tails Tracks with less attached tracklets are discarded after the tracking Post trigger Pile up integration time in BCs fits all iterations but the last one in projections Use material lookup table for TPC refit Apply workarounds to avoid cyclic merge should not be needed tpc dyn configStandalone Processing proc_rtc Replace constant variables static by constexpr expressions Compile RTC in deterministic with NO_FAST_MATH flags and GPUCA_DETERMINISTIC_MODE define Use RTC to optimize GPU code h configStandalone Processing proc_rtctech Use a file lock to serialize access to the cache folder Print launch bounds used for RTC code as debugging for exit after Allow RTC with slave GPUReconstruction instances with optConstexpr and optSpecialcode Maximum number of RTC cache files per backend in the cache the oldest are Prepend RTC compilation commands by this string Load a parameter object containing the launch bounds from a file h configStandalone Processing proc_param TPC Cluster Z Error Parameterization h nn
uint32_t j
Definition RawData.h:0
uint16_t pid
Definition RawData.h:2
ClassImp(o2::tof::TOFDCSinfo)
static constexpr long MONTH
static constexpr long DAY
DeliveryType get_type() const noexcept
static void getStripAndModule(Int_t iStripPerSM, Int_t &iplate, Int_t &istrip)
Definition Geo.cxx:1161
static constexpr Int_t NPADZ
Definition Geo.h:111
static constexpr Int_t NSTRIPB
Definition Geo.h:115
static constexpr Int_t NSTRIPC
Definition Geo.h:116
static constexpr Int_t NSTRIPA
Definition Geo.h:114
static Int_t getIndex(const Int_t *detId)
Definition Geo.cxx:563
static constexpr Int_t NPADX
Definition Geo.h:109
void init(const std::vector< DPID > &pids)
int process(const gsl::span< const DPCOM > dps)
static constexpr int NDDLS
void getStripsConnectedToFEAC(int nDDL, int nFEAC, TOFFEACinfo &info) const
int processDP(const DPCOM &dpcom)
uint64_t processFlags(uint64_t flag, const char *pid)
static constexpr int NFEACS
GLint GLint GLsizei GLint GLenum GLenum type
Definition glcorearb.h:275
GLuint GLfloat * val
Definition glcorearb.h:1582
static void prepareCCDBobjectInfo(T &obj, o2::ccdb::CcdbObjectInfo &info, const std::string &path, const std::map< std::string, std::string > &md, long start, long end=-1)
Definition Utils.h:91
static constexpr uint16_t BAD_TIMESTAMP_FLAG
static constexpr uint16_t WRITE_FLAG
static constexpr uint16_t DIRTY_FLAG
static constexpr uint64_t TURN_FLAG
static constexpr uint16_t FBI_FLAG
static constexpr uint16_t END_FLAG
static constexpr uint16_t BAD_PAYLOAD_FLAG
static constexpr uint16_t BAD_DPID_FLAG
static constexpr uint16_t KEEP_ALIVE_FLAG
static constexpr uint16_t DIM_ERROR_FLAG
static constexpr uint16_t OVERWRITE_FLAG
static constexpr uint16_t BAD_FBI_FLAG
static constexpr uint16_t VICTIM_FLAG
static constexpr uint16_t BAD_FLAGS_FLAG
static constexpr uint16_t READ_FLAG
static constexpr uint16_t NEW_FLAG
std::pair< O2LongUInt, double > minValue
std::pair< O2LongUInt, double > midValue
std::pair< O2LongUInt, double > firstValue
std::pair< std::array< O2LongUInt, 2 >, double > maxChange
std::pair< O2LongUInt, double > lastValue
std::pair< O2LongUInt, double > maxValue
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"