Skip to content

Commit 231f116

Browse files
authored
FIT calibration: large refactoring (AliceO2Group#9559)
* FIT calibration: global refactoring + distributed time offset task * FIT calibration: some refactoring and improvements for time offset workflows * Flat histogram: copy assignment and init method * FIT calibration: last modifications * clang fixes * Hotfix for time spectra workflow * Update FITCalibrationDevice.h
1 parent c34fba9 commit 231f116

68 files changed

Lines changed: 881 additions & 737 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

DataFormats/Detectors/FIT/FT0/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,31 +12,31 @@
1212
o2_add_library(DataFormatsFT0
1313
SOURCES src/ChannelData.cxx
1414
src/Digit.cxx
15+
src/DigitFilterParam.cxx
1516
src/RecPoints.cxx
1617
src/RawEventData.cxx
1718
src/CTF.cxx
18-
src/GlobalOffsetsCalibrationObject.cxx
19-
src/GlobalOffsetsContainer.cxx
2019
PUBLIC_LINK_LIBRARIES O2::FT0Base
2120
O2::DataFormatsFIT
2221
O2::SimulationDataFormat
2322
O2::CommonDataFormat
2423
O2::Headers
2524
O2::CCDB
26-
O2::DetectorsCalibration
2725
)
2826

2927
o2_target_root_dictionary(DataFormatsFT0
3028
HEADERS include/DataFormatsFT0/ChannelData.h
3129
include/DataFormatsFT0/Digit.h
30+
include/DataFormatsFT0/DigitFilterParam.h
3231
include/DataFormatsFT0/MCLabel.h
3332
include/DataFormatsFT0/HitType.h
3433
include/DataFormatsFT0/RecPoints.h
3534
include/DataFormatsFT0/RawEventData.h
3635
include/DataFormatsFT0/LookUpTable.h
3736
include/DataFormatsFT0/CTF.h
3837
include/DataFormatsFT0/RecoCalibInfoObject.h
38+
include/DataFormatsFT0/FT0CalibrationInfoObject.h
39+
include/DataFormatsFT0/FT0ChannelTimeCalibrationObject.h
3940
include/DataFormatsFT0/GlobalOffsetsInfoObject.h
4041
include/DataFormatsFT0/GlobalOffsetsCalibrationObject.h
41-
include/DataFormatsFT0/GlobalOffsetsContainer.h
4242
)
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2+
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3+
// All rights not expressly granted are reserved.
4+
//
5+
// This software is distributed under the terms of the GNU General Public
6+
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7+
//
8+
// In applying this license CERN does not waive the privileges and immunities
9+
// granted to it by virtue of its status as an Intergovernmental Organization
10+
// or submit itself to any jurisdiction.
11+
12+
/// \file DigitFilterParam.h
13+
/// \brief Configurable digit filtering
14+
15+
#ifndef ALICEO2_DIGIT_FILTER_PARAM
16+
#define ALICEO2_DIGIT_FILTER_PARAM
17+
18+
#include "CommonUtils/ConfigurableParamHelper.h"
19+
#include "DataFormatsFT0/Digit.h"
20+
#include "DataFormatsFT0/ChannelData.h"
21+
22+
namespace o2::ft0
23+
{
24+
struct DigitFilterParam : o2::conf::ConfigurableParamHelper<DigitFilterParam> {
25+
int16_t mAmpThreshold = 10;
26+
int16_t mTimeWindow = 153;
27+
uint8_t mPMbitsGood = (1 << ChannelData::EEventDataBit::kIsCFDinADCgate) | (1 << ChannelData::EEventDataBit::kIsEventInTVDC);
28+
uint8_t mPMbitsBad = (1 << ChannelData::EEventDataBit::kIsDoubleEvent) | (1 << ChannelData::EEventDataBit::kIsTimeInfoNOTvalid) | (1 << ChannelData::EEventDataBit::kIsTimeInfoLate) | (1 << ChannelData::EEventDataBit::kIsAmpHigh) | (1 << ChannelData::EEventDataBit::kIsTimeInfoLost);
29+
uint8_t mPMbitsToCheck = mPMbitsGood | mPMbitsBad;
30+
uint8_t mTrgBitsGood = (1 << Triggers::bitVertex) | (1 << Triggers::bitDataIsValid);
31+
uint8_t mTrgBitsBad = (1 << Triggers::bitOutputsAreBlocked);
32+
uint8_t mTrgBitsToCheck = mTrgBitsGood | mTrgBitsBad;
33+
34+
O2ParamDef(DigitFilterParam, "FT0DigitFilterParam");
35+
};
36+
} // namespace o2::ft0
37+
#endif

Detectors/FIT/FT0/calibration/include/FT0Calibration/FT0CalibrationInfoObject.h renamed to DataFormats/Detectors/FIT/FT0/include/DataFormatsFT0/FT0CalibrationInfoObject.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,4 @@ class FT0CalibrationInfoObject
4646
} // namespace ft0
4747
} // namespace o2
4848

49-
#endif //O2_FT0CALIBRATIONINFOOBJECT_H
49+
#endif // O2_FT0CALIBRATIONINFOOBJECT_H

DataFormats/Detectors/FIT/FT0/include/DataFormatsFT0/FT0ChannelTimeCalibrationObject.h

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,26 +14,19 @@
1414

1515
#include <array>
1616
#include "Rtypes.h"
17-
#include "DataFormatsFT0/RawEventData.h"
17+
#include "FT0Base/Geometry.h"
1818

