Skip to content

Commit 07b63f5

Browse files
authored
[PWGCF,PWGHF] FemtoDream: Fixes in the Cascade Selection and Seperation of Producer (#10128)
1 parent 1449ec4 commit 07b63f5

22 files changed

+1440
-412
lines changed

PWGCF/DataModel/FemtoDerived.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,14 @@ DECLARE_SOA_COLUMN(DecayVtxX, decayVtxX, float); //! X position of the decay
192192
DECLARE_SOA_COLUMN(DecayVtxY, decayVtxY, float); //! Y position of the decay vertex
193193
DECLARE_SOA_COLUMN(DecayVtxZ, decayVtxZ, float); //! Z position of the decay vertex
194194
DECLARE_SOA_COLUMN(MKaon, mKaon, float); //! The invariant mass of V0 candidate, assuming kaon
195+
// Here the cascade specific collums
196+
DECLARE_SOA_COLUMN(CascV0DCAtoPV, cascV0DCAtoPV, float); //! DCA of the daughter V0 to the primar vertex
197+
DECLARE_SOA_COLUMN(CascDaughDCA, cascDaughDCA, float); //! DCA between daughters
198+
DECLARE_SOA_COLUMN(CascTransRadius, cascTransRadius, float); //! Transverse radius of the decay vertex of the cascade
199+
DECLARE_SOA_COLUMN(CascDecayVtxX, cascDecayVtxX, float); //! X position of the decay vertex of the cascade
200+
DECLARE_SOA_COLUMN(CascDecayVtxY, cascDecayVtxY, float); //! Y position of the decay vertex of the cascade
201+
DECLARE_SOA_COLUMN(CascDecayVtxZ, cascDecayVtxZ, float); //! Z position of the decay vertex of the cascade
202+
DECLARE_SOA_COLUMN(MOmega, mOmega, float); //! The invariant mass of Cascade candidate, assuming Omega
195203
} // namespace femtodreamparticle
196204

197205
namespace fdhf
@@ -384,6 +392,13 @@ DECLARE_SOA_TABLE_STAGED(FDExtParticles, "FDEXTPARTICLE",
384392
femtodreamparticle::DecayVtxY,
385393
femtodreamparticle::DecayVtxZ,
386394
femtodreamparticle::MKaon,
395+
femtodreamparticle::CascV0DCAtoPV,
396+
femtodreamparticle::CascDaughDCA,
397+
femtodreamparticle::CascTransRadius,
398+
femtodreamparticle::CascDecayVtxX,
399+
femtodreamparticle::CascDecayVtxY,
400+
femtodreamparticle::CascDecayVtxZ,
401+
femtodreamparticle::MOmega,
387402
femtodreamparticle::TPCCrossedRowsOverFindableCls<track::TPCNClsFindable, femtodreamparticle::TPCNClsCrossedRows>)
388403
using FDFullParticle = FDExtParticles::iterator;
389404

PWGCF/FemtoDream/Core/femtoDreamCascadeSelection.h

Lines changed: 13 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,7 @@ enum CascadeSel {
5959
kCascadeV0TranRadMax,
6060
kCascadeV0DCAtoPVMin,
6161
kCascadeV0DCAtoPVMax
62-
63-
// kNcascadeSelection
64-
// kCascadeV0MassMin,
65-
// kCascadeV0MassMax
6662
};
67-
/*
68-
kCascadeDCAPosToPV,
69-
kCascadeDCANegToPV,
70-
kCascadeDCABachToPV,
71-
*/
7263

