Skip to content

Commit 9110a43

Browse files
authored
PWGCF: Fix FemtoDream (#4264)
* Feat: use track variables from v0 table For v0 daughters, certain track variables get recomputed by the lambdakzero-builder. Since these values are used to fill the femto tables, these values should also explicitly be used for the daughter selections. * Fix: fix formating * Fix: fix formating * Fix: fix comment
1 parent 9922e8c commit 9110a43

5 files changed

Lines changed: 24 additions & 19 deletions

File tree

PWGCF/FemtoDream/FemtoDreamTrackSelection.h

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,17 @@ class FemtoDreamTrackSelection : public FemtoDreamObjectSelection<float, femtoDr
137137
bool isSelectedMinimal(T const& track);
138138

139139
/// Obtain the bit-wise container for the selections
140+
/// Pt, eta and dca are not necessarily taken from the track table. For example, for V0 daughters they are recaluated and stored in the V0 table
140141
/// \todo For the moment, PID is separated from the other selections, hence instead of a single value an std::array of size two is returned
141142
/// \tparam cutContainerType Data type of the bit-wise container for the selections
142143
/// \tparam T Data type of the track
143144
/// \param track Track
145+
/// \param Pt pt of the track
146+
/// \param Eta eta of the track
147+
/// \param Dca dca of the track with respect to primary vertex
144148
/// \return The bit-wise container for the selections, separately with all selection criteria, and the PID
145-
template <typename cutContainerType, typename T>
146-
std::array<cutContainerType, 2> getCutContainer(T const& track);
149+
template <typename cutContainerType, typename T, typename R>
150+
std::array<cutContainerType, 2> getCutContainer(T const& track, R Pt, R Eta, R Dcaxy);
147151

148152
/// Some basic QA histograms
149153
/// \tparam part Type of the particle for proper naming of the folders for QA
@@ -478,15 +482,15 @@ bool FemtoDreamTrackSelection::isSelectedMinimal(T const& track)
478482
return true;
479483
}
480484

