diff --git a/Detector/Calo/include/Detector/Calo/CaloCellID.h b/Detector/Calo/include/Detector/Calo/CaloCellID.h index ab81cdc152757dc020f6b8a5c086ce3d342589c6..a517a746fd554b69891191a433dbd47f5190f957 100644 --- a/Detector/Calo/include/Detector/Calo/CaloCellID.h +++ b/Detector/Calo/include/Detector/Calo/CaloCellID.h @@ -423,6 +423,11 @@ namespace LHCb::Detector::Calo { return DenseIndex::details::offsetAfter< DenseIndex::details::Constants>(); } + static constexpr int nbEcalCells() { + return DenseIndex::details::offsetAfter< + DenseIndex::details::Constants>(); + } + static constexpr int nbHcalCells() { return max() - nbEcalCells(); } }; } // namespace LHCb::Detector::Calo diff --git a/Detector/Calo/include/Detector/Calo/DeCalorimeter.h b/Detector/Calo/include/Detector/Calo/DeCalorimeter.h index c3afe37cd532f689554a20dc6e56a018635af513..e8d4fa4ea8db80d32acea6701d17edc6b7d0f826 100644 --- a/Detector/Calo/include/Detector/Calo/DeCalorimeter.h +++ b/Detector/Calo/include/Detector/Calo/DeCalorimeter.h @@ -208,6 +208,19 @@ namespace LHCb::Detector::Calo { return plane( this->access()->toLocalTransform( global ).Z() ); } + // These crate numbers are the ones for Run3. + // Run 2 would have 21/22 instead of 13/14 and 25 instead of 17. + // due to this, no run2 data can be used with this + template + static inline constexpr unsigned int minCrate = ( calo == LHCb::Detector::Calo::CellCode::Index::EcalCalo ? 0 + : 14 ); + template + static inline constexpr unsigned int maxCrate = ( calo == LHCb::Detector::Calo::CellCode::Index::EcalCalo ? 13 + : 17 ); + template + static inline constexpr unsigned int nbCrates = ( calo == LHCb::Detector::Calo::CellCode::Index::EcalCalo ? 14 + : 4 ); + // accessing the calibration parameters double maxEtInCenter( unsigned int reg = 0 ) const { return ( reg < this->access()->maxEtInCenter.size() ) ? this->access()->maxEtInCenter[reg]