Project
Loading...
Searching...
No Matches
DigitBlockFIT.h
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//
12// file DigitBlockFIT.h class for proccessing RAW data into Digits
13//
14// Artur.Furs
15// afurs@cern.ch
16
17#ifndef ALICEO2_FIT_DIGITBLOCKFIT_H_
18#define ALICEO2_FIT_DIGITBLOCKFIT_H_
19#include <iostream>
20#include <vector>
21#include <algorithm>
22#include <Rtypes.h>
23#include "FITRaw/DataBlockFIT.h"
25
28
29#include "TTree.h"
30
31#include <gsl/span>
32
33namespace o2
34{
35namespace fit
36{
37// Temporary helper
38namespace DigitBlockFIThelper
39{
40
41// Temporary, PM module conversion
42// FT0 & FV0
43template <typename ChannelDataType, typename PMDataType>
44auto ConvertChData2EventData(const ChannelDataType& chData, PMDataType& pmData, int channelID) -> std::enable_if_t<std::is_same<decltype(std::declval<ChannelDataType>().QTCAmpl), int16_t>::value>
45{
46 pmData.pmBits = chData.ChainQTC;
47 pmData.channelID = channelID;
48 pmData.time = chData.CFDTime;
49 pmData.charge = chData.QTCAmpl;
50}
51// FDD
52template <typename ChannelDataType, typename PMDataType>
53auto ConvertChData2EventData(const ChannelDataType& chData, PMDataType& pmData, int channelID) -> std::enable_if_t<std::is_same<decltype(std::declval<ChannelDataType>().mChargeADC), int16_t>::value>
54{
55 pmData.pmBits = chData.mFEEBits;
56 pmData.channelID = channelID;
57 pmData.time = chData.mTime;
58 pmData.charge = chData.mChargeADC;
59}
60
61// Temporary, TCM module conversion
62// FT0, FV0 and FDD
63template <typename DigitType, typename TCMDataType>
64auto ConvertDigit2TCMData(const DigitType& digit, TCMDataType& tcmData)
65{
66 tcmData.orA = digit.mTriggers.getOrA();
67 tcmData.orC = digit.mTriggers.getOrC();
68 tcmData.sCen = digit.mTriggers.getSCen();
69 tcmData.cen = digit.mTriggers.getCen();
70 tcmData.vertex = digit.mTriggers.getVertex();
71 tcmData.laser = digit.mTriggers.getLaser();
72 tcmData.outputsAreBlocked = digit.mTriggers.getOutputsAreBlocked();
73 tcmData.dataIsValid = digit.mTriggers.getDataIsValid();
74 tcmData.nChanA = digit.mTriggers.getNChanA();
75 tcmData.nChanC = digit.mTriggers.getNChanC();
76 const int64_t thresholdSignedInt17bit = 65535; // pow(2,17)/2-1
77 if (digit.mTriggers.getAmplA() > thresholdSignedInt17bit) {
78 tcmData.amplA = thresholdSignedInt17bit;
79 } else {
80 tcmData.amplA = digit.mTriggers.getAmplA();
81 }
82 if (digit.mTriggers.getAmplC() > thresholdSignedInt17bit) {
83 tcmData.amplC = thresholdSignedInt17bit;
84 } else {
85 tcmData.amplC = digit.mTriggers.getAmplC();
86 }
87 tcmData.timeA = digit.mTriggers.getTimeA();
88 tcmData.timeC = digit.mTriggers.getTimeC();
89}
90
91// Digit to raw helper functions, temporary
92// TCM to Digit convertation
93// FT0, FV0 and FDD
94template <typename DigitType, typename TCMDataType>
95auto ConvertTCMData2Digit(DigitType& digit, const TCMDataType& tcmData)
96{
97 using TriggerType = decltype(digit.mTriggers);
98 auto& trg = digit.mTriggers;
99 trg.setTriggers((bool)tcmData.orA, (bool)tcmData.orC, (bool)tcmData.vertex, (bool)tcmData.cen, (bool)tcmData.sCen,
100 (int8_t)tcmData.nChanA, (int8_t)tcmData.nChanC, (int32_t)tcmData.amplA, (int32_t)tcmData.amplC,
101 (int16_t)tcmData.timeA, (int16_t)tcmData.timeC, (bool)tcmData.laser, (bool)tcmData.outputsAreBlocked, (bool)tcmData.dataIsValid);
102}
103
104// PM to ChannelData convertation
105// FT0 and FV0
106template <typename LookupTableType, typename ChannelDataType, typename PMDataType, typename RawDataMetricType>
107auto ConvertEventData2ChData(std::vector<ChannelDataType>& vecChData, const PMDataType& pmData, RawDataMetricType& metric, int linkID, int ep) -> std::enable_if_t<std::is_same<decltype(std::declval<ChannelDataType>().QTCAmpl), int16_t>::value>
108{
109 bool isValid{};
110 const auto globalChID = LookupTableType::Instance().getChannel(linkID, ep, pmData.channelID, isValid);
111 if (isValid) {
112 vecChData.emplace_back(static_cast<uint8_t>(globalChID), static_cast<int>(pmData.time), static_cast<int>(pmData.charge), static_cast<uint8_t>(pmData.pmBits));
113 } else {
114 static int warningCount = 0;
115 metric.addStatusBit(RawDataMetricType::EStatusBits::kWrongChannelMapping);
116 if (warningCount++ < 100) {
117 LOG(warning) << "Incorrect global channel! linkID: " << linkID << " | EndPoint: " << ep << " | LocalChID: " << static_cast<uint16_t>(pmData.channelID);
118 }
119 }
120}
121// FDD
122template <typename LookupTableType, typename ChannelDataType, typename PMDataType, typename RawDataMetricType>
123auto ConvertEventData2ChData(std::vector<ChannelDataType>& vecChData, const PMDataType& pmData, RawDataMetricType& metric, int linkID, int ep) -> std::enable_if_t<std::is_same<decltype(std::declval<ChannelDataType>().mChargeADC), int16_t>::value>
124{
125 bool isValid{};
126 const auto globalChID = LookupTableType::Instance().getChannel(linkID, ep, pmData.channelID, isValid);
127 if (isValid) {
128 vecChData.emplace_back(static_cast<uint8_t>(globalChID), static_cast<int>(pmData.time), static_cast<int>(pmData.charge), static_cast<uint8_t>(pmData.pmBits));
129 } else {
130 metric.addStatusBit(RawDataMetricType::EStatusBits::kWrongChannelMapping);
131 static int warningCount = 0;
132 if (warningCount++ < 100) {
133 LOG(warning) << "Incorrect global channel! linkID: " << linkID << " | EndPoint: " << ep << " | LocalChID: " << static_cast<uint16_t>(pmData.channelID);
134 }
135 }
136}
137// Interface for extracting interaction record from Digit
138template <typename T>
139auto GetIntRecord(const T& digit)
140{
141 return digit.mIntRecord;
142}
143} // namespace DigitBlockFIThelper
144
145// Normal data taking mode
146template <typename LookupTableType, typename DigitType, typename ChannelDataType>
147class DigitBlockFIT : public DigitBlockBase<DigitType, ChannelDataType>
148{
149 public:
152 typedef LookupTableType LookupTable_t;
153 template <typename... Args>
154 DigitBlockFIT(Args&&... args) : DigitBlockBase_t(std::forward<Args>(args)...)
155 {
156 }
157 DigitBlockFIT() = default;
159 ~DigitBlockFIT() = default;
160 // Filling data from PM
161 template <class DataBlockType, typename RawDataMetricType>
162 auto processDigits(const DataBlockType& dataBlock, RawDataMetricType& metric, int linkID, int ep) -> std::enable_if_t<DigitBlockHelper::IsSpecOfType<DataBlockPM, DataBlockType>::value>
163 {
164 const int nElements = dataBlock.DataPM::mNelements;
165 for (int iEventData = 0; iEventData < nElements; iEventData++) {
166 const auto& pmData = dataBlock.DataPM::mData[iEventData];
167 DigitBlockFIThelper::ConvertEventData2ChData<LookupTable_t>(DigitBlockBase_t::mSubDigit, pmData, metric, linkID, ep);
168 }
169 }
170 // Filling data from TCM (normal mode)
171 template <class DataBlockType, typename RawDataMetricType>
172 auto processDigits(const DataBlockType& dataBlock, RawDataMetricType& metric, int linkID, int ep) -> std::enable_if_t<DigitBlockHelper::IsSpecOfType<DataBlockTCM, DataBlockType>::value>
173 {
174
175 auto& tcmData = dataBlock.DataTCM::mData[0];
177 }
178 // Decompose digits into DataBlocks
179 // DataBlockPM
180 template <class DataBlockType>
181 auto decomposeDigits(const typename RawDataMetric::Status_t& status) const -> std::enable_if_t<DigitBlockHelper::IsSpecOfType<DataBlockPM, DataBlockType>::value, std::map<typename LookupTable_t::Topo_t, DataBlockType>>
182 {
183 using Topo_t = typename LookupTable_t::Topo_t;
184
185 std::map<Topo_t, DataBlockType> mapResult;
186 std::map<Topo_t, std::reference_wrapper<const ChannelDataType>> mapTopo2SortedCh;
187 std::map<Topo_t, std::size_t> mapTopoCounter;
188 // Preparing map "Topo to ChannelData refs" and map "Global Topo(FEE metadata) to number of ChannelData"
189 for (const auto& entry : DigitBlockBase_t::mSubDigit) {
190 auto topoPM = LookupTable_t::Instance().getTopoPM(static_cast<int>(entry.getChannelID()));
191 mapTopo2SortedCh.insert({topoPM, entry});
192 auto pairInserted = mapTopoCounter.insert({LookupTable_t::makeGlobalTopo(topoPM), 0});
193 pairInserted.first->second++;
194 }
195 // Preparing map of global Topo(related to PM module) to DataBlockPMs
196 for (const auto& entry : mapTopo2SortedCh) {
197 auto pairInserted = mapResult.insert({LookupTable_t::makeGlobalTopo(entry.first), {}});
198 DataBlockType& refDataBlock = pairInserted.first->second;
199 if (pairInserted.second) {
200 // Header preparation
201 refDataBlock.HeaderPM::mStatusBits |= status;
202 refDataBlock.HeaderPM::mData[0].setIntRec(DigitBlockFIThelper::GetIntRecord(DigitBlockBase_t::mDigit));
204 // Emulation for WrongDescriptor
205 refDataBlock.HeaderPM::mData[0].startDescriptor = 0x0;
206 } else {
207 refDataBlock.HeaderPM::mData[0].startDescriptor = 0xf;
208 }
209 std::size_t nElements = mapTopoCounter.find(pairInserted.first->first)->second;
210 std::size_t nWords = nElements / 2 + nElements % 2;
212 // Emulation for EmptyDataBlock
213 refDataBlock.HeaderPM::mData[0].nGBTWords = 0;
214 } else {
215 refDataBlock.HeaderPM::mData[0].nGBTWords = nWords;
216 }
217 refDataBlock.HeaderPM::mNelements = 1;
218 }
219 // Data preparation
220 refDataBlock.DataPM::mStatusBits |= status;
221 auto& refPos = refDataBlock.DataPM::mNelements;
222 auto& refData = refDataBlock.DataPM::mData[refPos];
223 refPos++;
224 int localChannelID = LookupTable_t::Instance().getLocalChannelID(entry.first);
226 // Emulation for WrongChannelMapping
227 localChannelID = 0xf;
228 }
229 DigitBlockFIThelper::ConvertChData2EventData(entry.second.get(), refData, localChannelID);
230 }
231 return mapResult;
232 }
233 // DataBlockTCM
234 template <class DataBlockType>
235 auto decomposeDigits(const typename RawDataMetric::Status_t& status) const -> std::enable_if_t<DigitBlockHelper::IsSpecOfType<DataBlockTCM, DataBlockType>::value, std::pair<typename LookupTable_t::Topo_t, DataBlockType>>
236 {
237 DataBlockType dataBlockTCM{};
238 // Header preparation
239 dataBlockTCM.HeaderTCM::mStatusBits |= status;
240 dataBlockTCM.HeaderTCM::mData[0].setIntRec(DigitBlockFIThelper::GetIntRecord(DigitBlockBase_t::mDigit));
242 // Emulation for WrongDescriptor
243 dataBlockTCM.HeaderTCM::mData[0].startDescriptor = 0x0;
244 } else {
245 dataBlockTCM.HeaderTCM::mData[0].startDescriptor = 0xf;
246 }
248 // Emulation for EmptyDataBlock
249 dataBlockTCM.HeaderTCM::mData[0].nGBTWords = 0;
250 } else {
251 dataBlockTCM.HeaderTCM::mData[0].nGBTWords = 1;
252 }
253
254 dataBlockTCM.HeaderTCM::mNelements = 1;
255 auto& refTCMdata = dataBlockTCM.DataTCM::mData[0];
256 dataBlockTCM.DataTCM::mStatusBits |= status;
257 dataBlockTCM.DataTCM::mNelements = 1;
258 // Data preparation
260 return {LookupTable_t::Instance().getTopoTCM(), dataBlockTCM};
261 }
262 // Process DigitBlocks from TTree
263 template <typename DigitBlockProcType>
264 static void processDigitBlocks(TTree* inputTree, DigitBlockProcType& digitBlockProc)
265 {
266 assert(inputTree != nullptr);
267 std::vector<DigitBlockFIT_t> vecResult;
268 std::vector<typename DigitBlockBase_t::Digit_t> vecDigit;
269 std::vector<typename DigitBlockBase_t::Digit_t>* ptrVecDigit = &vecDigit;
270 typename DigitBlockBase_t::SubDigit_t vecChannelData;
271 typename DigitBlockBase_t::SubDigit_t* ptrVecChannelData = &vecChannelData;
272 inputTree->SetBranchAddress(decltype(vecDigit)::value_type::sDigitBranchName, &ptrVecDigit);
273 inputTree->SetBranchAddress(decltype(vecChannelData)::value_type::sDigitBranchName, &ptrVecChannelData);
274 for (int iEntry = 0; iEntry < inputTree->GetEntries(); iEntry++) {
275 inputTree->GetEntry(iEntry);
276 LOG(detail) << "Processing TF " << iEntry;
277 digitBlockProc.processDigitBlockPerTF(DigitBlockBase_t::template makeDigitBlock<DigitBlockFIT_t>(vecDigit, vecChannelData));
278 }
279 }
280 template <typename VecDigitType, typename VecChannelDataType, typename VecDetTrigInputType>
281 void getDigits(VecDigitType& vecDigits, VecChannelDataType& vecChannelData, VecDetTrigInputType& vecTriggerInput)
282 {
283 DigitBlockBase_t::mDigit.fillTrgInputVec(vecTriggerInput);
284 DigitBlockBase_t::getSubDigits(vecDigits, vecChannelData);
285 }
286 template <typename VecDigitType, typename VecChannelDataType>
287 void getDigits(VecDigitType& vecDigits, VecChannelDataType& vecChannelData)
288 {
289 DigitBlockBase_t::getSubDigits(vecDigits, vecChannelData);
290 }
291 static void print(const std::vector<DigitType>& vecDigit, const std::vector<ChannelDataType>& vecChannelData)
292 {
293 for (const auto& digit : vecDigit) {
294 digit.printLog();
295 LOG(info) << "______________CHANNEL DATA____________";
296 for (int iChData = digit.ref.getFirstEntry(); iChData < digit.ref.getFirstEntry() + digit.ref.getEntries(); iChData++) {
297 vecChannelData[iChData].printLog();
298 }
299 LOG(info) << "______________________________________";
300 }
301 }
302 void print() const
303 {
305 }
306};
307
308// TCM extended data taking mode
309template <typename LookupTableType, typename DigitType, typename ChannelDataType, typename TriggersExtType>
310class DigitBlockFIText : public DigitBlockBase<DigitType, ChannelDataType, TriggersExtType>
311{
312 public:
315 typedef LookupTableType LookupTable_t;
316
317 template <typename... Args>
318 DigitBlockFIText(Args&&... args) : DigitBlockBase_t(std::forward<Args>(args)...)
319 {
320 }
321 DigitBlockFIText() = default;
323 ~DigitBlockFIText() = default;
324 // Filling data from PM
325 template <class DataBlockType, typename RawDataMetricType>
326 auto processDigits(const DataBlockType& dataBlock, RawDataMetricType& metric, int linkID, int ep) -> std::enable_if_t<DigitBlockHelper::IsSpecOfType<DataBlockPM, DataBlockType>::value>
327 {
328 const int nElements = dataBlock.DataPM::mNelements;
329 for (int iEventData = 0; iEventData < nElements; iEventData++) {
330 const auto& pmData = dataBlock.DataPM::mData[iEventData];
331 DigitBlockFIThelper::ConvertEventData2ChData<LookupTable_t>(DigitBlockBase_t::mSubDigit, pmData, metric, linkID, ep);
332 }
333 }
334 // Filling data from TCM (extended mode)
335 template <class DataBlockType, typename RawDataMetricType>
336 auto processDigits(const DataBlockType& dataBlock, RawDataMetricType& metric, int linkID, int ep) -> std::enable_if_t<DigitBlockHelper::IsSpecOfType<DataBlockTCMext, DataBlockType>::value>
337 {
338 auto& tcmData = dataBlock.DataTCM::mData[0];
341 const int nElements = dataBlock.DataTCMext::mNelements;
342 for (int iTriggerWord = 0; iTriggerWord < nElements; iTriggerWord++) {
343 DigitBlockBase_t::mSingleSubDigit.setTrgWord(dataBlock.DataTCMext::mData[iTriggerWord].triggerWord, iTriggerWord);
344 }
345 }
346 // Decompose digits into DataBlocks
347 // DataBlockPM
348 template <class DataBlockType>
349 auto decomposeDigits(const typename RawDataMetric::Status_t& status) const -> std::enable_if_t<DigitBlockHelper::IsSpecOfType<DataBlockPM, DataBlockType>::value, std::map<typename LookupTable_t::Topo_t, DataBlockType>>
350 {
351 using Topo_t = typename LookupTable_t::Topo_t;
352 std::map<Topo_t, DataBlockType> mapResult;
353 std::map<Topo_t, std::reference_wrapper<const ChannelDataType>> mapTopo2SortedCh;
354 std::map<Topo_t, std::size_t> mapTopoCounter;
355 // Preparing map "Topo to ChannelData refs" and map "Global Topo(FEE metadata) to number of ChannelData"
356 for (const auto& entry : DigitBlockBase_t::mSubDigit) {
357 auto topoPM = LookupTable_t::Instance().getTopoPM(static_cast<int>(entry.getChannelID()));
358 mapTopo2SortedCh.insert({topoPM, entry});
359 auto pairInserted = mapTopoCounter.insert({LookupTable_t::makeGlobalTopo(topoPM), 0});
360 pairInserted.first->second++;
361 }
362 // Preparing map of global Topo(related to PM module) to DataBlockPMs
363 for (const auto& entry : mapTopo2SortedCh) {
364 auto pairInserted = mapResult.insert({LookupTable_t::makeGlobalTopo(entry.first), {}});
365 auto& refDataBlock = pairInserted.first->second;
366 if (pairInserted.second) {
367 // Header preparation
368 refDataBlock.HeaderPM::mData[0].setIntRec(DigitBlockFIThelper::GetIntRecord(DigitBlockBase_t::mDigit));
370 // Emulation for WrongDescriptor
371 refDataBlock.HeaderPM::mData[0].startDescriptor = 0x0;
372 } else {
373 refDataBlock.HeaderPM::mData[0].startDescriptor = 0xf;
374 }
375 std::size_t nElements = mapTopoCounter.find(pairInserted.first->first)->second;
376 std::size_t nWords = nElements / 2 + nElements % 2;
378 // Emulation for EmptyDataBlock
379 refDataBlock.HeaderPM::mData[0].nGBTWords = 0;
380 } else {
381 refDataBlock.HeaderPM::mData[0].nGBTWords = nWords;
382 }
383 refDataBlock.HeaderPM::mNelements = 1;
384 }
385 // Data preparation
386 auto& refPos = refDataBlock.DataPM::mNelements;
387 auto& refData = refDataBlock.DataPM::mData[refPos];
388 refPos++;
389 int localChannelID = LookupTable_t::Instance().getLocalChannelID(entry.first);
391 // Emulation for WrongChannelMapping
392 localChannelID = 0xf;
393 }
394 DigitBlockFIThelper::ConvertChData2EventData(entry.second.get(), refData, localChannelID);
395 }
396 return mapResult;
397 }
398 // DataBlockTCM
399 template <class DataBlockType>
400 auto decomposeDigits(const typename RawDataMetric::Status_t& status) const -> std::enable_if_t<DigitBlockHelper::IsSpecOfType<DataBlockTCMext, DataBlockType>::value, std::pair<typename LookupTable_t::Topo_t, DataBlockType>>
401 {
402 DataBlockType dataBlockTCM{};
403 // Header preparation
404 dataBlockTCM.HeaderTCMext::mData[0].setIntRec(DigitBlockFIThelper::GetIntRecord(DigitBlockBase_t::mDigit));
406 // Emulation for WrongDescriptor
407 dataBlockTCM.HeaderTCMext::mData[0].startDescriptor = 0x0;
408 } else {
409 dataBlockTCM.HeaderTCMext::mData[0].startDescriptor = 0xf;
410 }
412 // Emulation for EmptyDataBlock
413 dataBlockTCM.HeaderTCMext::mData[0].nGBTWords = 0;
414 } else {
415 dataBlockTCM.HeaderTCMext::mData[0].nGBTWords = 1;
416 }
417 dataBlockTCM.HeaderTCMext::mNelements = 1;
418 auto& refTCMdata = dataBlockTCM.DataTCM::mData[0];
419 // Data preparation
421 dataBlockTCM.DataTCM::mNelements = 1;
422 // Extended mode
423 static_assert(std::decay<decltype(dataBlockTCM.DataTCMext::mData[0])>::type::MaxNelements == std::tuple_size<decltype(DigitBlockBase_t::mSingleSubDigit.mTriggerWords)>::value);
424 for (int i = 0; i < std::decay<decltype(dataBlockTCM.DataTCMext::mData[0])>::type::MaxNelements; i++) {
425 dataBlockTCM.DataTCMext::mData[i].triggerWord = DigitBlockBase_t::mSingleSubDigit.mTriggerWords[i];
426 }
427 dataBlockTCM.DataTCMext::mNelements = 1;
428 return {LookupTable_t::Instance().getTopoTCM(), dataBlockTCM};
429 }
430 template <typename VecDigitType, typename VecChannelDataType, typename VecTriggersExtType, typename VecDetTrigInputType>
431 void getDigits(VecDigitType& vecDigits, VecChannelDataType& vecChannelData, VecTriggersExtType& vecTriggersExt, VecDetTrigInputType& vecTriggerInput)
432 {
433 DigitBlockBase_t::mDigit.fillTrgInputVec(vecTriggerInput);
434 getDigits(vecDigits, vecChannelData, vecTriggersExt);
435 }
436 template <typename VecDigitType, typename VecChannelDataType, typename VecTriggersExtType>
437 void getDigits(VecDigitType& vecDigits, VecChannelDataType& vecChannelData, VecTriggersExtType& vecTriggersExt)
438 {
439 DigitBlockBase_t::getSubDigits(vecDigits, vecChannelData);
441 }
442 static void print(const std::vector<DigitType>& vecDigit, const std::vector<ChannelDataType>& vecChannelData, const std::vector<TriggersExtType>& vecTriggersExt)
443 {
444 for (const auto& digit : vecDigit) {
445 digit.printLog();
446 LOG(info) << "______________CHANNEL DATA____________";
447 for (int iChData = digit.ref.getFirstEntry(); iChData < digit.ref.getFirstEntry() + digit.ref.getEntries(); iChData++) {
448 vecChannelData[iChData].printLog();
449 }
450 LOG(info) << "______________________________________";
451 }
452 LOG(info) << "______________EXTENDED TRIGGERS____________";
453 for (const auto& trgExt : vecTriggersExt) {
454 trgExt.printLog();
455 }
456 LOG(info) << "______________________________________";
457 }
458 void print() const
459 {
461 }
462};
463} // namespace fit
464} // namespace o2
465#endif
uint8_t channelID
Definition RawEventData.h:8
unsigned short int uint16_t
int32_t i
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
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 bool
auto getSubDigits(VecDigit &vecDigits, VecSubDigits &... vecSubDigits) -> std::enable_if_t< sizeof...(VecSubDigits)==sNSubDigits >
auto getSingleSubDigits(T &... vecSingleSubDigits) -> std::enable_if_t< sizeof...(T)==sNSingleSubDigits >
DigitBlockHelper::GetSubDigitField< VecSubDigit_t >::vector_type SubDigit_t
void getDigits(VecDigitType &vecDigits, VecChannelDataType &vecChannelData)
auto decomposeDigits(const typename RawDataMetric::Status_t &status) const -> std::enable_if_t< DigitBlockHelper::IsSpecOfType< DataBlockTCM, DataBlockType >::value, std::pair< typename LookupTable_t::Topo_t, DataBlockType > >
static void print(const std::vector< DigitType > &vecDigit, const std::vector< ChannelDataType > &vecChannelData)
DigitBlockFIT(Args &&... args)
auto processDigits(const DataBlockType &dataBlock, RawDataMetricType &metric, int linkID, int ep) -> std::enable_if_t< DigitBlockHelper::IsSpecOfType< DataBlockPM, DataBlockType >::value >
DigitBlockBase< DigitType, ChannelDataType > DigitBlockBase_t
DigitBlockFIT(const DigitBlockFIT &other)=default
auto processDigits(const DataBlockType &dataBlock, RawDataMetricType &metric, int linkID, int ep) -> std::enable_if_t< DigitBlockHelper::IsSpecOfType< DataBlockTCM, DataBlockType >::value >
void getDigits(VecDigitType &vecDigits, VecChannelDataType &vecChannelData, VecDetTrigInputType &vecTriggerInput)
static void processDigitBlocks(TTree *inputTree, DigitBlockProcType &digitBlockProc)
auto decomposeDigits(const typename RawDataMetric::Status_t &status) const -> std::enable_if_t< DigitBlockHelper::IsSpecOfType< DataBlockPM, DataBlockType >::value, std::map< typename LookupTable_t::Topo_t, DataBlockType > >
LookupTableType LookupTable_t
LookupTableType LookupTable_t
auto decomposeDigits(const typename RawDataMetric::Status_t &status) const -> std::enable_if_t< DigitBlockHelper::IsSpecOfType< DataBlockTCMext, DataBlockType >::value, std::pair< typename LookupTable_t::Topo_t, DataBlockType > >
static void print(const std::vector< DigitType > &vecDigit, const std::vector< ChannelDataType > &vecChannelData, const std::vector< TriggersExtType > &vecTriggersExt)
void getDigits(VecDigitType &vecDigits, VecChannelDataType &vecChannelData, VecTriggersExtType &vecTriggersExt, VecDetTrigInputType &vecTriggerInput)
auto processDigits(const DataBlockType &dataBlock, RawDataMetricType &metric, int linkID, int ep) -> std::enable_if_t< DigitBlockHelper::IsSpecOfType< DataBlockTCMext, DataBlockType >::value >
auto decomposeDigits(const typename RawDataMetric::Status_t &status) const -> std::enable_if_t< DigitBlockHelper::IsSpecOfType< DataBlockPM, DataBlockType >::value, std::map< typename LookupTable_t::Topo_t, DataBlockType > >
auto processDigits(const DataBlockType &dataBlock, RawDataMetricType &metric, int linkID, int ep) -> std::enable_if_t< DigitBlockHelper::IsSpecOfType< DataBlockPM, DataBlockType >::value >
DigitBlockBase< DigitType, ChannelDataType, TriggersExtType > DigitBlockBase_t
void getDigits(VecDigitType &vecDigits, VecChannelDataType &vecChannelData, VecTriggersExtType &vecTriggersExt)
DigitBlockFIText(const DigitBlockFIText &other)=default
DigitBlockFIText(Args &&... args)
GLsizei const GLfloat * value
Definition glcorearb.h:819
auto ConvertDigit2TCMData(const DigitType &digit, TCMDataType &tcmData)
auto ConvertEventData2ChData(std::vector< ChannelDataType > &vecChData, const PMDataType &pmData, RawDataMetricType &metric, int linkID, int ep) -> std::enable_if_t< std::is_same< decltype(std::declval< ChannelDataType >().QTCAmpl), int16_t >::value >
auto GetIntRecord(const T &digit)
auto ConvertTCMData2Digit(DigitType &digit, const TCMDataType &tcmData)
auto ConvertChData2EventData(const ChannelDataType &chData, PMDataType &pmData, int channelID) -> std::enable_if_t< std::is_same< decltype(std::declval< ChannelDataType >().QTCAmpl), int16_t >::value >
const track::TrackFitContext< NLayers > & fit
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
bool isValid(std::string alias)
static bool isBitActive(Status_t metric, EStatusBits statusBit)
VectorOfTObjectPtrs other
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"