Project
Loading...
Searching...
No Matches
Digitizer.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
18
24
25#include <TCollection.h>
26#include <TFile.h>
27#include <TKey.h>
28#include <TRandom.h>
29
30#include <set>
31#include <string_view>
32#include <vector>
33#include <iostream>
34#include <numeric>
35#include <algorithm>
36#include <fairlogger/Logger.h>
37
38namespace o2::iotof
39{
40
41o2::iotof::Segmentation* Digitizer::sSegmentation = nullptr;
42//_______________________________________________________________________
44{
45 const int numberOfChips = mGeometry->getSize();
46 mChips.resize(numberOfChips);
47
48 const auto& specsConfig = ChipSpecificsParam::Instance();
49 const auto& digitizerParams = o2::iotof::DPLDigitizerParam::Instance();
50 const int nReadOutCols = specsConfig.NCols / digitizerParams.nColsPerGroup + 1;
51 for (int i = numberOfChips; i--;) {
52 mChips[i].setChipIndex(i);
57
63
64 // initialize the vector of TDC states
65 mChips[i].resizeTDCStates(nReadOutCols);
66 for (auto& tdcStates : mChips[i].getTDCStates()) {
67 for (int iT = 0; iT < 4; ++iT) {
68 tdcStates[iT] = -o2::constants::math::VeryBig;
69 }
70 }
71 // initialize the vector of mask states
72 mChips[i].resizeMaskStates(nReadOutCols);
73 for (auto& maskStates : mChips[i].getMaskStates()) {
74 maskStates = -o2::constants::math::VeryBig;
75 }
76 }
77
78 LOG(info) << "Initializing IOTOF digitizer";
79 LOG(info) << " Time resolution: " << digitizerParams.timeResolution * 1e3 << " ps";
80 LOG(info) << " Charge threshold: " << digitizerParams.chargeThreshold << " electrons";
81 LOG(info) << " Continuous mode: " << (mContinuous ? "ON" : "OFF");
82
83 sSegmentation = o2::iotof::Segmentation::Instance();
84}
85
86//_______________________________________________________________________
87void Digitizer::process(const std::vector<o2::itsmft::Hit>* hits, int evID, int srcID)
88{
89 // Digitize hits from a single event
90 LOG(debug) << "Digitizing IOTOF hits: " << hits->size() << " hits from event " << evID << " source " << srcID;
91
92 if (!hits || hits->empty()) {
93 return;
94 }
95
96 // Sort hits by detector ID for better cache locality
97 std::vector<int> hitIdx(hits->size());
98 std::iota(hitIdx.begin(), hitIdx.end(), 0);
99 std::sort(hitIdx.begin(), hitIdx.end(),
100 [hits](int lhs, int rhs) {
101 return (*hits)[lhs].GetDetectorID() < (*hits)[rhs].GetDetectorID();
102 });
103
104 // Process each hit
105 for (int i : hitIdx) {
106 processHit((*hits)[i], evID, srcID);
107 }
108
109 // In triggered mode, flush output after each event
110 if (!mContinuous) {
111 LOG(debug) << "Inner flushing for non-continuous mode";
113 }
114}
115
116//_______________________________________________________________________
117void Digitizer::processHit(const o2::itsmft::Hit& hit, int evID, int srcID)
118{
119 LOG(debug) << "\nProcessing hit with detector ID: " << hit.GetDetectorID() << ", track ID: " << hit.GetTrackID() << ", energy loss: " << hit.GetEnergyLoss() << " GeV, time: " << hit.GetTime() * sec2ns << " ns";
120 // Process a single hit and create a digit if it passes all cuts
121
122 // Get detector element ID
123 const int chipID = hit.GetDetectorID();
124 if (chipID < 0 || chipID >= mGeometry->getSize() || mGeometry->getSize() < 1) {
125 LOG(debug) << "Invalid detector ID: " << chipID << ", geometry size: " << mGeometry->getSize();
126 return; // invalid detector ID
127 }
128 const int subdetectorID = mGeometry->getIOTOFLayer(chipID);
129
130 auto& chip = mChips[chipID];
131 if (chip.isDisabled()) {
132 LOG(debug) << "Hit rejected because chip " << chipID << " is disabled";
133 return;
134 }
135
136 // Convert energy loss to charge (number of electrons)
137 float energyLoss = hit.GetEnergyLoss(); // in GeV
138 int charge = energyToCharge(energyLoss);
139 const auto& digitizerParams = o2::iotof::DPLDigitizerParam::Instance();
140 int electronsPerStep = static_cast<int>(charge / digitizerParams.nSimSteps);
141
142 // Apply charge threshold
143 if (charge < digitizerParams.chargeThreshold) {
144 LOG(debug) << "Hit rejected by charge threshold: " << charge << " < " << digitizerParams.chargeThreshold;
145 return;
146 }
147
148 // Get hit time and apply smearing
149 // Hit time is in seconds, convert to ns and add event time
150 double hitTime = hit.GetTime() * sec2ns; // convert to ns
151 double eventTimeInBC = mEventTime.getTimeOffsetWrtBC(); // event time wrt bc
152 double hitTimeWrtBC = hitTime + eventTimeInBC; // hit time wrt bc
153
154 // Create the digit with time information
155 o2::MCCompLabel label(hit.GetTrackID(), evID, srcID, false);
156 const int roFrameAbs = 0; // For now, we can set this to 0 or calculate based on time if needed
157 const int nROF = 1; // For now, we can assume the signal is contained in one ROF, this can be extended to multiple ROFs based on the time
158
159 float** respMatrix = nullptr;
160 float** avgHitLocalX = nullptr;
161 float** avgHitLocalZ = nullptr;
162 int rowStart = 0, colStart = 0, rowSpan = 0, colSpan = 0;
163 stepping(hit, respMatrix, avgHitLocalX, avgHitLocalZ, rowStart, colStart, rowSpan, colSpan);
164
165 float xPixelCenter = 0.0f, zPixelCenter = 0.0f;
166 for (int irow = rowSpan; irow--;) {
167 uint16_t rowIS = irow + rowStart;
168 for (int icol = colSpan; icol--;) {
169 uint16_t colIS = icol + colStart;
170 float nEleResp = respMatrix[irow][icol];
171 if (!nEleResp) {
172 continue;
173 }
174
175 // Apply efficiency cut based on the hit segment mean position relative to the pixel center
176 sSegmentation->detectorToLocal(rowIS, colIS, xPixelCenter, zPixelCenter, subdetectorID);
177 if (!isEfficient(avgHitLocalX[irow][icol] - xPixelCenter, avgHitLocalZ[irow][icol] - zPixelCenter)) {
178 LOG(debug) << "Hit rejected by efficiency cut at pixel (row,col) = (" << rowIS << ", " << colIS << ")";
179 continue;
180 }
181 double smearedTime = smearTime(hitTimeWrtBC, avgHitLocalX[irow][icol] - xPixelCenter, avgHitLocalZ[irow][icol] - zPixelCenter);
182
183 const int nElectronsSampled = gRandom->Poisson(electronsPerStep * nEleResp);
184 // Noise can be added here if needed
185
186 registerDigits(chip, roFrameAbs, smearedTime, nROF,
187 static_cast<uint16_t>(rowIS), static_cast<uint16_t>(colIS), nElectronsSampled, label);
188 }
189 }
190
191 for (int irow = 0; irow < rowSpan; ++irow) {
192 delete[] respMatrix[irow];
193 delete[] avgHitLocalX[irow];
194 delete[] avgHitLocalZ[irow];
195 }
196 delete[] respMatrix;
197 delete[] avgHitLocalX;
198 delete[] avgHitLocalZ;
199}
200
201void Digitizer::stepping(const o2::itsmft::Hit& hit, float**& respMatrix, float**& avgHitLocalX, float**& avgHitLocalZ, int& rowStart, int& colStart, int& rowSpan, int& colSpan)
202{
203 const int chipID = hit.GetDetectorID();
204 const auto& matrix = mGeometry->getMatrixL2G(chipID);
205 const int subdetectorID = mGeometry->getIOTOFLayer(chipID);
206
207 auto xyzPositionStart(matrix ^ (hit.GetPosStart())); // start position in sensor frame
208 auto xyzPositionEnd(matrix ^ (hit.GetPos())); // end position in sensor frame
209
210 const auto& digitizerParams = o2::iotof::DPLDigitizerParam::Instance();
211 auto stepVector = (xyzPositionEnd - xyzPositionStart) / digitizerParams.nSimSteps;
212 xyzPositionStart = xyzPositionStart + stepVector * 0.5f; // center the start position in the middle of the step
213
214 rowStart = -1;
215 colStart = -1;
216 int rowEnd = -1, colEnd = -1, nSkip = 0, nSteps = digitizerParams.nSimSteps;
217 while (!sSegmentation->localToDetector(xyzPositionStart.X(), xyzPositionStart.Z(), rowStart, colStart, mGeometry->getIOTOFLayer(chipID))) {
218 if (++nSkip > digitizerParams.nSimSteps) { // additional check to add: should we exclude something?
219 LOG(debug) << "Hit position out of bounds for detector ID " << chipID;
220 return; // hit is outside the active area
221 }
222 xyzPositionStart += stepVector;
223 }
224
225 // Re-compute end position based on the step vector,
226 // to avoid issues due to floating-point arithmetic,
227 xyzPositionEnd = xyzPositionStart + stepVector * (nSteps - 1 - nSkip);
228 while (!sSegmentation->localToDetector(xyzPositionEnd.X(), xyzPositionEnd.Z(), rowEnd, colEnd, mGeometry->getIOTOFLayer(chipID))) {
229 if (++nSkip > digitizerParams.nSimSteps) { // additional check to add: should we exclude something?
230 LOG(debug) << "Hit position out of bounds for detector ID " << chipID;
231 return; // hit is outside the active area
232 }
233 xyzPositionEnd -= stepVector;
234 }
235
236 if (nSkip) {
237 nSteps -= nSkip;
238 }
239 if (rowStart > rowEnd) {
240 std::swap(rowStart, rowEnd);
241 }
242 if (colStart > colEnd) {
243 std::swap(colStart, colEnd);
244 }
245
246 // Expand the range to take into account the effects of charge sharing
247 rowStart -= digitizerParams.responseMatrixSize / 2;
248 rowEnd += digitizerParams.responseMatrixSize / 2;
249 rowStart = std::max(rowStart, 0);
250 colStart = std::max(colStart, 0);
251
252 const auto& specsConfig = ChipSpecificsParam::Instance();
253 rowEnd = std::min(rowEnd, (specsConfig.NRows) - 1);
254 colEnd = std::min(colEnd, (specsConfig.NCols) - 1);
255 rowSpan = rowEnd - rowStart + 1;
256 colSpan = colEnd - colStart + 1;
257 if (rowSpan <= 0 || colSpan <= 0) {
258 return;
259 }
260
261 respMatrix = new float*[rowSpan];
262 avgHitLocalX = new float*[rowSpan];
263 avgHitLocalZ = new float*[rowSpan];
264 for (int i = 0; i < rowSpan; ++i) {
265 respMatrix[i] = new float[colSpan]();
266 avgHitLocalX[i] = new float[colSpan]();
267 avgHitLocalZ[i] = new float[colSpan]();
268 }
269
270 if (!respMatrix || !avgHitLocalX || !avgHitLocalZ) {
271 return;
272 }
273
274 int rowPrev = -1, colPrev = -1, row = 0, col = 0, nSkipPassive = 0;
275 auto pixelStartPosLocal = xyzPositionStart;
276 auto pixelCurrentPosLocal = xyzPositionStart;
277 for (int iStep{0}; iStep < nSteps; ++iStep) {
278 pixelCurrentPosLocal = xyzPositionStart + iStep * stepVector;
279
280 // Step does not contribute if it is in the passive area
281 if (!sSegmentation->localToDetector(pixelCurrentPosLocal.X(), pixelCurrentPosLocal.Z(), row, col, subdetectorID)) {
282 LOG(debug) << "Step is in passive area: (" << pixelCurrentPosLocal.X() << ", " << pixelCurrentPosLocal.Z() << ") is outside the active area of chip " << subdetectorID;
283 nSkipPassive++;
284 continue;
285 }
286
287 // The step has reached another pixel, compute mean hit segment positions
288 // for pixel efficiency evaluation and reset the start position for the next pixel
289 // LOG(debug) << "iStep: " << iStep << ", Current pixel: (row,col) = (" << row << ", " << col << "), Previous pixel: (rowPrev,colPrev) = (" << rowPrev << ", " << colPrev << ")";
290 if (row != rowPrev || col != colPrev) {
291
292 // Finalize the previous pixel
293 if (rowPrev != -1 && colPrev != -1) {
294 const int irow = rowPrev - rowStart;
295 const int icol = colPrev - colStart;
296 avgHitLocalX[irow][icol] = 0.5f * (pixelStartPosLocal.X() + pixelCurrentPosLocal.X() - (nSkipPassive + 1) * stepVector.X());
297 avgHitLocalZ[irow][icol] = 0.5f * (pixelStartPosLocal.Z() + pixelCurrentPosLocal.Z() - (nSkipPassive + 1) * stepVector.Z());
298 pixelStartPosLocal = pixelCurrentPosLocal;
299 nSkipPassive = 0;
300 }
301
302 // Start the new pixel
303 rowPrev = row;
304 colPrev = col;
305 }
306
307 for (int irow = digitizerParams.responseMatrixSize; irow--;) {
308 int rowDest = row + irow - (digitizerParams.responseMatrixSize / 2) - rowStart; // destination row in the respMatrix
309 if (rowDest < 0 || rowDest >= rowSpan) {
310 continue;
311 }
312 for (int icol = digitizerParams.responseMatrixSize; icol--;) {
313 int colDest = col + icol - (digitizerParams.responseMatrixSize / 2) - colStart; // destination column in the respMatrix
314 if (colDest < 0 || colDest >= colSpan) {
315 continue;
316 }
317 respMatrix[rowDest][colDest] += 1.;
318 }
319 }
320 }
321
322 // Finalize the last pixel
323 if (rowPrev != -1 && colPrev != -1) {
324 const int irow = rowPrev - rowStart;
325 const int icol = colPrev - colStart;
326 // Sizes of avgHitLocalX, avgHitLocalZ
327 avgHitLocalX[irow][icol] = 0.5f * (pixelStartPosLocal.X() + pixelCurrentPosLocal.X() - nSkipPassive * stepVector.X());
328 avgHitLocalZ[irow][icol] = 0.5f * (pixelStartPosLocal.Z() + pixelCurrentPosLocal.Z() - nSkipPassive * stepVector.Z());
329 }
330}
331
332//_______________________________________________________________________
333double Digitizer::smearTime(double time, const float x, const float y) const
334{
335 // Apply Gaussian smearing to simulate detector time resolution
336 const auto& digitizerParams = o2::iotof::DPLDigitizerParam::Instance();
337
338 float resolution = digitizerParams.timeResolution;
339 if (mScaledResolutionMap) {
340 int bin = mScaledResolutionMap->FindBin(x * o2::iotof::Digitizer::cm2um, y * o2::iotof::Digitizer::cm2um);
341 resolution = mScaledResolutionMap->GetBinContent(bin);
342 LOG(debug) << "Time resolution map check: x=" << x * o2::iotof::Digitizer::cm2um << ", y=" << y * o2::iotof::Digitizer::cm2um << ", bin=" << bin << ", resolution=" << resolution;
343 }
344 float timeOfArrivalOffset = 0.;
345 if (mTimeOfArrivalMap) {
346 int bin = mTimeOfArrivalMap->FindBin(x * o2::iotof::Digitizer::cm2um, y * o2::iotof::Digitizer::cm2um);
347 timeOfArrivalOffset = mTimeOfArrivalMap->GetBinContent(bin) * o2::iotof::Digitizer::ps2ns; // convert to ns
348 LOG(debug) << "Time of arrival map check: x=" << x * o2::iotof::Digitizer::cm2um << ", y=" << y * o2::iotof::Digitizer::cm2um << ", bin=" << bin << ", time offset=" << timeOfArrivalOffset;
349 }
350
351 if (digitizerParams.timeResolution > 0) {
352 return time + gRandom->Gaus(timeOfArrivalOffset, resolution);
353 }
354 return time;
355}
356
357//_______________________________________________________________________
358int Digitizer::energyToCharge(float energyLoss) const
359{
360 // Convert energy loss (GeV) to number of electrons
361 // Typical value: 3.6 eV per electron-hole pair in silicon
362 // energyLoss is in GeV, energyToNElectrons is electrons per GeV
363 const auto& digitizerParams = o2::iotof::DPLDigitizerParam::Instance();
364 return static_cast<int>(energyLoss * digitizerParams.energyToNElectrons);
365}
366
367//_______________________________________________________________________
369{
370 if (!mResolutionMap) {
371 LOG(warn) << "No resolution map available to prepare scaled resolution map.";
372 return;
373 }
374
375 const auto& digitizerParams = o2::iotof::DPLDigitizerParam::Instance();
376 const float nominalTimeResolution = digitizerParams.timeResolution;
377 const float minimumResolution = mResolutionMap->GetMinimum();
378 if (minimumResolution <= 0) {
379 LOG(warn) << "Minimum resolution in the map is non-positive, cannot prepare scaled resolution map.";
380 return;
381 }
382
383 mScaledResolutionMap = dynamic_cast<TH2D*>(mResolutionMap->Clone("hScaledResolutionMap"));
384 mScaledResolutionMap->SetDirectory(nullptr); // Detach from file to avoid deletion when file is closed
385
386 for (int binX = 1; binX <= mScaledResolutionMap->GetNbinsX(); ++binX) {
387 for (int binY = 1; binY <= mScaledResolutionMap->GetNbinsY(); ++binY) {
388 float originalValue = mScaledResolutionMap->GetBinContent(binX, binY);
389 float scalingValue = originalValue / minimumResolution;
390 mScaledResolutionMap->SetBinContent(binX, binY, scalingValue * nominalTimeResolution);
391 }
392 }
393}
394
395//_______________________________________________________________________
396bool Digitizer::isEfficient(const float x, const float z) const
397{
398 // Apply efficiency cut using random number
399 const auto& digitizerParams = o2::iotof::DPLDigitizerParam::Instance();
400 if (mEfficiencyMap) {
401 // int bin = mEfficiencyMap->FindBin(x * o2::iotof::Digitizer::cm2um, z * o2::iotof::Digitizer::cm2um);
402 int bin = mEfficiencyMap->FindBin(x * o2::iotof::Digitizer::cm2um, z * o2::iotof::Digitizer::cm2um);
403 float efficiency = mEfficiencyMap->GetBinContent(bin);
404 LOG(debug) << "Efficiency map check: x=" << x * o2::iotof::Digitizer::cm2um << ", z=" << z * o2::iotof::Digitizer::cm2um << ", bin=" << bin << ", efficiency=" << efficiency;
405 return gRandom->Uniform() < efficiency;
406 }
407 return gRandom->Uniform() < digitizerParams.efficiency;
408}
409
410//_______________________________________________________________________
412{
413 LOG(info) << "Filling output container with digits from chips";
414 LOG(debug) << "Number of chips: " << mChips.size();
415
416 const auto& digitizerParams = o2::iotof::DPLDigitizerParam::Instance();
417
419 rof.setFirstEntry(mDigits->size()); // index of the first digit
420
421 const auto* extraLabelBuffer = mExtraLabelBuffer.empty() ? nullptr : mExtraLabelBuffer.front().get();
422 for (auto& chip : mChips) {
423
424 if (chip.isDisabled()) {
425 continue;
426 }
427
429
430 if (chip.isEmpty()) {
431 continue;
432 }
433
434 auto& chipDigits = chip.getDigits();
435 auto& tdcStates = chip.getTDCStates();
436 auto& maskStates = chip.getMaskStates();
437
438 for (const auto& [key, digit] : chipDigits) {
439
440 if (digit.getCharge() < digitizerParams.chargeThreshold) {
441 continue; // skip digits below threshold
442 }
443
444 const int colInGroup = digit.getColumn() / digitizerParams.nColsPerGroup;
445 const double digitTime = digit.getTime();
446
447 if (digitTime - maskStates[colInGroup] < digitizerParams.maskWindow) {
448 continue; // the RO column is still masked
449 }
450
451 int available = -1;
452 for (int iT = 0; iT < 4; ++iT) {
453 if (digitTime - tdcStates[colInGroup][iT] > digitizerParams.tdcBusyTime) {
454 available = iT;
455 break;
456 }
457 }
458
459 if (available == -1) {
460 continue; // all tdc pairs are busy
461 }
462
463 tdcStates[colInGroup][available] = digitTime;
464 maskStates[colInGroup] = digitTime;
465
466 int digitID = mDigits->size();
467 mDigits->emplace_back(digit.getChipIndex(), digit.getRow(), digit.getColumn(), digit.getCharge(), digit.getTime(), digit.getBc(), digit.getTdc());
468 if (mMCLabels) {
469 mMCLabels->addElement(digitID, digit.getLabel().mLabel);
470 }
471 auto labelRef = digit.getLabel();
472
473 while (mMCLabels && extraLabelBuffer != nullptr && labelRef.mNext >= 0) {
474 labelRef = (*extraLabelBuffer)[labelRef.mNext];
475 mMCLabels->addElement(digitID, labelRef.mLabel);
476 }
477 }
478 chipDigits.clear(); // clear chip digits after copying to output
479 }
480
481 rof.setNEntries(mDigits->size() - rof.getFirstEntry()); // number of digits
482 rof.setBCData(mContinuous ? mROFRecordIR : mEventTime);
483 mROFRecords->push_back(rof);
484 LOG(debug) << "Created ROF record with " << mDigits->size() << " digits";
485
486 // extraLabelBuffer.clear(); // clear buffer for extra labels
487 // mExtraLabelBuffer.emplace_back(mExtraLabelBuffer.front().release()); // move current buffer to the end
488 // mExtraLabelBuffer.pop_front();
489}
490
491void Digitizer::registerDigits(Chip& chip, uint32_t roFrame, double time, int nROF,
492 uint16_t row, uint16_t col, int nElectrons, o2::MCCompLabel& label)
493{
494 // (void)nROF;
495
496 const auto& digitizerParams = o2::iotof::DPLDigitizerParam::Instance();
497
498 uint64_t nbc = static_cast<uint64_t>(time / o2::constants::lhc::LHCBunchSpacingNS);
499 int tdc = int((time - nbc * o2::constants::lhc::LHCBunchSpacingNS) / digitizerParams.tdcBin);
500 nbc += mEventTime.toLong();
501
502 double absoluteTime = tdc * digitizerParams.tdcBin + nbc * o2::constants::lhc::LHCBunchSpacingNS;
503
504 auto key = o2::iotof::Digit::getOrderingKey(nbc, tdc, row, col);
505 o2::iotof::LabeledDigit* existingDigit = chip.findDigit(key);
506
507 if (!existingDigit) {
508 // No existing digit, create a new one
509 chip.addDigit(row, col, nElectrons, absoluteTime, nbc, tdc, label);
510 } else {
511 // Digit already exists, update charge and labels
512 const int storedCharge = existingDigit->getCharge();
513 existingDigit->setCharge(storedCharge + nElectrons);
514 existingDigit->setTime(std::min(existingDigit->getTime(), time));
515 if (existingDigit->getLabel().mLabel == label) {
516 return; // don't store the same label twice
517 }
518 std::vector<o2::iotof::McLabelRef>* extra = getExtraLabelBuffer(roFrame);
519 auto labelRef = existingDigit->getLabel();
520 const auto next = static_cast<int>(extra->size());
521 extra->emplace_back(label, labelRef.mNext);
522 labelRef.mNext = next;
523 existingDigit->setLabel(labelRef);
524 }
525 LOG(debug) << "Registered digit at (row,col) = (" << row << ", " << col << ") with charge: " << nElectrons << ", time: " << time << ", nbc: " << nbc << ", tdc: " << tdc;
526}
527
528} // namespace o2::iotof
std::ostringstream debug
int16_t charge
Definition RawEventData.h:5
int16_t time
Definition RawEventData.h:4
int32_t i
useful math constants
uint32_t col
Definition RawData.h:4
Definition of the ALICE3 TOF digitizer.
StringRef key
int GetTrackID() const
Definition BaseHits.h:30
V GetEnergyLoss() const
Definition BaseHits.h:103
math_utils::Point3D< T > GetPos() const
Definition BaseHits.h:67
E GetTime() const
Definition BaseHits.h:71
unsigned short GetDetectorID() const
Definition BaseHits.h:73
void addElement(uint32_t dataindex, TruthElement const &element, bool noElement=false)
const Mat3D & getMatrixL2G(int sensID) const
Container for similated points connected to a given TOF Chip This will be used in order to allow a mo...
Definition Chip.h:41
void addDigit(UShort_t row, UShort_t col, Int_t charge, double time, ULong64_t bc, Int_t tdc, o2::MCCompLabel label)
Definition Chip.cxx:35
o2::iotof::LabeledDigit * findDigit(DigitKey key)
reset points container
Definition Chip.h:98
double getTime() const
Definition Digit.h:52
void setTime(double time)
Definition Digit.h:49
static DigitKey getOrderingKey(ULong64_t bc, UInt_t tdc, uint16_t row, uint16_t col)
Definition Digit.h:56
void prepareScaledResolutionMap()
void init()
Initialize the digitizer.
Definition Digitizer.cxx:43
void fillOutputContainer()
Flush the output container.
void process(const std::vector< o2::itsmft::Hit > *hits, int evID, int srcID)
Steer conversion of hits to digits.
Definition Digitizer.cxx:87
int getIOTOFLayer(int index) const
McLabelRef getLabel() const
Definition Digit.h:90
void setLabel(McLabelRef label)
Definition Digit.h:89
Segmentation and response for pixels in inner and outer TOF of the ALICE 3 apparatus.
bool detectorToLocal(L row, L col, T &xRow, T &zCol, const int subDetectorID) const
bool localToDetector(float x, float z, int &iRow, int &iCol, const int subDetectorID) const
void setCharge(Int_t charge)
Set the charge of the digit.
Definition Digit.h:62
Int_t getCharge() const
Get the accumulated charged of the digit.
Definition Digit.h:49
math_utils::Point3D< Float_t > GetPosStart() const
Definition Hit.h:60
void setNEntries(int n)
Definition ROFRecord.h:48
void setBCData(const BCData &bc)
Definition ROFRecord.h:44
void setFirstEntry(int idx)
Definition ROFRecord.h:47
int getFirstEntry() const
Definition ROFRecord.h:63
GLint GLenum GLint x
Definition glcorearb.h:403
GLint y
Definition glcorearb.h:270
GLuint GLsizei const GLchar * label
Definition glcorearb.h:2519
GLdouble GLdouble GLdouble z
Definition glcorearb.h:843
int mNext
eventual next contribution to the same pixel
Definition Digit.h:76
o2::MCCompLabel mLabel
hit label
Definition Digit.h:75
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"
std::vector< int > row