1919
namespace o2::ft0
2020
{
2121

2222
struct FT0ChannelTimeCalibrationObject {
2323

24-
std::array<int16_t, o2::ft0::Nchannels_FT0> mTimeOffsets{};
24+
std::array<int16_t, o2::ft0::Geometry::Nchannels> mTimeOffsets{};
25+
static constexpr const char* getObjectPath() { return "FT0/Calib/ChannelTimeOffset"; }
2526

2627
ClassDefNV(FT0ChannelTimeCalibrationObject, 1);
2728
};
2829

29-
class FT0ChannelTimeTimeSlotContainer;
30-
31-
class FT0TimeChannelOffsetCalibrationObjectAlgorithm
32-
{
33-
public:
34-
[[nodiscard]] static FT0ChannelTimeCalibrationObject generateCalibrationObject(const FT0ChannelTimeTimeSlotContainer& container);
35-
};
36-
3730
} // namespace o2::ft0
3831

39-
#endif //O2_FT0CHANNELTIMECALIBRATIONOBJECT_H
32+
#endif // O2_FT0CHANNELTIMECALIBRATIONOBJECT_H

DataFormats/Detectors/FIT/FT0/include/DataFormatsFT0/GlobalOffsetsCalibrationObject.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ namespace o2::ft0
2222
struct GlobalOffsetsCalibrationObject {
2323
// LHCphase calibration
2424
int mCollisionTimeOffsets; ///< <LHCphase>
25+
static constexpr const char* getObjectPath() { return "FT0/Calib/GlobalOffsets"; }
2526
ClassDefNV(GlobalOffsetsCalibrationObject, 1);
2627
};
2728

@@ -35,4 +36,4 @@ class GlobalOffsetsCalibrationObjectAlgorithm
3536

3637
} // namespace o2::ft0
3738

38-
#endif //O2_GLOBALOFFSETSCALIBRATIONOBJECT_H
39+
#endif // O2_GLOBALOFFSETSCALIBRATIONOBJECT_H

DataFormats/Detectors/FIT/FT0/src/DataFormatsFT0LinkDef.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#pragma link off all functions;
1717

1818
#pragma link C++ class o2::ft0::Digit + ;
19+
#pragma link C++ class o2::ft0::DigitFilterParam + ;
1920
#pragma link C++ class o2::ft0::ChannelData + ;
2021
#pragma link C++ class o2::ft0::DetTrigInput + ;
2122
#pragma link C++ class o2::ft0::TriggersExt + ;
@@ -42,10 +43,9 @@
4243
#pragma link C++ class o2::ft0::CTF + ;
4344
#pragma link C++ class o2::ctf::EncodedBlocks < o2::ft0::CTFHeader, 9, uint32_t> + ;
4445

46+
#pragma link C++ class o2::ft0::FT0CalibrationInfoObject + ;
47+
#pragma link C++ class o2::ft0::FT0ChannelTimeCalibrationObject + ;
4548
#pragma link C++ class o2::ft0::GlobalOffsetsCalibrationObject + ;
46-
#pragma link C++ class o2::ft0::GlobalOffsetsContainer + ;
4749
#pragma link C++ class o2::ft0::RecoCalibInfoObject + ;
4850
#pragma link C++ class o2::ft0::GlobalOffsetsInfoObject + ;
49-
#include "DetectorsCalibration/TimeSlotCalibration.h"
50-
#pragma link C++ class o2::calibration::TimeSlotCalibration < o2::ft0::GlobalOffsetsInfoObject, o2::ft0::GlobalOffsetsContainer> + ;
5151
#endif

Detectors/FIT/common/calibration/src/FITCalibrationLinkDef.h renamed to DataFormats/Detectors/FIT/FT0/src/DigitFilterParam.cxx

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,7 @@
99
// granted to it by virtue of its status as an Intergovernmental Organization
1010
// or submit itself to any jurisdiction.
1111

12-
#ifdef __CLING__
12+
#include "DataFormatsFT0/DigitFilterParam.h"
1313

14-
#pragma link off all globals;
15-
#pragma link off all classes;
16-
#pragma link off all functions;
17-
18-
#pragma link C++ class o2::calibration::TimeSlotCalibration < o2::ft0::FT0CalibrationInfoObject, o2::ft0::FT0ChannelTimeTimeSlotContainer>;
19-
#pragma link C++ class o2::calibration::TimeSlotCalibration < o2::fv0::FV0CalibrationInfoObject, o2::fv0::FV0ChannelTimeTimeSlotContainer>;
20-
#endif
14+
using namespace o2::ft0;
15+
O2ParamImpl(DigitFilterParam);

DataFormats/Detectors/FIT/FT0/src/GlobalOffsetsCalibrationObject.cxx

Lines changed: 0 additions & 26 deletions
This file was deleted.

DataFormats/Detectors/FIT/FV0/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ o2_add_library(DataFormatsFV0
2626
o2_target_root_dictionary(DataFormatsFV0
2727
HEADERS include/DataFormatsFV0/ChannelData.h
2828
include/DataFormatsFV0/Digit.h
29+
include/DataFormatsFV0/FV0CalibrationInfoObject.h
30+
include/DataFormatsFV0/FV0ChannelTimeCalibrationObject.h
2931
include/DataFormatsFV0/MCLabel.h
3032
include/DataFormatsFV0/Hit.h
3133
include/DataFormatsFV0/RecPoints.h

Detectors/FIT/FV0/calibration/include/FV0Calibration/FV0CalibrationInfoObject.h renamed to DataFormats/Detectors/FIT/FV0/include/DataFormatsFV0/FV0CalibrationInfoObject.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,4 @@ class FV0CalibrationInfoObject
4646
} // namespace fv0
4747
} // namespace o2
4848

49-
#endif //O2_FV0CALIBRATIONINFOOBJECT_H
49+
#endif // O2_FV0CALIBRATIONINFOOBJECT_H

0 commit comments

Comments
 (0)