Skip to content

Commit f02ab6f

Browse files
shahor02martenole
authored andcommitted
Extract both lumis from CTP CTF
Also the HBF count for the 2nd lumi was not propagated to the CTF, now it is done (though it is anyway the same as the main lumi HBF counts)
1 parent 46bf284 commit f02ab6f

3 files changed

Lines changed: 13 additions & 10 deletions

File tree

DataFormats/Detectors/CTP/include/DataFormatsCTP/CTF.h

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,16 @@ namespace ctp
2929
struct CTFHeader : public o2::ctf::CTFDictHeader {
3030
uint64_t lumiCounts = 0; /// FT0 Luminosity counts moving average over lumiNHBFs orbits
3131
uint64_t lumiCountsFV0 = 0; /// FV0 Luminosity counts moving average over lumiNHBFs orbits
32-
uint32_t lumiNHBFs = 0; /// Number of HBFs over which lumi is integrated
33-
uint32_t lumiOrbit = 0; /// 1st orbit of TF where lumi was updated, can be compared with firstOrbit
34-
uint32_t nTriggers = 0; /// number of triggers
35-
uint32_t firstOrbit = 0; /// orbit of 1st trigger
36-
uint16_t firstBC = 0; /// bc of 1st trigger
37-
uint16_t inp1 = 0; /// lumiCounts input ID
38-
uint16_t inp2 = 0; /// lumiCountsFV0 input ID
39-
40-
ClassDefNV(CTFHeader, 4);
32+
uint32_t lumiNHBFs = 0; /// Number of HBFs over which lumi is integrated
33+
uint32_t lumiNHBFsFV0 = 0; /// Number of FV0 HBFs over which lumi is integrated
34+
uint32_t lumiOrbit = 0; /// 1st orbit of TF where lumi was updated, can be compared with firstOrbit
35+
uint32_t nTriggers = 0; /// number of triggers
36+
uint32_t firstOrbit = 0; /// orbit of 1st trigger
37+
uint16_t firstBC = 0; /// bc of 1st trigger
38+
uint16_t inp1 = 0; /// lumiCounts input ID
39+
uint16_t inp2 = 0; /// lumiCountsFV0 input ID
40+
41+
ClassDefNV(CTFHeader, 5);
4142
};
4243

4344
/// wrapper for the Entropy-encoded trigger inputs and classes of the TF

Detectors/CTP/reconstruction/include/CTPReconstruction/CTFCoder.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,9 @@ o2::ctf::CTFIOSize CTFCoder::decode(const CTF::base& ec, VTRG& data, LumiInfo& l
147147
std::map<o2::InteractionRecord, CTPDigit> digitsMap;
148148
o2::InteractionRecord ir(header.firstBC, header.firstOrbit);
149149
lumi.nHBFCounted = header.lumiNHBFs;
150+
lumi.nHBFCountedFV0 = header.lumiNHBFsFV0 ? header.lumiNHBFsFV0 : header.lumiNHBFs;
150151
lumi.counts = header.lumiCounts;
152+
lumi.countsFV0 = header.lumiCountsFV0;
151153
lumi.orbit = header.lumiOrbit;
152154
lumi.inp1 = int(header.inp1);
153155
lumi.inp2 = int(header.inp2);

Detectors/CTP/reconstruction/include/CTPReconstruction/CTFHelper.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class CTFHelper
3838
CTFHeader createHeader(const LumiInfo& lumi)
3939
{
4040
CTFHeader h{o2::detectors::DetID::CTP, 0, 1, 0, // dummy timestamp, version 1.0
41-
lumi.counts, lumi.countsFV0, lumi.nHBFCounted, lumi.orbit,
41+
lumi.counts, lumi.countsFV0, lumi.nHBFCounted, lumi.nHBFCountedFV0, lumi.orbit,
4242
uint32_t(mData.size()), 0, 0, uint16_t(lumi.inp1), uint16_t(lumi.inp2)};
4343
if (mData.size()) {
4444
h.firstOrbit = mData[0].intRecord.orbit;

0 commit comments

Comments
 (0)