Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions PWGLF/TableProducer/Resonances/doublephitable.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@
hProcessedEvents->Fill(2.5);
auto posThisColl = posTracks->sliceByCached(aod::track::collisionId, collision.globalIndex(), cache);
auto negThisColl = negTracks->sliceByCached(aod::track::collisionId, collision.globalIndex(), cache);
for (auto track1 : posThisColl) {

Check failure on line 266 in PWGLF/TableProducer/Resonances/doublephitable.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
// track selection
if (!selectionTrack(track1)) {
continue;
Expand All @@ -273,7 +273,7 @@
if (!selectionPID(track1)) {
continue;
}
if (!(itsResponse.nSigmaITS<o2::track::PID::Kaon>(track1) > -3.0 && itsResponse.nSigmaITS<o2::track::PID::Kaon>(track1) < 3.0)) {

Check failure on line 276 in PWGLF/TableProducer/Resonances/doublephitable.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
continue;
}
Npostrack = Npostrack + 1;
Expand All @@ -282,7 +282,7 @@
qaRegistry.fill(HIST("hNsigmaPtkaonTOF"), track1.tofNSigmaKa(), track1.pt());
}
auto track1ID = track1.globalIndex();
for (auto track2 : negThisColl) {

Check failure on line 285 in PWGLF/TableProducer/Resonances/doublephitable.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
auto track2ID = track2.globalIndex();
if (track2ID == track1ID) {
continue;
Expand All @@ -295,7 +295,7 @@
if (!selectionPID(track2)) {
continue;
}
if (!(itsResponse.nSigmaITS<o2::track::PID::Kaon>(track2) > -3.0 && itsResponse.nSigmaITS<o2::track::PID::Kaon>(track2) < 3.0)) {

Check failure on line 298 in PWGLF/TableProducer/Resonances/doublephitable.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
continue;
}
if (Npostrack == 1) {
Expand Down Expand Up @@ -443,7 +443,7 @@
bool selectionITSKaon(const T& candidate, float& nSigmaITS)
{
nSigmaITS = o2::aod::ITSResponse::nSigmaITS<o2::track::PID::Kaon>(candidate);
if (!(nSigmaITS > -3.0f && nSigmaITS < 3.0f)) {

Check failure on line 446 in PWGLF/TableProducer/Resonances/doublephitable.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
return false;
}

Expand Down Expand Up @@ -516,12 +516,12 @@
pair.vertexLxy = std::hypot(pair.deltaVtxX, pair.deltaVtxY);
pair.vertexL3D = std::sqrt(pair.deltaVtxX * pair.deltaVtxX + pair.deltaVtxY * pair.deltaVtxY + pair.deltaVtxZ * pair.deltaVtxZ);
float varLxy = 0.5f * (cxx + cyy);
if (pair.vertexLxy > 1.e-12f) {

Check failure on line 519 in PWGLF/TableProducer/Resonances/doublephitable.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
varLxy = (pair.deltaVtxX * pair.deltaVtxX * cxx + 2.f * pair.deltaVtxX * pair.deltaVtxY * cxy + pair.deltaVtxY * pair.deltaVtxY * cyy) / (pair.vertexLxy * pair.vertexLxy);
}

float varL3D = (cxx + cyy + czz) / 3.f;
if (pair.vertexL3D > 1.e-12f) {

Check failure on line 524 in PWGLF/TableProducer/Resonances/doublephitable.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
varL3D = (pair.deltaVtxX * pair.deltaVtxX * cxx + pair.deltaVtxY * pair.deltaVtxY * cyy + pair.deltaVtxZ * pair.deltaVtxZ * czz +
2.f * pair.deltaVtxX * pair.deltaVtxY * cxy + 2.f * pair.deltaVtxX * pair.deltaVtxZ * cxz + 2.f * pair.deltaVtxY * pair.deltaVtxZ * cyz) /
(pair.vertexL3D * pair.vertexL3D);
Expand All @@ -543,7 +543,7 @@
pair.maxDcaChi2 = -1.f;
pair.maxAbsDcaXYSig = -1.f;
pair.maxAbsDcaZSig = -1.f;
for (const auto* kaon : kaons) {

Check failure on line 546 in PWGLF/TableProducer/Resonances/doublephitable.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
if (std::isfinite(kaon->dcaXYSig) && kaon->dcaXYSig > -900.f) {
pair.sumDcaXYSig2 += kaon->dcaXYSig * kaon->dcaXYSig;
pair.maxAbsDcaXYSig = std::max(pair.maxAbsDcaXYSig, std::abs(kaon->dcaXYSig));
Expand Down Expand Up @@ -599,7 +599,7 @@
selectedNeg.reserve(negThisColl.size());
selectedPosITS.reserve(posThisColl.size());
selectedNegITS.reserve(negThisColl.size());
for (auto track : posThisColl) {

Check failure on line 602 in PWGLF/TableProducer/Resonances/doublephitable.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
if (!selectionTrack(track)) {
continue;
}
Expand All @@ -621,7 +621,7 @@
}
}

for (auto track : negThisColl) {

Check failure on line 624 in PWGLF/TableProducer/Resonances/doublephitable.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
if (!selectionTrack(track)) {
continue;
}
Expand Down Expand Up @@ -720,6 +720,12 @@
const auto phi2Fit = k3Fit + k4Fit;
const auto pairFit = phi1Fit + phi2Fit;

if (pairFit.Pt() < 6.0) {
continue;
}
if (pairFit.M() < 2.5 || pairFit.M() > 3.2) {
continue;
}
// No pair-pT or pair-mass cut here.

PhiPhiPairPayload pair;
Expand Down
43 changes: 19 additions & 24 deletions PWGLF/Tasks/Resonances/doublephimeson.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,14 @@ struct doublephimeson {
Configurable<bool> additionalEvsel{"additionalEvsel", true, "Additional event selection"};
Configurable<bool> isDeep{"isDeep", true, "Store deep angle"};
Configurable<float> cutMinNsigmaTPC{"cutMinNsigmaTPC", -2.5, "nsigma cut TPC"};
Configurable<float> cutNsigmaTPC{"cutNsigmaTPC", 3.0, "nsigma cut TPC"};
Configurable<float> cutNsigmaTOF{"cutNsigmaTOF", 3.0, "nsigma cut TOF"};
Configurable<float> cutNsigmaTPC{"cutNsigmaTPC", 2.5, "nsigma cut TPC"};
Configurable<float> cutNsigmaTOF{"cutNsigmaTOF", 2.5, "nsigma cut TOF"};
Configurable<float> momTOFCut{"momTOFCut", 1.8, "minimum pT cut for madnatory TOF"};
Configurable<float> maxKaonPt{"maxKaonPt", 100.0, "maximum kaon pt cut"};
Configurable<float> cfgCrossPhiLow{"cfgCrossPhiLow", 1.01, "Lower edge of phi mass window for cross-pairing (ghost) veto"};
Configurable<float> cfgCrossPhiHigh{"cfgCrossPhiHigh", 1.03, "Upper edge of phi mass window for cross-pairing (ghost) veto"};
Configurable<bool> useParametrized{"useParametrized", false, "Use pT dependent mass peak and width"};
Configurable<bool> useCrossPairRejection{"useCrossPairRejection", true, "Use cross pair phi signal compatibilaty"};
// ------------------------------------------------------------
// pT-dependent phi mass peak and width from single-phi BW fits
//
Expand Down Expand Up @@ -337,17 +338,17 @@ struct doublephimeson {
}

if (PIDStrategy == 1003) {
if (ptcand < 0.5 && TOFHit != 1 && nsigmaTPC > -2.0 && nsigmaTPC < 2.0) {
if (ptcand < 0.5 && TOFHit != 1 && std::abs(nsigmaTPC) < cutNsigmaTPC) {
return true;
}
if (ptcand < 0.5 && TOFHit == 1 && std::sqrt(nsigmaTOF * nsigmaTOF + nsigmaTPC * nsigmaTPC) < 2.5) {
if (ptcand < 0.5 && TOFHit == 1 && std::sqrt(nsigmaTOF * nsigmaTOF + nsigmaTPC * nsigmaTPC) < cutNsigmaTPC) {
return true;
}
if (ptcand >= 0.5) {
if (TOFHit != 1 && nsigmaTPC > -2.0 && nsigmaTPC < 2.0) {
if (TOFHit != 1 && nsigmaTPC > -2.0 && nsigmaTPC < cutNsigmaTPC) {
return true;
}
if (TOFHit == 1 && std::sqrt(nsigmaTOF * nsigmaTOF + nsigmaTPC * nsigmaTPC) < 2.5) {
if (TOFHit == 1 && std::sqrt(nsigmaTOF * nsigmaTOF + nsigmaTPC * nsigmaTPC) < cutNsigmaTOF) {
return true;
}
}
Expand Down Expand Up @@ -1695,7 +1696,6 @@ struct doublephimeson {
if (id2 <= id1) {
continue;
}

const double kplus2pt = std::hypot(t2.phid1Px(), t2.phid1Py());
const double kminus2pt = std::hypot(t2.phid2Px(), t2.phid2Py());

Expand Down Expand Up @@ -1736,25 +1736,20 @@ struct doublephimeson {
t1.phid1Index() == t2.phid2Index() ||
t1.phid2Index() == t2.phid1Index() ||
t1.phid2Index() == t2.phid2Index()) {
// LOGF(info,"track share",t1.phid1Index(),t1.phid2Index(),t2.phid1Index(),t2.phid2Index());
LOGF(info, "track share %d %d %d %d", t1.phid1Index(), t1.phid2Index(), t2.phid1Index(), t2.phid2Index());
continue;
}
const double mCross12 = (k1p + k2m).M(); // K+ from phi1 + K- from phi2
const double mCross21 = (k2p + k1m).M(); // K+ from phi2 + K- from phi1

const bool cross12IsPhiLike = (mCross12 > cfgCrossPhiLow && mCross12 < cfgCrossPhiHigh);
const bool cross21IsPhiLike = (mCross21 > cfgCrossPhiLow && mCross21 < cfgCrossPhiHigh);

if (cross12IsPhiLike || cross21IsPhiLike) {
LOGF(info,
"Best-pairing rejected: mPhi1 = %3.4f, mPhi2 = %3.4f, mCross12 = %3.4f, mCross21 = %3.4f",
phi1.M(),
phi2.M(),
mCross12,
mCross21,
pair.Pt(),
pair.M());
continue;
auto cross12 = k1p + k2m;
auto cross21 = k2p + k1m;
bool alternativePairValid = cross12.M() > cfgCrossPhiLow && cross12.M() < cfgCrossPhiHigh && cross21.M() > cfgCrossPhiLow && cross21.M() < cfgCrossPhiHigh;
if (alternativePairValid) {
float scoreOriginal = deltaMPhiNominal(phi1.M(), phi2.M());
float scoreCross = deltaMPhiNominal(cross12.M(), cross21.M());
if (useCrossPairRejection && (scoreCross < scoreOriginal)) {
LOGF(info, "Best-pairing rejected: original score = %3.4f, cross scoremPhi2 = %3.4f", scoreOriginal, scoreCross);
continue; // another pairing of these four tracks is better
}
}
histos.fill(HIST("hPhiMass"), phi1.M(), phi2.M(), pair.Pt());
histos.fill(HIST("hPhiMassNormalized"), getNormalizedMPhi(phi1.M(), phi1.Pt()), getNormalizedMPhi(phi2.M(), phi2.Pt()), pair.Pt());
Expand Down Expand Up @@ -1808,7 +1803,7 @@ struct doublephimeson {
}
if (pairPt > minExoticPt) {
histos.fill(HIST("hPtCorrelation"), pairPt, ptcorr);
histos.fill(HIST("hMassCent"), p1.M(), p2.M(), collision.centrality());
// histos.fill(HIST("hMassCent"), p1.M(), p2.M(), collision.centrality());
histos.fill(HIST("SEMassUnlike_AllVars"),
M,
pairPt,
Expand Down
Loading
Loading