Skip to content

Commit 4e741fa

Browse files
authored
Adding possibilty to study D0 reflections. (#4666)
Co-authored-by: Andrea <andrea.rossicern.ch>
1 parent c8f6b85 commit 4e741fa

File tree

1 file changed

+89
-11
lines changed

1 file changed

+89
-11
lines changed

DPG/Tasks/AOTTrack/tagAndProbeDmesons.cxx

Lines changed: 89 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ enum TagChannels : uint8_t {
4242
DsOrDplusToKKPi,
4343
DstarPlusToDzeroPi,
4444
DstarMinusToDzeroBarPi,
45+
DstarToDzeroToKK,
4546
NTagChannels
4647
};
4748

@@ -123,6 +124,7 @@ struct TagTwoProngDisplacedVertices {
123124
SliceCache cache;
124125

125126
Configurable<bool> applyTofPid{"applyTofPid", true, "flag to enable TOF PID selection"};
127+
Configurable<bool> studyDzeroReflections{"studyDzeroReflections", false, "flag to study Dzero reflections"};
126128
Configurable<float> trackNumSigmaTof{"trackNumSigmaTof", 3.f, "number of sigma for TOF PID compatibility"};
127129
Configurable<float> trackNumSigmaTpc{"trackNumSigmaTpc", 3.f, "number of sigma for TOF PID compatibility"};
128130
Configurable<float> trackDcaXyMin{"trackDcaXyMin", 0.002f, "minimum DCAxy for tracks with pT < 2 GeV/c"};
@@ -131,10 +133,12 @@ struct TagTwoProngDisplacedVertices {
131133
Configurable<std::vector<float>> binsPtPiPiFromDplus{"binsPtPiPiFromDplus", std::vector<float>{aod::tagandprobe::vecBinsPt}, "pT bin limits for pipi pairs from D+ decays"};
132134
Configurable<std::vector<float>> binsKaKaFromDsOrDplus{"binsKaKaFromDsOrDplus", std::vector<float>{aod::tagandprobe::vecBinsPt}, "pT bin limits for KK pairs from Ds or D+ decays"};
133135
Configurable<std::vector<float>> binsPtDzeroFromDstar{"binsPtDzeroFromDstar", std::vector<float>{aod::tagandprobe::vecBinsPt}, "pT bin limits for Kpi pairs from D0 <- D*+ decays"};
136+
Configurable<std::vector<float>> binsPtDzeroKaKaFromDstar{"binsPtDzeroKaKaFromDstar", std::vector<float>{aod::tagandprobe::vecBinsPt}, "pT bin limits for KK pairs from D0 <- D*+ decays"};
134137

135138
Configurable<LabeledArray<float>> cutsPiPiFromDplus{"cutsPiPiFromDplus", {aod::tagandprobe::cuts[0], aod::tagandprobe::nBinsPt, aod::tagandprobe::nCutVars, aod::tagandprobe::labelsPt, aod::tagandprobe::labelsCutVar}, "Selections for pipi pairs from D+ decays"};
136139
Configurable<LabeledArray<float>> cutsKaKaFromDsOrDplus{"cutsKaKaFromDsOrDplus", {aod::tagandprobe::cuts[0], aod::tagandprobe::nBinsPt, aod::tagandprobe::nCutVars, aod::tagandprobe::labelsPt, aod::tagandprobe::labelsCutVar}, "Selections for KK pairs from Ds or D+ decays"};
137140
Configurable<LabeledArray<float>> cutsDzeroFromDstar{"cutsDzeroFromDstar", {aod::tagandprobe::cutsDzero[0], aod::tagandprobe::nBinsPt, aod::tagandprobe::nCutVarsDzero, aod::tagandprobe::labelsPt, aod::tagandprobe::labelsCutVarDzero}, "Selections for Kpi pairs from D0 <- D*+ decays"};
141+
Configurable<LabeledArray<float>> cutsDzeroKaKaFromDstar{"cutsDzeroKaKaFromDstar", {aod::tagandprobe::cutsDzero[0], aod::tagandprobe::nBinsPt, aod::tagandprobe::nCutVarsDzero, aod::tagandprobe::labelsPt, aod::tagandprobe::labelsCutVarDzero}, "Selections for Kpi pairs from D0 <- D*+ decays"};
138142

139143
using TracksWithSelAndDca = soa::Join<aod::Tracks, aod::TracksCov, aod::TracksDCA, aod::TracksExtra, aod::TrackSelection, aod::pidTPCFullPi, aod::pidTOFFullPi, aod::pidTPCFullKa, aod::pidTOFFullKa>;
140144
using CollisionsWithEvSel = soa::Join<aod::Collisions, aod::EvSels>;
@@ -160,7 +164,8 @@ struct TagTwoProngDisplacedVertices {
160164
std::array<std::array<double, 2>, aod::tagandprobe::TagChannels::NTagChannels> masses = {std::array{constants::physics::MassPionCharged, constants::physics::MassPionCharged},
161165
std::array{constants::physics::MassKaonCharged, constants::physics::MassKaonCharged},
162166
std::array{constants::physics::MassPionCharged, constants::physics::MassKaonCharged},
163-
std::array{constants::physics::MassKaonCharged, constants::physics::MassPionCharged}};
167+
std::array{constants::physics::MassKaonCharged, constants::physics::MassPionCharged},
168+
std::array{constants::physics::MassKaonCharged, constants::physics::MassKaonCharged}};
164169

165170
std::array<LabeledArray<float>, aod::tagandprobe::TagChannels::NTagChannels> topologicalCuts{};
166171
std::array<std::vector<float>, aod::tagandprobe::TagChannels::NTagChannels> ptBinsForTopologicalCuts{};
@@ -184,11 +189,12 @@ struct TagTwoProngDisplacedVertices {
184189
vertexer.setMinRelChi2Change(0.9f);
185190
vertexer.setUseAbsDCA(false);
186191

187-
topologicalCuts = {cutsPiPiFromDplus, cutsKaKaFromDsOrDplus, cutsDzeroFromDstar, cutsDzeroFromDstar};
188-
ptBinsForTopologicalCuts = {binsPtPiPiFromDplus, binsKaKaFromDsOrDplus, binsPtDzeroFromDstar, binsPtDzeroFromDstar};
192+
topologicalCuts = {cutsPiPiFromDplus, cutsKaKaFromDsOrDplus, cutsDzeroFromDstar, cutsDzeroFromDstar, cutsDzeroKaKaFromDstar};
193+
ptBinsForTopologicalCuts = {binsPtPiPiFromDplus, binsKaKaFromDsOrDplus, binsPtDzeroFromDstar, binsPtDzeroFromDstar, binsPtDzeroKaKaFromDstar};
189194

190195
const AxisSpec axisPt{250, 0.f, 50.f};
191196
const AxisSpec axisMassPiPi{250, 0.f, 2.5f};
197+
const AxisSpec axisReflFlag{3, 0.5f, 3.5f};
192198
const AxisSpec axisMassKaKa{200, constants::physics::MassPhi - 0.05f, constants::physics::MassPhi + 0.05f};
193199
const AxisSpec axisMassKaPi{400, constants::physics::MassD0 - 0.2f, constants::physics::MassD0 + 0.2f};
194200

@@ -199,7 +205,14 @@ struct TagTwoProngDisplacedVertices {
199205
registry.add<TH2>("hMassKaKaVsPt", ";#it{p}_{T}(KK) (GeV/#it{c}); #it{M}(KK) (GeV/#it{c}^{2})", HistType::kTH2D, {axisPt, axisMassKaKa});
200206
}
201207
if (doprocessKaPiFromDstar) {
202-
registry.add<TH2>("hMassKaPiVsPt", ";#it{p}_{T}(K#pi) (GeV/#it{c}); #it{M}(K#pi) (GeV/#it{c}^{2})", HistType::kTH2D, {axisPt, axisMassKaPi});
208+
if (!studyDzeroReflections) {
209+
registry.add<TH2>("hMassKaPiVsPt", ";#it{p}_{T}(K#pi) (GeV/#it{c}); #it{M}(K#pi) (GeV/#it{c}^{2})", HistType::kTH2D, {axisPt, axisMassKaPi});
210+
} else {
211+
registry.add<THn>("hMassKaPiVsPt", ";#it{p}_{T}(K#pi) (GeV/#it{c}); #it{M}(K#pi) (GeV/#it{c}^{2}); #it{M}(#piK) (GeV/#it{c}^{2}); ReflFag", HistType::kTHnF, {axisPt, axisMassKaPi, axisMassKaPi, axisReflFlag});
212+
}
213+
}
214+
if (doprocessKaKaFromDzero) {
215+
registry.add<TH2>("hMassDzeroKaKaVsPt", ";#it{p}_{T}(K#pi) (GeV/#it{c}); #it{M}(K#pi) (GeV/#it{c}^{2})", HistType::kTH2D, {axisPt, axisMassKaPi});
203216
}
204217
}
205218

@@ -270,6 +283,11 @@ struct TagTwoProngDisplacedVertices {
270283
return true;
271284
}
272285
}
286+
case aod::tagandprobe::TagChannels::DstarToDzeroToKK: {
287+
if (std::abs(track.tofNSigmaKa()) < trackNumSigmaTof) {
288+
return true;
289+
}
290+
}
273291
}
274292
return false;
275293
}
@@ -314,7 +332,7 @@ struct TagTwoProngDisplacedVertices {
314332
}
315333