481-
template <typename cutContainerType, typename T>
482-
std::array<cutContainerType, 2> FemtoDreamTrackSelection::getCutContainer(T const& track)
485+
template <typename cutContainerType, typename T, typename R>
486+
std::array<cutContainerType, 2> FemtoDreamTrackSelection::getCutContainer(T const& track, R Pt, R Eta, R Dca)
483487
{
484488
cutContainerType output = 0;
485489
size_t counter = 0;
486490
cutContainerType outputPID = 0;
487491
const auto sign = track.sign();
488-
const auto pT = track.pt();
489-
const auto eta = track.eta();
492+
const auto pt = Pt;
493+
const auto eta = Eta;
490494
const auto tpcNClsF = track.tpcNClsFound();
491495
const auto tpcRClsC = track.tpcCrossedRowsOverFindableCls();
492496
const auto tpcNClsC = track.tpcNClsCrossedRows();
@@ -495,7 +499,7 @@ std::array<cutContainerType, 2> FemtoDreamTrackSelection::getCutContainer(T cons
495499
const auto itsNClsIB = track.itsNClsInnerBarrel();
496500
const auto dcaXY = track.dcaXY();
497501
const auto dcaZ = track.dcaZ();
498-
const auto dca = std::sqrt(pow(dcaXY, 2.) + pow(dcaZ, 2.));
502+
const auto dca = Dca;
499503

500504
std::vector<float> pidTPC, pidTOF;
501505
for (auto it : mPIDspecies) {
@@ -523,7 +527,7 @@ std::array<cutContainerType, 2> FemtoDreamTrackSelection::getCutContainer(T cons
523527
break;
524528
case (femtoDreamTrackSelection::kpTMin):
525529
case (femtoDreamTrackSelection::kpTMax):
526-
observable = pT;
530+
observable = pt;
527531
break;
528532
case (femtoDreamTrackSelection::kEtaMax):
529533
observable = eta;

PWGCF/FemtoDream/FemtoDreamV0Selection.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -552,8 +552,8 @@ template <typename cutContainerType, typename C, typename V, typename T>
552552
std::array<cutContainerType, 5>
553553
FemtoDreamV0Selection::getCutContainer(C const& col, V const& v0, T const& posTrack, T const& negTrack)
554554
{
555-
auto outputPosTrack = PosDaughTrack.getCutContainer<cutContainerType>(posTrack);
556-
auto outputNegTrack = NegDaughTrack.getCutContainer<cutContainerType>(negTrack);
555+
auto outputPosTrack = PosDaughTrack.getCutContainer<cutContainerType>(posTrack, v0.positivept(), v0.positiveeta(), v0.dcapostopv());
556+
auto outputNegTrack = NegDaughTrack.getCutContainer<cutContainerType>(negTrack, v0.negativept(), v0.negativeeta(), v0.dcanegtopv());
557557
cutContainerType output = 0;
558558
size_t counter = 0;
559559

PWGCF/FemtoDream/femtoDreamDebugV0.cxx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ struct femtoDreamDebugV0 {
4141

4242
Configurable<int> ConfV01_PDGCode{"ConfV01_PDGCode", 3122, "V0 - PDG code"};
4343
Configurable<int> ConfV01_ChildPos_PDGCode{"ConfV01_PosChild_PDGCode", 2212, "Positive Child - PDG code"};
44-
Configurable<int> ConfV01_NegChild_PDGCode{"ConfV01_NegChild_PDGCode", 211, "Negative Child- PDG code"};
44+
Configurable<int> ConfV01_ChildNeg_PDGCode{"ConfV01_NegChild_PDGCode", 211, "Negative Child- PDG code"};
4545
Configurable<aod::femtodreamparticle::cutContainerType> ConfV01_CutBit{"ConfV01_CutBit", 338, "V0 - Selection bit from cutCulator"};
4646
ConfigurableAxis ConfV0TempFitVarBins{"ConfV0TempFitVarBins", {300, 0.95, 1.}, "V0: binning of the TempFitVar in the pT vs. TempFitVar plot"};
4747
ConfigurableAxis ConfV0TempFitVarMomentumBins{"ConfV0TempFitVarMomentumBins", {20, 0.5, 4.05}, "V0: pT binning of the pT vs. TempFitVar plot"};
@@ -57,6 +57,7 @@ struct femtoDreamDebugV0 {
5757

5858
Configurable<aod::femtodreamparticle::cutContainerType> ConfV01_ChildPos_CutBit{"ConfV01_ChildPos_CutBit", 150, "Positive Child of V0 - Selection bit from cutCulator"};
5959
Configurable<aod::femtodreamparticle::cutContainerType> ConfV01_ChildPos_TPCBit{"ConfV01_ChildPos_TPCBit", 4, "Positive Child of V0 - PID bit from cutCulator"};
60+
Configurable<aod::femtodreamparticle::cutContainerType> ConfV01_ChildNeg_CutBit{"ConfV01_ChildNeg_CutBit", 149, "Negative Child of V0 - PID bit from cutCulator"};
6061
Configurable<aod::femtodreamparticle::cutContainerType> ConfV01_ChildNeg_TPCBit{"ConfV01_ChildNeg_TPCBit", 8, "Negative Child of V0 - PID bit from cutCulator"};
6162
ConfigurableAxis ConfChildTempFitVarBins{"ConfChildTempFitVarBins", {300, -0.15, 0.15}, "V0 child: binning of the TempFitVar in the pT vs. TempFitVar plot"};
6263
ConfigurableAxis ConfChildTempFitVarpTBins{"ConfChildTempFitVarpTBins", {20, 0.5, 4.05}, "V0 child: pT binning of the pT vs. TempFitVar plot"};
@@ -79,7 +80,7 @@ struct femtoDreamDebugV0 {
7980
{
8081
eventHisto.init(&EventRegistry);
8182
posChildHistos.init(&V0Registry, ConfV0ChildTempFitVarMomentumBins, ConfChildTempFitVarBins, ConfV0ChildNsigmaTPCBins, ConfV0ChildNsigmaTOFBins, ConfV0ChildNsigmaTPCTOFBins, ConfV0InvMassBins, false, ConfV01_ChildPos_PDGCode.value, true);
82-
negChildHistos.init(&V0Registry, ConfV0ChildTempFitVarMomentumBins, ConfChildTempFitVarBins, ConfV0ChildNsigmaTPCBins, ConfV0ChildNsigmaTOFBins, ConfV0ChildNsigmaTPCTOFBins, ConfV0InvMassBins, false, ConfV01_NegChild_PDGCode, true);
83+
negChildHistos.init(&V0Registry, ConfV0ChildTempFitVarMomentumBins, ConfChildTempFitVarBins, ConfV0ChildNsigmaTPCBins, ConfV0ChildNsigmaTOFBins, ConfV0ChildNsigmaTPCTOFBins, ConfV0InvMassBins, false, ConfV01_ChildNeg_PDGCode, true);
8384
V0Histos.init(&V0Registry, ConfV0TempFitVarMomentumBins, ConfV0TempFitVarBins, ConfV0ChildNsigmaTPCBins, ConfV0ChildNsigmaTOFBins, ConfV0ChildNsigmaTPCTOFBins, ConfV0InvMassBins, false, ConfV01_PDGCode.value, true);
8485
}
8586

@@ -107,7 +108,7 @@ struct femtoDreamDebugV0 {
107108
(posChild.cut() & ConfV01_ChildPos_CutBit) == ConfV01_ChildPos_CutBit &&
108109
(posChild.pidcut() & ConfV01_ChildPos_TPCBit) == ConfV01_ChildPos_TPCBit &&
109110
negChild.partType() == uint8_t(aod::femtodreamparticle::ParticleType::kV0Child) &&
110-
(negChild.cut() & ConfV01_ChildNeg_TPCBit) == ConfV01_ChildNeg_TPCBit &&
111+
(negChild.cut() & ConfV01_ChildNeg_CutBit) == ConfV01_ChildNeg_CutBit &&
111112
(negChild.pidcut() & ConfV01_ChildNeg_TPCBit) == ConfV01_ChildNeg_TPCBit) {
112113
V0Histos.fillQA<false, true>(part, static_cast<aod::femtodreamparticle::MomentumType>(ConfV0TempFitVarMomentum.value));
113114
posChildHistos.fillQA<false, true>(posChild, static_cast<aod::femtodreamparticle::MomentumType>(ConfV0TempFitVarMomentum.value));

PWGCF/FemtoDream/femtoDreamProducerReducedTask.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ struct femtoDreamProducerReducedTask {
259259
trackCuts.fillQA<aod::femtodreamparticle::ParticleType::kTrack, aod::femtodreamparticle::TrackType::kNoChild>(track);
260260
// an array of two bit-wise containers of the systematic variations is obtained
261261
// one container for the track quality cuts and one for the PID cuts
262-
auto cutContainer = trackCuts.getCutContainer<aod::femtodreamparticle::cutContainerType>(track);
262+
auto cutContainer = trackCuts.getCutContainer<aod::femtodreamparticle::cutContainerType>(track, track.pt(), track.eta(), sqrtf(powf(track.dcaXY(), 2.f) + powf(track.dcaZ(), 2.f)));
263263

264264
// now the table is filled
265265
outputParts(outputCollision.lastIndex(),

PWGCF/FemtoDream/femtoDreamProducerTask.cxx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ struct femtoDreamProducerTask {
390390
}
391391
trackCuts.fillQA<aod::femtodreamparticle::ParticleType::kTrack, aod::femtodreamparticle::TrackType::kNoChild>(track);
392392
// the bit-wise container of the systematic variations is obtained
393-
auto cutContainer = trackCuts.getCutContainer<aod::femtodreamparticle::cutContainerType>(track);
393+
auto cutContainer = trackCuts.getCutContainer<aod::femtodreamparticle::cutContainerType>(track, track.pt(), track.eta(), sqrtf(powf(track.dcaXY(), 2.f) + powf(track.dcaZ(), 2.f)));
394394

395395
// now the table is filled
396396
outputParts(outputCollision.lastIndex(),
@@ -442,12 +442,12 @@ struct femtoDreamProducerTask {
442442
rowInPrimaryTrackTablePos = getRowDaughters(postrackID, tmpIDtrack);
443443
childIDs[0] = rowInPrimaryTrackTablePos;
444444
childIDs[1] = 0;
445-
outputParts(outputCollision.lastIndex(), v0.positivept(),
446-
v0.positiveeta(), v0.positivephi(),
445+
outputParts(outputCollision.lastIndex(),
446+
v0.positivept(), v0.positiveeta(), v0.positivephi(),
447447
aod::femtodreamparticle::ParticleType::kV0Child,
448448
cutContainerV0.at(femtoDreamV0Selection::V0ContainerPosition::kPosCuts),
449449
cutContainerV0.at(femtoDreamV0Selection::V0ContainerPosition::kPosPID),
450-
0.,
450+
postrack.dcaXY(),
451451
childIDs,
452452
0,
453453
0);
@@ -467,7 +467,7 @@ struct femtoDreamProducerTask {
467467
aod::femtodreamparticle::ParticleType::kV0Child,
468468
cutContainerV0.at(femtoDreamV0Selection::V0ContainerPosition::kNegCuts),
469469
cutContainerV0.at(femtoDreamV0Selection::V0ContainerPosition::kNegPID),
470-
0.,
470+
negtrack.dcaXY(),
471471
childIDs,
472472
0,
473473
0);

0 commit comments

Comments
 (0)