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 3e6db16
Browse filesBrowse the repository at this point in the historyBrowse files
TRK/FT3 digitizer: changed digit ToA format from float to the format of the ALMIRA timestamp: 12 bits filled as following [frame (8 bits) | clock cycle in the ROF (4 bits)]
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 | 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; if the ROF is not a multiple of the clock period, the last cycle is shorter
54
+
/// (e.g. ROF 18 BC, clock 4 BC -> 4.5 -> 5 cycles). Tolerance for the float rounding: 18 BC / 24.95 ns must give 18, not 19
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)
0 commit comments