Skip to content

Commit b04894e

Browse files
committed
Add countsFV0 to LumiInfo as backup for nominal FT0 lumi
1 parent 97c3731 commit b04894e

3 files changed

Lines changed: 9 additions & 5 deletions

File tree

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,15 @@ namespace ctp
2727

2828
/// Header for a single CTF
2929
struct CTFHeader : public o2::ctf::CTFDictHeader {
30-
uint64_t lumiCounts = 0; /// Luminosity counts moving average over lumiNHBFs orbits
30+
uint64_t lumiCounts = 0; /// FT0 Luminosity counts moving average over lumiNHBFs orbits
31+
uint64_t lumiCountsFV0 = 0; /// FV0 Luminosity counts moving average over lumiNHBFs orbits
3132
uint32_t lumiNHBFs = 0; /// Number of HBFs over which lumi is integrated
3233
uint32_t lumiOrbit = 0; /// 1st orbit of TF where lumi was updated, can be compared with firstOrbit
3334
uint32_t nTriggers = 0; /// number of triggers
3435
uint32_t firstOrbit = 0; /// orbit of 1st trigger
3536
uint16_t firstBC = 0; /// bc of 1st trigger
3637

37-
ClassDefNV(CTFHeader, 2);
38+
ClassDefNV(CTFHeader, 3);
3839
};
3940

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

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,13 @@ struct LumiInfo {
2424
LumiInfo() = default;
2525
uint32_t orbit = 0; // orbit of TF when was updated
2626
uint32_t nHBFCounted = 0; // length of interval in HB
27-
uint64_t counts = 0; // counts in the interval
27+
uint64_t counts = 0; // counts in the interval for the nominal lumi detector (FT0)
28+
uint64_t countsFV0 = 0; // connts for FV0 (less reliable)
2829
float getLumi() const { return nHBFCounted > 0 ? float(counts / (nHBFCounted * o2::constants::lhc::LHCOrbitMUS * 1e-6)) : 0.f; }
30+
float getLumiFV0() const { return nHBFCounted > 0 ? float(countsFV0 / (nHBFCounted * o2::constants::lhc::LHCOrbitMUS * 1e-6)) : 0.f; }
2931
float getLumiError() const { return nHBFCounted > 0 ? float(std::sqrt(counts) / (nHBFCounted * o2::constants::lhc::LHCOrbitMUS * 1e-6)) : 0.f; }
30-
ClassDefNV(LumiInfo, 1);
32+
float getLumiFV0Error() const { return nHBFCounted > 0 ? float(std::sqrt(countsFV0) / (nHBFCounted * o2::constants::lhc::LHCOrbitMUS * 1e-6)) : 0.f; }
33+
ClassDefNV(LumiInfo, 2);
3134
};
3235
} // namespace ctp
3336

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.nHBFCounted, lumi.orbit,
41+
lumi.counts, lumi.countsFV0, lumi.nHBFCounted, lumi.orbit,
4242
uint32_t(mData.size()), 0, 0};
4343
if (mData.size()) {
4444
h.firstOrbit = mData[0].intRecord.orbit;

0 commit comments

Comments
 (0)