316334
// only for D0 meson
317-
if (channel == aod::tagandprobe::TagChannels::DstarPlusToDzeroPi || channel == aod::tagandprobe::TagChannels::DstarMinusToDzeroBarPi) {
335+
if (channel == aod::tagandprobe::TagChannels::DstarPlusToDzeroPi || channel == aod::tagandprobe::TagChannels::DstarMinusToDzeroBarPi || channel == aod::tagandprobe::TagChannels::DstarToDzeroToKK) {
318336
if (trackDcaXy[0] * trackDcaXy[1] > topologicalCuts[channel].get(ptBin, 6u)) {
319337
return false;
320338
}
@@ -439,11 +457,47 @@ struct TagTwoProngDisplacedVertices {
439457
registry.fill(HIST("hMassKaKaVsPt"), RecoDecay::pt(pVec), std::sqrt(invMass2));
440458
tagKaKaTable(trackPos.collisionId(), trackPos.globalIndex(), trackNeg.globalIndex());
441459
} else if (channel == aod::tagandprobe::TagChannels::DstarPlusToDzeroPi) {
442-
registry.fill(HIST("hMassKaPiVsPt"), RecoDecay::pt(pVec), std::sqrt(invMass2));
460+
if (!studyDzeroReflections) {
461+
registry.fill(HIST("hMassKaPiVsPt"), RecoDecay::pt(pVec), std::sqrt(invMass2));
462+
} else {
463+
float invMassrefl{0.f};
464+
int isDzero = 1;
465+
if (std::abs(trackPos.tpcNSigmaKa()) < trackNumSigmaTpc && (std::abs(trackNeg.tpcNSigmaPi()) < trackNumSigmaTpc)) {
466+
isDzero = 3;
467+
if (applyTofPid) {
468+
if (!isSelectedPidTof(trackNeg, aod::tagandprobe::TagChannels::DstarMinusToDzeroBarPi) || !isSelectedPidTof(trackPos, aod::tagandprobe::TagChannels::DstarMinusToDzeroBarPi))
469+
isDzero = 1;
470+
}
471+
}
472+
if (isDzero == 3) {
473+
auto arrMomentum = std::array{pVecTrackNeg, pVecTrackPos};
474+
invMassrefl = std::sqrt(RecoDecay::m2(arrMomentum, masses[channel]));
475+
}
476+
registry.fill(HIST("hMassKaPiVsPt"), RecoDecay::pt(pVec), std::sqrt(invMass2), invMassrefl, isDzero);
477+
}
443478
tagPiKaTable(trackPos.collisionId(), trackPos.globalIndex(), trackNeg.globalIndex());
444479
} else if (channel == aod::tagandprobe::TagChannels::DstarMinusToDzeroBarPi) {
445-
registry.fill(HIST("hMassKaPiVsPt"), RecoDecay::pt(pVec), std::sqrt(invMass2));
480+
if (!studyDzeroReflections) {
481+
registry.fill(HIST("hMassKaPiVsPt"), RecoDecay::pt(pVec), std::sqrt(invMass2));
482+
} else {
483+
float invMassrefl{0.f};
484+
int isDzero = 2;
485+
if (std::abs(trackNeg.tpcNSigmaKa()) < trackNumSigmaTpc && (std::abs(trackPos.tpcNSigmaPi()) < trackNumSigmaTpc)) {
486+
isDzero = 3;
487+
if (applyTofPid) {
488+
if (!isSelectedPidTof(trackNeg, aod::tagandprobe::TagChannels::DstarPlusToDzeroPi) || !isSelectedPidTof(trackPos, aod::tagandprobe::TagChannels::DstarPlusToDzeroPi))
489+
isDzero = 2;
490+
}
491+
}
492+
if (isDzero == 3) {
493+
auto arrMomentum = std::array{pVecTrackNeg, pVecTrackPos};
494+
invMassrefl = std::sqrt(RecoDecay::m2(arrMomentum, masses[channel]));
495+
}
496+
registry.fill(HIST("hMassKaPiVsPt"), RecoDecay::pt(pVec), std::sqrt(invMass2), invMassrefl, isDzero);
497+
}
446498
tagKaPiTable(trackPos.collisionId(), trackPos.globalIndex(), trackNeg.globalIndex());
499+
} else if (channel == aod::tagandprobe::TagChannels::DstarToDzeroToKK) {
500+
registry.fill(HIST("hMassDzeroKaKaVsPt"), RecoDecay::pt(pVec), std::sqrt(invMass2));
447501
}
448502
}
449503
}
@@ -497,6 +551,29 @@ struct TagTwoProngDisplacedVertices {
497551
}
498552
PROCESS_SWITCH(TagTwoProngDisplacedVertices, processKaKaFromDsOrDplus, "Process KK combinatorial to tag kaon pairs from Ds+/D+ decays", false);
499553

