Skip to content

Commit 3799aa5

Browse files
committed
add isGoodRct column to output trees
1 parent 8b85e39 commit 3799aa5

2 files changed

Lines changed: 15 additions & 9 deletions

File tree

DPG/Tasks/TPC/tpcSkimsTableCreator.cxx

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ struct TreeWriterTpcV0 {
259259
}
260260

261261
template <bool DoUseCorrectedDeDx, int ModeId, typename T, typename C, typename V0Casc>
262-
void fillSkimmedV0Table(V0Casc const& v0casc, T const& track, aod::TracksQA const& trackQA, const bool existTrkQA, C const& collision, const float nSigmaTPC, const float nSigmaTOF, const float nSigmaITS, const float dEdxExp, const o2::track::PID::ID id, const int runnumber, const double dwnSmplFactor, const float hadronicRate, const int bcGlobalIndex, const int bcTimeFrameId, const int bcBcInTimeFrame, const OccupancyValues& occValues)
262+
void fillSkimmedV0Table(V0Casc const& v0casc, T const& track, aod::TracksQA const& trackQA, const bool existTrkQA, C const& collision, const float nSigmaTPC, const float nSigmaTOF, const float nSigmaITS, const float dEdxExp, const o2::track::PID::ID id, const int runnumber, const double dwnSmplFactor, const float hadronicRate, const int bcGlobalIndex, const int bcTimeFrameId, const int bcBcInTimeFrame, const OccupancyValues& occValues, const bool isGoodRctEvent)
263263
{
264264
const double ncl = track.tpcNClsFound();
265265
const double nclPID = track.tpcNClsFindableMinusPID();
@@ -286,7 +286,8 @@ struct TreeWriterTpcV0 {
286286
tpcdEdxNorm = existTrkQA ? trackQA.tpcdEdxNorm() : UndefValueFloat;
287287
}
288288
if constexpr (ModeId == ModeStandard || ModeId == ModeWithdEdxTrkQA) {
289-
rowTPCTree(usedDedx,
289+
rowTPCTree(isGoodRctEvent,
290+
usedDedx,
290291
1. / dEdxExp,
291292
track.tpcInnerParam(),
292293
track.tgl(),
@@ -316,7 +317,8 @@ struct TreeWriterTpcV0 {
316317
v0radius,
317318
gammapsipair);
318319
} else {
319-
rowTPCTreeWithTrkQA(usedDedx,
320+
rowTPCTreeWithTrkQA(isGoodRctEvent,
321+
usedDedx,
320322
1. / dEdxExp,
321323
track.tpcInnerParam(),
322324
track.tgl(),
@@ -477,7 +479,7 @@ struct TreeWriterTpcV0 {
477479
if constexpr (ModeId == ModeWithTrkQA) {
478480
evaluateOccupancyVariables(dauTrack, occValues);
479481
}
480-
fillSkimmedV0Table<IsCorrectedDeDx, ModeId>(mother, dauTrack, trackQAInstance, existTrkQA, collision, daughter.tpcNSigma, daughter.tofNSigma, daughter.itsNSigma, daughter.tpcExpSignal, daughter.id, runnumber, daughter.dwnSmplFactor, hadronicRate, bcGlobalIndex, bcTimeFrameId, bcBcInTimeFrame, occValues);
482+
fillSkimmedV0Table<IsCorrectedDeDx, ModeId>(mother, dauTrack, trackQAInstance, existTrkQA, collision, daughter.tpcNSigma, daughter.tofNSigma, daughter.itsNSigma, daughter.tpcExpSignal, daughter.id, runnumber, daughter.dwnSmplFactor, hadronicRate, bcGlobalIndex, bcTimeFrameId, bcBcInTimeFrame, occValues, isGoodRctEvent);
481483
}
482484
};
483485

@@ -692,7 +694,7 @@ struct TreeWriterTpcTof {
692694
}
693695

694696
template <bool DoCorrectDeDx, int ModeId, typename T, typename C>
695-
void fillSkimmedTpcTofTable(T const& track, aod::TracksQA const& trackQA, const bool existTrkQA, C const& collision, const float nSigmaTPC, const float nSigmaTOF, const float nSigmaITS, const float dEdxExp, const o2::track::PID::ID id, const int runnumber, const double dwnSmplFactor, const double hadronicRate, const int bcGlobalIndex, const int bcTimeFrameId, const int bcBcInTimeFrame, const OccupancyValues& occValues)
697+
void fillSkimmedTpcTofTable(T const& track, aod::TracksQA const& trackQA, const bool existTrkQA, C const& collision, const float nSigmaTPC, const float nSigmaTOF, const float nSigmaITS, const float dEdxExp, const o2::track::PID::ID id, const int runnumber, const double dwnSmplFactor, const double hadronicRate, const int bcGlobalIndex, const int bcTimeFrameId, const int bcBcInTimeFrame, const OccupancyValues& occValues, const bool isGoodRctEvent)
696698
{
697699
const double ncl = track.tpcNClsFound();
698700
const double nclPID = track.tpcNClsFindableMinusPID();
@@ -712,7 +714,8 @@ struct TreeWriterTpcTof {
712714
tpcdEdxNorm = existTrkQA ? trackQA.tpcdEdxNorm() : UndefValueFloat;
713715
}
714716
if (ModeId == ModeStandard || ModeId == ModeWithdEdxTrkQA) {
715-
rowTPCTOFTree(usedEdx,
717+
rowTPCTOFTree(isGoodRctEvent,
718+
usedEdx,
716719
1. / dEdxExp,
717720
track.tpcInnerParam(),
718721
track.tgl(),
@@ -736,7 +739,8 @@ struct TreeWriterTpcTof {
736739
hadronicRate,
737740
tpcdEdxNorm);
738741
} else {
739-
rowTPCTOFTreeWithTrkQA(usedEdx,
742+
rowTPCTOFTreeWithTrkQA(isGoodRctEvent,
743+
usedEdx,
740744
1. / dEdxExp,
741745
track.tpcInnerParam(),
742746
track.tgl(),
@@ -864,7 +868,7 @@ struct TreeWriterTpcTof {
864868
((trk.tpcInnerParam() <= tofTrack->maxMomTPCOnly && std::fabs(tofTrack->tpcNSigma) < tofTrack->nSigmaTPCOnly) ||
865869
(trk.tpcInnerParam() > tofTrack->maxMomTPCOnly && std::fabs(tofTrack->tofNSigma) < tofTrack->nSigmaTofTpctof && std::fabs(tofTrack->tpcNSigma) < tofTrack->nSigmaTpcTpctof)) &&
866870
downsampleTsalisCharged(fRndm, trk.pt(), tofTrack->downsamplingTsalis, tofTrack->mass, sqrtSNN)) {
867-
fillSkimmedTpcTofTable<IsCorrectedDeDx, ModeId>(trk, trackQA, existTrkQA, collision, tofTrack->tpcNSigma, tofTrack->tofNSigma, tofTrack->itsNSigma, tofTrack->tpcExpSignal, tofTrack->pid, runnumber, tofTrack->dwnSmplFactor, hadronicRate, bcGlobalIndex, bcTimeFrameId, bcBcInTimeFrame, occValues);
871+
fillSkimmedTpcTofTable<IsCorrectedDeDx, ModeId>(trk, trackQA, existTrkQA, collision, tofTrack->tpcNSigma, tofTrack->tofNSigma, tofTrack->itsNSigma, tofTrack->tpcExpSignal, tofTrack->pid, runnumber, tofTrack->dwnSmplFactor, hadronicRate, bcGlobalIndex, bcTimeFrameId, bcBcInTimeFrame, occValues, isGoodRctEvent);
868872
}
869873
}
870874
} /// Loop tracks

DPG/Tasks/TPC/tpcSkimsTableCreator.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ namespace o2::aod
3232
{
3333
namespace tpcskims
3434
{
35+
DECLARE_SOA_COLUMN(IsGoodRct, isGoodRct, bool);
3536
DECLARE_SOA_COLUMN(InvDeDxExpTPC, invDeDxExpTPC, float);
3637
DECLARE_SOA_COLUMN(Mass, mass, float);
3738
DECLARE_SOA_COLUMN(BetaGamma, betaGamma, float);
@@ -59,7 +60,8 @@ DECLARE_SOA_COLUMN(BcBcInTimeFrame, bcBcInTimeFrame, int);
5960
} // namespace tpcskims
6061

6162
#define TPCSKIMS_COLUMNS_BASE \
62-
o2::aod::track::TPCSignal, \
63+
tpcskims::IsGoodRct, \
64+
o2::aod::track::TPCSignal, \
6365
tpcskims::InvDeDxExpTPC, \
6466
o2::aod::track::TPCInnerParam, \
6567
o2::aod::track::Tgl, \

0 commit comments

Comments
 (0)