Skip to content
Merged
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
52 changes: 45 additions & 7 deletions PWGLF/Tasks/Strangeness/hStrangeCorrelation.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@
Configurable<int> minITSClustersForDaughterTracks{"minITSClustersForDaughterTracks", 1, "Minimum number of ITS clusters for V0 daughter tracks"};
Configurable<bool> requireDCAzCut{"requireDCAzCut", false, "require DCAz cut for trigger and associated primary tracks"};
Configurable<bool> doITSChi2Selection{"doITSChi2Selection", false, "require ITS chi2 cut for trigger and associated primary tracks"};
Configurable<bool> checkForITSTPCMissmatchMC{"checkForITSTPCMissmatchMC", false, "if true, reject tracks with MC mask 13 (ITS-TPC mismatch) for trigger and associated primary tracks"};
Configurable<bool> checkForITSTPCMissmatchMC{"checkForITSTPCMissmatchMC", false, "if true, reject tracks with MC mask bit 13 (ITS-TPC mismatch) for trigger and associated primary tracks"};
// --- Trigger: DCA variation from basic formula: |DCAxy| < 0.004f + (0.013f / pt)
Configurable<float> dcaXYconstant{"dcaXYconstant", 0.004, "[0] in |DCAxy| < [0]+[1]/pT"};
Configurable<float> dcaXYpTdep{"dcaXYpTdep", 0.013, "[1] in |DCAxy| < [0]+[1]/pT"};
Expand Down Expand Up @@ -839,7 +839,7 @@
if (!isValidTrigger(trigg, triggerTrack.isLeading())) {
continue;
}
if (trackSelection.checkForITSTPCMissmatchMC && triggerTrack.mcMask() == 13) {
if (trackSelection.checkForITSTPCMissmatchMC && bitcheck(triggerTrack.mcMask(), 13)) {
continue;
}
float efficiencyTrigg = 1.0f;
Expand Down Expand Up @@ -1029,13 +1029,13 @@
((-massWindowConfigurations.maxBgNSigma < assocCandidate.invMassNSigma(Index) && assocCandidate.invMassNSigma(Index) < -massWindowConfigurations.minBgNSigma) ||
(-massWindowConfigurations.maxPeakNSigma < assocCandidate.invMassNSigma(Index) && assocCandidate.invMassNSigma(Index) < +massWindowConfigurations.maxPeakNSigma) ||
(+massWindowConfigurations.minBgNSigma < assocCandidate.invMassNSigma(Index) && assocCandidate.invMassNSigma(Index) < +massWindowConfigurations.maxBgNSigma))) {
if (std::abs(deltaphi) < 0.5) {

Check failure on line 1032 in PWGLF/Tasks/Strangeness/hStrangeCorrelation.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.
histos.fill(HIST("sameEvent/InvariantMass/") + HIST(V0names[Index]) + HIST("/hNearSide"), ptassoc, pttrigger, getV0InvariantMass<Index>(assoc));
}
if (std::abs(PI - deltaphi) < 0.5) {

Check failure on line 1035 in PWGLF/Tasks/Strangeness/hStrangeCorrelation.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.
histos.fill(HIST("sameEvent/InvariantMass/") + HIST(V0names[Index]) + HIST("/hAwaySide"), ptassoc, pttrigger, getV0InvariantMass<Index>(assoc));
}
if (deltaphi > 1.0 && deltaphi < 1.5) {

Check failure on line 1038 in PWGLF/Tasks/Strangeness/hStrangeCorrelation.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.
histos.fill(HIST("sameEvent/InvariantMass/") + HIST(V0names[Index]) + HIST("/hUnderlyingEvent"), ptassoc, pttrigger, getV0InvariantMass<Index>(assoc));
}
}
Expand Down Expand Up @@ -1140,9 +1140,9 @@
int binnumb = binMult * nBinsVtxZ + binVtxZ;
int hastirgorassoc = masterConfigurations.collisionHasTriggOrAssoc;
if ((hastirgorassoc == 1 && currentCollision.trigParticles.empty()) ||
(hastirgorassoc == 2 && currentCollision.assocParticles.empty()) ||

Check failure on line 1143 in PWGLF/Tasks/Strangeness/hStrangeCorrelation.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.
(hastirgorassoc == 3 && currentCollision.trigParticles.empty() && currentCollision.assocParticles.empty()) ||

Check failure on line 1144 in PWGLF/Tasks/Strangeness/hStrangeCorrelation.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.
(hastirgorassoc == 4 && (currentCollision.trigParticles.empty() || currentCollision.assocParticles.empty()))) {

Check failure on line 1145 in PWGLF/Tasks/Strangeness/hStrangeCorrelation.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;
}
for (const auto& collision : validCollisions[binnumb]) {
Expand Down Expand Up @@ -1179,7 +1179,7 @@
if (Index == assoc.type && assoc.region == 1) {
fillCorrelationHistogram(histos.get<THn>(HIST("mixedEvent/Signal/") + HIST(V0names[Index])), binFillThn, 1, efficiencyTrigg * efficiencyAssoc, totalEffUncert, 1., 0.);
}
if (Index == assoc.type && assoc.region == 2) {

Check failure on line 1182 in PWGLF/Tasks/Strangeness/hStrangeCorrelation.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.
fillCorrelationHistogram(histos.get<THn>(HIST("mixedEvent/RightBg/") + HIST(V0names[Index])), binFillThn, 1, efficiencyTrigg * efficiencyAssoc, totalEffUncert, 1., 0.);
}
});
Expand Down Expand Up @@ -1218,6 +1218,9 @@
if (!isValidTrigger(trigg, triggerTrack.isLeading())) {
continue;
}
if (trackSelection.checkForITSTPCMissmatchMC && bitcheck(triggerTrack.mcMask(), 13)) {
continue;
}

