Skip to content

Commit 56c66ad

Browse files
committed
fix based on Ionut's comments and suggestions
1 parent 4934b53 commit 56c66ad

File tree

2 files changed

+22
-9
lines changed

2 files changed

+22
-9
lines changed

PWGDQ/Core/VarManager.h

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include "Common/Core/EventPlaneHelper.h"
2828
#include "Common/Core/fwdtrackUtilities.h"
2929
#include "Common/Core/trackUtilities.h"
30+
#include "DataFormatsFIT/Triggers.h"
3031

3132
#include <CommonConstants/LHCConstants.h>
3233
#include <CommonConstants/PhysicsConstants.h>
@@ -5510,17 +5511,23 @@ void VarManager::FillFIT(TBC const& bc, TBCs const& bcs, float* values)
55105511
if (scanbc.selection_bit(o2::aod::evsel::kIsBBFDC))
55115512
bbFDDCpf |= (1 << bit);
55125513

5513-
// Track closest BCs with specific triggers
5514+
// Track closest BCs with specific triggers
55145515
if (scanbc.selection_bit(o2::aod::evsel::kIsTriggerTVX)) {
55155516
if (std::abs(dist) < std::abs(minDistTVX)) {
55165517
minDistTVX = dist;
55175518
}
55185519
}
5519-
if (scanbc.alias_bit(o2::aod::evsel::kTVXinTRD)) { // TOR trigger
5520-
if (std::abs(dist) < std::abs(minDistTOR)) {
5521-
minDistTOR = dist;
5520+
5521+
// TOR trigger: FT0 time-based selection (|timeA| > 2 && |timeC| > 2)
5522+
if (scanbc.has_ft0()) {
5523+
auto ft0 = scanbc.ft0();
5524+
if (!(std::abs(ft0.timeA()) > 2.f && std::abs(ft0.timeC()) > 2.f)) {
5525+
if (std::abs(dist) < std::abs(minDistTOR)) {
5526+
minDistTOR = dist;
5527+
}
55225528
}
55235529
}
5530+
55245531
if (scanbc.selection_bit(o2::aod::evsel::kIsBBV0A)) { // V0A trigger
55255532
if (std::abs(dist) < std::abs(minDistV0A)) {
55265533
minDistV0A = dist;
@@ -5531,10 +5538,16 @@ void VarManager::FillFIT(TBC const& bc, TBCs const& bcs, float* values)
55315538
minDistT0A = dist;
55325539
}
55335540
}
5534-
// TSC = TVX & (TSC | TCE) - approximated by TVX for now
5535-
if (scanbc.selection_bit(o2::aod::evsel::kIsTriggerTVX)) {
5536-
if (std::abs(dist) < std::abs(minDistTSC)) {
5537-
minDistTSC = dist;
5541+
5542+
// TSC = TVX & (TSC | TCE) - check FT0 trigger mask
5543+
if (scanbc.has_ft0()) {
5544+
auto ft0 = scanbc.ft0();
5545+
if (TESTBIT(ft0.triggerMask(), o2::fit::Triggers::bitVertex) &&
5546+
(TESTBIT(ft0.triggerMask(), o2::fit::Triggers::bitCen) ||
5547+
TESTBIT(ft0.triggerMask(), o2::fit::Triggers::bitSCen))) {
5548+
if (std::abs(dist) < std::abs(minDistTSC)) {
5549+
minDistTSC = dist;
5550+
}
55385551
}
55395552
}
55405553
}

PWGDQ/TableProducer/tableMaker_withAssoc.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ using MyMuonsWithCov = soa::Join<aod::FwdTracks, aod::FwdTracksCov, aod::FwdTrac
119119
using MyMuonsRealignWithCov = soa::Join<aod::FwdTracksReAlign, aod::FwdTrksCovReAlign, aod::FwdTracksDCA>;
120120
using MyMuonsColl = soa::Join<aod::FwdTracks, aod::FwdTracksDCA, aod::FwdTrkCompColls>;
121121
using MyMuonsCollWithCov = soa::Join<aod::FwdTracks, aod::FwdTracksCov, aod::FwdTracksDCA, aod::FwdTrkCompColls>;
122-
using MyBCs = soa::Join<aod::BCs, aod::Timestamps, aod::Run3MatchedToBCSparse>;
122+
using MyBCs = soa::Join<aod::BCs, aod::Timestamps, aod::Run3MatchedToBCSparse,aod::BcSels>;
123123
using ExtBCs = soa::Join<aod::BCs, aod::Timestamps, aod::MatchedBCCollisionsSparseMulti>;
124124

125125
// Declaration of various bit maps containing information on which tables are included in a Join

0 commit comments

Comments
 (0)