Skip to content

Commit cf6d373

Browse files
wpierozakWiktor Pierozakf3sch
authored
AFIT-80 - Implementation of configurable parameters for FV0 reconstruction (#15881)
* created fv0::TimeFilter and fv0::ChargeFilter classes for reco configuration * replaced Digit configuration opitons with ChargeFilter and TimeFilter parameters in BaseRecoTask * prefixed FV0 reco configuration structure with 'FV0Reco' * Merged Charge and Time fileters to one Fv0RecoConfig * Renamed files * Fixed typo in FV0 CMakeLists * Update DataFormats/Detectors/FIT/FV0/src/DataFormatsFV0LinkDef.h * Added explicit casting to uin8_t in FV0RecoConfig to remove compilation warning * Added ClassDefNV statement to FV0RecoConfig struct * Fixed typos and #define directives, removed unused includes Co-authored-by: Wiktor Pierozak <wpieroza@alifitlab010.dyndns.cern.ch> Co-authored-by: Felix Schlepper <f3sch.git@outlook.com>
1 parent 7bb9128 commit cf6d373

5 files changed

Lines changed: 63 additions & 6 deletions

File tree

‎DataFormats/Detectors/FIT/FV0/CMakeLists.txt‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ o2_add_library(DataFormatsFV0
1717
src/RawEventData.cxx
1818
src/CTF.cxx
1919
src/LookUpTable.cxx
20+
src/FV0RecoConfig.cxx
2021
PUBLIC_LINK_LIBRARIES O2::FV0Base
2122
O2::DataFormatsFIT
2223
O2::SimulationDataFormat
@@ -35,4 +36,6 @@ o2_target_root_dictionary(DataFormatsFV0
3536
include/DataFormatsFV0/RecPoints.h
3637
include/DataFormatsFV0/RawEventData.h
3738
include/DataFormatsFV0/LookUpTable.h
38-
include/DataFormatsFV0/CTF.h)
39+
include/DataFormatsFV0/CTF.h
40+
include/DataFormatsFV0/FV0RecoConfig.h
41+
)
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+
#ifndef ALICEO2_FV0_RECO_PARAM
13+
#define ALICEO2_FV0_RECO_PARAM
14+
15+
#include "CommonUtils/ConfigurableParamHelper.h"
16+
#include "DataFormatsFV0/ChannelData.h"
17+
18+
namespace o2::fv0
19+
{
20+
struct FV0RecoConfig : o2::conf::ConfigurableParamHelper<FV0RecoConfig> {
21+
double AmplitudeLowerThreshold = 24; // only channels with amplitude higher will participate in calibration and collision time
22+
double AmplitudeThresholdForMeanTime = 5; // Charge threshold, only above which the time is taken into account in calculating the mean time of all qualifying channels
23+
double TimeUpperThreshold = 1000.0; // only channels with time below will participate in calibration and collision time
24+
uint8_t mValidPmInputFlagMask = static_cast<uint8_t>(~(1u << ChannelData::kNumberADC));
25+
uint8_t mValidPmInputFlags = static_cast<uint8_t>((1u << ChannelData::kIsCFDinADCgate) | (1u << ChannelData::kIsEventInTVDC));
26+
27+
bool areChannelDataFlagsGood(uint8_t flags) const
28+
{
29+
return (flags & mValidPmInputFlagMask) == mValidPmInputFlags;
30+
}
31+
O2ParamDef(FV0RecoConfig, "FV0RecoConfig");
32+
ClassDefNV(FV0RecoConfig, 1);
33+
};
34+
35+
} // namespace o2::fv0
36+
37+
#endif

‎DataFormats/Detectors/FIT/FV0/src/DataFormatsFV0LinkDef.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,6 @@
4040
#pragma link C++ class o2::fv0::FV0CalibrationInfoObject + ;
4141
#pragma link C++ class o2::fv0::FV0ChannelTimeCalibrationObject + ;
4242

43+
#pragma link C++ class o2::fv0::FV0RecoConfig + ;
44+
#pragma link C++ class o2::conf::ConfigurableParamHelper < o2::fv0::FV0RecoConfig> + ;
4345
#endif
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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+
#include "DataFormatsFV0/FV0RecoConfig.h"
13+
14+
using namespace o2::fv0;
15+
O2ParamImpl(FV0RecoConfig);

‎Detectors/FIT/FV0/reconstruction/src/BaseRecoTask.cxx‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
#include "FV0Reconstruction/BaseRecoTask.h"
1616
#include "DataFormatsFV0/RecPoints.h"
1717
#include "FV0Base/Geometry.h"
18-
#include "FV0Simulation/FV0DigParam.h"
1918
#include "FV0Simulation/DigitizationConstant.h"
19+
#include "DataFormatsFV0/FV0RecoConfig.h"
2020
#include <DataFormatsFV0/ChannelData.h>
2121
#include <DataFormatsFV0/Digit.h>
2222
#include <CommonDataFormat/InteractionRecord.h>
@@ -56,14 +56,14 @@ RP BaseRecoTask::process(o2::fv0::Digit const& bcd,
5656
const auto& currentOutCh = outChData.back();
5757

5858
// Conditions for reconstructing collision time (3 variants: first, average-relaxed and average-tight)
59-
if (currentOutCh.charge > FV0DigParam::Instance().chargeThrForMeanTime) {
59+
if (currentOutCh.charge > FV0RecoConfig::Instance().AmplitudeThresholdForMeanTime) {
6060
sideAtimeFirst = std::min(static_cast<Double_t>(sideAtimeFirst), currentOutCh.time);
61-
if (inChData[ich].areAllFlagsGood()) {
62-
if (std::abs(currentOutCh.time) < FV0DigParam::Instance().mTimeThresholdForReco) {
61+
if (FV0RecoConfig::Instance().areChannelDataFlagsGood(inChData[ich].ChainQTC)) {
62+
if (std::abs(currentOutCh.time) < FV0RecoConfig::Instance().TimeUpperThreshold) {
6363
sideAtimeAvg += currentOutCh.time;
6464
ndigitsA++;
6565
}
66-
if (currentOutCh.charge > FV0DigParam::Instance().mAmpThresholdForReco && std::abs(currentOutCh.time) < FV0DigParam::Instance().mTimeThresholdForReco) {
66+
if (currentOutCh.charge > FV0RecoConfig::Instance().AmplitudeLowerThreshold && std::abs(currentOutCh.time) < FV0RecoConfig::Instance().TimeUpperThreshold) {
6767
sideAtimeAvgSelected += currentOutCh.time;
6868
ndigitsASelected++;
6969
}

0 commit comments

Comments
 (0)