138int RawReaderZDC::getDigits(std::vector<BCData>& digitsBC, std::vector<ChannelData>& digitsCh, std::vector<OrbitData>& orbitData)
140 const char* thefcn =
"RawReaderZDC::getDigits";
142 if (mModuleConfig ==
nullptr) {
143 LOG(fatal) <<
"Missing ModuleConfig";
152 int bcCounter = mMapData.size();
155 LOG(info) <<
"Processing #bc " << bcCounter;
157 for (
int im = 0; im <
NModules; im++) {
159 printf(
"%6u", mEvents[im][ic]);
161 printf(
" %6u", mEvents[im][ic]);
168 for (
auto& [
ir, ev] : mMapData) {
172 auto& pdata = orbitData.emplace_back();
176 if (ev.data[im][ic].f.fixed_0 ==
Id_w0 && ev.data[im][ic].f.fixed_1 ==
Id_w1 && ev.data[im][ic].f.fixed_2 ==
Id_w2) {
180 if (mModuleConfig->
modules[im].readChannel[ic]) {
182 auto id = mModuleConfig->
modules[im].channelID[ic];
183 word16.uns = ev.data[im][ic].f.offset;
184 pdata.data[
id] = word16.sig;
185 if (ev.data[im][ic].f.dLoss) {
189 pdata.scaler[
id] = ev.data[im][ic].f.hits | 0x8000;
191 pdata.scaler[
id] = ev.data[im][ic].f.hits;
194 }
else if (ev.data[im][ic].f.fixed_0 == 0 && ev.data[im][ic].f.fixed_1 == 0 && ev.data[im][ic].f.fixed_2 == 0) {
203 auto& bcdata = digitsBC.emplace_back();
206 bool inconsistent_event =
false;
207 bool inconsistent_alice_trig =
false;
208 bool inconsistent_auto_trig =
false;
209 bool filled_event =
false;
210 bcdata.ref.setFirstEntry(digitsCh.size());
212 bool alice_0 =
false;
213 bool alice_1 =
false;
214 bool alice_2 =
false;
215 bool alice_3 =
false;
220 bool filled_module =
false;
223 if (ev.data[im][ic].f.fixed_0 ==
Id_w0 && ev.data[im][ic].f.fixed_1 ==
Id_w1 && ev.data[im][ic].f.fixed_2 ==
Id_w2) {
224 if (mModuleConfig->
modules[im].readChannel[ic] ==
false) {
226 if (bcdata.ir.bc == 0 || bcdata.ir.bc == 3563) {
234 auto& ch = ev.data[im][ic];
249 auto& chd = digitsCh.emplace_back();
250 auto id = mModuleConfig->
modules[im].channelID[ic];
256 chd.data[is] = us[is];
263 if (filled_event ==
false) {
265 alice_0 = ch.f.Alice_0;
266 alice_1 = ch.f.Alice_1;
267 alice_2 = ch.f.Alice_2;
268 alice_3 = ch.f.Alice_3;
270 }
else if (alice_0 != ch.f.Alice_0 || alice_1 != ch.f.Alice_1 || alice_2 != ch.f.Alice_2 || alice_3 != ch.f.Alice_3) {
271 inconsistent_event =
true;
272 inconsistent_alice_trig =
true;
273 mt.f.AliceErr =
true;
274 LOGF(warn,
"%s (m,c)=(%d,%d) Alice [0123] %u%s%u %u%s%u %u%s%u %u%s%u", thefcn, im, ic,
275 alice_0, alice_0 == ch.f.Alice_0 ?
"==" :
"!=", ch.f.Alice_0,
276 alice_1, alice_1 == ch.f.Alice_1 ?
"==" :
"!=", ch.f.Alice_1,
277 alice_2, alice_2 == ch.f.Alice_2 ?
"==" :
"!=", ch.f.Alice_2,
278 alice_3, alice_3 == ch.f.Alice_3 ?
"==" :
"!=", ch.f.Alice_3);
280 if (filled_module ==
false) {
281 mt.f.Auto_m = ch.f.Auto_m;
282 mt.f.Auto_0 = ch.f.Auto_0;
283 mt.f.Auto_1 = ch.f.Auto_1;
284 mt.f.Auto_2 = ch.f.Auto_2;
285 mt.f.Auto_3 = ch.f.Auto_3;
286 mt.f.Alice_0 = ch.f.Alice_0;
287 mt.f.Alice_1 = ch.f.Alice_1;
288 mt.f.Alice_2 = ch.f.Alice_2;
289 mt.f.Alice_3 = ch.f.Alice_3;
290 filled_module =
true;
291 }
else if (mt.f.Auto_m != ch.f.Auto_m || mt.f.Auto_0 != ch.f.Auto_0 || mt.f.Auto_1 != ch.f.Auto_1 || mt.f.Auto_2 != ch.f.Auto_2 || mt.f.Auto_3 != ch.f.Auto_3) {
293 inconsistent_auto_trig =
true;
294 LOGF(warn,
"%s (m,c)=(%d,%d) Auto [m0123] %u%s%u %u%s%u %u%s%u %u%s%u %u%s%u", thefcn, im, ic,
295 mt.f.Auto_m, mt.f.Auto_m == ch.f.Auto_m ?
"==" :
"!=", ch.f.Auto_m,
296 mt.f.Auto_0, mt.f.Auto_0 == ch.f.Auto_0 ?
"==" :
"!=", ch.f.Auto_0,
297 mt.f.Auto_1, mt.f.Auto_1 == ch.f.Auto_1 ?
"==" :
"!=", ch.f.Auto_1,
298 mt.f.Auto_2, mt.f.Auto_2 == ch.f.Auto_2 ?
"==" :
"!=", ch.f.Auto_2,
299 mt.f.Auto_3, mt.f.Auto_3 == ch.f.Auto_3 ?
"==" :
"!=", ch.f.Auto_3);
302 }
else if (ev.data[im][ic].f.fixed_0 == 0 && ev.data[im][ic].f.fixed_1 == 0 && ev.data[im][ic].f.fixed_2 == 0) {
305 LOG(
error) << thefcn <<
"RAW Data format error";
308 bcdata.moduleTriggers[im] = mt.w;
309 if (mt.f.AutoErr ==
true) {
310 inconsistent_event =
true;
317 bcdata.ref.setEntries(ncd);
319 bcdata.print(mTriggerMask);
320 auto first_entry = bcdata.ref.getFirstEntry();
321 for (Int_t icd = 0; icd < ncd; icd++) {
322 digitsCh[icd + first_entry].print();
326 if (inconsistent_event) {
327 LOGF(
error,
"%s %u.%04u Inconsistent event:%s%s", thefcn, bcdata.ir.orbit, bcdata.ir.bc, (inconsistent_auto_trig ?
" AUTOT" :
""), (inconsistent_alice_trig ?
" ALICET" :
""));
329 if ((inconsistent_event && mVerbosity >
DbgMinimal) || (mVerbosity >=
DbgFull)) {
330 bcdata.print(mTriggerMask);
333 if (ev.data[im][ic].f.fixed_0 ==
Id_w0 && ev.data[im][ic].f.fixed_1 ==
Id_w1 && ev.data[im][ic].f.fixed_2 ==
Id_w2) {
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 int32_t