7364
enum ChildTrackType { kPosTrack,
7465
kNegTrack,
@@ -101,11 +92,6 @@ class FemtoDreamCascadeSelection
10192
nCascadeTranRadMin(0),
10293
nCascadeTranRadMax(0),
10394
nCascadeDecVtxMax(0),
104-
/*
105-
nCascadeDCAPosToPV(0),
106-
nCascadeDCANegToPV(0),
107-
nCascadeDCABachToPV(0),
108-
*/
10995
nCascadeV0DCADaughMax(0),
11096
nCascadeV0CPAMin(0),
11197
nCascadeV0TranRadMin(0),
@@ -121,11 +107,6 @@ class FemtoDreamCascadeSelection
121107
fCascadeTranRadMin(9999999),
122108
fCascadeTranRadMax(-9999999),
123109
fCascadeDecVtxMax(-9999999),
124-
/*
125-
fCascadeDCAPosToPV(9999999),
126-
fCascadeDCANegToPV(9999999),
127-
fCascadeDCABachToPV(9999999),
128-
*/
129110
fCascadeV0DCADaughMax(-9999999),
130111
fCascadeV0CPAMin(9999999),
131112
fCascadeV0TranRadMin(9999999),
@@ -141,7 +122,6 @@ class FemtoDreamCascadeSelection
141122
fInvMassCompetingLowLimit(1.5),
142123
fInvMassCompetingUpLimit(2.0),
143124
isCascOmega(false)
144-
/*,nSigmaPIDOffsetTPC(0.)*/
145125
{
146126
}
147127

@@ -174,7 +154,7 @@ class FemtoDreamCascadeSelection
174154
} else if (child == femtoDreamCascadeSelection::kNegTrack) {
175155
NegDaughTrack.setSelection(selVal, selVar, selType);
176156
} else if (child == femtoDreamCascadeSelection::kBachTrack) {
177-
BachDaugTrack.setSelection(selVal, selVar, selType);
157+
BachDaughTrack.setSelection(selVal, selVar, selType);
178158
}
179159
}
180160

@@ -187,7 +167,7 @@ class FemtoDreamCascadeSelection
187167
} else if (child == femtoDreamCascadeSelection::kNegTrack) {
188168
NegDaughTrack.setPIDSpecies(pids);
189169
} else if (child == femtoDreamCascadeSelection::kBachTrack) {
190-
BachDaugTrack.setPIDSpecies(pids);
170+
BachDaughTrack.setPIDSpecies(pids);
191171
}
192172
}
193173

@@ -315,7 +295,7 @@ class FemtoDreamCascadeSelection
315295

316296
FemtoDreamTrackSelection PosDaughTrack;
317297
FemtoDreamTrackSelection NegDaughTrack;
318-
FemtoDreamTrackSelection BachDaugTrack;
298+
FemtoDreamTrackSelection BachDaughTrack;
319299

320300
static constexpr int kNcascadeSelection = 16;
321301

@@ -431,9 +411,9 @@ void FemtoDreamCascadeSelection::init(HistogramRegistry* QAregistry, HistogramRe
431411
aod::femtodreamparticle::TrackType::kNegChild,
432412
aod::femtodreamparticle::cutContainerType>(mQAHistogramRegistry, mHistogramRegistry);
433413

434-
BachDaugTrack.init<aod::femtodreamparticle::ParticleType::kCascadeBachelor,
435-
aod::femtodreamparticle::TrackType::kBachelor,
436-
aod::femtodreamparticle::cutContainerType>(mQAHistogramRegistry, mHistogramRegistry);
414+
BachDaughTrack.init<aod::femtodreamparticle::ParticleType::kCascadeBachelor,
415+
aod::femtodreamparticle::TrackType::kBachelor,
416+
aod::femtodreamparticle::cutContainerType>(mQAHistogramRegistry, mHistogramRegistry);
437417
}
438418

