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
Fix TOF digit fields to allow multiple TF processing
Since the TOF digit stores as BC the absolute bunch count from orbit 0, with
int32 it will overflow after ~100 s. Change it uint64_t.
Also fix the orbit/bc to uint32_t / uint16_t resp.
return ((static_cast<ULong64_t>(bc) << 18) + channel); // channel in the least significant bits; then shift by 18 bits (which cover the total number of channels) to write the BC number
Copy file name to clipboardExpand all lines: Detectors/TOF/base/include/TOFBase/WindowFiller.h
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -78,13 +78,13 @@ class WindowFiller
78
78
// arrays with digit and MCLabels out of the current readout windows (stored to fill future readout window)
79
79
std::vector<Digit> mFutureDigits;
80
80
81
-
voidfillDigitsInStrip(std::vector<Strip>* strips, int channel, int tdc, int tot, int nbc, UInt_t istrip, Int_t triggerorbit = 0, Int_t triggerbunch = 0);
81
+
voidfillDigitsInStrip(std::vector<Strip>* strips, int channel, int tdc, int tot, uint64_t nbc, UInt_t istrip, uint32_t triggerorbit = 0, uint16_t triggerbunch = 0);
82
82
// void fillDigitsInStrip(std::vector<Strip>* strips, o2::dataformats::MCTruthContainer<o2::tof::MCLabel>* mcTruthContainer, int channel, int tdc, int tot, int nbc, UInt_t istrip, Int_t trackID, Int_t eventID, Int_t sourceID);
voidWindowFiller::fillDigitsInStrip(std::vector<Strip>* strips, int channel, int tdc, int tot, int nbc, UInt_t istrip, Int_t triggerorbit, Int_t triggerbunch)
103
+
voidWindowFiller::fillDigitsInStrip(std::vector<Strip>* strips, int channel, int tdc, int tot, uint64_t nbc, UInt_t istrip, uint32_t triggerorbit, uint16_t triggerbunch)
Copy file name to clipboardExpand all lines: Detectors/TOF/reconstruction/include/TOFReconstruction/Decoder.h
+12-3Lines changed: 12 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -44,8 +44,8 @@ class Decoder : public WindowFiller
44
44
boolopen(std::string name);
45
45
46
46
booldecode();
47
-
voidreadTRM(int icru, int icrate, int orbit, int bunchid);
48
-
voidInsertDigit(int icrate, int itrm, int itdc, int ichain, int channel, int orbit, int bunchid, int time_ext, int tdc, int tot);
47
+
voidreadTRM(int icru, int icrate, uint32_t orbit, uint16_t bunchid);
48
+
voidInsertDigit(int icrate, int itrm, int itdc, int ichain, int channel, uint32_t orbit, uint16_t bunchid, int time_ext, int tdc, int tot);
49
49
voidFillWindows();
50
50
voidclear();
51
51
@@ -58,7 +58,16 @@ class Decoder : public WindowFiller
58
58
voidprintCrateTrailerInfo(int icru) const;
59
59
voidprintHitInfo(int icru) const;
60
60
61
-
staticvoidfromRawHit2Digit(int icrate, int itrm, int itdc, int ichain, int channel, int orbit, int bunchid, int tdc, int tot, std::array<int, 6>& digitInfo); // convert raw info in digit info (channel, tdc, tot, bc), tdc = packetHit.time + (frameHeader.frameID << 13)
61
+
structDigitInfo {
62
+
uint64_t bcAbs;
63
+
int channel;
64
+
int tdc;
65
+
int tot;
66
+
uint32_t orbit;
67
+
uint16_t bc;
68
+
};
69
+
70
+
staticvoidfromRawHit2Digit(int icrate, int itrm, int itdc, int ichain, int channel, uint32_t orbit, uint16_t bunchid, int tdc, int tot, DigitInfo& dinfo); // convert raw info in digit info (channel, tdc, tot, bc), tdc = packetHit.time + (frameHeader.frameID << 13)
voidDecoder::fromRawHit2Digit(int icrate, int itrm, int itdc, int ichain, int channel, int orbit, int bunchid, int tdc, int tot, std::array<int, 6>& digitInfo)
192
+
voidDecoder::fromRawHit2Digit(int icrate, int itrm, int itdc, int ichain, int channel, uint32_t orbit, uint16_t bunchid, int tdc, int tot, Decoder::DigitInfo& dinfo)
199
193
{
200
194
// convert raw info in digit info (channel, tdc, tot, bc)
0 commit comments