Skip to content

Commit e716a5d

Browse files
wpierozakwpierozak
authored andcommitted
Refactored parameters name; Preparing structure for coincidence checks
1 parent 33fa132 commit e716a5d

2 files changed

Lines changed: 13 additions & 9 deletions

File tree

‎DataFormats/Detectors/FIT/FDD/include/DataFormatsFDD/FDDRecoConfig.h‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ struct FDDRecoConfig : o2::conf::ConfigurableParamHelper<FDDRecoConfig> {
4949
return (flags & CollisionTimeValidPmInputFlagMask) == CollisionTimeValidPmInputFlags;
5050
}
5151

52-
int16_t SwTriggerTimeLowThreshold = -153;
53-
int16_t SwTriggerTimeHighThreshold = 153;
54-
int16_t SwTriggerAmplitudeLowThreshold = 10;
55-
int16_t SwTriggerAmplitudeHighThreshold = 4096;
56-
float SwTriggerTimeDiffMin = -1.3;
57-
float SwTriggerTimeDiffMax = 1.3;
52+
int16_t SwOrTriggerTimeLowThreshold = -153;
53+
int16_t SwOrTriggerTimeHighThreshold = 153;
54+
int16_t SwOrTriggerAmplitudeLowThreshold = 10;
55+
int16_t SwOrTriggerAmplitudeHighThreshold = 4096;
56+
int16_t SwVtxTriggerTimeDiffMin = -100;
57+
int16_t SwVtxTriggerTimeDiffMax = 100;
5858
bool SwTriggerEnabled = false;
5959

6060
O2ParamDef(FDDRecoConfig, "FDDRecoConfig");

‎Detectors/FIT/FDD/reconstruction/include/FDDReconstruction/Reconstructor.h‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include "DataFormatsFDD/RecPoint.h"
2020
#include "DataFormatsFIT/DeadChannelMap.h"
2121
#include "DataFormatsFDD/FDDRecoConfig.h"
22+
#include "FDDBase/Constants.h"
2223
namespace o2
2324
{
2425
namespace fdd
@@ -41,6 +42,9 @@ class Reconstructor
4142
}
4243

4344
private:
45+
static const int coincidencePairsSideC[4][2] = {{0, 4}, {1, 5}, {2, 6}, {3, 7}};
46+
static const int coincidencePairsSideA[4][2] = {{8, 12}, {9, 13}, {10, 14}, {11, 15}};
47+
4448
bool isInAmplitudeWindow(int16_t amplitude)
4549
{
4650
return amplitude >= FDDRecoConfig::Instance().ChannelAmplitudeLower && amplitude <= FDDRecoConfig::Instance().ChannelAmplitudeUpper;
@@ -69,15 +73,15 @@ class Reconstructor
6973

7074
bool checkSwOrGateConditions(const ChannelData& channelData)
7175
{
72-
bool isAmplitudeInRange = channelData.mChargeADC >= FDDRecoConfig::Instance().SwTriggerAmplitudeLowThreshold && channelData.mChargeADC <= FDDRecoConfig::Instance().SwTriggerAmplitudeHighThreshold;
73-
bool isInTimeWindow = std::abs(channelData.mTime) >= FDDRecoConfig::Instance().SwTriggerTimeLowThreshold && std::abs(channelData.mTime) <= FDDRecoConfig::Instance().SwTriggerTimeHighThreshold;
76+
bool isAmplitudeInRange = channelData.mChargeADC >= FDDRecoConfig::Instance().SwOrTriggerAmplitudeLowThreshold && channelData.mChargeADC <= FDDRecoConfig::Instance().SwOrTriggerAmplitudeHighThreshold;
77+
bool isInTimeWindow = std::abs(channelData.mTime) >= o2::fdd::timePerTDC * FDDRecoConfig::Instance().SwOrTriggerTimeLowThreshold && std::abs(channelData.mTime) <= o2::fdd::timePerTDC * FDDRecoConfig::Instance().SwOrTriggerTimeHighThreshold;
7478
bool isCfdInAdcGate = channelData.getFlag(ChannelData::EEventDataBit::kIsCFDinADCgate);
7579
return isAmplitudeInRange && isInTimeWindow && isCfdInAdcGate;
7680
}
7781

7882
bool calculateSwTrigger(float meanTimeSideA, float meanTimeSideC, bool orGateSideA, bool orGateSideC)
7983
{
80-
return (meanTimeSideC - meanTimeSideA) >= FDDRecoConfig::Instance().SwTriggerTimeDiffMin && (meanTimeSideC - meanTimeSideA) <= FDDRecoConfig::Instance().SwTriggerTimeDiffMax && orGateSideA && orGateSideC;
84+
return (meanTimeSideC - meanTimeSideA) >= o2::fdd::timePerTDC * FDDRecoConfig::Instance().SwVtxTriggerTimeDiffMin && (meanTimeSideC - meanTimeSideA) <= o2::fdd::timePerTDC * FDDRecoConfig::Instance().SwVtxTriggerTimeDiffMax && orGateSideA && orGateSideC;
8185
}
8286
static constexpr uint8_t sSideAMaxId = 7;
8387

0 commit comments

Comments
 (0)