Skip to content
5 changes: 4 additions & 1 deletion DataFormats/Detectors/FIT/FV0/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ o2_add_library(DataFormatsFV0
src/RawEventData.cxx
src/CTF.cxx
src/LookUpTable.cxx
src/FV0RecoConfig.cxx
PUBLIC_LINK_LIBRARIES O2::FV0Base
O2::DataFormatsFIT
O2::SimulationDataFormat
Expand All @@ -35,4 +36,6 @@ o2_target_root_dictionary(DataFormatsFV0
include/DataFormatsFV0/RecPoints.h
include/DataFormatsFV0/RawEventData.h
include/DataFormatsFV0/LookUpTable.h
include/DataFormatsFV0/CTF.h)
include/DataFormatsFV0/CTF.h
include/DataFormatsFV0/FV0RecoConfig.h
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
// This software is distributed under the terms of the GNU General Public
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

#ifndef ALICEO2_FV0_DIGIT_FILTER_PARAM
#define ALICEO2_FV0_DIGIT_FILTER_PARAM

#include "CommonUtils/ConfigurableParamHelper.h"
#include "DataFormatsFV0/ChannelData.h"

namespace o2::fv0
{
struct FV0RecoConfig : o2::conf::ConfigurableParamHelper<FV0RecoConfig> {
double AmplitudeLowerThreshold = 24; // only channels with amplitude higher will participate in calibration and collision time
double AmplitudeThreholdForMeanTime = 5; // Charge threshold, only above which the time is taken into account in calculating the mean time of all qualifying channels
double TimeUpperThershold = 1000.0; // only channels with time below will participate in calibration and collision time
uint8_t mValidPmInputFlagMask = static_cast<uint8_t>(~(1u << ChannelData::kNumberADC));
uint8_t mValidPmInputFlags = static_cast<uint8_t>((1u << ChannelData::kIsCFDinADCgate) | (1u << ChannelData::kIsEventInTVDC));

bool areChannelDataFlagsGood(uint8_t flags) const
{
return (flags & mValidPmInputFlagMask) == mValidPmInputFlags;
}
O2ParamDef(FV0RecoConfig, "FV0RecoConfig");
ClassDefNV(FV0RecoConfig, 1);
};

} // namespace o2::fv0

#endif
2 changes: 2 additions & 0 deletions DataFormats/Detectors/FIT/FV0/src/DataFormatsFV0LinkDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,6 @@
#pragma link C++ class o2::fv0::FV0CalibrationInfoObject + ;
#pragma link C++ class o2::fv0::FV0ChannelTimeCalibrationObject + ;

#pragma link C++ class o2::fv0::FV0RecoConfig + ;
Comment thread
wpierozak marked this conversation as resolved.
#pragma link C++ class o2::conf::ConfigurableParamHelper < o2::fv0::FV0RecoConfig> + ;
#endif
15 changes: 15 additions & 0 deletions DataFormats/Detectors/FIT/FV0/src/FV0RecoConfig.cxx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
// This software is distributed under the terms of the GNU General Public
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

#include "DataFormatsFV0/FV0RecoConfig.h"

using namespace o2::fv0;
O2ParamImpl(FV0RecoConfig);
9 changes: 5 additions & 4 deletions Detectors/FIT/FV0/reconstruction/src/BaseRecoTask.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "FV0Base/Geometry.h"
#include "FV0Simulation/FV0DigParam.h"
#include "FV0Simulation/DigitizationConstant.h"
#include "DataFormatsFV0/FV0RecoConfig.h"
#include <DataFormatsFV0/ChannelData.h>
#include <DataFormatsFV0/Digit.h>
#include <CommonDataFormat/InteractionRecord.h>
Expand Down Expand Up @@ -56,14 +57,14 @@ RP BaseRecoTask::process(o2::fv0::Digit const& bcd,
const auto& currentOutCh = outChData.back();

// Conditions for reconstructing collision time (3 variants: first, average-relaxed and average-tight)
if (currentOutCh.charge > FV0DigParam::Instance().chargeThrForMeanTime) {
if (currentOutCh.charge > FV0RecoConfig::Instance().AmplitudeThreholdForMeanTime) {
sideAtimeFirst = std::min(static_cast<Double_t>(sideAtimeFirst), currentOutCh.time);
if (inChData[ich].areAllFlagsGood()) {
if (std::abs(currentOutCh.time) < FV0DigParam::Instance().mTimeThresholdForReco) {
if (FV0RecoConfig::Instance().areChannelDataFlagsGood(inChData[ich].ChainQTC)) {
if (std::abs(currentOutCh.time) < FV0RecoConfig::Instance().TimeUpperThershold) {
sideAtimeAvg += currentOutCh.time;
ndigitsA++;
}
if (currentOutCh.charge > FV0DigParam::Instance().mAmpThresholdForReco && std::abs(currentOutCh.time) < FV0DigParam::Instance().mTimeThresholdForReco) {
if (currentOutCh.charge > FV0RecoConfig::Instance().AmplitudeLowerThreshold && std::abs(currentOutCh.time) < FV0RecoConfig::Instance().TimeUpperThershold) {
sideAtimeAvgSelected += currentOutCh.time;
ndigitsASelected++;
}
Expand Down