439419
/// check whether the most open cuts are fulfilled - most of this should have
@@ -506,7 +486,6 @@ bool FemtoDreamCascadeSelection::isSelectedMinimal(Col const& col, Casc const& c
506486
const float invMass = isCascOmega ? cascade.mOmega() : cascade.mXi();
507487
// const float invMass = cascade.mXi();
508488

509-
// LOGF(info, "GG producer: Charge %i", cascade.sign());
510489
if (invMassLambda < fV0InvMassLowLimit || invMassLambda > fV0InvMassUpLimit) {
511490
return false;
512491
}
@@ -515,15 +494,13 @@ bool FemtoDreamCascadeSelection::isSelectedMinimal(Col const& col, Casc const& c
515494
return false;
516495
}
517496

518-
/*
519497
if (fRejectCompetingMass) {
520498
const float invMassCompeting = isCascOmega ? cascade.mXi() : cascade.mOmega();
521499
if (invMassCompeting > fInvMassCompetingLowLimit &&
522500
invMassCompeting < fInvMassCompetingUpLimit) {
523501
return false;
524502
}
525503
}
526-
*/
527504

528505
if (nCascadePtMin > 0 && cascade.pt() < fCascadePtMin) {
529506
return false;
@@ -579,7 +556,7 @@ bool FemtoDreamCascadeSelection::isSelectedMinimal(Col const& col, Casc const& c
579556
if (!NegDaughTrack.isSelectedMinimal(negTrack)) {
580557
return false;
581558
}
582-
if (!BachDaugTrack.isSelectedMinimal(bachTrack)) {
559+
if (!BachDaughTrack.isSelectedMinimal(bachTrack)) {
583560
return false;
584561
}
585562

@@ -589,10 +566,10 @@ bool FemtoDreamCascadeSelection::isSelectedMinimal(Col const& col, Casc const& c
589566
template <typename cutContainerType, typename Col, typename Casc, typename Track>
590567
std::array<cutContainerType, 8> FemtoDreamCascadeSelection::getCutContainer(Col const& col, Casc const& casc, Track const& posTrack, Track const& negTrack, Track const& bachTrack)
591568
{
592-
// Cut bit
593-
auto outputPosTrack = PosDaughTrack.getCutContainer<false, cutContainerType>(posTrack, casc.positivept(), casc.positiveeta(), casc.dcapostopv());
594-
auto outputNegTrack = NegDaughTrack.getCutContainer<false, cutContainerType>(negTrack, casc.negativept(), casc.negativeeta(), casc.dcanegtopv());
595-
auto outputBachTrack = BachDaugTrack.getCutContainer<false, cutContainerType>(bachTrack, casc.bachelorpt(), casc.bacheloreta(), casc.dcabachtopv());
569+
auto outputPosTrack = PosDaughTrack.getCutContainer<false, cutContainerType>(posTrack, posTrack.pt(), posTrack.eta(), posTrack.dcaXY());
570+
auto outputNegTrack = NegDaughTrack.getCutContainer<false, cutContainerType>(negTrack, negTrack.pt(), negTrack.eta(), negTrack.dcaXY());
571+
auto outputBachTrack = BachDaughTrack.getCutContainer<false, cutContainerType>(bachTrack, bachTrack.pt(), bachTrack.eta(), bachTrack.dcaXY());
572+
596573
cutContainerType output = 0;
597574
size_t counter = 0;
598575

@@ -608,7 +585,6 @@ std::array<cutContainerType, 8> FemtoDreamCascadeSelection::getCutContainer(Col
608585
const auto cpav0 = casc.v0cosPA(col.posX(), col.posY(), col.posZ());
609586
const auto v0dcatopv = casc.dcav0topv(col.posX(), col.posY(), col.posZ());
610587

611-
// LOGF(info, "GG producer: New dcatoPV: %f", dcav0topv);
612588
float observable = 0.;
613589
for (auto& sel : mSelections) {
614590

@@ -661,14 +637,12 @@ std::array<cutContainerType, 8> FemtoDreamCascadeSelection::getCutContainer(Col
661637
break;
662638
case (femtoDreamCascadeSelection::kCascadeV0DCAtoPVMin):
663639
observable = v0dcatopv;
664-
// LOGF(info, "==> Now it is: %f", dcav0topv);
665640
break;
666641
case (femtoDreamCascadeSelection::kCascadeV0DCAtoPVMax):
667642
observable = v0dcatopv;
668643
break;
669644
} // switch
670645
sel.checkSelectionSetBit(observable, output, counter, nullptr);
671-
//}
672646
} // for loop
673647

674648
return {
@@ -711,8 +685,8 @@ void FemtoDreamCascadeSelection::fillQA(Col const& col, Casc const& casc, Track
711685
aod::femtodreamparticle::TrackType::kPosChild, false, cutstage>(posTrack);
712686
NegDaughTrack.fillQA<aod::femtodreamparticle::ParticleType::kCascadeV0Child,
713687
aod::femtodreamparticle::TrackType::kNegChild, false, cutstage>(negTrack);
714-
BachDaugTrack.fillQA<aod::femtodreamparticle::ParticleType::kCascadeBachelor,
715-
aod::femtodreamparticle::TrackType::kBachelor, false, cutstage>(bachTrack);
688+
BachDaughTrack.fillQA<aod::femtodreamparticle::ParticleType::kCascadeBachelor,
689+
aod::femtodreamparticle::TrackType::kBachelor, false, cutstage>(bachTrack);
716690
}
717691
}
718692

PWGCF/FemtoDream/Core/femtoDreamCollisionSelection.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,21 @@ class FemtoDreamCollisionSelection
136136
return true;
137137
}
138138

139+
template <typename C, typename Casc, typename CascC, typename T>
140+
bool isCollisionWithoutTrkCasc(C const& col, Casc const& Cascades, CascC& CascadeCuts, T const& /*Tracks*/)
141+
{
142+
// check if there is no selected Cascade
143+
for (auto const& Cascade : Cascades) {
144+
auto postrack = Cascade.template posTrack_as<T>();
145+
auto negtrack = Cascade.template negTrack_as<T>();
146+
auto bachtrack = Cascade.template bachelor_as<T>();
147+
if (CascadeCuts.isSelectedMinimal(col, Cascade, postrack, negtrack, bachtrack)) {
148+
return false;
149+
}
150+
}
151+
return true;
152+
}
153+
139154
/// Some basic QA of the event
140155
/// \tparam T type of the collision
141156
/// \param col Collision

PWGCF/FemtoDream/Core/femtoDreamDetaDphiStar.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class FemtoDreamDetaDphiStar
6464
radiiTPC = radiiTPCtoCut;
6565
fillQA = fillTHSparse;
6666

67-
if constexpr (mPartOneType == o2::aod::femtodreamparticle::ParticleType::kTrack && (mPartTwoType == o2::aod::femtodreamparticle::ParticleType::kTrack || mPartTwoType == o2::aod::femtodreamparticle::ParticleType::kCascadeV0Child)) {
67+
if constexpr (mPartOneType == o2::aod::femtodreamparticle::ParticleType::kTrack && (mPartTwoType == o2::aod::femtodreamparticle::ParticleType::kTrack || mPartTwoType == o2::aod::femtodreamparticle::ParticleType::kCascadeV0Child || mPartTwoType == o2::aod::femtodreamparticle::ParticleType::kCascadeBachelor)) {
6868
std::string dirName = static_cast<std::string>(dirNames[0]);
6969
histdetadpi[0][0] = mHistogramRegistry->add<TH2>((dirName + static_cast<std::string>(histNames[0][0]) + static_cast<std::string>(histNameSEorME[meORse])).c_str(), "; #Delta #eta; #Delta #phi^{*}", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}});
7070
histdetadpi[0][1] = mHistogramRegistry->add<TH2>((dirName + static_cast<std::string>(histNames[1][0]) + static_cast<std::string>(histNameSEorME[meORse])).c_str(), "; #Delta #eta; #Delta #phi^{*}", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}});

PWGCF/FemtoDream/Core/femtoDreamMath.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,19 @@ class FemtoDreamMath
136136
{
137137
return std::sqrt(std::pow(getkT(part1, mass1, part2, mass2), 2.) + std::pow(0.5 * (mass1 + mass2), 2.));
138138
}
139+
140+
template <typename T1>
141+
static float getInvMassCascade(const T1& trackpos, const float masspos, const T1& trackneg, const float massneg, const T1& trackbach, const float massbach, const float massv0)
142+
{
143+
// calculate the invariant mass
144+
const ROOT::Math::PtEtaPhiMVector posDaug(trackpos.pt(), trackpos.eta(), trackpos.phi(), masspos);
145+
const ROOT::Math::PtEtaPhiMVector negDaug(trackneg.pt(), trackneg.eta(), trackneg.phi(), massneg);
146+
const ROOT::Math::PtEtaPhiMVector bachDaug(trackbach.pt(), trackbach.eta(), trackbach.phi(), massbach);
147+
const ROOT::Math::PxPyPzMVector v0(posDaug.Px() + negDaug.Px(), posDaug.Py() + negDaug.Py(), posDaug.Pz() + negDaug.Pz(), massv0);
148+
const ROOT::Math::PxPyPzMVector casc = v0 + bachDaug;
149+
150+
return casc.M();
151+
}
139152
};
140153

141154
} // namespace o2::analysis::femtoDream

0 commit comments

Comments
 (0)