554+
void processKaKaFromDzero(CollisionsFiltered::iterator const& collision,
555+
TracksWithSelAndDcaFiltered const& tracks,
556+
aod::BCsWithTimestamps const&)
557+
{
558+
auto bc = collision.bc_as<aod::BCsWithTimestamps>();
559+
float bz{0};
560+
if (runNumber != bc.runNumber()) {
561+
parameters::GRPMagField* grpo = ccdb->getForTimeStamp<parameters::GRPMagField>("GLO/Config/GRPMagField", bc.timestamp());
562+
if (grpo != nullptr) {
563+
base::Propagator::initFieldFromGRP(grpo);
564+
bz = base::Propagator::Instance()->getNominalBz();
565+
} else {
566+
LOGF(fatal, "GRP object is not available in CCDB for run=%d at timestamp=%llu", bc.runNumber(), bc.timestamp());
567+
}
568+
runNumber = bc.runNumber();
569+
}
570+
571+
auto groupPositive = positiveKaons->sliceByCached(aod::track::collisionId, collision.globalIndex(), cache);
572+
auto groupNegative = negativeKaons->sliceByCached(aod::track::collisionId, collision.globalIndex(), cache);
573+
computeCombinatorialOppositeCharge(collision, groupPositive, groupNegative, aod::tagandprobe::TagChannels::DstarToDzeroToKK, bz);
574+
}
575+
PROCESS_SWITCH(TagTwoProngDisplacedVertices, processKaKaFromDzero, "Process KK combinatorial to tag kaon pairs from Dzero decays", false);
576+
500577
void processKaPiFromDstar(CollisionsFiltered::iterator const& collision,
501578
TracksWithSelAndDcaFiltered const& tracks,
502579
aod::BCsWithTimestamps const&)
@@ -538,7 +615,8 @@ struct ProbeThirdTrack {
538615
std::array<std::array<double, 3>, aod::tagandprobe::TagChannels::NTagChannels> masses = {std::array{constants::physics::MassPionCharged, constants::physics::MassPionCharged, constants::physics::MassKaonCharged},
539616
std::array{constants::physics::MassKaonCharged, constants::physics::MassKaonCharged, constants::physics::MassPionCharged},
540617
std::array{constants::physics::MassPionCharged, constants::physics::MassKaonCharged, constants::physics::MassPionCharged},
541-
std::array{constants::physics::MassKaonCharged, constants::physics::MassPionCharged, constants::physics::MassPionCharged}};
618+
std::array{constants::physics::MassKaonCharged, constants::physics::MassPionCharged, constants::physics::MassPionCharged},
619+
std::array{constants::physics::MassKaonCharged, constants::physics::MassKaonCharged, constants::physics::MassPionCharged}};
542620

