You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 5c6d39b
Browse filesBrowse the repository at this point in the historyBrowse files
floatmToA = 0; // TimeOfArrival, set to float at the moment. TODO: implement correctly the size https://indico.cern.ch/event/1724141/contributions/7252329/attachments/3336751/5980668/data_throughput_estimation.pdf
57
+
uint16_tmTimestampToA = 0; ///< Time of Arrival timestamp: [frame (ROF counter) | clock cycle in ROF], see AlmiraParam::encodeTimestamp. https://indico.cern.ch/event/1724141/contributions/7252329/attachments/3336751/5980668/data_throughput_estimation.pdf
staticconstexprintkDefROFLengthInBC = 16; ///< default ROF length in BC (16 clock cycles of 1 BC for VD)
35
+
32
36
int roFrameLengthInBCPerLayer[kNLayers] = {0}; ///< ROF length in BC per layer
33
37
float strobeDelayPerLayer[kNLayers] = {0}; ///< strobe delay in ns per layer
34
38
float strobeLengthContPerLayer[kNLayers] = {0}; ///< strobe length in ns per layer
35
39
int roFrameBiasInBCPerLayer[kNLayers] = {0}; ///< ROF start bias in BC per layer
36
40
int roFrameDelayInBCPerLayer[kNLayers] = {0}; ///< extra ROF delay in BC per layer
41
+
float clockPeriodPerLayer[kNLayers] = {0}; ///< ALMIRA clock period in ns per layer (timestamp fine granularity), 0 = default (1 BC VD, 4 BC ML/OT/disks)
42
+
int nTimestampBits = 12; ///< bits of the digit timestamp: [frame (coarse) | clock cycle in ROF (fine)]
43
+
int nFineBits = 4; ///< bits of the fine part (clock cycle in ROF); the coarse part (frame: free-running ROF counter, rolling over at 2^(nTimestampBits - nFineBits)) has nTimestampBits - nFineBits
44
+
45
+
floatgetClockPeriod(int layer) const
46
+
{
47
+
if (clockPeriodPerLayer[layer] > 0) {
48
+
return clockPeriodPerLayer[layer];
49
+
}
50
+
return (layer < constants::VD::petal::nLayers ? 1 : 4) * o2::constants::lhc::LHCBunchSpacingNS; // the clock is synchronous with the LHC: 1 BC (VD), 4 BC (ML/OT/disks)
51
+
}
52
+
53
+
/// number of clock cycles in a ROF (the ROF length is a multiple of the clock period, as required by the ALMIRA design)
floatmNoisePerPixel = 0.2; ///< noise rate per pixel, in hits/s
@@ -150,6 +163,9 @@ class DigiParams
150
163
// auxiliary precalculated parameters
151
164
std::array<float, MaxLayers> mROFrameLayerLengthInv; ///< inverse length of RO frame in ns per layer
152
165
166
+
std::array<float, MaxLayers> mClockPeriod{}; ///< ALMIRA clock period in ns per layer
167
+
std::array<int, MaxLayers> mNClockCyclesPerROF{}; ///< clock cycles in a ROF per layer (if the ROF is not a multiple of the clock period, the last cycle is shorter)
constint nROFsTF = (tfLengthInBC + roFrameLengthInBC - 1) / roFrameLengthInBC; // rounded up: if the TF length is not a multiple of the ROF length, the last ROF is truncated by the end of the TF
143
+
// (simulation artifact: the handling of ROFs across the TF boundary is still to be defined with DAQ)
144
+
143
145
mROFRecordsAccum[iLayer].reserve(nROFsTF);
144
146
145
147
auto accumulate = [this, &digitsAccum, &iLayer]() {
@@ -159,7 +161,7 @@ class TRKFT3DPLDigitizerTask : BaseDPLDigitizer
if (aopt.nTimestampBits > 16 || aopt.nFineBits < 0 || aopt.nFineBits > aopt.nTimestampBits) { // TODO: check once the bits division has been definitively chosen
294
+
LOGP(fatal, "Invalid timestamp format: {} bits with {} fine bits (the digit timestamp is a uint16_t)", aopt.nTimestampBits, aopt.nFineBits);
295
+
}
296
+
291
297
for (int iLayer = 0; iLayer < mLayers; ++iLayer) {
LOGP(warning, "{} layer {}: ROF length {} BC does not divide the TF length {} BC: the last ROF of the TF is truncated", ID.getName(), iLayer, roFrameLengthInBC, tfLengthInBC);
LOGP(warning, "{} layer {}: the timestamp frame counter ({} bits) rolls over within an orbit with ROF length {} BC", ID.getName(), iLayer, aopt.nTimestampBits - aopt.nFineBits, roFrameLengthInBC);
323
+
}
324
+
if (nCycles > (1 << aopt.nFineBits)) {
325
+
LOGP(fatal, "{} layer {}: {} clock cycles per ROF do not fit in the {} fine bits of the timestamp. Possible values: 16 BC for VD; 16,32,64 BC for MLOT/FT3.", ID.getName(), iLayer, nCycles, aopt.nFineBits);
326
+
}
302
327
}
303
328
// parameters of signal time response: flat-top duration, max rise time and q @ which rise time is 0
0 commit comments