float efficiencyTrigg = 1.0f;
float efficiencyTriggError = 0.0f;
Expand Down Expand Up @@ -1475,9 +1478,9 @@
int binnumb = binMult * nBinsVtxZ + binVtxZ;
int hastirgorassoc = masterConfigurations.collisionHasTriggOrAssoc;
if ((hastirgorassoc == 1 && currentCollision.trigParticles.empty()) ||
(hastirgorassoc == 2 && currentCollision.assocParticles.empty()) ||

Check failure on line 1481 in PWGLF/Tasks/Strangeness/hStrangeCorrelation.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.
(hastirgorassoc == 3 && currentCollision.trigParticles.empty() && currentCollision.assocParticles.empty()) ||

Check failure on line 1482 in PWGLF/Tasks/Strangeness/hStrangeCorrelation.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.
(hastirgorassoc == 4 && (currentCollision.trigParticles.empty() || currentCollision.assocParticles.empty()))) {

Check failure on line 1483 in PWGLF/Tasks/Strangeness/hStrangeCorrelation.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;
}
for (const auto& collision : validCollisions[binnumb]) {
Expand Down Expand Up @@ -1535,6 +1538,9 @@
if (!isValidTrigger(trigg, triggerTrack.isLeading())) {
continue;
}
if (trackSelection.checkForITSTPCMissmatchMC && bitcheck(triggerTrack.mcMask(), 13)) {
continue;
}

float efficiencyTrigger = 1.0f;
float efficiencyTriggerError = 0.0f;
Expand Down Expand Up @@ -1599,6 +1605,9 @@
if (!isValidAssocHadron(assoc)) {
continue;
}
if (trackSelection.checkForITSTPCMissmatchMC && bitcheck(assocTrack.mcMask(), 13)) {
continue;
}
if (doAssocPhysicalPrimary && !assocTrack.mcPhysicalPrimary()) {
continue;
}
Expand Down Expand Up @@ -2411,6 +2420,9 @@
if (!isValidTrigger(track, triggerTrack.isLeading())) {
continue;
}
if (trackSelection.checkForITSTPCMissmatchMC && bitcheck(triggerTrack.mcMask(), 13)) {
continue;
}
auto binNumber = histos.get<TH1>(HIST("axes/hPtTriggerAxis"))->FindFixBin(track.pt()) - 1;
SETBIT(triggerPresenceMap[collision.globalIndex()], binNumber);
}
Expand Down Expand Up @@ -2455,6 +2467,9 @@
if (!isValidTrigger(track, triggerTrack.isLeading())) {
continue;
}
if (trackSelection.checkForITSTPCMissmatchMC && bitcheck(triggerTrack.mcMask(), 13)) {
continue;
}
histos.fill(HIST("hDCAzTriggerHadron"), track.dcaZ(), track.pt());
histos.fill(HIST("hDCAxyTriggerHadron"), track.dcaXY(), track.pt());
float efficiency = 1.0f;
Expand All @@ -2479,6 +2494,9 @@
if (!isValidAssocHadron(assoc)) {
continue;
}
if (trackSelection.checkForITSTPCMissmatchMC && bitcheck(assocTrack.mcMask(), 13)) {
continue;
}
float efficiency = 1.0f;
float purity = 1.0f;
histos.fill(HIST("hDCAzAssociatedHadron"), assoc.dcaZ(), assoc.pt());
Expand Down Expand Up @@ -2636,6 +2654,9 @@
if (!isValidTrigger(track, triggerTrack.isLeading())) {
continue;
}
if (trackSelection.checkForITSTPCMissmatchMC && bitcheck(triggerTrack.mcMask(), 13)) {
continue;
}
histos.fill(HIST("hTriggerAllSelectedEtaVsPt"), track.pt(), track.eta(), cent);
histos.fill(HIST("hTriggerPtResolution"), track.pt(), triggerTrack.mcOriginalPt());
if (masterConfigurations.doTriggPhysicalPrimary && !triggerTrack.mcPhysicalPrimary()) {
Expand Down Expand Up @@ -2791,6 +2812,9 @@
if (!isValidTrigger(track, triggerTrack.isLeading())) {
continue;
}
if (trackSelection.checkForITSTPCMissmatchMC && bitcheck(triggerTrack.mcMask(), 13)) {
continue;
}
histos.fill(HIST("hTriggerAllSelectedEtaVsPt"), track.pt(), track.eta(), cent);
histos.fill(HIST("hTriggerPtResolution"), track.pt(), triggerTrack.mcOriginalPt());
if (masterConfigurations.doTriggPhysicalPrimary && !triggerTrack.mcPhysicalPrimary()) {
Expand Down Expand Up @@ -2849,6 +2873,9 @@
if (!isValidAssocHadron(pionTrack)) {
continue;
}
if (trackSelection.checkForITSTPCMissmatchMC && bitcheck(pion.mcMask(), 13)) {
continue;
}

histos.fill(HIST("hPionEtaVsPtAllSelected"), pionTrack.pt(), pionTrack.eta(), collision.centFT0M());
if (doAssocPhysicalPrimary && !pion.mcPhysicalPrimary()) {
Expand All @@ -2870,6 +2897,9 @@
if (!isValidTrigger(track, triggerTrack.isLeading())) {
continue;
}
if (trackSelection.checkForITSTPCMissmatchMC && bitcheck(triggerTrack.mcMask(), 13)) {
continue;
}
histos.fill(HIST("hTriggerAllSelectedEtaVsPt"), track.pt(), track.eta(), collision.centFT0M());
histos.fill(HIST("hTriggerPtResolution"), track.pt(), triggerTrack.mcOriginalPt());
if (masterConfigurations.doTriggPhysicalPrimary && !triggerTrack.mcPhysicalPrimary()) {
Expand Down Expand Up @@ -3504,6 +3534,8 @@
double getatrigger = triggerParticle.eta();
double gphitrigger = triggerParticle.phi();
double pttrigger = triggerParticle.pt();
auto const* triggerPdg = pdgDB->GetParticle(triggerParticle.pdgCode());
const double triggerCharge = triggerPdg ? triggerPdg->Charge() : 0.;
auto const& mother = triggerParticle.mothers_first_as<aod::McParticles>();
auto globalIndex = mother.globalIndex();
static_for<0, 8>([&](auto i) { // associated loop
Expand Down Expand Up @@ -3531,12 +3563,18 @@
histos.fill(HIST("ClosureTest/sameEvent/") + HIST(Particlenames[Index]), computeDeltaPhi(gphitrigger, gphiassoc), deltaeta, ptassoc, pttrigger, bestCollisionVtxZ, bestCollisionCentpercentile);
}
if (i < 3 && TESTBIT(doCorrelation, i) && masterConfigurations.doCorrelationsHadronV0daughter) {
auto assocParticleDaugters = assocParticle.daughters_as<aod::McParticles>();
for (const auto& assocParticleDaugter : assocParticleDaugters) {
if (((assocParticleDaugter.pdgCode() == PDG_t::kPiPlus || assocParticleDaugter.pdgCode() == PDG_t::kProton) && (triggerParticle.pdgCode() > 0)) || ((assocParticleDaugter.pdgCode() == PDG_t::kPiMinus || assocParticleDaugter.pdgCode() == PDG_t::kProtonBar) && (triggerParticle.pdgCode() < 0))) {
histos.fill(HIST("ClosureTest/sameEvent/") + HIST(Particlenames[Index]) + HIST("_SameSignDaughter"), computeDeltaPhi(gphitrigger, assocParticleDaugter.phi()), getatrigger - assocParticleDaugter.eta(), assocParticleDaugter.pt(), pttrigger, bestCollisionVtxZ, bestCollisionCentpercentile);
auto const assocParticleDaughters = assocParticle.daughters_as<aod::McParticles>();
for (const auto& assocParticleDaughter : assocParticleDaughters) {
auto const* daughterPdg = pdgDB->GetParticle(assocParticleDaughter.pdgCode());
const double daughterCharge = daughterPdg ? daughterPdg->Charge() : 0.;
// Neutral daughters, including pi0, do not correspond to reconstructed V0 daughter tracks.
if (triggerCharge == 0. || daughterCharge == 0.) {
continue;
}
if (triggerCharge * daughterCharge > 0.) {
histos.fill(HIST("ClosureTest/sameEvent/") + HIST(Particlenames[Index]) + HIST("_SameSignDaughter"), computeDeltaPhi(gphitrigger, assocParticleDaughter.phi()), getatrigger - assocParticleDaughter.eta(), assocParticleDaughter.pt(), pttrigger, bestCollisionVtxZ, bestCollisionCentpercentile);
} else {
histos.fill(HIST("ClosureTest/sameEvent/") + HIST(Particlenames[Index]) + HIST("_OppSignDaughter"), computeDeltaPhi(gphitrigger, assocParticleDaugter.phi()), getatrigger - assocParticleDaugter.eta(), assocParticleDaugter.pt(), pttrigger, bestCollisionVtxZ, bestCollisionCentpercentile);
histos.fill(HIST("ClosureTest/sameEvent/") + HIST(Particlenames[Index]) + HIST("_OppSignDaughter"), computeDeltaPhi(gphitrigger, assocParticleDaughter.phi()), getatrigger - assocParticleDaughter.eta(), assocParticleDaughter.pt(), pttrigger, bestCollisionVtxZ, bestCollisionCentpercentile);
}
}
}
Expand Down
Loading