543621
std::array<TrackSelection, aod::tagandprobe::TrackTypes::NTrackTypes> trackSelector{}; // define the track selectors
544622

@@ -594,11 +672,11 @@ struct ProbeThirdTrack {
594672
const AxisSpec axisNumCrossRowTpc{51, 49.5f, 100.5f};
595673
const AxisSpec axisTpcChi2PerClus{8, 2.f, 10.f};
596674
const AxisSpec axisNumCluIts{5, 2.5f, 7.5f};
597-
std::array<AxisSpec, aod::tagandprobe::TagChannels::NTagChannels> axisMass = {AxisSpec{225, 1.65f, 2.10f}, AxisSpec{225, 1.65f, 2.10f}, AxisSpec{350, 0.135f, 0.17f}, AxisSpec{350, 0.135f, 0.17f}};
598-
std::array<AxisSpec, aod::tagandprobe::TagChannels::NTagChannels> axisMassTag = {AxisSpec{125, 0.f, 2.5f}, AxisSpec{100, constants::physics::MassPhi - 0.05f, constants::physics::MassPhi + 0.05f}, AxisSpec{200, constants::physics::MassD0 - 0.2f, constants::physics::MassD0 + 0.2f}, AxisSpec{200, constants::physics::MassD0 - 0.2f, constants::physics::MassD0 + 0.2f}};
675+
std::array<AxisSpec, aod::tagandprobe::TagChannels::NTagChannels> axisMass = {AxisSpec{225, 1.65f, 2.10f}, AxisSpec{225, 1.65f, 2.10f}, AxisSpec{350, 0.135f, 0.17f}, AxisSpec{350, 0.135f, 0.17f}, AxisSpec{350, 0.135f, 0.17f}};
676+
std::array<AxisSpec, aod::tagandprobe::TagChannels::NTagChannels> axisMassTag = {AxisSpec{125, 0.f, 2.5f}, AxisSpec{100, constants::physics::MassPhi - 0.05f, constants::physics::MassPhi + 0.05f}, AxisSpec{200, constants::physics::MassD0 - 0.2f, constants::physics::MassD0 + 0.2f}, AxisSpec{200, constants::physics::MassD0 - 0.2f, constants::physics::MassD0 + 0.2f}, AxisSpec{200, constants::physics::MassD0 - 0.2f, constants::physics::MassD0 + 0.2f}};
599677

600678
std::string trackTypes[aod::tagandprobe::TrackTypes::NTrackTypes] = {"ItsTpc", "ItsTpcNoIb", "Tpc", "Its"};
601-
std::string tagChannels[aod::tagandprobe::TagChannels::NTagChannels] = {"DplusToKPiPi", "DsOrDplusToKKPi", "DstarPlusToDzeroPi", "DstarMinusToDzeroBarPi"};
679+
std::string tagChannels[aod::tagandprobe::TagChannels::NTagChannels] = {"DplusToKPiPi", "DsOrDplusToKKPi", "DstarPlusToDzeroPi", "DstarMinusToDzeroBarPi", "DstarChargedToDzeroToKK"};
602680

603681
for (int iChannel{0}; iChannel < aod::tagandprobe::TagChannels::NTagChannels; ++iChannel) {
604682
for (int iTrackType{0}; iTrackType < aod::tagandprobe::TrackTypes::NTrackTypes; ++iTrackType) {

0 commit comments

Comments
 (0)